Ring Device integration via MQTT w/ Video Streaming

I have 50 or so ring-client-api listed in control center. Should I delete a bunch of them?
Thanks,
Papa Lanc

edit: actually there are several unknowns as well as some chrome as well as ring-mqtt. Can I just remove all devices and then generate a new token for 5.30?

If you only have a single ring-mqtt install, then you should delete all of them. There should only be one needed per-instance of ring-mqtt. You can remove all devices if you want to, but that means youā€™ll need to login from any devices, such as web browsers, phones, tablets. Itā€™s generally not required to remove these.

I upgraded to the latest HAOS (2023.6.0) and now am seeing errors for the Generic Camera I setup a long time ago for this Ring integration:

Logger: homeassistant.components.generic.camera
Source: components/generic/camera.py:194
Integration: Generic Camera ([documentation](https://www.home-assistant.io/integrations/generic), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+generic%22))
First occurred: 8:10:36 PM (2 occurrences)
Last logged: 8:18:15 PM

* Error parsing template Template<template=(https://homeassistant:8123{{ states.camera.front_door_snapshot.attributes.entity_picture }}) renders=1>: UndefinedError: 'None' has no attribute 'attributes'
* Error parsing template Template<template=(https://homeassistant:8123{{ states.camera.front_door_snapshot.attributes.entity_picture }}) renders=2>: UndefinedError: 'None' has no attribute 'attributes'

Before I file an issue with Generic Camera - anyone else experiencing this?

There are no known issues with ring-mqtt and 2023.6.0 so I doubt this is an actual bug. Have you definitely completely rebooted (not just restart HA)? Both my development and production HA instances had some strange behaviors with just the required restart (for production, I couldnā€™t get Z-wave integration to complete its setup, just kept retrying), but both returned to normal operation after a full reboot instead (Setupā€¦Three Dotsā€¦Restart Home Assistantā€¦Advanced Optionsā€¦Reboot System).

The error above appears to show that HA doesnā€™t think there is any entity with the name camera.front_door_snapshot so you could also look in devices or developer tools and see if it really exists. If you use developer tools, you can just select States, click the Set State dropdown and type camera.front_door_snapshot into the entity field to see if there is a device there with states. You should clearly see an ā€œenttity_pictureā€ state attribute on this device if everything is working.

Thanks for the response

I checked the entities and saw there was an entity but it had a different name

In entities I see:
camera.front_door_snapshot_2

When I go to the MQTT info for the front doorbell I see the following info under attributes:
https://homeassistant:8123{{ states.camera.front_door_snapshot.attributes.entity_picture }}

I also see the same entity (snapshot_2) referenced as a still image under MQTT so it feels linked?

As it notes in the ring-mqtt documentation, the data provided in the information sensor is just a guess based on default entity naming as ring-mqtt has no way to know exactly what HA will name any given device. For example, HA usually adds the ā€œ_2ā€ suffix if thereā€™s already an entity with the name but ring-mqtt would have no way to actually know this. If your actual HA entity name is different then you should use that vs the guess in the info sensor.

Thank you so much - both the base URL and the entity (_2) needed to be changed to get the template error to go away, but now itā€™s working perfectly. I definitely missed that part of the instructions. Iā€™m shocked it worked for this long without that change, and no errors. I guess something changed with this new OS that helped identify the template problem.

[And Iā€™m not sure if Iā€™m imagining things or not, but the image load times appear much faster!]

To be fair, there is significant room for improvement here. In modern HA itā€™s possible to provide an object_id option which will be used by HA to generate the entity ID instead of the device name, this way you can more easily assure a unique identifier although there could still be cases where it would be wrong.

As most people donā€™t seem to understand the templating system Iā€™ve also thought about just providing a URL that pulls the still image directly from ring-mqtt because then I could control the URL more easily and perhaps just publish the information within the web UI for the addon. I just havenā€™t had much time to work on this project lately and the code as-is mostly works, so I havenā€™t done it. Iā€™m hopeful to have a little bit of time over the next couole of months so maybe Iā€™ll finally get time for a 6.x version.

2 Likes

Looking for some help / guidance on if the following is possible with my setup. Been reading through everything online but Iā€™m just not sure or what Iā€™m doing wrong.
(Maybe this is just an issue with buffering as the video data goes to ring cloud first being being downloaded therefore cannot be resolved. But thought id check)
Thanks

Objective:
When the doorbell is pressed, capture a snapshot image & send to my phone

Current progress:
Using an automation I can get a screenshot sent to my device, however the image is not current (ie of the person who pressed the doorbell)

Test Automation (which simply takes a screenshot):
Action - Camera: take snapshot / Target: camera.front_door_snapshot / Filename : /config/www/tmp/snapshot-doorbell.jpg

The image file is generated at the point its triggered (file timestamp confirms), but iā€™m standing in front of the doorbell - and the image seems older (not of me)

Looking at the device settings in HA, the snapshot interval is set to 30 seconds. I assume this is for the image shown just before streaming video, which is fine. But how do I get a live image from the camera to see whoā€™s a the door.

BTW Not sure what the Event Select option does or how it affects anything, could you explain?

Thanks

Setup:
HA Core & MQTT-ring running as dockers on same unraid server
Ring - No active subscription

You did not mention what model doorbell you have, but if you have any Ring low-power doorbell (i.e. basically anything that is not a Pro or Elite model), then having no subscription means you will be unable to achieve your objective since these cameras will not take a snapshot while recording an event. This is covered in the project FAQ. Do you have a Pro or Elite model doorbell?

1 Like

Video Doorbell Wired. My apologies, Iā€™ve re-read the FAQā€™s and found the section you refer too. Many thanks,

Hello can you tell me the easiest way to get a new token for ring in home assistant. Saying itā€™s invalid today

The method to get a new token is the same method used to get the first token, so just follow the instructions you used initially. If you are talking about the addon, open the addon web UI and authenticate.

Iā€™m using docker. Iā€™m running that long command with ā€”enteypoint

It prompts me for my email and password saying that I was reading the latest data from the ring-state.Jsn file but itā€™s not taken my ring login

When I go and look at that file, itā€™s just the big giant token. That is now invalid as of this morning.

Everything you describe is how it should work. If your token is suddenly invalid and your credentials arenā€™t working, that sounds more like a service outage and indeed Ring status page shows an outage today for Andriod authentication (what ring-mqtt uses):

Ring.com Status

If you are still unable to authenticate, feel free to start a discussion or open an issue on the Github project page, itā€™s not really possible to troubleshoot issues here in this thread. Thanks!

Hi All,

After a long time I wanted add a new door sensor, but MQTT doesnā€™t find it.

I have already configured it in the Ring app and I have updated my token. Any Idea please ?

Many thanks

I will reply to myself and maybe this will help someone else. After updating to the latest version 5.4.1 my sensor was automaticaly detected. My previous version was 5.0.4 and I found out that in update v5.2.0 there was a bug fix with the automatic discovery of generic binary sensors.

1 Like

So o Just tried again today. No outage reported anymore and still the same issue in screen shot.

Is there an easy way for me to redo this token part? If thatā€™s what you recommend?

As stated above, you should acquire a new token exactly the way you acquired one the first time using the Web UI or the CLI. Nothing is different about re-acquiring a token vs getting the token the very first time, itā€™s exactly the same process. If you still have problems, please open an issue on the Github project page.

Contacted Ring Support about this issue and they were completely useless, my flood cam got that update recently and there is no toggle in the app to revert the video codec, so I wonā€™t be able to automate recordings of my cameras. If you have an update on this matter please let us know. I will probably start considering POE cameras to replace my Ring ones