Ring Device integration via MQTT w/ Video Streaming

I do own a Ring alarm, but no siren, and I just don’t have much use for one as I don’t live close to anyone that would hear it anyway. I use an automation to trip the sirens on the Ring cameras over and over any time the alarm is in triggered state, and I have 6 outdoor cameras with sirens so I feel like that’s enough. If an intruder is going to be willing to ignore all of that, I don’t think another siren is going to make the difference.

I do appreciate the offer though.

great addon
i added it too soon i think all my devices have the generic ring names
then in the ring app i named and located all my devices but the names do not change in ha
is there a way to get my new ring names for devices or is it bes to renanme within the app

You can manually rename the devices in HA, or you can delete all of the devices from HA and then re-run the addon.

1 Like

FWIW I just did hassio in vmware and the ring addon went fine. Took a while for devices to show up though. As well ring has changed how you get your token. You have to click in the app for 3rd party now.

In the app for 3rd party? You saying somewhere in ring app there is a option for 3rd party?

yes when you enter your email and password for the code you get an email telling you what to do in the app
For your security, your verification code will not be sent by email. Here’s how to generate your verification code.

  1. Open the Ring App on a device or browser that you’ve previously used to sign in to Ring.

This could be the phone or browser you use often to access your Ring account.
2. Select Control Center from the Account or dropdown menu (☰) on the Dashboard.
3. Tap Account Verification.
4. Then tap Generate in the Authorize a New Device section.
5. Input the code on your new device or browser, and you’re in.

Yeah I did all that already. Let us know how long the cameras work before they drop out. Maybe I need to remove all the authorized clients in ring app and start over if you have no issues.

Is this only for email based verification? I haven’t seen anything like this but my codes are sent via SMS, not email.

Also, Hassio on VMware should definitely work as it’s the environment I use as the primary development platform.

Interesting have dozens and dozens of these clients in list…

This is “normal”, you’ll get a new ring-client-api entry every time the addon is started/restarted. I think it’s because the code generates a new session ID on startup. I think it might be possible to get rid of this behavior if I generated and stored a static session ID that could be used across startups, but I haven’t bothered with it since it’s mostly cosmetic and there are plenty of bigger issues to address.

This certainly has nothing to do with the camera event issues as that is a known issue impacting all users of the ring-client-api library, any type of interruption in connectivity has the potential to lead to the loss of camera events. Unfortunately, the maintainer of that code has been busy, as have I, so until someone has the time to dig through and figure out a workaround, that problem will continue to exist. At this point I haven’t event figured out a way to detect when it happens, but I admittedly have had near zero time to work on it and solving the problem will likely take hours of investigation at least.

The best suggestion for now is to just use the native HA integration for cameras as it shouldn’t suffer from the same issue, although it may have different issues.

1 Like

Thankfully the ring alarm has been working perfectly and that’s the most important thing for me.

No clue, I use email
BTW, the reason I did this project is Alexa does not see flood sensors so I could not create a routine.

I do not use hassio for ring cameras…

I’m having an issue with a First Alert Smoke/CO Detector connected to my Ring Alarm. Here is the log and the Warning I’m getting:


2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: binary_sensor.hallway_smoke_alarm

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Got update for entity with hash: ('sensor', '5abe9208-323d-4186-a53f-2ae6b1f1fc67 2fab3c5f-98b5-4085-aad3-78f3aede6819_info') '{'name': 'Hallway Info', 'unique_id': '2fab3c5f-98b5-4085-aad3-78f3aede6819_info', 'availability_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/2fab3c5f-98b5-4085-aad3-78f3aede6819/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'state_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/2fab3c5f-98b5-4085-aad3-78f3aede6819/info/state', 'json_attributes_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/2fab3c5f-98b5-4085-aad3-78f3aede6819/info/state', 'icon': 'mdi:information-outline', 'value_template': '{{value_json["batteryLevel"]}}', 'unit_of_measurement': '%', 'device': {'identifiers': ['2fab3c5f-98b5-4085-aad3-78f3aede6819'], 'name': 'Hallway', 'manufacturer': 'First Alert', 'model': 'Smoke Alarm'}, 'platform': 'mqtt'}'

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: sensor.hallway_smoke_alarm_info

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Got update for entity with hash: ('binary_sensor', '5abe9208-323d-4186-a53f-2ae6b1f1fc67 b47a1426-49ba-44c4-9500-e2b8f27b4868') '{'name': 'First Alert CO Alarm', 'unique_id': 'b47a1426-49ba-44c4-9500-e2b8f27b4868', 'availability_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/b47a1426-49ba-44c4-9500-e2b8f27b4868/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'state_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/b47a1426-49ba-44c4-9500-e2b8f27b4868/co/state', 'device_class': 'gas', 'device': {'identifiers': ['b47a1426-49ba-44c4-9500-e2b8f27b4868'], 'name': 'First Alert CO Alarm', 'manufacturer': 'First Alert', 'model': 'CO Alarm'}, 'platform': 'mqtt'}'

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: binary_sensor.hallway_co_alarm

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Got update for entity with hash: ('sensor', '5abe9208-323d-4186-a53f-2ae6b1f1fc67 b47a1426-49ba-44c4-9500-e2b8f27b4868_info') '{'name': 'First Alert CO Alarm Info', 'unique_id': 'b47a1426-49ba-44c4-9500-e2b8f27b4868_info', 'availability_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/b47a1426-49ba-44c4-9500-e2b8f27b4868/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'state_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/b47a1426-49ba-44c4-9500-e2b8f27b4868/info/state', 'json_attributes_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/b47a1426-49ba-44c4-9500-e2b8f27b4868/info/state', 'icon': 'mdi:information-outline', 'value_template': '{{value_json["batteryLevel"]}}', 'unit_of_measurement': '%', 'device': {'identifiers': ['b47a1426-49ba-44c4-9500-e2b8f27b4868'], 'name': 'First Alert CO Alarm', 'manufacturer': 'First Alert', 'model': 'CO Alarm'}, 'platform': 'mqtt'}'

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: sensor.hallway_co_alarm_info

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Got update for entity with hash: ('binary_sensor', '5abe9208-323d-4186-a53f-2ae6b1f1fc67 5955ca14-9438-4b26-8d26-80d5c6afbb63') '{'name': 'Master Bedroom ', 'unique_id': '5955ca14-9438-4b26-8d26-80d5c6afbb63', 'availability_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/5955ca14-9438-4b26-8d26-80d5c6afbb63/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'state_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/5955ca14-9438-4b26-8d26-80d5c6afbb63/smoke/state', 'device_class': 'smoke', 'device': {'identifiers': ['5955ca14-9438-4b26-8d26-80d5c6afbb63'], 'name': 'Master Bedroom ', 'manufacturer': 'First Alert', 'model': 'Smoke Alarm'}, 'platform': 'mqtt'}'

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: binary_sensor.master_bedroom

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Got update for entity with hash: ('sensor', '5abe9208-323d-4186-a53f-2ae6b1f1fc67 5955ca14-9438-4b26-8d26-80d5c6afbb63_info') '{'name': 'Master Bedroom Info', 'unique_id': '5955ca14-9438-4b26-8d26-80d5c6afbb63_info', 'availability_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/5955ca14-9438-4b26-8d26-80d5c6afbb63/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'state_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/5955ca14-9438-4b26-8d26-80d5c6afbb63/info/state', 'json_attributes_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/5955ca14-9438-4b26-8d26-80d5c6afbb63/info/state', 'icon': 'mdi:information-outline', 'value_template': '{{value_json["batteryLevel"]}}', 'unit_of_measurement': '%', 'device': {'identifiers': ['5955ca14-9438-4b26-8d26-80d5c6afbb63'], 'name': 'Master Bedroom ', 'manufacturer': 'First Alert', 'model': 'Smoke Alarm'}, 'platform': 'mqtt'}'

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: sensor.master_bedroom_smoke_alarminfo

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Got update for entity with hash: ('binary_sensor', '5abe9208-323d-4186-a53f-2ae6b1f1fc67 686283e7-ac22-4923-9693-8f12139f6798') '{'name': 'First Alert CO Alarm', 'unique_id': '686283e7-ac22-4923-9693-8f12139f6798', 'availability_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/686283e7-ac22-4923-9693-8f12139f6798/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'state_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/686283e7-ac22-4923-9693-8f12139f6798/co/state', 'device_class': 'gas', 'device': {'identifiers': ['686283e7-ac22-4923-9693-8f12139f6798'], 'name': 'First Alert CO Alarm', 'manufacturer': 'First Alert', 'model': 'CO Alarm'}, 'platform': 'mqtt'}'

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: binary_sensor.master_bedroom_co_alarm_2

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Got update for entity with hash: ('sensor', '5abe9208-323d-4186-a53f-2ae6b1f1fc67 686283e7-ac22-4923-9693-8f12139f6798_info') '{'name': 'First Alert CO Alarm Info', 'unique_id': '686283e7-ac22-4923-9693-8f12139f6798_info', 'availability_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/686283e7-ac22-4923-9693-8f12139f6798/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'state_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/686283e7-ac22-4923-9693-8f12139f6798/info/state', 'json_attributes_topic': 'ring/5abe9208-323d-4186-a53f-2ae6b1f1fc67/alarm/686283e7-ac22-4923-9693-8f12139f6798/info/state', 'icon': 'mdi:information-outline', 'value_template': '{{value_json["batteryLevel"]}}', 'unit_of_measurement': '%', 'device': {'identifiers': ['686283e7-ac22-4923-9693-8f12139f6798'], 'name': 'First Alert CO Alarm', 'manufacturer': 'First Alert', 'model': 'CO Alarm'}, 'platform': 'mqtt'}'

2021-07-08 11:38:47 INFO (MainThread) [homeassistant.components.mqtt.mixins] Ignoring unchanged update for: sensor.master_bedroom_co_alarm_info_2

2021-07-08 11:38:51 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'batteryLevel' when rendering '{{value_json["batteryLevel"]}}'

2021-07-08 11:38:51 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'batteryLevel' when rendering '{{value_json["batteryLevel"]}}' ```

Can you describe what actual problem are you having? The info messages are normal and even the warning is not unexpected as it’s due to a change that was introduced in HA 2021.4 on how templates deal with missing variables. Previously missing variables were just just silently ignored but now they generate a warning, indeed I do need to fix it but it’s just cosmetic at this point (the new behavior will not be enforced until 2021.10).

No actual problem, just the Warning. No worries - just wasn’t sure if it was mentioned before. Thanks!

Hi all. For those that have been experiencing the issue where cameras silently stop updating motion/ding events I have pushed a new update, 4.5.7, that I hope fixes, or at least dramatically improves, this behavior. It’s using a custom ring-client-api that I have hacked with a timeout so that any request that hangs for more than 20 seconds is timed out, rather than just hanging there forever.

I have spent hours tracking this down and testing various workarounds and, so far, this seems to be a solid fix, but only testing in a larger variety of environments will really help me know that for sure. Previously, any minor interruption in network connectivity or the Ring services had about a 75% chance of causing the addon to hang, but so far, with this fix, it’s been able to handle everything I’ve thrown at it.

Note that this impacted only cameras and primarily motion/ding events, but could also impact any camera functions (not alarm/lighting functions). I believe the main reason it impacted motion/ding events more than others is simple because they happen at 2 second intervals vs 20 second intervals (or the 30 second intervals for snapshots), so there was simply a much higher likelihood that any short outage would cause the polling request to hang since they happened 10x more frequently than the background polling events.

1 Like

@tsightler i will give this a test tomorrow night and provide feedback. Thank you very much for taking the time to tweak it for us.

@tsightler so i guess i had auto update installed and it updated. So im at work looking and all seems normal BUT…

I have “enable_cameras: true” and i also have :snapshot_mode: motion" the motion works but im not seeing the camera entities from your integration i only see camera entities if i enable the HA ring integration and ofcoarse the HA integration times out still

I don’t really know what would keep camera entities from appearing, the project has had camera support for a long time and I’ve not heard of this particular issue before. Are there any errors in the HA logs about failed discovery messages?