jeroenterheerdt / ring-hassio

A Home Assistant add-on for live streaming from Ring devices.
MIT License
131 stars 93 forks source link

+-10 second delay on livestream #21

Open jhooyberghs opened 3 years ago

jhooyberghs commented 3 years ago

Hey @jeroenterheerdt , thanks for the great work on the plugin. I'm currently trying it out with my ring doorbell 2 and it all seems to work, except that I always have a delay of +-10 seconds when viewing.

Steps tried:

  1. I start the plugin
  2. I open up home assistant with the camera feed (tried with VLC too, same effect)
  3. I walk to my door, and all video has this 10s delay

When I watch the live feed with the official ring app, I don't have any delay (< 1s).

Do you experience the same?

jeroenterheerdt commented 3 years ago

hmm, I have not seen this same problem no. It is slower, yes, but 10 seconds, no. Maybe ask if someone over at https://github.com/dgreif/ring has been same experience?

mspace00 commented 3 years ago

I can confirm the same delay, using VLC or Home Assistant.

johanvh83 commented 3 years ago

Any solution for this issue? Have also a delay for apporx 6 seconds

schergr commented 3 years ago

Any solution for this issue? Have also a delay for apporx 6 seconds

Same issue...lags behind about 10 - 15 seconds.

schergr commented 3 years ago

hmm, I have not seen this same problem no. It is slower, yes, but 10 seconds, no. Maybe ask if someone over at https://github.com/dgreif/ring has been same experience?

Since you wrapped around dgreif, are you storing the refresh token as part of your implementation?

Refresh Token Expiration Ring has updated their refresh tokens so that they expire within a couple minutes of when they are used for the first time. This means that you basically only get to use a refresh token once, and need to keep the new refresh token that comes with the response.

For libraries that use ring-client-api, you can subscribe to api.onRefreshTokenUpdated to get the new refresh token each time a new one is created. This new refresh token should be stored wherever your library stores its configuration. See here for an example. If you are a user of homebridge-ring, this is done automatically for you, and your config.json will always be up-to-date with the last available refresh token.

CharlesW2506 commented 3 years ago

I also get around 6-7 secs delay on the live feed, other than works great, still working on battery feed drain issues though (see a sperate thread here for that though).

patsch9 commented 3 years ago

I can confirm this problem too

adorobis commented 2 years ago

Many thanks for your great work! I was able to (quite easily) run it on TrueNAS. But I have the same issue, 10-12 seconds delay on live stream with Ring Doorbell Wired on very good wifi connection, Anyone was able to improve it?