Ring Device integration via MQTT w/ Video Streaming

The only time you need to do anything with rtsp-simple-server yourself is if you are trying to perform a standard install. If that’s the case you’ll need to download the correct version for you platform, and extract the binary from the downloaded archive file. The archive only contains two files, the rtsp-simple-server binary and the config file, but the config file isn’t needed since ring-mqtt will provide it’s own. I usually just suggest that the rtsp-simple-server binary be placed in /usr/local/bin since that’s almost always in the default PATH, but anywhere in the PATH is valid.

If you are using the addon or Docker version of ring-mqtt, none of that is required as rtsp-simple-server, and all other dependencies, are already in the Docker hosted image, thus why that is the recommended install method.

Does anyone have clear instructions to play back recorded clips? every time i try, i get this in the log.

2021-10-03T19:04:34.399Z ring-mqtt [Front Door] Received set event stream state ON
2021-10-03T19:04:34.400Z ring-mqtt [Front Door] Event stream can only be started on-demand!

Also, maybe a better explanation how they work? i see in the log that certain events can fill up the 5 spaces, only while live stream is enabled.

I feel like this is pretty well documented in the camera documentation, but if you have suggestions to improve it I’m happy to hear them.

The summary version is that the only difference between playing back a live stream and playing back an event stream is the path that you use, live streams are rtsp://<server_name_or_IP>/<camera_id>_live and event streams are rtsp://<server_name_or_IP>/<camera_id>_event, that’s the only difference. To play an event stream, simply configure an RTSP client to use the even stream path.

Your example above implies that you are attempting to toggle the event stream on manually, but this isn’t supported for event streams because it doesn’t really make since as, if there are no viewers of the RTSP stream, the RTSP server will shut the stream down 5 seconds later anyway. Thus event streams can only be started “on demand” by a client connecting to the RTSP path and requesting the stream.

By default the event stream plays back the most recent motion event, but it’s possible to use the event selector to select any of the 5 most recent motion, demand, or ding events.

Event streams are not related to live streams in any way, you can have both a live stream and an event stream active for the same camera even at the same time. As a matter of fact, that’s exactly how I have my HA camera dashboard setup, each camera has two entities on the dashboard, both a live stream and an event stream camera entity, and I have a card with the event selector for all my cameras, so that I can pick the event I want for any event stream camera at any time. That, way I click the live stream image to bring up the live camera view, or I click the event stream image to bring up the selected event camera with the selected event recording.

It is possible to manually start a live stream without an RTSP client, but that’s because there is a potential use case for this since live streams also cause Ring to create an on-demand recording, so this allows manually creating records based on automations other than the normal Ring motion/ding events. Events are already recorded, so there’s no reason to manually start them, thus they are only stated when an client requests them.

2 Likes

I knew i had read that earlier rtsp://<server_name_or_IP>/<camera_id>_event but couldnt find it when i posted.

Thanks for the reply, and awesome work!

maybe on the camera documentation, separate the line as its currently
‘Live Stream: <camera_id>_live Event Stream: <camera_id>_event’
to this
‘Live Stream: <camera_id>_live
Event Stream: <camera_id>_event’

Amazing add-on! Makes everything so easy with Ring… I have one problem. I can’t get any devices into Mosquitto.

Complete new VM of Home Assistant. Installed on Linux VM on Unraid.

Default settings for installing Mosquitto broker
Current version: 6.0.1

Default settings for Ring-mqtt with Video Streaming:
Current version: 4.8.4

Logs of Ring-Mqtt show all new devices. (Just installed a ring alarm 2 days ago). Nothing is making it back over to MQTT…It was running flawlessesly for a year. I thought maybe it was my home assistant so did a new clean install.

Thanks for any help. Cheers

Logs and config files from both?

MQTT:
1633355714: New connection from 172.30.32.2 on port 1883.
1633355714: Socket error on client , disconnecting.
1633355834: New connection from 172.30.32.2 on port 1883.
1633355834: Socket error on client , disconnecting.
1633355954: New connection from 172.30.32.2 on port 1883.
1633355954: Socket error on client , disconnecting.
1633356074: New connection from 172.30.32.2 on port 1883.
1633356074: Socket error on client , disconnecting.
1633356194: New connection from 172.30.32.2 on port 1883.
1633356194: Socket error on client , disconnecting.
1633356314: New connection from 172.30.32.2 on port 1883.
1633356314: Socket error on client , disconnecting.
1633356434: New connection from 172.30.32.2 on port 1883.
1633356434: Socket error on client , disconnecting.
1633356554: New connection from 172.30.32.2 on port 1883.
1633356554: Socket error on client , disconnecting.
1633356674: New connection from 172.30.32.2 on port 1883.
1633356674: Socket error on client , disconnecting.
1633356794: New connection from 172.30.32.2 on port 1883.
1633356794: Socket error on client , disconnecting.
1633356914: New connection from 172.30.32.2 on port 1883.
1633356914: Socket error on client , disconnecting.
1633357034: New connection from 172.30.32.2 on port 1883.
1633357034: Socket error on client , disconnecting.
1633357106: Saving in-memory database to /data/mosquitto.db.
1633357154: New connection from 172.30.32.2 on port 1883.
1633357154: Socket error on client , disconnecting.
1633357274: New connection from 172.30.32.2 on port 1883.
1633357274: Socket error on client , disconnecting.
1633357394: New connection from 172.30.32.2 on port 1883.
1633357394: Socket error on client , disconnecting.
1633357514: New connection from 172.30.32.2 on port 1883.
1633357514: Socket error on client , disconnecting.
1633357634: New connection from 172.30.32.2 on port 1883.
1633357634: Socket error on client , disconnecting.

RING MQTT : Imgur: The magic of the Internet

Sorry new to forum and wouldn’t allow me to post more links? So took a screenshot. Nothing changed from stock install.

Have you set a username and password in MQTT same as whatever admin account you log in with?

logins:

  • username: xxxxx
    password: yyyyyyy
    customize:
    active: false
    folder: mosquitto
    certfile: fullchain.pem
    keyfile: privkey.pem
    require_certificate: false
    anonymous: false

formatting above is off

Yup just confirmed it all correct.

well how about ring?
enable_cameras: false
snapshot_mode: disabled
livestream_user: ‘’
livestream_pass: ‘’
enable_modes: false
enable_panic: false
beam_duration: 100
disarm_code: ‘3103’
mqtt_host: <auto_detect>
mqtt_port: <auto_detect>
mqtt_user: <auto_detect>
mqtt_password: <auto_detect>
branch: addon
ring_token: ‘’
location_ids:

  • ‘’

Yup exactly the same besides the disarm code.

Searching around I think its a MQTT version issue. So going to try putting it in docker and see if that works.

Well, someone has been busy. These latest updates are awesome! Streaming, who’d have thought.

A random question, maybe it is HA generally not specific to the addon but anyhow… I have a picture entity card. I set the image to the snap shot and add my generic camera entity (with the live url) as an entity on it. So I end up with a camera icon on the bottom of the picture entity card which if I press, I go straight to live view…

I’d like to add more entities to the card. One for last motion and one for last ding. Would I assume correctly I’d create multiple generic cameras but have each cameras stream-source as _event? How can I hard code in the specific event like motion1 and ding1 so I dont have to change the select then start the stream like imagine something such as this:

stream_source: rtsp://03cabcc9-ring-mqtt:8554/3452b19184fa_event_ding1

Then in the image as below, the second entity plays specifically motion1, and a third entity (which I’d make the icon a bell) play specifically the ding1… but without having to use the select.

Hopefully I am explaining myself correctly. This possible?

The fact that the addon is starting implies that it’s definitely making it over to MQTT (ring-mqtt won’t start if it can’t make a connection). My guess is that means it’s the Home Assistant Mosquitto/MQTT integration that is not maintaining the connection. But honestly, troubleshooting issues like this is nearly impossible in the forum, IMO. If you still have problems after moving to Docker feel free to open an issue on the Github project and we can dig through it.

Nope, this isn’t possible (playing back a specific event without selecting the event). I considered the possibility of creating RTSP paths for every event type, or attempting to use some kind of wildcard, but it just seemed too complicated to implement and I didn’t think most people would want to create 10-15 camera entities, so I just gave up and went with the simple implementation since I figured 99% of the time people will only care about the last motion or last ding. Maybe you could do something with an automation to toggle it automatically, but that’s probably better answered by people who actually use the HA UI as I almost never touch the UI myself.

I didn’t think most people would want to create 10-15 camera entities, so I just gave up and went with the simple implementation since I figured 99% of the time people will only care about the last motion or last ding

I am not following, maybe I was not clear. I’m not trying to create 15 entities. I am also only interested in last motion and last ding event exactly as you say. So there is some way to get last ding / last motion directly? Or you mean the timestamp attributes?

There’s only a single event stream and you can select what event you want played on that stream whenever a media client connects to it. Connecting to the event stream will always play back the currently selected event. If the most recent motion is selected, then that will be played, if the most recent ding is selected, then that will be played.

Since you only care about two events you could accomplish want you want with a input boolean helper and an automation that would pick the selected event based on if it is on/off, and that could be placed on the glance card with whatever icon you want.

Personally, I just put all the event selectors on their own card so that way I can pick whatever event I want for whatever camera. The way I do it is I have 5 cameras so I have 5 event camera entities with 5 glance cards (with icons for motion/ding/lights/siren/stream state) and then a 6th card with the event selector entities which I can select via drop down. If I want to view an event other than last motion, I just select the event for that camera from the appropriate drop down and then open the camera and it plays back that event.

My knowledge is limited so more complex things need spelling out, but I guess I need to set the input and there is a service I can call to make the stream pop up then. Let me play with it, see if I can figure it out. Good point in the right direction.

The work you have done lately has reinvigorated me and made my ring devices way more valuable in my opinion. Its fantastic. This integration needs a highlight from frenck on the blog, it doesnt have the exposure it deserves. Some people on the other integrations git bug threads don’t even know it exists.

I don’t really know about popping up, I just create a camera entity and a picture glance card, and click it, which pops up the view. If you want something to pop up automatically then I’m not sure. I’m far from an expert in the HA UI because I barely use it, but it’s just a generic IP camera from the HA perspective so anything possible with normal IP cameras should be possible.