Ring Device integration via MQTT w/ Video Streaming

I added a usb hub to my synology box. For a while I would have to reselect my usb stick in the VM when it rebooted, but that seems to be fixed now.

1 Like

Hey! i was looking at you addon and reading the last few months above i’m excited to try it but i cannot figure out if it’s possible to send a screenshot or video with node-red to a telegram chat is that possible with mqtt-ring? thanks!

Hello, I was looking at previous posts and existing documentation of bypassing faulted sensors when arming the alarm and read that there is a bypass switch that I can turn on.
However I don’t seem to have this switch? Or I simply cannot find it. Is there a screenshot of the location where I can turn on this bypass mode?
I’m running v5.0.2

@tsightler first of all thanks for your addon.
One question. I have a battery doorbell. I see that the motion sensor and the ding sensor keep the status ‘on’ for more time than ring native integration (some minutes, also 6/7 min) instead of some seconds). The status ‘on’ is triggered more or less at the same moment for both addon and integration, while the ‘off’ is very delayed. Is there a way to align them?

I can’t really say anything about how the native integration works as I have nothing to do with it, however, I can explain how ring-mqtt works:

Ring cameras don’t really have state, they simply send event notifications for either “ding” or “motion” so there’s no real “off” event, thus it is incumbent on the receiver to somehow deal with state if they want anything other than notification. However, these event notifications do include an “expire time” property as part of the event, typically 180 seconds, so ring-mqtt uses this to maintain state, sensors stay “on” until all events of that type expire.

So, for example, if there’s a single motion event, the motion will remain active for ~3 minutes, however, if additional motion events are detected, then that extends the time, however, a new update, including LastMotion attribute, is always sent for new events, so it’s possible to detect and act on additional motion events even if the state is already “on”.

The reason I implemented this behavior is two-fold, the primary one being that ring-mqtt started out life as ring-alarm-mqtt, so it only supported Ring alarm devices, and motion sensors for Ring alarm are state based vs event based, i.e., there’s an actual “on” and “off” state updated by Ring. Knowing that, you can probably guess how long Ring alarm motion sensors stay in “on” state when there is a motion event. If you guessed 180 seconds, then you’d be correct!

So eventually, when camera support was added and the project morphed into ring-mqtt, I really wanted the behavior for camera motion sensors to be the same as alarm motion sensors, with the only significant difference being that camera motion sensors can send those additional “on” events which always update “last motion”, something that’s not possible with alarm motion sensors since Ring maintains the state on the server side.

The second reason is the 180 second expiration which is part of the notification event. The fact that Ring cameras send events that includes a 180 second expiration time, and Ring alarm motion sensors detect motion for 180 seconds, didn’t seem like a coincidence to me, so it seemed to make complete sense to have all binary sensors behave the same.

Note that I’m not saying that choosing to do something else is wrong, only explaining the logic I used when implementing ring-mqtt.

2 Likes

Hi @MRobi. How did you get the rebroadcast rtsp stream url? Trying the same setup as you

I still haven’t found what I consider a “perfect” working solution.

Ring-Mqtt will provide you with it’s best guest for the RTSP URL. What I’m finding with this addon is that the stream just eventually stops loading and it seems completely random. Restarting the addon brings it back, but you’re spending 5-10 minutes just getting things going again to view your camera stream. It’s easier to open the Ring app.

With Scrypted the stream is very steady and does not drop even with weeks of use. The rebroadcast URL is provided in the settings of the device. The issue with Scrypted is that it pre-buffers the stream so in Ring’s eyes you are sitting there watching your camera on the app 24/7. And when the camera stream is active, Ring does not record or notify of events. So you lose all functionality in the ring app so you essentially need to run it into some sort of NVR.

@tsightler just tagging you as the owner of the plugin

I was going to raise an issue on github but thought i would reach out here first. Got a Ring Doorbell Elite (POE) working with the add-on today and the stream is being a bit touchy.

It consistently flicks from clear to pixelated. From the below you can see only the bottom 20% is pixelated, sometimes its the full thing, sometimes somewhere in between

Any pointers on what might be going on here?
Note that the stream does work ok inbetween these pixelation events - it happens every 2-5 seconds and lasts for around the same before disappearing

@Kingy444 The same for me. I was thinking about bad internet connection but I can´t test whether this is the problem or not.

That’s a fair point to add here - my tests here are on a POE based camera and a hardwired desktop using chrome desktop.

No issues in the ring app away or at home so I don’t think it’s internet.

This has to do probably with the 'processing power of your device. It is in the docs, I had the same issue. I’ll see if I can find the correct docs.

Frequently Asked Questions (FAQ) ¡ tsightler/ring-mqtt Wiki ¡ GitHub has the information, I did the config as mentioned over there, so the stream: integration in my config.yaml and increasing the MEM for my device. Worked like a charm for me, im using a Pi4.

As @mhoogenbosch has replied, those artifacts are definitely UDP drops, but not likely from bad Internet, more likely from UDP buffer overflow because your device can’t keep up with the stream. Increasing the UDP buffer, as described in the FAQ, should be the solution, even if it’s a bit of a pain to do with Home Assistant OS.

I’ve been told that recent versions of Home Assistant OS have increased the max buffer size, but not the default, so I’m hopeful that in a future version I can just set this automatically within the addon, but I haven’t had any time to work on this project lately.

1 Like

I installed this integration yesterday and i just noticed the camera has missed at least 1 motion events (but has received several as expected)

I have read the FAQ regarding this and think i have a good understanding of the limitations…

neither of the switch.xxx_live/event_streams show any state change between last night and now, indicating that ring-mqtt was not accessing the streams from ring - so not blocking events

also there is no event, live or anything in the ring app at the time… but the default 60s ring snapshots clearly show the delivery truck in the driveway in 2 frames! I have multiple cameras that trigger notifications and normally i get a ring and HA notification at the same time for the driveway, but this time i only got the HA one from the other camera system.

are there any other conditions that would block the normal motion events? perhaps something to do with downloading? i use the automation on the video streaming page of the wiki, but that was last run 30mins prior to the event and appears to have completed correctly.

update: another few motion events not captured at all, no alert, no event or video in the ring app or HA. after the failed event this morning i even disabled the snapshots in HA…

Hi there @tsightler.

Just dropping by to say:

  1. I installed this utility a week ago after buying a ring alarm kit in the Prime day sale.
  2. It’s fantastic.
  3. It gives me full utilisation of things I hoped to do regards “someone has opened the hall to kitchen door, its after 11pm, the lights in the kitchen have been off for at least two minutes, turn them on”.
  4. It’s really easy to set up.
  5. I’ve not used MQTT before and was surprised I didn’t need to buy a usb adaptor or anything.
  6. I thought it might be slow like polling, but it’s instantaneous.
  7. You have my absolute thanks for building this.
  8. Anyone with a ring alarm who’s on the fence about whether to integrate with HA should really jump on.

Cheers!

1 Like

There are no other conditions that I’m aware of that would block this, other than the use of Smart Alerts. Otherwise, if you get a phone notification from Ring you should get one from ring-mqtt as they literally use the identical push notifications API.

This integration is awesome, just wanted to say thanks. @tsightler

The issue is I don’t get a ring notification, there it no motion alert in the ring app at all

If there is no history of the event in the Ring app, and there was no active recording at the time (should be easy to tell from the timeline), then I’m not sure what to tell you but I don’t see any way that could be caused by this addon.

Can I please have a clarification on the bypass modes for a motion detector?

Each alarm sensor includes a bypass mode selector that allows the bypass behavior to be set for each sensor individually. The three possible modes are as follows:

|Mode|Description|
| --- | --- |
|Never|The sensor will never be bypassed, if sensor is faulted it will prevent arming. This is the default behavior.|
|Faulted|The sensor will be automatically bypassed if it is faulted during an arming attempt.|
|Always|The sensor will be bypassed during an arming attempt, regardless of its existing state.|

The contact, zone and tilt sensors support all three bypass modes, while motion and glassbreak sensors do not support "Faulted" mode.

For ‘always’ is that literally that the motion detector won’t trigger the alarm? Essentially disabling them at all times for an alarm triggering event? Am I reading that correctly?

For ‘always’ is that literally that the motion detector won’t trigger the alarm? Essentially disabling them at all times for an alarm triggering event? Am I reading that correctly?

Yes, that is correct. If you look at the event history in the Ring app you will see additional events as part of the arming stating the sensors that have been bypassed during arming. Of course, this setting only impacts arming via ring-mqtt, it doesn’t have any impact on arming via the Ring app or the keypad.

1 Like