Since installing v9.0.0, Ring plugin is no longer able to connect to Ring oauth URL. Everything was working great in the previous version, no issues. I've unlinked account multiple times. I've uninstalled the plugin multiple times. I've restarted my routers and I've also hit the https://oauth.ring.com/oauth/token URL successfully from the Raspberry directly. It can ping oauth.ring.com as well.
Is there a way to revert back to an older version of the Ring plug to confirm that one still works?
Steps to reproduce the behavior:
It would connect to Ring oauth URL
[6/5/2020, 1:33:45 PM] Homebridge is running on port 51626.
[6/5/2020, 1:33:45 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 1:33:50 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 1:33:55 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 1:34:00 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 1:34:36 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 1:34:41 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 1:34:46 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 1:34:51 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 1:34:56 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
Add any other context about the problem here.
Post homebridge-ring platform config _without sensitive information_
{
"refreshToken": "xxxx",
"platform": "Ring"
}
You can roll back with npm i -g [email protected]. You might be getting rate limited by Ring for some reason, in which case your best bet would be to turn off the plugin and try again after 24 hours. Try 8.2.0 and if it gives you the same error, you know it's rate limiting.
Thanks for the quick response. Rollback complete and appears to be working fine now. I got an initial error hitting oauth but then it setup my doorbell and no errors since. Other ideas why v9.0.0 continues to fail on oauth but 8.2.0 appears to be successful?
[6/5/2020, 1:53:02 PM] Homebridge is running on port 51626.
[6/5/2020, 1:53:02 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 1:53:08 PM] [Ring] Configuring 1 cameras and 2 devices for location "Mason" - locationId: dnupc4-1v0m4-0
[6/5/2020, 1:53:08 PM] [Ring] Adding new accessory doorbell_v3 Front Door
[6/5/2020, 1:53:08 PM] [Ring] Adding new accessory location.mode Mason Mode
Now that you got a token, I'd try v9 again. A lot of users have updated to v9 already and I haven't had any other reports of this issue so it's probably a fluke
I was hoping for the same but I'm back to the errors. I did the plugin upgrade, restarted the Homebridge and back to the errors. Sorry for the long log but you can see where it was working, then the upgrade to 9.0.0, the reboot and then the errors again.
[6/5/2020, 1:53:02 PM] Homebridge is running on port 51626.
[6/5/2020, 1:53:02 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 1:53:08 PM] [Ring] Configuring 1 cameras and 2 devices for location "Mason" - locationId: dnupc4-1v0m4-0
[6/5/2020, 1:53:08 PM] [Ring] Adding new accessory doorbell_v3 Front Door
[6/5/2020, 1:53:08 PM] [Ring] Adding new accessory location.mode Mason Mode
[6/5/2020, 1:56:59 PM] [Ring] Front Door Detected Motion
[6/5/2020, 1:56:59 PM] [Ring] Snapshot for Front Door is still within its life time (225.974s old)
[6/5/2020, 1:56:59 PM] [Ring] Snapshot for Front Door is still within its life time (225.978s old)
[6/5/2020, 1:56:59 PM] [Ring] Snapshot for Front Door is still within its life time (225.992s old)
[6/5/2020, 1:56:59 PM] [Ring] Snapshot for Front Door is still within its life time (225.994s old)
[6/5/2020, 1:56:59 PM] [Ring] Snapshot for Front Door is still within its life time (225.998s old)
[6/5/2020, 1:56:59 PM] [Ring] Snapshot for Front Door is still within its life time (226.018s old)
[6/5/2020, 2:00:09 PM] [Config] Running Command: sudo -E -n npm install homebridge-ring@latest
[6/5/2020, 2:00:58 PM] [Ring] Snapshot for Front Door is still within its life time (465.199s old)
[6/5/2020, 2:01:08 PM] [Ring] Snapshot for Front Door is still within its life time (475.215s old)
[6/5/2020, 2:01:10 PM] [Ring] Preparing Live Stream for Front Door
[6/5/2020, 2:01:11 PM] [Ring] Streaming video only - found ffmpeg, but libfdk_aac is not installed. See https://github.com/dgreif/ring/wiki/FFmpeg for details.
[6/5/2020, 2:01:12 PM] [Ring] Waiting for stream data from Front Door (1.743s)
[6/5/2020, 2:01:21 PM] [Ring] Stopped Live Stream for Front Door
[6/5/2020, 2:01:21 PM] [Ring] Received stream data from Front Door (10.676s)
[6/5/2020, 2:01:31 PM] [Ring] Snapshot for Front Door is still within its life time (498.721s old)
[6/5/2020, 2:01:41 PM] [Ring] Snapshot for Front Door is still within its life time (508.738s old)
[6/5/2020, 2:01:48 PM] [Config] Rebooting linux server with command: "sudo -n shutdown -r now"
[6/5/2020, 2:01:48 PM] [HB Supervisor] Stopping services...
[6/5/2020, 2:01:48 PM] Got SIGTERM, shutting down Homebridge...
[6/5/2020, 2:02:04 PM] [HB Supervisor] OS: Linux 4.19.57-v7l+ arm
[6/5/2020, 2:02:04 PM] [HB Supervisor] Homebridge Path: /usr/lib/node_modules/homebridge/bin/homebridge
[6/5/2020, 2:02:04 PM] [HB Supervisor] UI Path: /usr/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js
[6/5/2020, 2:02:04 PM] [HB Supervisor] Starting Homebridge with extra flags: -I
[6/5/2020, 2:02:04 PM] [HB Supervisor] Started Homebridge v1.1.0 with PID: 534
[6/5/2020, 2:02:05 PM] Loaded config.json with 0 accessories and 2 platforms.
[6/5/2020, 2:02:05 PM] ---
[6/5/2020, 2:02:08 PM] Loaded plugin: [email protected]
[6/5/2020, 2:02:08 PM] Registering platform 'homebridge-config-ui-x.config'
[6/5/2020, 2:02:08 PM] ---
[6/5/2020, 2:02:11 PM] [Config] Homebridge Config UI X v4.21.0 is listening on :: port 8581
[6/5/2020, 2:02:10 PM] Loaded plugin: [email protected]
[6/5/2020, 2:02:10 PM] Registering platform 'homebridge-ring.Ring'
[6/5/2020, 2:02:10 PM] ---
[6/5/2020, 2:02:10 PM] Loading 2 platforms...
[6/5/2020, 2:02:10 PM] [Config] Initializing config platform...
[6/5/2020, 2:02:10 PM] [Config] Running in Service Mode
[6/5/2020, 2:02:10 PM] [Ring] Initializing Ring platform...
[6/5/2020, 2:02:10 PM] [Ring] Configuring cached accessory cd44352f-1976-4e7f-a232-0baf85d8c152 Front Door
[6/5/2020, 2:02:10 PM] [Ring] Configuring cached accessory af4071ef-1df5-4b90-aafb-625a739991e5 Mason Mode
Setup Payload:
X-HM://00251VS7JC597
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
ββββββββββββββ
β XXXXX β
ββββββββββββββ
[6/5/2020, 2:02:10 PM] Homebridge is running on port 51626.
[6/5/2020, 2:02:10 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 2:02:15 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 2:02:20 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
[6/5/2020, 2:02:25 PM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. Trying again in 5 seconds...
Unfortunately I'm unable to reproduce the issue. I'd recommend downgrading to 8.2.0 and trying again in a few days
Sounds good. I'll give that a shot and then report back after the weekend on the results.
@kjason33 could you give v9.0.1 a try? I added the error message to the logs when you get stuck in the 5 second retry loop
Sure, just updated and below are the latest error messages.
[6/6/2020, 11:00:59 AM] Homebridge is running on port 51626.
[6/6/2020, 11:00:59 AM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. queryA ECONNREFUSED oauth.ring.com. Trying again in 5 seconds...
[6/6/2020, 11:01:04 AM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. connect ENETUNREACH 2606:4700::6811:7f01:443 - Local (:::0). Trying again in 5 seconds...
[6/6/2020, 11:01:09 AM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. connect ENETUNREACH 2606:4700::6811:7f01:443 - Local (:::0). Trying again in 5 seconds...
[6/6/2020, 11:01:14 AM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. connect ENETUNREACH 2606:4700::6811:8001:443 - Local (:::0). Trying again in 5 seconds...
Thanks for posting! Iβll take a look and see what I can do for those errors. Might be a few days before I get time to work on this, so I guess you will have to use v8 for now.
@dgreif @kjason33 Not sure if this will help you or not, but I have encountered something that may be related.
When encountering some issues with the hb Ring app recently, I tried going into the official Ring app and saw the same errors. It wouldn't let me pull snapshots or live videos for certain cameras.
I have multiple users authorized to use my Ring account. Now, strangely, if I use the official Ring app on their phone, I can see all the history and pull live feeds just fine! However, if I use mine, the camera/snapshots are stale and reporting that things aren't working.
If I logout/login from the official Ring app, that fixes the issue in the Ring app AND homebridge.
I'm wondering if you've tried logging out/in from the official Ring app that is connected to your hb account?
Thanks for the suggestion @dxdc. @kjason33 could you give that a try?
Saw similar Ring behavior this morning with both HomeKit and Ring app. Logged out of my iPhone and iPad. Same for my wife's iPhone and iPad. Logged back in to Ring.com on my iPhone and both HK and Ring are now responding in a timely manner. Did not log in to Ring.com on the other devices.
When checking HomeKit on my local network the Ring snapshots are generally refreshed immediately, however, at times I do get the "please wait" message. Personally don't mind the "please wait" message as I understand the purpose.
I seem to be having the same issue as of 2 days ago according to my snapshots in the Home app. I'm on 9.1.1 and have a huge string of unable to connect to oauth.ring.com every 5 seconds.
Thanks all, appreciate the suggestions. I've tried the following.
Note: My iPhone never had an issue with with snapshots/live stream on prior to the steps above.
[6/8/2020, 9:39:23 AM] Homebridge is running on port 51626.
[6/8/2020, 9:39:23 AM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. queryA ECONNREFUSED oauth.ring.com. Trying again in 5 seconds...
[6/8/2020, 9:39:28 AM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. connect ENETUNREACH 2606:4700::6811:8001:443 - Local (:::0). Trying again in 5 seconds...
[6/8/2020, 9:39:33 AM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. connect ENETUNREACH 2606:4700::6811:8001:443 - Local (:::0). Trying again in 5 seconds...
[6/8/2020, 9:39:38 AM] [Ring] Failed to reach Ring server at https://oauth.ring.com/oauth/token. connect ENETUNREACH 2606:4700::6811:8001:443 - Local (:::0). Trying again in 5 seconds...
Just upgraded to 9.2.0 after downgrading to 8.2.0 last week and the problem still persists. 8.2.0 also I noticed this morning, was starting to give the 5 second retry errors as well
@kahnartist81 Do you have some sort of dns caching on your network?
I did have DNS caching enabled which completely screwed up my Raspberry PI (nothing worked at all on the device). I turned that off in hopes it would solve all my issues. 99% of my problems went away, however the Ring plugin just won't work on 9.X+. I'm back to 8.2.0 and it's working just fine but as soon as I load a 9.X version, the oauth errors come back.
I was messing around with this yesterday and I even did a "curl" on the Pi to the Ring oauth site and it loaded fine. So I know the Pi can reach the Ring site but the plugin won't for some reason. Is there any other troubleshooting steps I could try?
@kahnartist81 Do you have some sort of dns caching on your network?
Not that I know of. Not actively set no. As the OP also mentioned, one day it just didn't work and hasn't since even with the new versions. Only 8.2.0 seems to work fully.
Using Google WiFi as router, running homebridge on Mac OS High Sierra
@kjason33 can you give 9.3.1 a try? I removed the keepalive from oauth and session requests, which is what was causing the ENETUNREACH errors. If it still isn't working, please post updated logs.
@dgreif @kahnartist81 I've got some good news, I fixed my issue with the help of my buddy who's a Linux guru.
He noticed in the Ring plugin debug that the cachetable lookup was suspect in the oauth requests. He had me restart only the HomeBridge service using the following command:
systemctl restart homebridge
Once the service came back, the Ring plugin is working great on 9.3.0. What he suspects is the HomeBridge service is starting before the network is ready and it's screwing up the cachetables. If I restart the Pi again, the issues return but then you can run the command above once it's back and everything calms down.
What I'm going to try next is to add a delay to the HomeBridge service start to give it a few more seconds after the Pi comes online.
@kjason33 that is great info!! I updated the oauth request to not use dns caching in v9.3.2. Now it should fail 1 or 2 times while it waits for your network to start up. Once oauth succeeds, the rest of the requests will start using dns caching and keepalive. Let me know if that fixes it for you without delaying your service startup
@kjason33 that is great info!! I updated the oauth request to not use dns caching in v
9.3.2. Now it should fail 1 or 2 times while it waits for your network to start up. Once oauth succeeds, the rest of the requests will start using dns caching and keepalive. Let me know if that fixes it for you without delaying your service startup
9.3.2 totally fixed it for me. Restarted via config UI twice and it's worked without error both times! Great work
It's getting closer but I'm not out of the wood yet on 9.3.2. I'm getting these errors now:
[6/17/2020, 1:09:53 PM] [Ring] Failed to reach Ring server at https://app.ring.com/rhq/v1/devices/v1/locations. cacheableLookup ENOTFOUND app.ring.com. Trying again in 5 seconds...
[6/17/2020, 1:10:01 PM] [Ring] Failed to reach Ring server at https://app.ring.com/rhq/v1/devices/v1/locations. cacheableLookup ENOTFOUND app.ring.com. Trying again in 5 seconds...
If I restart the HomeBridge service after the Pi comes back, these errors disappear.
Yeah, go ahead and fix it on your end I guess π . I'm not sure how it's getting to that step and then having issues with DNS since the oauth request has to succeed first. Definitely something odd in your linux environment tho. If delaying the service start fixes it, then that's probably the best solution at this point.
No worries at all, it's easy enough to delay the service start. I messed with so many setting yesterday to try and get this to work, it's possible I screwed something else up. I'm just glad we got to the bottom of it.
Thanks for your quick work and assistance. Version 9 is so much quicker and cleaner with the live streams!
To wrap this one up in case others run into the same thing.
Looks like in my Pi build, the systemd-networkd-wait-online.service was disabled which allowed the HomeBridge service to start before the network services were up. To fix this, run the command below as su in your Pi to enable the service then reboot the Pi. Once it comes back, this will force HomeBridge to wait for the network to be available before starting.
systemctl enable systemd-networkd-wait-online.service
Most helpful comment
To wrap this one up in case others run into the same thing.
Looks like in my Pi build, the systemd-networkd-wait-online.service was disabled which allowed the HomeBridge service to start before the network services were up. To fix this, run the command below as su in your Pi to enable the service then reboot the Pi. Once it comes back, this will force HomeBridge to wait for the network to be available before starting.
systemctl enable systemd-networkd-wait-online.service