Ring Device integration via MQTT w/ Video Streaming

Of course Ring support would not care anything about some third-party, reverse-engineered solution, so that’s not really a surprise there.

There is no update at this point since, despite my queries on mulitple sites where people have posted about this issue, so far no one has stepped up to help resolve the issue via any means, either by simply answering detailed questions, performing the testing with various browsers that was asked, or, ideally, sharing their camera with me for a few days.

My belief is that it won’t take much to modify ring-mqtt to support HEVC but, since none of my cameras have received the update, unless somebody steps up to actively participate with me in the process, it will likely remain in the current state.

If someone is willing to actively participating in the process of researching this capability, feel free to contact me directly, either via DM on this forum, or via email using the same username as here at gmail, and we can discuss how you can help.

I’m a huge fan of your integration and never have any issue with it. I’d help if I got update from ring…how would I know if mine are updated? I have the ring professionally monitored system at 2 locations so don’t use live view in HA so is there another way to tell? I would gladly help anyway I can

Hi @randr. Realistically I need help from someone that has a device that has been upgraded. If you have such a device then live streaming will not work (and probably event streams, although transcoded event streams might work).

Ring is rolling out HEVC support slowly and it appears to be only to a subset of cameras, so far I know that at least these camera models are being upgraded:

  • Stick Up Cam Plug-in
  • Stick Up Cam Battery
  • Ring Video Doorbell (2nd Gen)
  • Floodlight Cam Wired Plus

Technically the Car Cam as well, but that’s an entirely different device that so far nobody has been willing to share with me either, so it remains unsupported. It’s possible that it’s rolling out to other cameras as well, but the ones above seems to be confirmed.

All of these cameras appear to be based on a newer hardware architecture. Unfortunately (or fortunately, based on how you look at it), I own none of these camera models, which might explain why none of my eight cameras have been upgraded to HEVC as they are all 5+ years old (I have one Stick Up Cam Elite that is only a year old or so, but I bought it from eBay and it was clearly old stock and it doesn’t appear Ring has upgraded the hardware in the devices even for new ones being sold).

If you have any camera that has been converted to use HEVC, then streaming will not work in ring-mqtt and there will be a log entry stating that there is a codec mismatch. If you don’t have any cameras with this issue then, unfortunately, you can’t really be any help.

So, to summarize, if there is anyone with issues with camera live streaming not working with the message “ERROR - Unable to negotiate H.264 codec, verify this camera has Legacy Video Mode enabled”, then please contact me via DM on this forum, or via email using the same username at gmail.

2 Likes

So I have an update on the HEVC codec issue. It turns out, it is still possible to enable legacy video mode, at least if you have a subscription. You can use Firefox to login to the Ring web dashboard and try to play back a recording (must be a recording, live streams will work fine). This won’t work because Firefox has zero support for HEVC, even for file based playback, but you will get a popup that prompts you to switch back to legacy mode.

Even better, I’ve implemented some basic support for HEVC in ring-mqtt v5.5.0, however, in that version it requires local transcoding, so you need to run ring-mqtt on something with a decent CPU.

However, thanks to a user sharing their camera, I’ve been able to poke and prod at Ring’s APIs and have figured out how they play back video to browsers that do not support HEVC with WebRTC (pretty much all browsers except Safari), if you connect to the signaling API using the same method as the browser, rather than the method used by the Android app, it does allow negotiating the stream down to H.264 on-the-fly.

I plan to implement this change in v5.5.1 and, right now, everything is staged in dev, but it’s a little bit scary as it changed the API used for everyone. If anyone out there has these HEVC cameras and is willing to test the current dev branch, I would really appreciate feedback before I throw this change out there. Even if you don’t have an HEVC camera, it would be good to know if it breaks any existing working streams since it’s a new API implementation where the code path is far less tested (it’s not 100% untested as the API was previously used for Ring Edge cameras).

4 Likes

HI - I have the exact same issue a the above poster, but do have the url pointing to my home assistant.
I have both running on a Synology in Docker.

I’m only using this for Ring Alarm, as I swapped out my doorbell camera a while back. This integration has been working flawlessly for me for a year and change. Yesterday I decided to update mosquitto and it broke the integration. So I’m trying to do a fresh install from scratch.

Logs are below. It seems promising that the Ring API and token is getting refreshed, but I just can’t seem to access the MQTT server. The ECONNREFUSED error just keeps looping, but I truncated it here.

Any help will be MOST appreciated, as all my sensors and automations are dead at the moment.

Thanks,

John


| Ring-MQTT with Video Streaming |
| Docker Edition |
| |
| For support questions please visit: |

cont-init: info: /etc/cont-init.d/ring-mqtt.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun ring-mqtt (no readiness notification)
s6-rc: info: service legacy-services successfully started

ring-mqtt.js version: 5.5.0
Node version v18.16.1
NPM version 9.1.2
git version 2.38.5

Running ring-mqtt…
e[38;5;41;1mring-mqtt e[0mDetected runmode: docker e[38;5;41m+0mse[0m
e[38;5;41;1mring-mqtt e[0mConfiguration file: /data/config.json e[38;5;41m+2mse[0m
e[38;5;41;1mring-mqtt e[0mReading latest data from state file: /data/ring-state.json e[38;5;41m+0mse[0m
e[38;5;41;1mring-mqtt e[0mMQTT URL: mqtt://hass:********@192.168.4.50:1883 e[38;5;41m+4se[0m
e[38;5;41;1mring-mqtt e[0mAttempting connection to Ring API using saved refresh token… e[38;5;41m+0mse[0m
e[38;5;41;1mring-mqtt e[0mSuccessfully established connection to Ring API using saved token e[38;5;41m+2se[0m
e[38;5;41;1mring-mqtt e[0mReceived updated refresh token e[38;5;41m+2mse[0m
e[38;5;41;1mring-mqtt e[0mSaving updated refresh token to state file e[38;5;41m+2se[0m
e[38;5;41;1mring-mqtt e[0mSuccessfully saved updated state file: /data/ring-state.json e[38;5;41m+1se[0m
e[38;5;41;1mring-mqtt e[0mAttempting connection to MQTT broker… e[38;5;41m+0mse[0m
e[38;5;41;1mring-mqtt e[0mUnable to connect to MQTT broker connect ECONNREFUSED 192.168.4.50:1883 e[38;5;41m+49mse[0m
e[38;5;41;1mring-mqtt e[0mAttempting to reconnect to MQTT broker… e[38;5;41m+1se[0m
e[38;5;41;1mring-mqtt e[0mUnable to connect to MQTT broker connect ECONNREFUSED 192.168.4.50:1883 e[38;5;41m+3mse[0m
e[38;5;41;1mring-mqtt e[0mAttempting to reconnect to MQTT broker… e[38;5;41m+1se[0m
e[38;5;41;1mring-mqtt e[0mUnable to connect to MQTT broker connect ECONNREFUSED 192.168.4.50:1883 e[38;5;41m+2mse[0m
e[38;5;41;1mring-mqtt e[0mAttempting to reconnect to MQTT broker… e[38;5;41m+1se[0m
e[38;5;41;1mring-mqtt e[0mUnable to connect to MQTT broker connect ECONNREFUSED 192.168.4.50:1883 e[38;5;41m+1mse[0m
e[38;5;41;1mring-mqtt e[0mAttempting to reconnect to MQTT broker… e[38;5;41m+1se[0m

So was able to get it back up. For running Mosquitto version 2.0 and up on Synology docker, you need to follow the instructions here Eclipse MQTT 2.x in Docker + user credentials on Synology - YouTube to install the openssl version of Mosquitto for username and password management.

Gotta say @tsightler you’ve made a great addon and I am always touting its uses in the forums where questions come up on integrating ring alarm and cameras!

I know this is probably a trigger question, but is there any way to use ring-mqtt feed into go2rtc and integrate into frigate?

I’ve heard a lot about the stream from ring not being compatible with frigate, but I’m hoping that it has matured enough to maybe bridge the gaps of live feed requirement for frigate?

Thank you,
Daniel

I’ve heard a lot about the stream from ring not being compatible with frigate, but I’m hoping that it has matured enough to maybe bridge the gaps of live feed requirement for frigate?

It doesn’t have anything to do with the maturity of the project or the stream not being compatible from a codec perspective, the stream is standard H.264/AVC with Opus audio, streamed via WebRTC, which ring-mqtt gateways to RTSP. Nothing special here, Frigate can consume that easily enough.

The issue is that Frigate expects a 24x7 continuous video feed which Ring cameras just are not designed to provide. Many of them won’t do it at all without eventually overheating, and Ring limits individual live sessions to ~10 minutes. Even more critical, the stream is never local, always through the cloud and, when Ring cameras stream, they do not send motion/ding notifications, so you basically lose all Ring functionality and it just becomes a dumb camera, and honestly, if you want that, there are way better cameras out there on the market that will stream locally to Frigate.

Of course, you could get really fancy and use scripts to trigger Frigate to enable/disable a stream based on a motion event or something using the Frigate APIs, but I leave that up to people who like to tinker because I don’t want to deal with all the problems this causes.

I have had some crazy idea of creating a “snapshot stream” that provides a continuous stream of the snapshot camera but switches to a low-FPS image stream when motion is detected. I feel like this could work, but my fear is that it will just create a bunch of issues as people won’t understand the limitations of this approach.

1 Like

I think that this would be phenomenal and a great approach, maybe a spun out integration to reduce chances of confusion on base use cases and allow for more advanced use cases to reside in their own repo to avoid headaches down the line?

Whatever you choose to do you’ve really advanced the ring ecosystem for sure, and a big thank you!

1 Like

@tsightler thanks for this post. It was very helpful to understand how to update device and entity IDs.

Hi I’ve been using this integration for quite a while and it’s been running great. I only have the one ring device which is a ring doorbell pro. However, I’ve just realised that the entity/sensors for both doorbell ding and motion detection are not working properly within home assistant. They are only staying as “Clear” and do not change. The motion events and dings are being detected in the ring app just fine and are still enabled. I’ve tried re authenticating ring within the addon and also restarting the add on but it still isn’t working. Any idea what the problem could be, it was working fine before… although I’m not sure how long it hasn’t been working for as I only use those sensors for a few things in home assistant. Thanks.

I’m guessing you are actually using the HA Ring Integration and not the ring-mqtt integration. There is a known issue with the Ring Integration:

Try the ring-mqtt integration instead.

Interesting co-incidence but I’m definitely using Ring-MQTT by tsightler and not the HA Ring Integration.

Sorted. I uninstalled Ring-MQTT and then re-installed it and it’s working again. I recently migrated from an RPi4 to Proxmox so I wonder if something within the HA backup broke the addon… strange how everything else within the addon was ok.

Standard ring-mqtt troubleshooting:

  1. Stop/start the addon
    This works and is all that is required about 99% of the time. This seems obvious but the biggest issue is that using the UI to restart HA does not restart addons, unless you expand the advanced options and choose to reboot the system. It seems like 99% of HA users believe that restarting HA also restarts addons when it does not, it only restarts the container running the HA core code, not the containers running the addons. Each addon has it’s own restart option, or you can choose to reboot the host system.

  2. Stop addon/Remove authorized device(s) from Ring Control Center/Start addon/Re-authenticate
    This works for approximately the remaining .999% of the time and is basically the same steps Ring recommends if the Ring app is messed up, can’t connect, view devices, etc.

  3. Remove and re-install addon
    Needed maybe .001% of the time, usually only if the container won’t start for some reason or exits immediately. This is brute force, it will work, because the new install gets a new hardware ID generated, which will create a new device registration with Ring, but you could have just removed the old device from Ring Control Center to get the same effect. The biggest down side of this approach is that you lose any device specific settings like snapshot frequency, bypass settings, etc. If you just use 100% default settings for all devices, or you only have a few devices, well, no big deal I guess, but you do also leave old, unused devices registered in Ring, which can negatively impact notifications if you get too many of them.

If you follow these steps, you will generally always be able to recover from any issues with notifications or whatever. Good luck!

5 Likes

Been looking at this post, and I am trying to figure out how to create an action in automation to change the event selector from Motion 1 to On-demand 1 or something similar. Maybe it is something straightforward, but I am missing something. Been looking at posts and can’t find much info about changing the state of a particular entity. My next step will be to download a HACS integration based on a Python script that changes attributes and states of entities, but there might be an easier way than that. Thanks in advance

I’m not 100% sure what you are attempting to do, but there is definitely no requirement to use anything from HACS just to automate changes. Since you replied to a post about changing the event select, I’ll assume that is what your goal is. You can do this with an automation built 100% with the UI easily enough via one of two methods.

  1. Create an automation with your preferred trigger/condition and, for the action, chose the “Device” option, select your doorbell/camera from the dropdown, for “Action” select “Change <camera_name> Event Select option” and then for option select the option you want that automation to switch it to from the drop down.

  2. Create an automation with your preferred trigger/condition and, for the action, choose “Call Service” option, for the “Service” choose “Select: Select” (yes, weird, IMO it should be “Select: Option”, but I don’t control HA) then pick the event select entity you want to change, and enter the option name you want to change it to. This method is, IMO, more complex and requires you to type the option name explicitly (and it must match exactly) but might be useful if you want to use a single automation to change multiple cameras at once.

Overall, none of the is ring-mqtt specific, just standard HA automations, so pursiing this in other forum sections might provide better feedback as I’m far from an expert on HA automations.

Appreciate the quick response, will have a look at these options. Already took a quick look at work and it seems that they should work. Haven’t messed with home assistant too much, only for a few months, and oddly enough I never thought I could treat your dropdown entity as a device. Now it makes perfect sense. I thought about using another forum but it seemed more natural to post on this one as I was under the impression that it would be a more complex solution.

In a different subject I do appreciate you fixing the HEVC issue now my floodlight wired cam works perfect for streaming, I’ve been having some issues with the motion alerts like you mention in your FAQ but I need to do some more discovery as it’s not acting consistently. Sometimes I enable the alerts in the app and starts working and when I disable them to the previous state they just keep working. But I am sure I just need to mess with the options in the app a bit more.

Ring doesn’t make it super easy to understand notifications because it’s not clear in the app which notifications settings are app specific vs device wide. For example, disabling the “Motion Alerts” option is actually app specific, if you have two phones with the app installed and disable motion alerts on one, you will still receive alerts on the other, so that setting actually has zero impact on ring-mqtt. However, features like Smart Alerts or Modes are device wide, so any settings applied there applies to all app clients, so if you disable any notifications in Smart Alerts or Modes, then ring-mqtt will not get those alerts either.

If you are losing notifications after some period of time, there could still be some bug in the push-receiver library, although I’ve been through that library pretty deeply myself and there’s just not that much too it, so I’m not sure what it might be.

Hello complete Noob here, i was able to install this add-on but looking for how to get started and get my cameras configured. I’ve looked around and cant find the enable cameras option