Ring Device integration via MQTT w/ Video Streaming

There is nothing to solve here as it’s simply not possible. I don’t really know why people think that somehow this integration can change the fundamental behavior of Ring alarm, but I guess I need to add it to the FAQ. It’s not possible to set the alarm into “pending” state with the Ring app, so thus it’s not possible to do so with ring-mqtt, it’s mostly as simple as that.

Hey Guys,
Would it be possible to get the Ring Intercom working with this Integration, since the current core Ring integration does not see it and the only way to get it into HA is via a workaround through Homebridge.
I did not see anything about it here yet and nothing in the repo.

1 Like

This isn’t really the place to ask for features, that would be the Github project page. I’ll never own a Ring intercom, so the only way it will ever be included is if someone is willing to share their intercom with me or at least be willing to test. I really don’t even have any idea what such an integration would look like or what functions would be needed, but if you are willing to share your device and can describe what functions you’d want, then it would potentially be possible, but please pursue that on the project page, not here. If the basic capabilities needed are just knowing with the doorbell is pressed and unlocking the door, then it seems completely doable.

1 Like

Hi guys,

first of all a big compliment for the support here on the same questions over and over again and all the work behind the addon! Great!

After 3 days I was finally able to connect the system. Sensors and cams are integrated. Live Steam works!

BUT, unfortunately the still images are not updated. All cams take a new snapshot either every 30 seconds or every 10 minutes. That depends on whether battery or cable.

But in Home Assistant, the images are all old. I have already tried to reload mqtt-ring and the mqtt broker as well. I restarted all the cams via Generic Camera and reloaded them in the Ring app, reloaded Home Assistant, no success.

Did I forgot something? Or are the images not updated when the cam itself has taken a new screenshot?

All screenshot show daytime. But we have night now.

Many thanks for the support and a nice weekend!

Apologies if this is listed somewhere but this thread is really long. Was there a way to bring Ring video /screenshots to HA after all?

I’ve been running into an issue with this addon and the go2rtc addon both competing for port 8554.

On startup, if the go2rtc addon starts first, the ring-mqtt addon will not start because port 8554 is already in use by go2rtc. If the ring-mqtt addon starts first, go2rtc seems to automatically adjust itself to listen on port 8553 instead. Unfortunately there’s no way to define startup order for addons.

In the ring-mqtt logs I see

2023-02-08T13:10:13.401Z ring-rtsp [go2rtc] INF go2rtc version 1.1.1 linux/amd64
2023-02-08T13:10:13.402Z ring-rtsp [go2rtc] INF [rtsp] listen addr=:8554
2023-02-08T13:10:13.402Z ring-rtsp [go2rtc] INF [webrtc] listen addr=:8555

In the go2rtc logs I see

09:11:26.215 ERR [rtsp] listen error="listen tcp :8554: bind: address already in use"
09:11:26.223 INF [srtp] listen addr=:8443
09:11:26.223 INF [webrtc] listen addr=:8555

From the ring-mqtt logs it almost appears as if this addon runs its own instance of go2rtc. Does this mean I do not need to run the standalone go2rtc addon beside it?

Meanwhile, I’m having issues accessing the camera’s live feeds.
From the ring-mqtt logs

2023-02-08T13:16:11.873Z ring-rtsp [go2rtc] WRN github.com/AlexxIT/go2rtc/cmd/rtsp/rtsp.go:219 > error="read tcp XXX.XX.X.X:8554->XXX.XX.X.X:34800: read: connection reset by peer"
2023-02-08T13:16:11.968Z ring-rtsp [go2rtc] WRN github.com/AlexxIT/go2rtc/cmd/rtsp/rtsp.go:219 > error=EOF
2023-02-08T13:16:12.158Z ring-rtsp [go2rtc] WRN github.com/AlexxIT/go2rtc/cmd/rtsp/rtsp.go:219 > error=EOF
2023-02-08T13:16:12.213Z ring-rtsp [go2rtc] WRN github.com/AlexxIT/go2rtc/cmd/rtsp/rtsp.go:219 > error="read tcp XXX.XX.X.X:8554->XXX.XX.XX.X:35798: read: connection reset by peer"

In HA I’m just getting “Timeout while loading URL” when trying to access the RTSP URL

I have a problem with my Ring camera setup via MQTT. It worked like a charm the last weeks and suddenly the livestream didn’t appear anymore when I opened the generic camera I have setup in Home Assistant. When I tried to re-setup the camera in the UI I got an time out and in the logs of the Ring MQTT addon I got these informations:

2023-02-08T14:53:12.975Z ring-rtsp [go2rtc] DBG [rtsp] new consumer stream=*******_live
2023-02-08T14:53:12.978Z ring-rtsp [go2rtc] DBG [streams] probe producer url=exec:/app/ring-mqtt/scripts/start-stream.sh ******* live ring/*******/camera/******* {output}
2023-02-08T14:53:12.980Z ring-rtsp [go2rtc] DBG [exec] run url="exec:/app/ring-mqtt/scripts/start-stream.sh ******* live ring/*******/camera/******* rtsp://localhost:8554/*******"
2023-02-08T14:53:13.004Z ring-rtsp [Haustür] Sending command to activate live stream ON-DEMAND
2023-02-08T14:53:13.011Z ring-mqtt [Haustür] Received set live stream state ON-DEMAND rtsp://localhost:8554/*******
2023-02-08T14:53:13.011Z ring-mqtt [Haustür] ring/*******/camera/*******/stream/state ON
2023-02-08T14:53:13.012Z ring-attr [Haustür] ring/*******/camera/*******/stream/attributes {"status":"activating"}
2023-02-08T14:53:13.013Z ring-mqtt [Haustür] Initializing a live stream session for Ring cloud
2023-02-08T14:53:13.096Z ring-rtsp [Haustür] State indicates live stream is activating
2023-02-08T14:53:13.615Z ring-mqtt [Haustür] Live stream session successfully initialized, starting worker
2023-02-08T14:53:13.621Z ring-wrtc [Haustür] Live stream WebRTC worker received start command
2023-02-08T14:53:13.681Z ring-wrtc [Haustür] Live stream transcoding process is starting
2023-02-08T14:53:13.864Z ring-wrtc [Haustür] Websocket signalling for Ring cloud connected successfully
2023-02-08T14:53:14.798Z ring-mqtt ERROR - Uncaught Exception
2023-02-08T14:53:14.798Z ring-mqtt Error: negotiate codecs failed.
2023-02-08T14:53:15.801Z ring-mqtt The ring-mqtt process is shutting down...
2023-02-08T14:53:15.803Z ring-mqtt Setting all devices offline...
2023-02-08T14:53:15.806Z ring-rtsp exit OK

Problems occurs on all my devices. Does anybody has an idea, what is going wrong?

This is the key message:

2023-02-08T14:53:14.798Z ring-mqtt Error: negotiate codecs failed.

Ring has suddenly started rolling out HEVC/H.265 video codec support and, based on the Ring forums, is seemingly just randomly enabling it on various cameras. You can revert to AVC/H.264 by enabling the new Legacy Video Mode option for the camera.

Now, indeed, the code shouldn’t crash on this case, and in the latest 5.1.3 release this error is now properly trapped and logged with a message about Legacy Video Mode.

I honestly have no idea what Ring is thinking here, there are still so many devices that don’t support H.265 downstream, and the forum is pretty much full of such issues. But even more confusing is the seeming randomness of it all. Users on the forum with mulitple cameras report the feature being enabled only a single camera, or a small number of cameras.

Now, it’s easy enough for me to enable H.265 support in ring-mqtt, but the problem is that there’s still a LOT of downstream devices that will not play back H.265, mostly due to licensing issues vs any actual technical limitations. Sure, I could also transcode the H.265 stream back to H.264, but as ring-mqtt is run on a lot of low power devices, that’s not terribly practical as it will mean a significant increase in CPU usage.

For now, enabling Legacy Video Mode is the best way to maintain compatibility with ring-mqtt and, honestly, with lots of other devices (for example, lots of reported issues with Echo Show integration not working after Ring “upgrades” their video capabilitiy).

Thanks for the comment, I already upgraded my plugin and the error message is gone. For me only one camera had this problem (front door), all other cameras working like a charm. Also the Echo Show says that the camera is not working properly (as you wrote). Interesting fact: I cannot see a possibility to enable legacy mode on my ring device, it is also a quite old one (2nd generation doorbell). So I guess I have to live with that or get another (newer) doorbell.

It doesn’t seem to be camera specific. They seem to be just randomly enabling it for devices. There are several topics on the Ring community forums about this issue, you may want to look there. There’s some advice as to what to do if you can’t find an option regarding Legacy Video Mode.

HEVC not supported? Not true as other are showing camera preview but one is not - Products / Security Cams - Ring Community

This all started back in late January but it seems to be showing up on more and more cameras. So far none of my 8 cameras have received this change.

I have an issue where the ring binary sensors (not the mqtt ones) get trigged frequently by motion caused by high wind events (trees blowing, camera shaking) or vehicles in the distance driving by at speed.

These motion events still trigger the HA official ring integration binary sensors, however, they do not cause any events to be registered by the official ring app so do not meet some motion score model I suspect to be considered useful to send an alert. (which is fine)

The issue I have is that I use the official ring binary sensors to trigger my workflow in a Node Red flow. This works fine in all times except for these ‘phantom’ triggers.

My main use case is to identity persons (as passed in by the ring-mqtt binary sensor) and only send notifications of such events by way of the HA app. (thus I have full control of what ring events I will receive)

The issue is that because these phantom events occur, the ring-mqtt sensor is not updated (as no real or useful motion/person event has occurred) so not state changes have occurred. If the last state was a person walking by, the isPerson state in the mqtt message is still true and thus in windy scenarios, my person trigger keeps going off because the HA ring binary sensor is super sensitive.

If I switch to using the ring-mqtt binary sensor, they seem to have a long ON state applied for when motion is detected (3-4 minutes) before turning off, which means not other meaningfully events are trigged during this time.

ASK; 1) Is it possible that the ring-mqtt sensor attribute [personDetected] could be rest back to false after a few seconds? OR
2) The ring-mqtt binary sensors state lifetime can be reduce / configured. Ideally it would match the HA ring binary sensors which toggle from ON/OFF within a few seconds. This would be the ideal for me as it seems to not be as sensitive to the events I have described above and so more accurate to real events.

Is any of the above asks possible now through config that I may have missed?

Thanks

Use this python script:

and create an automation to change the state of the binary sensors to off after 5 seconds of turning on.

This worked perfectly. Thanks Robert

1 Like

Glad it’s worked for you. :slight_smile:

I’m troubleshooting why I can’t get my live streaming to work. I would like to restrict the addon to only one ring location. But for the life of me I can’t get the config UI for the addon to take my location. I’ve tried all of these formats:
[“xxxxxxxxxxx”]
“xxxxxxxxx”
[“xxxxxxxxx”,]

The save button never lights up and lets me save the location. It seems like it doesn’t like how it’s formatted. Is there a config file somewhere I can go manually enter it?

Thanks for any help!

Hello,
When i try to add a Generic Camara, I get this error in the logs for the image url:

[homeassistant.components.generic.config_flow] Problem rendering template Template(“https://homeassistant:8123{{ states.camera.porte_entree_snapshot.attributes.entity_picture }}”): UndefinedError: ‘None’ has no attribute ‘attributes’

Thanks for your help!

Please can you tell us what was in your image url setting?

If possible please copy and paste that text from the image url in the user interface.

Also you may want to test the template in developer tools > template.

I got this sorted…I just changed to edit yaml mode and I could just manually shove the ID in there and it worked the first time! Not sure what I was doing wrong in the form…but I’ll take it :slight_smile:

First of all, wanted to say what an amazing addon this is.

I’ve got the RTSP stream going through Frigate… works like a champ. The only issue is the CPU usage… any idea what HWACCEL options work?

There is no transcoding in the addon, so hwaccel is unlikely to help (even on a RPi 4 the ffmpeg usage of for 8 streams is maybe 25% of a single core). The CPU usage is almost completely due to the fact that the WebRTC code for receiving the stream from Ring uses werift, which is a WebRTC implementation written in pure Javascript. It’s great stuff, but decoding an WebRTC stream in Javascript has a lot of CPU overhead. As this project is designed for on-demand vs 24x7 streaming, this isn’t much of an issue.