Ring Device integration via MQTT w/ Video Streaming

I don’t actually maintain a hassio addon so I’m assuming you mean you added the one here:

This should just pull the latest version of the script, but if you’ve installed it longer than 2 days ago you might need to use the rebuild option to pull in the latest script version.

Thanks :slight_smile:
Lock works now. what I noticed is it shows me also a slider switch in the lock that doesn’t do anything. not sure what that is for.

Another issue I noticed is my Ring app push notification won’t show if the app is closed. I’m not sure if it is related to the add-on or it’s because of iOS 13 beta that I’m using.

Thanks again for the amazing add-on
I enabled homekit on my Hassio and all the sensors and alarm and lock shows now in my home app :slight_smile:

Can you provide a screenshot of what you are referring to? The only slider switch I would expect would be to switch the lock between locked/unlocked. Are you getting some other switch as well? I don’t know where that would come from as the script just publishes a generic MQTT “lock” device.

I don’t think this script would have anything to do with push notifications are you phone, I and my family certainly still get push notifications on our devices.

If you were mostly just looking to use this with Homekit you might want to check out the ring-homebridge solution instead as it’s significantly more mature and feature complete than this script, but of course doesn’t provide the HA integration.

Capture

Please find the extra slider I see in my console.
I mainly wanted to use it in homekit but also I like to have my options open in case I want to combine it with other add-on :slight_smile:

I don’t believe this has anything to do with the script as that looks like the “header toggle” since it’s beside the header, not the lock entry itself. This should allow you to toggle all devices in that entity card with a single switch. For example, if you had 5 locks, toggling the switch should lock/unlock all locks in the “Lock” entity card (at least that’s how it works with lights, I don’t actually have any locks in my Home Assistant).

However, if you go to “Customize UI” and edit the entity card, you can just disable the “Show Header Toggle” option and it should go away. Please try that and let me know.

I have a question (sorry about that, i’m a newbie),
I’m using Hass.IO, and I installed the add-on with the following command to use it with Docker:

git clone https://github.com/tsightler/ring-alarm-mqtt.git
cd ring-alarm-mqtt
docker build -t ring-alarm-mqtt/ring-alarm-mqtt .

after that, I have started the add-on with the following command:

docker run -d --restart=unless-stopped -e "MQTTHOST={host name}" -e "MQTTPORT={host port}" -e "MQTTRINGTOPIC={host ring topic}" -e "MQTTHASSTOPIC={host hass topic}" -e "MQTTUSER={mqtt user}" -e "MQTTPASSWORD={mqtt pw}" -e "RINGUSER={ring user}" -e "RINGPASS={ring pq}" ring-alarm-mqtt/ring-alarm-mqtt

I have added the option –restart=unless-stopped to start the add-on automatically with Hass.io startup.

my question is the following:
if you update the code on github, what step i need to do to update the add-on running in Docker container?

thanks and regards!

Hey @tsightler,

I am also running into the same problem as @BrainSop and @John.

I am running the ring-alarm-ha-integration addon, which I think is basically a dockerized wrapper for your code. After starting the addon, I get the following log message:

Ring Alarm Integration
Node Version
v10.16.0
NPM Version
6.9.0
git version 2.22.0
added 121 packages from 89 contributors and audited 427 packages in 21.445s
found 0 vulnerabilities
up to date in 3.77s
fixed 0 of 0 vulnerabilities in 427 scanned packages

But none of my ring devices show up, and watching all events I don’t see activity when sensors should be active. My MQTT server is the Mosquitto Broker addon with the following config:

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

My setup is as follows:
Software: Hassio: 0.96.3
Hardware: Raspberry Pi 3 B+

Here’s my MQTT settings:

mqtt:
  discovery: true
  discovery_prefix: homeassistant
  broker: !secret mqtt_broker
  port: 1883
  # username: !secret mqtt_username
  # password: !secret mqtt_password
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'

I commented out username and password from both MQTT configs, as it should use the Hassio user and password. I have also tried this with the username/password fields filled out with no change. My MQTT broker is working with my Shelly 2.5 switch, so I don’t think it’s an MQTT misconfiguration.

Here’s my ring-alarm-ha-integration config:

{
  "host": "https://127.0.0.1",
  "port": 1883,
  "ring_topic": "ring",
  "hass_topic": "hass/status",
  "mqtt_user": "<mqtt_user>",
  "mqtt_pass": "<mqtt_pass>",
  "ring_user": "<ring_user>",
  "ring_pass": "<ring_pass>"
}

I am running over https using DuckDNS and require https, but I don’t know if that will affect these settings. I have also tried these settings without specifying https.

I’ll be happy to debug through this with you if you want to message me.

1 Like

hi @Henriques

I found a good solution to use with HassIO,
I don’t use the hassIO add-on (ring-alarm-hassio-addon) it doesn’t work for me :frowning: i have posted more info about the issue here: https://github.com/rs1932/ring-alarm-hassio-addon/issues/6

do the following:

  1. add to the configuration to the mqtt broker (I’m using MQTT Server & Web client), in my case the following works well for me:
mqtt:
  broker: a0d7b954-mqtt
  username: !secret msqtt_user
  password: !secret msqtt_pass
  client_id: home-assistant
  discovery: true
  discovery_prefix: homeassistant
  birth_message:
    topic: 'hass/status'
    payload: 'online'
    qos: 0
    retain: false
  1. Install the add-on SSH & Web Terminal from Community Hass.io Add-ons.
  2. Disable Protection mode from the add and start it.
  3. go to terminal and execute:
git clone https://github.com/tsightler/ring-alarm-mqtt.git
cd ring-alarm-mqtt
docker build -t ring-alarm-mqtt/ring-alarm-mqtt .
  1. execute the following to start the service and add it to hass.io startup:
docker run -d --restart=unless-stopped -e "MQTTHOST={host name}" -e "MQTTPORT={host port}" -e "MQTTRINGTOPIC={host ring topic}" -e "MQTTHASSTOPIC={host hass topic}" -e "MQTTUSER={mqtt user}" -e "MQTTPASSWORD={mqtt pw}" -e "RINGUSER={ring user}" -e "RINGPASS={ring pq}" ring-alarm-mqtt/ring-alarm-mqtt

The add-on from @tsightler is working well :slight_smile:
I hope this help you :wink:

The only question that i have is how update the Docker when update will be available (Ring Device integration via MQTT).

Regards.

I doubt I’m of much help here, however the hassio addon ring-alarm-hassio-addon at GitHub - rs1932/ring-alarm-hassio-addon works well in my setup.

@Henriques Your ring-alarm-hassio-addon configuration definitely will not work. You cannot use a URL in the “host” configuration and, as noted above, it needs to be the IP address of your hassio system, not 127.0.0.1, at least in my experience. I believe that’s because hassio runs docker with network_mode=bridge, but I’m not sure since I don’t really use hassio.

I’m not sure that’s your only issue, but there’s no way the config you posted would work. Also, I assume you removed left the mqtt_user and mqtt_password blank ("")?

@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?