Core: Ring integration stopped working

Created on 19 Dec 2019  Â·  37Comments  Â·  Source: home-assistant/core

Home Assistant release with the issue:
0.103.2

Last working Home Assistant release (if known):
0.102

Operating environment (Hass.io/Docker/Windows/etc.):
Hassio

Integration:
Ring

Description of problem:
Ring integration stopped working suddenly after upgrading to latest release.

2019-12-19 14:49:22 ERROR (SyncWorker_1) [homeassistant.components.ring] Unable to connect to Ring service: 403 Client Error: Forbidden for url: https://api.ring.com/clients_api/session
2019-12-19 14:49:23 ERROR (MainThread) [homeassistant.setup] Setup failed for ring: Integration failed to initialize.
2019-12-19 14:49:23 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform ring.camera: Unable to set up component.
2019-12-19 14:49:23 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform ring.binary_sensor: Unable to set up component.

update
I have send ring an email and asked for explination, they replied on twitter to me with the fact that i need to sign up for ring partner to get API access.

See tweet:

https://twitter.com/diondk/status/1207677919339974658

ring

Most helpful comment

I am in touch with their CTO and working on getting a client ID/secret for Home Assistant to use. It will need an update to the Python lib https://github.com/tchellomello/python-ring-doorbell/issues/144

All 37 comments

Same here. Additional details:

Not using Multi Factor authentication
Hass.io 0.103.2

Reddit thread: https://old.reddit.com/r/homeassistant/comments/ecnnpq/trouble_connecting_to_ring_service/
Community thread:
https://community.home-assistant.io/t/ring-error-401-client-error-unauthorized-for-url/154051

Could this be due to API changes necessitated by some recent widely reported breaches?

Same here, failed after rolling back from 0.103.1, upgrading to 0.103.2 does not fix the issue for me.

Related to: #25088

Not completely my 2 factor authentication is off, and ring told me on twitter that i need to sign up for the partner program to get access to the API.

https://twitter.com/diondk/status/1207677919339974658

It has nothing to do with HA versions, they just changed the API overnight. It also doesn't matter if you have/had 2FA enable or not.

Same here,
it seems that they have made changes in the API or no longer exists

Twitter message they posted, hope this isn't the case:

image

I have send ring an email and asked for explination. will keep you guys posted.

they may be taking advantage to enable live stream access(sarcastic)

So I guess we need Nabu Casa to get partner status, or start again to reverse engineer the app ;-(

So I guess we need Nabu Casa to get partner status, or start again to reverse engineer the app ;-(

Hi,where do you read that?

So I guess we need Nabu Casa to get partner status, or start again to reverse engineer the app ;-(

Hi,where do you read that?

On twitter they told me that we need to sign as a partner to get API access.

So I guess we need Nabu Casa to get partner status, or start again to reverse engineer the app ;-(

Hi,where do you read that?

On twitter they told me that we need to sign as a partner to get API access.

But i dont understand that about nabucasa

So I guess we need Nabu Casa to get partner status, or start again to reverse engineer the app ;-(

Hi,where do you read that?

On twitter they told me that we need to sign as a partner to get API access.

But i dont understand that about nabucasa

someone needs partner status to get access to the API, untill now its not clear if everyone can get api access again.

So I guess we need Nabu Casa to get partner status, or start again to reverse engineer the app ;-(

Hi,where do you read that?

On twitter they told me that we need to sign as a partner to get API access.

But i dont understand that about nabucasa

someone needs partner status to get access to the API, untill now its not clear if everyone can get api access again.

Ok,now understand it,Thanks

Same here,
it seems that they have made changes in the API or no longer exists

API still exists, if you go to the url you will get a "unauthorized" response, so something is listening but we're just not passing it the right credentials any longer.

Response from ring, we are screwed.. Anyone wants to buy a doorbell? i am going to search for a replacement bell.

Same here with my hass.io 0.102.2.

My Ring protect plan is still active and I get the following errors in HA logs:

_Unable to prepare setup for platform ring.sensor: Unable to set up component.
9:39 PM setup.py (ERROR)
Unable to prepare setup for platform ring.binary_sensor: Unable to set up component.
9:39 PM setup.py (ERROR)
Setup failed for ring: Integration failed to initialize.
9:39 PM setup.py (ERROR)
Unable to connect to Ring service: 403 Client Error: Forbidden for url: https://api.ring.com/clients_api/session
9:39 PM components/ring/__init__.py (ERROR)_

Using a web browser pointed at [https://api.ring.com/clients_api/session] I get:
{"error":"not authorized"}

IMHO, Ring have obviously changed their API.

I don't know what are the requirements, but it may be worth talking to Ring.
cc @balloob

In the meantime, please follow this thread for updates https://github.com/tchellomello/python-ring-doorbell/issues/142

Regardless of what their CTO is saying, it still works for now with xernaj's changes.

> 2019-12-19 18:16:18 INFO (SyncWorker_4) [homeassistant.loader] Loaded ring from custom_components.ring,
> 2019-12-19 18:16:18 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for ring which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.,
> 2019-12-19 18:16:19 INFO (SyncWorker_13) [homeassistant.util.package] Attempting install of https://github.com/xernaj/python-ring-doorbell/archive/fix/oauth-fail-due-to-blocked-user-agent.zip#ring_doorbell==0.2.4,
> 2019-12-19 18:16:31 INFO (SyncWorker_10) [homeassistant.util.package] Attempting install of https://github.com/xernaj/python-ring-doorbell/archive/fix/oauth-fail-due-to-blocked-user-agent.zip#ring_doorbell==0.2.4,
> 2019-12-19 18:16:42 INFO (SyncWorker_21) [homeassistant.util.package] Attempting install of https://github.com/xernaj/python-ring-doorbell/archive/fix/oauth-fail-due-to-blocked-user-agent.zip#ring_doorbell==0.2.4,
> 2019-12-19 18:16:55 INFO (MainThread) [homeassistant.setup] Setting up ring,
> 2019-12-19 18:17:05 WARNING (MainThread) [homeassistant.setup] Setup of ring is taking over 10 seconds.,
> 2019-12-19 18:17:05 INFO (MainThread) [homeassistant.setup] Setup of domain ring took 10.7 seconds.,
> 2019-12-19 18:17:05 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.ring,
> 2019-12-19 18:17:05 INFO (MainThread) [homeassistant.components.camera] Setting up camera.ring,
> 2019-12-19 18:17:15 WARNING (MainThread) [homeassistant.components.camera] Setup of platform ring is taking over 10 seconds.

...
Cameras working now.

Just FYI, while in the saga to version 0.103.2, all 3 of my problems were actually unrelated to 0.103.2

  1. EcoBee failed with expired token, (re config fix it)
  2. SmartThings failed with expired token, removing using the tool and re config fixed the issue.
  3. Ring failed because of this thread.

Thanks,

Oscar

Unbelievable that all 3 hit right as we were all trying to upgrade to 103.1/2 ... what are the odds.

LMAO here because I lost Ring and Ecobee at the same time too! Like you said, a simple expired token but what are the odds?

we'd be happy to discuss with the maintainers of Home Assistant on how to make this happen.

Really? I kind of get the impression they just ignore such requests. Still waiting for any kind of response on my own partner request with them months later

I am in touch with their CTO and working on getting a client ID/secret for Home Assistant to use. It will need an update to the Python lib https://github.com/tchellomello/python-ring-doorbell/issues/144

It works fine here. (with2FA disabled)

On Sat, Dec 21, 2019 at 1:10 AM Mike J McGuire notifications@github.com
wrote:

Have updated to 103.3, the ring error seems to still be appearing.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/30076?email_source=notifications&email_token=ABJR36OH3GL5I6662XTMJXTQZVNGTA5CNFSM4J5IKHC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHOP36A#issuecomment-568131064,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABJR36P6L7UHOLEX5UUAYQTQZVNGTANCNFSM4J5IKHCQ
.

Fixed in 103.3

And it failed again in 103.4 (with Ecobee)

This still appear to be an issue... 103.5

Working for me in 103.5.

The only downside is I see about 10 DNS lookups a second to oath.ring.com

Mine stopped working today :-(

Mine broke again with latest update yesterday

Same:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/ring/__init__.py", line 79, in timer_hub_refresh
    hub_refresh()
  File "/usr/src/homeassistant/homeassistant/components/ring/__init__.py", line 87, in hub_refresh
    camera.update()
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/generic.py", line 55, in update
    self._get_attrs()
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/generic.py", line 87, in _get_attrs
    lst = self._ring.query(url).get(self.family)
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 198, in query
    'Bearer {}'.format(self._get_oauth_token())
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/__init__.py", line 111, in _get_oauth_token
    self.auth = oauth.refresh_tokens()
  File "/usr/local/lib/python3.7/site-packages/ring_doorbell/auth.py", line 59, in refresh_tokens
    token = self._oauth.refresh_token(OAuth.ENDPOINT)
  File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 446, in refresh_token
    self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
  File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 421, in parse_request_body_response
    self.token = parse_token_response(body, scope=scope)
  File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 431, in parse_token_response
    validate_token_parameters(params)
  File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 441, in validate_token_parameters
    raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.

I just got this response from Ring:

We’ve been working with the Home Assistant open source community for a few weeks now. As you know, this is not an approved Ring system, nor is it using Ring approved Partner APIs. We will continue to work with folks to get Home Assistant to a place that works with Ring and meets our security needs. Hopefully you’ll stick around as we truly value you and the community support.
Joshua Roth
Chief Technology Officer
[email protected]
310.925.2643

@HemiBob thanks for talking to Ring and the post, its encouraging Ring want to work with the community.

For what its worth, mine has broken too (103.5).
Maybe a coincidence, but my doorbell stopped sending alert details to Ring a few days back. I removed the integration from HA, and within in few hours the Ring started to send alerts to Ring again. So I suspect (but have no evidence of, apart from this coincidence) part of the "stronger controls" Ring are implementing involves temporary blacklisting.

Thanks for following up with Ring, folks.
Looking forward for them to come back with some acceptable solution.

Was this page helpful?
0 / 5 - 0 ratings