diff --git a/arlo.go b/arlo.go index a079352..5b39abc 100644 --- a/arlo.go +++ b/arlo.go @@ -234,10 +234,16 @@ func (a *Arlo) IsConnected() bool { } func (a *Arlo) Subscribe(ctx context.Context) error { + lastid := "" + if a.eventStream != nil { + lastid = a.eventStream.GetLastId() + } + a.eventStream = newEventStream( BaseUrl+fmt.Sprintf(NotifyResponsesPushServiceUri), &http.Client{Jar: a.client.GetClient().Jar}, a.client.Header.Get("Authorization"), + lastid, ) err := a.eventStream.listen(ctx)