Ring Device integration via MQTT w/ Video Streaming

Guys, thanks for the support. As of last night I have published my own addon for Hassio that I will strive to support along with the ongoing support for the ring-mqtt script. Overall the function should be the same as prior addons but with these changes:

  • Configured to use host network so “localhost” should work if running Mosquitto on Hassio
  • Uses the new ring-mqtt code base which has support for cameras (config option) and a few new devices (e.g. fans, retro kit zones, etc.) with hopefully more to come.

I’m working on making it easier to get the initial 2FA refresh token, but that’s not implemented yet. I’d strongly suggest migration to this addon from any others because changes that I will be making to the old ring-alarm-mqtt repo will likely break the others soon.

Please feel free to report any bugs/issues via Github and I will look after them as quickly as I can.

1 Like

The Docker setup doesn’t use config.json, that’s why everything is passed via environment variables. You’ll need to pass the token via “RINGTOKEN={ring token}” just like all the other parameters.

Got it. Thanks!

For those of us not using addon, do we need to migrated to new code https://github.com/tsightler/ring-mqtt?
Question for the token, does it expire? can we manually disable it if needed?

Yes, you’ll need to migrate. I will soon be renaming the ring-alarm-mqtt repository to just ring-mqtt and placing in it the new code base. The migration should be pretty easy overall as the code is functionally identical, same config, etc. Only user visible difference is the project/executable name. It doesn’t make sense to call in ring-alarm-mqtt since it supports more than alarm functions.

As far as I understand the token doesn’t expire as long as it is being used regularly. It’s the same authentication the Ring app uses. Upon completing the 2FA auth, the Ring app gets the refresh token and stores it securely on your phone/device. That’s why you don’t have to log in again even if you reboot your device, because the refresh token is stored locally there. I suppose there could be some lifetime to the token, but I haven’t seen this yet.

1 Like

I should probably change this to say it’s the only user visible changes when used with Home Assistant, because other things that changed are handled automatically by discovery.

For those using the script with 3rd party MQTT tools (Node-Red seems common) there are a few breaking changes with topic naming and such to be more consistent.

BTW, I’m also looking for people who can help testing this new code as some of it is completely untested after the refactor because I don’t have the actual devices. While I copied the logic from the existing code, typos or other minor issues could easily sneak in.

I’ve tested the following devices thoroughly:
Alarm Control Panel
Contact Sensor
Motion Sensor
Camera functions (dings, motion, lights, siren)
Flood/Freeze Sensor
Smoke/Co Listener

So far other users have reported success with:
Locks
Retrokit Zones

Functions that I’d love to hear feedback on:
CO Detector
Smoke Detector
3rd Party Z-wave switch (standard)
3rd Party Z-wave dimmer switch/light (brightness control)
3rd Party Z-wave fan (multi-level-switch set to Fan mode)

I’m also looking to add support for Ring smart lighting and 3rd party zwave sensors, but need people with those devices to help with testing.

Woooh I’m back up and running! I wish ring would have added a device prompt authentication rather than this archaic sms/email system

Hi all, another update. Thanks to all those who have tested the new script and addon. I have a few bugs reports, mostly device specific, but overall things seem to be working pretty well.

Since ring has eliminated anything other than 2FA authentication I have updated the script and add-on with a small web service with the goal to simplify the process of getting the refresh token, especially for Hass.io users.

In the new addon, when you press start and the ring_token config entry is empty, the script will start a small web service. Once you see the entry in the log that the web service has started, you can click the “OPEN WEB UI” button and walk through entering your username/password and 2FA response, it will then show a refresh token that you can copy and paste into the ring_token option.

The web server exits immediately after showing the token so the docker container is destroyed and the web server does not run if a ring_token exist in the config.

While the forms/web pages are crude, and have limited error checking, I’m thinking it might be OK for this very limited use case. Of course you’re welcome to continue to generate a refresh_token using the ring-auth-cli run on any node system, but with this you can do everything from within Hass.io. Feedback is welcome!

1 Like

Hi ,

Anyone seen this error ?

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] done.
[services.d] starting services
[services.d] done.
ifelse: fatal: unable to exec /run.sh: Exec format error
[cmd] /run.sh exited 126
[cont-finish.d] executing container finish scripts…
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

I had not seen it, however, simply based on the error message, I had at least one idea of what it might be (missing shebang in run.sh), although I have no idea how it would work for my setup and not yours. Still, I pushed a quick update with that in it, because I didn’t think it would hurt. You can uninstall and reinstall the addon (should show 3.0.0b4) and let me know if it works for you.

did not help , did generate a key from CLI but no luck.

Can it be that im not using MQTT on HA ?

it still says 3.0 on the addon page

I wouldn’t think so because the error you are posting is before the script itself even starts. Basically the docker container is not even starting because “run.sh” is the command that starts everything within the container. I’d suggesting completely removing the addon and repository and re-adding since you didn’t see a bump in the version number.

What Hass.io version and HassOS version are you running? What platform?

Remove the link and now it works , thanks

@tsightler Your update to handle the 2FA worked like a charm. Can’t thank you enough for the time you’ve put into this project!

My Ring Alarm Stop working all entities are showing unavailable since 3 days now.


Ring now requires 2FA so some changes had to be made. Please look over the last 15-20 post in the thread. I’ve also updated the OP with the new instructions as well.

You Sir, are a genius! Thanks for all the effort!

Removed…discovered the new repository that was created …DOH!!

Thanks @tsightler for the great effort! Now I switched to use the official docker from docker hub. Works great!

Is there a service to trigger Ring alarm?

I have a docker related question, I can’t see any log for this docker when running command: docker logs ringalarm (ringalarm is the docker name)

Is there a service to trigger Ring alarm?

Do you mean just sound the siren or actually trigger a real alarm (like a panic function) like the sliders to call police/fire/ambulance in the Ring app? Neither of these are currently implemented but both are technically possible. I’ve been very hesitant to implement any solution that could trigger an actual alarm due to concerns of false alarm/responses, but siren trigger is actually on my todo (you can already trigger sirens on cameras that have them).

I have a docker related question, I can’t see any log for this docker when running command: docker logs ringalarm (ringalarm is the docker name)

Did you pass any DEBUG environment variable when starting docker? Be default, with no DEBUG, the script produces zero output, but you can pass “-e DEBUG=ring-mqtt” with the docker run command and then you’ll get output. I’m pretty sure I put this in the docs, but I’ll double check.

1 Like

Thanks for the explanation. False alarm is definitely valid concern for those who has professional monitoring.

Added DEBUG and now there are logs.

Thank you!