Ring integration setup fails

This didn’t appear to work for me. I upgraded and I now have 0.2.8 in HA. As such, I removed the header “hack” from init.py and then rebooted HA. It came up with the same denial. I then removed the .ring_cache.pickle file as well, rebooted HA, same result.

Is there anything required to initiate the OAuth2 connection?

1 Like

0.2.8 ?
Where in HA

Download the zip
Extract the ring_doorbell folder only
Copy it to the samba share over the network to the config folder

From terminal docker session
Type
cp -r /config/ring_doorbell usr/local/lib/python3.7/site-packages/

If your running 3.6 its a different path

This didn’t work for me, either.

This did not work for me either

Manually updating the requirements_all.txt and the components/ring/manifest.json in the homeassistant src folder in my hassos installation worked for me, thank you. a manual pip install got overwritten when I restarted hassio.

2 Likes

Okay I see
Marcelo has been bumping the version since i looked at it he’s now at 0.2.9 but that hasn’t fully updated to the dist.
I can only confirm that it all works for me even on 0.2.6 and now 0.2.8.

I Can Confirm That
I never hacked the components/ring/init.py
I never used the custom_components hack

Tests I Just Performed
Ring was working For Me
i ran through the following just now as a test

I Remove The ring-doorbell

bash-5.0# pip uninstall ring-doorbell
Uninstalling ring-doorbell-0.2.6:
  Would remove:
    /usr/local/lib/python3.7/site-packages/ring_doorbell-0.2.6.dist-info/*
    /usr/local/lib/python3.7/site-packages/ring_doorbell/*
Proceed (y/n)? y
  Successfully uninstalled ring-doorbell-0.2.6

I Installed The ring-doorbell

bash-5.0# pip install ring-doorbell
Collecting ring-doorbell
  Using cached https://files.pythonhosted.org/packages/e3/b9/c9ceb6d286f95d7ee640e248556977c0fe02a821b7a7f879d950c413cdf8/ring_doorbell-0.2.8-py3-none-any.whl
Requirement already satisfied: requests==2.22.0 in /usr/local/lib/python3.7/site-packages (from ring-doorbell) (2.22.0)
Requirement already satisfied: requests-oauthlib==1.3.0 in /usr/local/lib/python3.7/site-packages (from ring-doorbell) (1.3.0)
Requirement already satisfied: pytz in /usr/local/lib/python3.7/site-packages (from ring-doorbell) (2019.3)
Requirement already satisfied: oauthlib==3.1.0 in /usr/local/lib/python3.7/site-packages (from ring-doorbell) (3.1.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/site-packages (from requests==2.22.0->ring-doorbell) (1.25.7)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests==2.22.0->ring-doorbell) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests==2.22.0->ring-doorbell) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests==2.22.0->ring-doorbell) (2019.11.28)
Installing collected packages: ring-doorbell
Successfully installed ring-doorbell-0.2.8
bash-5.0# 

Now@ ring-doorbell 0.2.8

I Updated The manifest.json In The components/ring Folder

{
  "domain": "ring",
  "name": "Ring",
  "documentation": "https://www.home-assistant.io/integrations/ring",
  "requirements": ["ring_doorbell==0.2.8"],
  "dependencies": ["ffmpeg"],
  "codeowners": []
}

I removed the pickle file.

I rebooted the whole system.

Ring Is Still Working for me.

2 Likes

Harry, thanks for documenting that…

The key appears to be updating the manifest.json file so it doesn’t overwrite the ring_doorbell file on reboot.

Thanks!

I got it working using the following steps. Thanks to @Harry13, @pickerin, and @tom_w!

  1. Install ring-doorbell 0.2.8
  2. Update requirements_all.txt and manifest.json changing the ring component version to 0.2.8.
  3. Delete .ring_cache.pickle
  4. Reboot
1 Like

I basically did the same thing, but didn’t have to update the requirements_all.txt…it’s working so far.

Where are the “requirements_all.txt” and “manifest.json” files? I’m running HASSIO and can’t find them.

Look at my post a bit further up
8h before this to get the access

Location is
cd /usr/src/homeassistant/homeassistant/componets/ring

I see that you said they are in the components/ring folder. But I don’t have a components folder, at least I can’t find it. I have a custom_components but I know that’s not it.

Sorry in the car so hard to type
But all explained above

If you’re using a Hass.io Add-on for the terminal then make sure you turn off Protection Mode.

Thanks, I did that. I was eventually able to find the json file. Just made the changes and rebooted and all is working as expecting so far. Thanks to this thread.

1 Like

Steps to upgrade ring 0.2.8 on hassbian

# sudo systemctl stop [email protected]

# sudo nano /srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/ring/manifest.json

change X.2.X to 0.2.8
"requirements": ["ring_doorbell==0.2.8"]

# sudo rm /home/homeassistant/.homeassistant/.ring_cache.pickle

# sudo -u homeassistant -H -s
# cd /srv/homeassistant
# python3 -m venv .
# source /srv/homeassistant/bin/activate

# pip3 uninstall ring-doorbell
# pip3 install ring-doorbell


# reboot

Confirmed working hassbian 0.102.3

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:

The server in blue is my Hassio box.

After disabling the Ring.com integration it fell back to the baseline.
I’m not willing to have that volume of traffic just to have Ring…

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…

All of this traffic is coming from HA, almost none from my actual Ring cameras which are also communicating with the cloud.