Comments (49)
Please don't post a lot of "me too" post here, that does nothing but fill the maintainers inbox with lots of messages while providing no additional value. If you are having the same issue and feel the need to express yourself, a "thumbs up" on the initial post is enough. Of course if you have details to add beyond what has already been posted, feel free to do so.
It's quite clear that this is a change in behavior of the Ring server side, what is not clear is if it is a permanent change, or a temporary issue. The ring-client-api code is using app.ring.com
to request tickets for opening a websocket connection. Historically this URL load balanced requests to a pool of servers but as of some point today it is returning the error "No available app brokers".
The official Ring app appears to use prd-api-us.prd.rings.solutions
and the Ring web console uses account.ring.com/api
which is also used for requesting the ticket for the WebRTC control channel websocket as well. These both seem to be working, so it's possible Ring is simply disabling this functionality on the old app pool and we'll need to update ring-client-api to use the new URL.
We're likely in for a bumpy ride with the Ring API for the next few weeks as, due the the deprecation and imminent disabling of the legacy FCM APIs (not directly related to Ring, but used for push notifications), we're also in the middle of migrating to FCM v1 to be able to continue to receive push notifications. Unfortunately, this work has been challenging as it depends on upstream packages which had several limitations in the implementation that made it unsuitable for use with ring-client-api. I finally managed to get this working last night, but upgrading will require upstream to accept a small PR I've submitted, a complete re-authentication cycle will have to be completed, and perhaps more. This work is ongoing, but it's a race against the clock since the official disable data for the legacy FCM API is June 20th.
I've also noticed there are other changes happening, lots of backend APIs failing even in the official Ring app, my guess is they are doing some backend optimization and consolidation. We'll do our best to keep up with the changes, at least so far I've not seen any intentional attempt to block 3rd-party access, something I have long feared could happen, but providing 100% reliability for a reverse engineered API is simply not possible.
from ring.
I have confirmed that replacing app.ring.com
with prd-api-us.prd.rings.solutions
seems to work around the issue. As far as I can tell this is used only for ticket requests and for changing modes, so I need to investigate if mode changes work with this new URL as well, if so, it should be a simple change.
If any of you know what you are doing and are interested in manually working around the issue, you can edit node_modules/ring-client-api/lib/rest-client.js and replace appApiBaseUrl = 'https://app.ring.com/api/v1/'
with appApiBaseUrl = 'https://prd-api-us.prd.rings.solutions/api/v1/'
on line 22.
from ring.
12.1.1 has been released with a fix for this issue.
from ring.
As I stated earlier, it was quite likely the problem was temporary on the Ring side, the service errored with a message indicating a backend problem, not that it didn't exist or anything like that, it seemed likely to be temporary. That being said, it doesn't mean we shouldn't update the URL at some point to use the same one the Ring app leverages, otherwise it creates issues like this where the Ring app works while the projects depending on ring-client-api do not and people go crazy like they did here.
from ring.
Home Assistant: Confirmed working in the UK, using a Ring account that is not the "master" either. On HAOS, I made the edits and restarted the docker container.
- Install the Advanced SSH & Terminal add-on and configure it correctly (with a password)
- Disable Protected mode on the add-on config
- Launch the add-on and run:
docker exec -it $(docker ps | grep ring-mqtt | awk '{print $1}') /bin/sh
- Edit this file:
vi /app/ring-mqtt/node_modules/ring-client-api/lib/rest-client.js
If you're new to vi
, use the cursor arrow keys to navigate towards the end of line 22, type a
then replace appApiBaseUrl = 'https://app.ring.com/api/v1/'
with appApiBaseUrl = 'https://prd-api-us.prd.rings.solutions/api/v1/'
then press esc
followed by entering :wq
and press enter
to save.
- Log out of the container with
ctrl + d
- Restart the container, preserving your changes with:
docker restart $(docker ps | grep ring-mqtt | awk '{print $1}')
If you screw it up, just restart the ring-mqtt add-on from the Home Assistant GUI and it will revert the damage and go back to its original state.
from ring.
I am also experiencing the same issue after updating Homebridge today;
[18/06/2024, 19:08:04] [homebridge-ring] Request to https://app.ring.com/api/v1/clap/tickets?locationID=cc415c7-30c8-497f-b2c0-5bb94de8103d failed with status 500. Response body: {"error":860004,"msg":"No available app brokers"}
[18/06/2024, 19:08:04] [homebridge-ring] Error connecting to API
[18/06/2024, 19:08:04] [homebridge-ring] HTTPError: Response code 500 (Server Error)
at Request. (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/got/dist/source/as-promise/index.js:118:42)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_NON_2XX_3XX_RESPONSE',
timings: {
start: 1718734084301,
socket: 1718734084303,
lookup: 1718734084316,
connect: 1718734084399,
secureConnect: 1718734084570,
upload: 1718734084571,
response: 1718734084713,
end: 1718734084713,
error: undefined,
abort: undefined,
phases: {
wait: 2,
dns: 13,
tcp: 83,
tls: 171,
request: 1,
firstByte: 142,
download: 0,
total: 412
}
}
}
from ring.
Based on the http error code, it seems to be a Ring server-side issue. I researched and saw that this endpoint helps establish a socket connection. Maybe it'll fix itself over time. This probably isn't an issue with homebridge-ring, especially since @Bro-Rocket12 mentioned his other location works.
from ring.
Folks, if you don't know how to edit files, then the manual solution is not for you, newbies will have to wait for an official fix, having everybody post here about how to edit files will just add confusion. I will be deleting messages asking for help editing files, Google can help you, or you can go and talk about it in the discussions groups, but this is not the place for that, this issue is about researching and solving the problem.
from ring.
Just manually did the change. All statuses of all devices are back, camera streams work and Alarm status change including PIN challenge work. Awesome!
from ring.
Just going to add that I did worry about the US in that domain name and wondered if this was US specific but just checking DNS logs I can see that app in UK is still connecting to prd-api-us.prd.rings.solutions
so would appear to be a global thing
from ring.
Just in case it helps anyone, I am using the ring-mqtt docker image and was able to modify the URL as follow.
First I had to access the container's shell on my home assistant server:
docker exec -it ring-mqtt /bin/sh
Then I searched for the rest-client.js file and found it at this location
/app/ring-mqtt/node_modules/ring-client-api/lib/rest-client.js
So I used vi to modify the file
vi /app/ring-mqtt/node_modules/ring-client-api/lib/rest-client.js
and then proceeded to modify the appApiBaseUrl
value to https://prd-api-us.prd.rings.solutions/api/v1/
from ring.
Is it possible to have a new version of component with URL fixed? I’m not confident to make manually this edit with Advanced SSH in my HAOS
from ring.
Everything is working again, with no modifications. I just restarted the addon in Home Assistant
from ring.
Yes, that is probably the easiest and has no negative side effects, setting a DNS alias for app.ring.com to resolve to prd-api-us.prd.rings.solutions is probably the easiest, using either /etc/hosts or perhaps DNS on your local router, etc.
from ring.
Same....
[6/18/2024, 1:33:17 PM] [Ring] Request to https://app.ring.com/api/v1/clap/tickets?locationID=baa71e2c-7986-44fa-744e-720cff98e320 failed with status 500. Response body: {"error":860004,"msg":"No available app brokers"}
[6/18/2024, 1:33:17 PM] [Ring] Error connecting to API
[6/18/2024, 1:33:17 PM] [Ring] HTTPError: Response code 500 (Server Error)
at Request. (/var/lib/homebridge/node_modules/homebridge-ring/node_modules/got/dist/source/as-promise/index.js:118:42)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_NON_2XX_3XX_RESPONSE',
from ring.
Just manually did the change. All statuses of all devices are back, camera streams work and Alarm status change including PIN challenge work. Awesome!
Please, can you explain me how to do it? ( i don't know how to edit the node modules)
I am using ring-mqtt with docker and this is what I did.
- sudo docker exec -it ring-mqtt bash (this enter the console of the container
- cd ./app/ring-mqtt/node_modules/ring-client-api/lib
- vi rest-client.js
from ring.
Is it possible to have a new version of component with URL fixed? I’m not confident to make manually this edit with Advanced SSH in my HAOS
I am pretty sure that this will come soon once confirmed that this change really has no negative side effects. It is clearly just a workaround to do this manually as a re-pull of the container image will undo this change anyway every time.
from ring.
vi /app/ring-mqtt/mode_modules/ring-client-api/lib/rest-client.js
node_modules not mode_modules.
vi /app/ring-mqtt/node_modules/ring-client-api/lib/rest-client.js
from ring.
this worked - tsightler/ring-mqtt#861 (comment)
changing the volume only on the base station
from ring.
I made another workaround without changing the source code, I changed the /etc/hosts
and added this line:
app.ring.com prd-api-us.prd.rings.solutions
Restarted the complement and all is working fine for me. Alarm, sensor, etc..
from ring.
which workaround is the "goto" atm? thank ya @tsightler !
this is an easy one:
I made another workaround without changing the source code, I changed the /etc/hosts and added this line:
app.ring.com prd-api-us.prd.rings.solutions
from ring.
started happening to me today or recently also. Didn't do any updates in the last few weeks.
Node.js Version | v20.14.0
homebridge-ring | v12.1.0
from ring.
Same error here.
No updates done recently.
Hopefully this can be fixed or is just temporary.
from ring.
Yeah it's definitely something sever side. Rolling back to previous version does not fix it unfortunately. Nor does setting it up as a child bridge. It is weird that my other location id works though, not sure why one works and the other does not. Hopefully whatever the issue is gets fixed soon.
from ring.
Just manually did the change. All statuses of all devices are back, camera streams work and Alarm status change including PIN challenge work. Awesome!
Thanks for the confirmation, if someone out there happens to have a setup that uses modes, and can verify that the change doesn't break that, it would go a long way as I don't have an easy way to test this at the moment as I have an alarm at my location and I don't have any spare camera to setup a second site with no alarm.
from ring.
Hi, I made the change to update 'appApiBaseUrl' and it also worked for me. @tsightler - By modes, do you mean just switching my alarm to Home/Away modes, using the buttons as shown in the screenshot?
from ring.
Just manually did the change. All statuses of all devices are back, camera streams work and Alarm status change including PIN challenge work. Awesome!
Please, can you explain me how to do it? ( i don't know how to edit the node modules)
I am using ring-mqtt in a docker container. Just jumped into the interactive shell of that container and followed the path given by @tsightler and did the change in line 22
from ring.
Just manually did the change. All statuses of all devices are back, camera streams work and Alarm status change including PIN challenge work. Awesome!
Confirmed the change to appApiBaseUrl
is working for me. Changing modes works as well.
from ring.
Just manually did the change. All statuses of all devices are back, camera streams work and Alarm status change including PIN challenge work. Awesome!
Please, can you explain me how to do it? ( i don't know how to edit the node modules)
- Go to homebridge UI terminal: something like
http://192.168.1.11:8581/platform-tools/terminal
- look for Plugin Path in the terminal. Mine is
/var/lib/homebridge/node_modules
- type in
nano {PLUGIN_PATH}/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js
. Mine looks likenano /var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js
- Use your arrow keys to go down to line 22. It looks like:
}, clientApiBaseUrl = 'https://api.ring.com/clients_api/', deviceApiBaseUrl = 'https://api.ring.com/devices/v1/', commandsApiBaseUrl = 'https://api.ring.com/commands/v1/', appApiBaseUrl = 'https://app.ring.com/api/v1/', apiVersion = 11;
- Delete
appApiBaseUrl = 'https://app.ring.com/api/v1/'
and type inappApiBaseUrl = 'https://prd-api-us.prd.rings.solutions/api/v1/'
- CTRL+X to Exit
- Y to save
- ENTER to confirm
- Restart bomebridge-ring child process or main process and it look at logs to confirm it works
from ring.
Spent a fair while doing the usual troubleshooting on this before I came across this thread a few hours ago. And having seen the comments thought I’d leave.
Since all the traffic of you guys making changes etc, I figured I’d do a full server reboot. As it looks like a DNS change on ring’a end, rather than anything else. (Server OS reboot not just service/app)
This appears to have fixed the issue for me.
Using raspberry pi running homebridge OS
from ring.
Just going to add that I did worry about the US in that domain name and wondered if this was US specific but just checking DNS logs I can see that app in UK is still connecting to
prd-api-us.prd.rings.solutions
so would appear to be a global thing
Thanks, I had this concern too, but I scoured the app source code and could not find any other reference to a non-US URL so I suspected it was not a problem.
from ring.
Just manually did the change. All statuses of all devices are back, camera streams work and Alarm status change including PIN challenge work. Awesome!
Please, can you explain me how to do it? ( i don't know how to edit the node modules)
- Go to homebridge UI terminal: something like
http://192.168.1.11:8581/platform-tools/terminal
- look for Plugin Path in the terminal. Mine is
/var/lib/homebridge/node_modules
- type in
nano {PLUGIN_PATH}/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js
. Mine looks likenano /var/lib/homebridge/node_modules/homebridge-ring/node_modules/ring-client-api/lib/rest-client.js
- Use your arrow keys to go down to line 22. It looks like:
}, clientApiBaseUrl = 'https://api.ring.com/clients_api/', deviceApiBaseUrl = 'https://api.ring.com/devices/v1/', commandsApiBaseUrl = 'https://api.ring.com/commands/v1/', appApiBaseUrl = 'https://app.ring.com/api/v1/', apiVersion = 11;
- Delete
appApiBaseUrl = 'https://app.ring.com/api/v1/'
and type inappApiBaseUrl = 'https://prd-api-us.prd.rings.solutions/api/v1/'
- CTRL+X to Exit
- Y to save
- ENTER to confirm
- Restart bomebridge-ring child process or main process and it look at logs to confirm it works
THANK YOU, it works
from ring.
Proposal:
But what if we set a url we, which automatically links to the correct API url?
That way in a situation with today's, we could globally change the url and the whole thing would be solved, without requiring a new plugin update
from ring.
Proposal: But what if we set a url we, which automatically links to the correct API url? That way in a situation with today's, we could globally change the url and the whole thing would be solved, without requiring a new plugin update
I appreciate the suggestion, but the Ring API is complex, it's not just a single URL, there are at least a dozen different URLs listed in the code, it makes zero sense to try to expose them all. Many times when they change the API itself also changes, what headers are needed, what authentication they use, etc.
from ring.
I made another workaround without changing the source code, I changed the
/etc/hosts
and added this line:
app.ring.com prd-api-us.prd.rings.solutions
Restarted the complement and all is working fine for me. Alarm, sensor, etc..
Good idea and nice workaround for the interim.
from ring.
If your running Pihole can change the CNAME record to redirect until a better solution is found
from ring.
Everything is working again, with no modifications. I just restarted the addon in Home Assistant
No change in the hosts file or in the code? Maybe ring recover the previous url?
from ring.
yep works for me again too, just restarted the addon and it's good again
from ring.
Everything is working again, with no modifications. I just restarted the addon in Home Assistant
No change in the hosts file or in the code? Maybe ring recover the previous url?
Yes, I think so
from ring.
Everything is working again, with no modifications. I just restarted the addon in Home Assistant
No change in the hosts file or in the code? Maybe ring recover the previous url?
Yes, I think so
Yup, I reverted my change, restarted the addon and it's working! No change in the code needed I guess
from ring.
Rollling Back To v 11.8.1 solve the issue
from ring.
Rollling Back To v 11.8.1 solve the issue
No it won't, it's just that the outage is over and Ring has corrected the issue.
from ring.
Here we go again! It does not work anymore... (without the modification)
from ring.
I did the modification to the file and everything works perfectly, in fact my Ring cameras come up instantly in HomeKit now.
BUT I tried going back to the pre modified rest-client.js file when others said it was working again, and I am still getting error 500.
So I went back again to the modified file and it all works. So this issue may not be cleared on Rings end of things.
from ring.
Yes, there have been several periods of time where it worked or didn't work throughout the day. I guess we'll see if it stabilizes and, if not, we'll have to push out an update.
from ring.
Just fyi for anyone else not back yet, I'm now getting a "Response code 503 (Service Unavailable)"
I'm in Ireland, so presumably Ring/DNS are slowly propogating a fix.
from ring.
I restarted HB plugin, disabled and re-enabled it... no go still here. Am i supposed to do something else? thanks in advance!
from ring.
There is nothing to do until Ring either fixes the issue, or we push out a new version to work around the problem, unless you are able to implement one of the workarounds already posted in this thread.
from ring.
/etc/hosts is easy enough, ill give that a shot! Thanks @tsightler
Update: Worked like a charm (for now) ... thanks again!
from ring.
Related Issues (20)
- Quick Responses Endpoints
- API no longer returning cameras or devices HOT 1
- Intercom - Ding event not available in ioBroker where I use your adapter HOT 1
- Ring Intercom - silence Ringtone when Delay Switch is triggered
- Ring panic buttons dont show up in Home
- Stream instantly closes after it opens HOT 9
- Intercom: It is not possible to disable HomeKit notifications when doorbell rings HOT 4
- Plugin doesn’t respect Ring app settings for Live View HOT 1
- rpc command unlock_door for ring HOT 1
- ring plugin stopped working, cant lovin anymore HOT 3
- Live stream fails/times out, snapshots work HOT 3
- No longer working (cannot arm and disarm) HOT 1
- Add Medical Alert Option for Ring Alarm Integration with Home Assistant HOT 1
- Invalid discord link HOT 1
- Add ability to view camera activity in recent events HOT 1
- Ring Intercom - Possibility do make it a switch / button instead of a lock HOT 1
- No Accessories installing
- Homebridge-Ring logs don't show up in Homebridge UI (Homebridge-Config-UI-X)
- Add support for water valves HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ring.