Word of caution for folks…after updating to the OAuth2 implementation in ring-doorbell 0.2.8 library, it appears my Hassio box is now making about 3000 DNS queries a minute to oauth.ring.com. Here are the graphs from my Pi Hole:
Rob, just checked mine and I’m not seeing any uptick in DNS queries after making the above changes. I have adguard and not pihole, but I ran a query to search for that DNS query but only had a few. Not that this helps you, but just wanted to comment that it doesn’t appear to be a common issue.
Not knowing your setup
Have you tried with a static entry in the host file
Resolve it internal so it doesnt forget and never needs to ask outside where to go.
Harry, appreciated, but it shouldn’t be making that volume of requests, regardless of if it’s internally resolved or hitting my DNS server, it’s a LOT of requests, which indicates something is wrong. The only change I made to my config was turning off the Ring integration, you can see it immediately went back to baseline…
Yes but why is your system forgetting where it just was, part of any dns from server to pc, is to cache the recent query so they don’t have to go looking for it again.
What I’m say is. Is it the ring or is it your system.
But either way is there actual traffic or just the Queries.
I was going to Suggest you message Marcelo code owner or Steve Gombos who did the OAuth2 code there may be a loop in the code he added.
Part of the reason why it fell over before was cause there was unnecessary request being made every time it pass through the request code.
But I just saw you opened a request.
No that doesn’t explain it. It explains why it’s not caching it, but not why it needs it multiple times a second.
Why does HA need to make a DNS request to oauth.ring.com 1000s of times a minute? That doesn’t make sense. I’m also not seeing this same behavior from my cameras, or from the Ring app on my phone…just HA.
Before you suggest that it’s streaming to the cloud, the only time it should need to get to oauth.ring.com is to refresh the token. After that the token itself is passed with the API calls to a totally different FQDN.
From what I can tell in the logs, it’s just updating the sensor every 10 seconds:
2019-12-28 13:32:06 DEBUG (SyncWorker_11) [homeassistant.components.ring] Updating Ring Hub component
2019-12-28 13:32:06 DEBUG (SyncWorker_11) [homeassistant.components.ring] Updating camera Front Door
2019-12-28 13:32:07 DEBUG (MainThread) [homeassistant.components.ring.camera] Updating Ring camera Front Door (callback)
2019-12-28 13:32:07 DEBUG (SyncWorker_13) [homeassistant.components.ring.sensor] Updating data from Front Door Last Activity sensor
2019-12-28 13:32:07 DEBUG (SyncWorker_15) [homeassistant.components.ring.camera] Checking if Ring DoorBell needs to refresh video_url
2019-12-28 13:32:07 DEBUG (SyncWorker_2) [homeassistant.components.ring.sensor] Updating data from Front Door Battery sensor
2019-12-28 13:32:07 DEBUG (SyncWorker_6) [homeassistant.components.ring.sensor] Updating data from Front Door WiFi Signal Strength sensor
2019-12-28 13:32:07 DEBUG (SyncWorker_5) [homeassistant.components.ring.sensor] Updating data from Front Door WiFi Signal Category sensor
2019-12-28 13:32:07 DEBUG (SyncWorker_8) [homeassistant.components.ring.sensor] Updating data from Front Door Last Motion sensor
2019-12-28 13:32:08 DEBUG (SyncWorker_7) [homeassistant.components.ring.sensor] Updating data from Front Door Last Ding sensor
2019-12-28 13:32:11 DEBUG (SyncWorker_13) [homeassistant.components.ring.sensor] Updating data from Front Door Volume sensor
I see that there is now (on GitHub) 0.103.5 with the comment:-
Bump ring to 0.2.8 to fix Oauth issues
Please excuse my ignorance but can someone answer the following questions for me? 1/ Will I have to set up 2FA on my Ring account? 2/ Will I have to change my configuration.yaml entry?
Currently simply…
Which would be fine, but I only have 3 Ring devices, if each of them were updating every 10 seconds, worst case that would be 18 updates a minute. I’m seeing 100x that traffic.
Additionally, those updates shouldn’t need to be calling oauth.ring.com, as they’d already have a valid token to submit the API call…