Ring Device integration via MQTT w/ Video Streaming

@tsightler,

Thanks for your feedback. I made a wrong assumption about using https. I removed that from the URL and the ring-alarm-ha-integration addon works for me now.

Thanks for your help!

Well as an update I have had this running for about a week now and nothing has cr*pped out on me.

It is a bit embarrassing. I wonder if there is any connection with how i usually run the ring js which is using a systemctl symlink to run on startup vs now that I am running it in debug mode.

FYI I haven’t checked out the log at all but I have yet to notice the ring shut down on me. I think when i get some time I will stop running it in debug mode and do it via the systemctl method again and see if I experience the same fall out. It doesn’t make sense for this method to not work as a systemctl is doing the same thing as running the js file…

Not sure if you have any thoughts.

Yeah, not sure, I certainly run the script via systemctl and it’s hard to see how that could have an impact. You could probably modify the startup script to run in debug and dump to a file, that way, if it happened, you’d at least have something in the file if you felt it was not working.

I try to monitor for things that would normally make the script not work, for example, there’s traps for mqtt disconnects and for things like the websocket being down due to server disconnect or internet issues, etc., and I’ve tested these cases pretty extensively, but there’s always the possibility there’s some code path I haven’t managed to exercise.

Just wanted to give an update that since I deployed this into a docker in my unRAID server I have not had it hiccup at all! Great work! Love this component!

Hey @tsightler,

I am trying to use homebridge to expose my alarm to my iphone but without using the homekit integration of home assistant. However, I don’t know what to publish.

I used node-red to subscribe with a wild car to ring/# and I get this format

ring/alarm/<location_id>/<ha_platform_type>/<device_zid>/state

and the topic is “armed_home”. However, when I try to publish this myself I don’t see the ring app change alarm modes.

Where do i publish the topic to change the mode?

Commands should be sent to the command topic as the state topic is only for monitoring state:

ring/alarm/<location_id>/<ha_platform_type>/<device_zid>/command

Big thanks to tsightler for making this. I took the plunge into this a week ago with the simple goal integrating Ring Alarm commands into Alexa routines. For a complete noob it wasn’t “simple” since I knew nothing about the systems and there’s not a holistic guide specific to that project. So if it helps anyone, here’s the step-by-step walkthrough of how I got it working: https://docs.google.com/document/d/1IqIywW2dIedWzAJUs5z5YMYgqz18uhZjuUFCPGYDndc/edit?usp=sharing

hi slim, how did you set up your config.yaml, mqtt, and ring addon settings?

Rob,
It’s been quite some time since I integrated ring into HA, so memory is a little fuzzy. However I added the Mosquito Broker add-on, and I have it’s config:

{
  "logins": [
    {
      "username": "mqttuser",
      "password": "mqttpw"
    }
  ],
  "anonymous": false,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "quiet_logs": false
}

I used the addon ring-alarm-hassio-addon (https://github.com/rs1932/ring-alarm-hassio-addon) given earlier in this thread. The config file is below, where I’ve removed info pertinent to my own network and accounts:

{
  "host": "192.168.xx.yy”,
  "port": 1883,
  "ring_topic": "ring",
  "hass_topic": "hass/status",
  "mqtt_user": "mqttuser",
  "mqtt_pass": "mqttpw",
  "ring_user": “<[email protected]>“,
  "ring_pass": “<ring_password>“
}

Finally, in configuration.yaml I have:

# Add Ring info
mqtt:
  broker: 127.0.0.1
  username: mqttuser
  password: mqttpw
  discovery: true
  discovery_prefix: homeassistant
  birth_message:
    topic: 'hass/status'
    payload: 'online'
    qos: 0
    retain: false

It all works well.

1 Like

@tsightler I discovered that arming/disarming using the ring physical keypad does not update the alarm status in HA. Is this some kind of limitation of the add on or do I have something configured wrong? Maybe MQTT?

It should definitely update the status in HA regardless of how the device is armed as the status of the alarm has effectively nothing to do with the keypad.

I don’t really see how it could be an MQTT problem as, in general, MQTT will either not work at all if it’s configured incorrectly. I don’t really have any suggestions other than to run in DEBUG mode and see if you see state updates from the script during arm/disarm but somehow not showing in HA. All I can say is that it works fine for me, we arm from the keypad almost every night and status always displays correctly.

I understand that mqtt is pretty much set and forget, but I didn’t have discovery prefix, qos 0, or retain false. I just added those and now the add on is responding to arm/disarm done by the keypad. I have no idea what those settings actually do, but they seem to have worked. For future reference, what exactly do you mean by debug…monitor the add on logs?

Is it possible to get the siren/alarming state?

Thanks tsightler for your awesome work!

I just started HA and wanted to integrate my Ring alarm.

My HA is a container in MacOS. After reading your github repo and over 170+ posts here I think I can take the docker installation for this script too.

I am trying to use cloudmqtt as mtqq now and below is in configuration.yaml.

mqtt:
  broker: tailor.cloudmqtt.com
  port: 27369
  username: !secret mqttusername
  password: !secret mqttpassword
  discovery: true
  discovery_prefix: homeassistant
  birth_message:
    topic: "hass/status"
    payload: "online"
    qos: 0
    retain: false

In the docker run command, what would be the values of “{host ring topic}” and “{host hass topic}”?

I cant get devices to show up.

everything shows up under integration mqtt: configuration.yaml but as “Entities without devices”

why are the devices not getting create?

I think this defects the purpose of 2FA on main account since the shared account does’t have 2FA, right?

For this ring integration https://www.home-assistant.io/integrations/ring/, it supports using token I think. I disabled 2FA on my ring account, setup integration on HA. Then I enabled 2FA again, the ring integration still works on HA, even after reboot (which I do receive text msg code, but just ignore).

I don’t think it defeats the purpose of 2FA at all. What does 2FA really provide? It provides protection of your account if the password is compromised, by requiring a second “factor” to login.

That’s great, but the first thing that has to happen is that your password has to be compromised. There are basically three primary ways that passwords are compromised:

  1. Weak passwords
  2. Using the same password on mulitple sites
  3. Stealing your password, typically by phishing or other attacks (perhaps keylogger, although I don’t believe these are super common, but they do happen).

However, if using a “service” account, you should create a completely random, super long, very complex password and that password should be stored only on the server running ring-mqtt. In that case, none of the traditional ways passwords are compromised would realistically be possible.

Even worse, the other key idea behind 2FA is that it involves two distinct “factors”, something you know (your username/password), and something you have (you device to receive the pin). If you just replace the 2nd factor with a token stored on the same machine as the password, then it almost completely devaules the use of 2FA as a compromise of the server running ring-mqtt will still compromise the account.

In other words, I personally see zero benefit to 2FA with an account that is used only for this one thing and has a complex password immune from the normal attack methods.

All of that being said, I’m not opposed to implementing 2FA, someone else has already submitted a pull request to add it, but I just don’t have any time to really work on it and merge it into the current tree as I’ve had some unexpected things come up that have left me with no time to maintain this project properly, especially since it works perfectly fine for me as is. Hopefully that will change in the next few months as I have a number of things outstanding to merge.

1 Like

That makes sense. Thanks again for your great work!

In case you didn’t get this rectified, I’ve found that I have to manually restart the add-on. About 2 minutes after the restart, my Ring Alarm devices show up.

New to the Home Assistant scene but managed to get this setup and integrated with my Ring Alarm system after some trial and error. I did have a question though:

I was using my Ring Alarm as my overall Hub with a few water sensors, smart plugs, thermostat and those devices don’t show up in here, just my Ring Alarm Devices. Is there anything I can do to get these to show up as well?

I wanted to keep them in the Ring Alarm to easily pull up the app and make changes remotely while integrating everything with Home Assistant to make some automations. Is this possible @tsightler?