Core: Ring seems to need 2-factor now

Created on 12 Jul 2019  ·  26Comments  ·  Source: home-assistant/core

Home Assistant release with the issue:
0.96.0b0

Last working Home Assistant release (if known):
None

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

Component/platform:
https://www.home-assistant.io/components/ring/

Description of problem:
Ring now seem to require two-factor authentication, because every time my HA restarts, I get a PIN sent to my mobile via SMS.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

ring:
  username: !secret ring_username
  password: !secret ring_password

Additional information:
Looks like OAuth might be a requirement now. IFTTT works with my Ring, as long as I've authenticated it via a browser process first.

2019-07-11 23:05:34 ERROR (SyncWorker_14) [homeassistant.components.ring] Unable to connect to Ring service: 401 Client Error: Unauthorized for url: https://api.ring.com/clients_api/session
2019-07-11 23:05:34 ERROR (MainThread) [homeassistant.setup] Setup failed for ring: Integration failed to initialize.
ring

Most helpful comment

I've confirmed the ring-doorbell package that the integration depends on has the same issue. Someone has raised an issue against it already, so hopefully it gets resolved shortly.

All 26 comments

they just added 2fa, the integration will need to be updated...if u remove 2fa from your account it should work...i enabled mine earlier today after getting the email but i will disable until the integration is updated

I wouldn't call it "just added", I've had it enabled since January I think, but I guess security=off will have to do for now, or do without.

Well I had gotten the email yesterday and until this past month it was not made available to my account. FWIW I just restarted after enabling 2FA on my ring accouint. I got the 2FA text, HA component loaded fine, sensors are working as expected. I did not have to send the 2FA code to anywhere.

I'll try re-enabling my 2FA now. Maybe once HA gets an auth token while it's disabled, it doesn't need to again.

@Cylindric yea you are correct HA saves a pickle file and seems to reuse it periodically, mine was updated today and I last restarted HA 2 days ago.

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

I just tested this on 0.100.2. When 2FA is enabled on your Ring account it won't authorize in HA. I receive the 2FA text message from Ring, but there isn't anywhere to input it at the moment.

Same as @steve-gombos here. This makes this integration currently useless as disabling 2FA is really not an option.

Would be nice to see this -- it has been added via PR in a few of the other developed integrations -- something about a refreshToken.

@Coch I did some research on this a couple weeks ago, but it appears that the python library that this component uses under the hood doesn't accept the 2FA codes. Something similar should probably be done to the alexa media integration, where in the HA UI it asks for all the 2FA details. After that the refreshToken is utilized to keep you authenticated.

I believe this is the library: https://github.com/tchellomello/python-ring-doorbell

So I think either a PR needs to be done on that repo to add the functionality, then the HA component will need to be updated after that.

I'm not super familiar with python, otherwise I would work on this. I may end up trying something eventually though since I currently am still using the ring integration via smartthings to determine doorbell motion right now.

Did similar actually but not familiar enough :)

There’s a PR here waiting to be committed that shows how it might be done — https://github.com/tsightler/ring-alarm-mqtt

I’ve managed to wedge it into this code — https://github.com/tsightler/ring-mqtt

All of that is based off this — https://github.com/dgreif/ring

All of what I see there suggests that it LOOKS straightforward — but...

ring seems to be broken for me tonight after updating HASS.IO. It now comes up with the error:
Error: 401 Client Error: Unauthorized for url: https://api.ring.com/clients_api/session
You will need to restart hass after fixing.
Where it was working and 2FA is not on. I did get an email talking about how they want 2FA on and such recently

Error: 401 Client Error: Unauthorized for url: https://api.ring.com/clients_api/session

Same here. I upgraded to 0.103.1 which caused my CPU to go to 100% for extended period of time. After reverting to 0.103.0, ring integration is now busted due to the above issue.

I'm still on 102.3 and after regular restart got the error.

adding me - no changes to config - just a restart and now fails to connect

I just updated to 103.2 and get the same issue and i have not done any changes to config.

Yep, restarted and its now complaining with the unauthorized error. That's on the latest 103.2 (and prior). I've never enabled 2FA on my ring account.

I'm still at Home Assistant 0.103.0 and have the same issue arise just now even without enabling 2FA yet, I guess Ring changed the API per region/account batch?

I tried to downgrade to 103.1 or 103.0 but the error remains.

I've confirmed the ring-doorbell package that the integration depends on has the same issue. Someone has raised an issue against it already, so hopefully it gets resolved shortly.

I'm on 0.103.4, and hitting this:

2019-12-24 11:10:36 ERROR (SyncWorker_9) [homeassistant.components.ring] Unable to connect to Ring service: 401 Client Error: Unauthorized for url: https://api.ring.com/clients_api/session

Never enabled 2FA.

2019-12-24 11:10:36 ERROR (SyncWorker_9) [homeassistant.components.ring] Unable to connect to Ring service: 401 Client Error: Unauthorized for url: https://api.ring.com/clients_api/session

Different Issue: See here: https://github.com/tchellomello/python-ring-doorbell/issues/146

A new API will need to be developed to support both proper OAuth Login and 2FA.

I'm just setting up Ring integration for the first time and ran into this. Is there any way around this? I really don't want to disable 2FA.

I'm just setting up Ring integration for the first time and ran into this. Is there any way around this? I really don't want to disable 2FA.

Awesome. So are we just waiting for this to be accepted then? I'm new to HASS and not sure how the procedure works.

I'm just setting up Ring integration for the first time and ran into this. Is there any way around this? I really don't want to disable 2FA.

Awesome. So are we just waiting for this to be accepted then? I'm new to HASS and not sure how the procedure works.

It'll probably be included in the next version of Home Assistant. I don't know for sure, but sit tight for a week or so.

Was this page helpful?
0 / 5 - 0 ratings