A few weeks ago I installed the Ring Alarm and wrote a post about it. Towards the end, noted that I wanted to integrate it with Home Assistant. Unfortunately, native integration isn’t there yet, but the good news, at least for those running Hass.io, is that there is a Hass.io addon that will integrate all Ring devices via MQTT.
If you don’t have Hass.io, it’s still very much possible to get this going, but I just don’t know the details on how to do that. So I’m not going to go into any detail on how to do that.
MQTT
The first thing that you need to do is install an MQTT broker. Many HA users already have that. If you don’t, then the easiest way to get it running is to use the Hass.io addon. I’m currently using the official Mosquitto Broker addon. But I’ve been thinking about moving to the community addon, MQTT Server and Web Client. Either should work just fine. I recommend configuring it with a username and password.
After you set it up, you will need to add some config to the HA yaml file and then restart HomeAssistant.
mqtt: broker: core-mosquitto username: username password: password discovery: true discovery_prefix: homeassistant birth_message: topic: 'hass/status' payload: 'online' qos: 0 retain: false
Ring HASS.io Addon
Next, install the Ring addon for Hass.io. Go to the Hass.io menu and then to the Addon Store. Add the https://github.com/rs1932/ring-alarm-hassio-addon
repository. Open the Ring Addon, and edit the config for it. You should only need to add the username and password for the MQTT broker and the email/password for Ring. You may need to change the IP address for the MQTT broker as well.
Now when you start the addon, the sensors should show up in Home Assistant. They will definitely show up in the states view. In lovelace, they might have to be added before they will show up, depending on how you have it setup.
Feel free to comment below if you have any questions.
If i restart home-assistant do the sensors come back?
Yes. Assuming you have the config for the ‘birth message’ in your HA configuration. It worked fine for me, and I had someone on Reddit that added that to theirs, and it fixed it for them.
Hi
Been trying to get this going for a month. Did a fresh install of HASSIO yesterday
HASSIO on a Pi3 Community MQTT
All the sensors show in the Ring add-on log file but zero cute pictures on the overview tab as well none of the sensors show in states. Log for Mqtt says happy also
Any ideas what I am missing?
Thanks
Grey
Did you add the config for discovery in your Home Assistant config? They won’t show in Home Assistant automatically unless you have that enabled.
You talking about this ?
# MQTT 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
Yes. That looks right. Make sure to look at the HA logs to make sure that HA is connecting to your broker. That connection is the only thing that I can think of that might be the problem based on what you said.
Thanks, of course it was pilot error
I installed the mosquito web server and client not the broker.
silly thing works 🙂
Thanks again,
Grey
NICE!!! Got it working this morning!
Awesome. Glad to hear that.
Hi,
thank you for this add-on. works really good except once small issue.
I’ve added my schlage lock to ring alarm.
-From ring app I can lock and unlock
-from Hassio console when I try to lock or unlock nothing happens
-if I lock or unlock using ring app, I can see the updated state in hassio
MQTT log shows below error:
ring-alarm-mqtt Received set lock state LOCK for lock Id: xxxxxx-xxxx-xxxxx-xxxx-xxxxx
ring-alarm-mqtt Location Id: xxxx-xxxxx-x
(node:40) UnhandledPromiseRejectionWarning: TypeError: location.setDeviceInfo is not a function
at setLockTargetState (/ring-alarm-mqtt/ring-alarm-mqtt.js:379:22)
at processCommand (/ring-alarm-mqtt/ring-alarm-mqtt.js:426:17)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:40) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 13)
I removed my lock ID and Ring location ID from the message.
I’m not sure. But it sounds like an issue with the add-on. You may want to post on their GitHub.
Working nicely!
Trying to get this going, but when I add the MQTT code to the Yaml the HASSIO system will not come back up. I have the broker setup and the u/p match
Post your yaml. I can try to help if you want. But you may get more eyes on it if you post on the home assistant forum or subreddit.
Ok, so I think I got this up and running. However, no alarm components are coming up. Here is my setup. Please advise what I’m doing wrong here.
Configuration.yaml
mqtt:
broker: 127.0.0.1
username: admin
password: XXXXXXX
discovery: true
discovery_prefix: homeassistant
birth_message:
topic: ‘hass/status’
payload: ‘online’
qos: 0
retain: false
Mosquitto Broker
{
“logins”: [
{
“username”: “admin”,
“password”: “XXXXXX”
}
],
“anonymous”: false,
“customize”: {
“active”: false,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}
Ring Alarm Hassio Integration
{
“host”: “127.0.0.1”,
“port”: 1883,
“ring_topic”: “ring”,
“hass_topic”: “hass/status”,
“mqtt_user”: “admin”,
“mqtt_pass”: “XXXXXX”,
“ring_user”: “XXXXXX@gmail.com”,
“ring_pass”: “XXXXXX”
}
I’m not sure. Are you getting MQTT messages from the Ring base station?
Adding the repository does not work for me. I had it added on one of my Hassio instances and the repository is gone but the add-on still shows. All of the sensors show “Error – Entity not found.” On my new Hassio install, when I try to add the repository, the link disappears and the add-on never shows up. Is there a new address other than https://github.com/rs1932/ring-alarm-hassio-addon?
I was able to remove and add the repository just fine. That URL is correct.
doesn’t adding all of this:
mqtt:
broker: 127.0.0.1
username: admin
password: XXXXXXX
discovery: true
discovery_prefix: homeassistant
birth_message:
topic: ‘hass/status’
payload: ‘online’
qos: 0
retain: false
just overwrite the config that comes with the Mosquitto Broker add-on?
I must be missing something b/c I’m not able to get anything to show up — not even in states.
Honestly, I don’t know. This is my config and it works for me.
Thanks for the guide. I’ve got this working well, able to arm and disarm by clicking on the keypad/control panel entity.
Any tips on how to get the control panel and various sensors to be devices in Home Assistant, and therefore come through to HomeKit?
The sensors all just showed up in HA. You do need to enable MQTT discovery for that to happen. And then they don’t show up in Lovelace after you edit your interface. You can see it in the States UI.
Just to confirm..
You need the alarm base station?
The ring sensor cannot talk directly to HA/MQTT?
I thought if I could just buy some sensors and have them detected by HA/MQTT, that would be enough for me 😉
Thanks.
Yes. You do need the Ring base station. This article is pretty much geared towards people that have already got the Ring Alarm system. If you were looking to integrate sensors and stuff into HA, then you might want to look into the Wyze stuff which can directly integrate.
Thanks for your work on this. I think I’ve followed this as expected. However, my Ring Alarm add-on will not keep running. I’ll start it, then get a text from Ring with a code, then when checking the add-on it’s stopped again.
Wondering why my question from 10/23/19 has been deleted?
Thank you for the guide and i figure I must be doing something wrong, I suspect it’s my Integration with MQTT but not 100% sure. I’m a recent Wink II to HA converter and not a programmer so struggling a little but like the learning and getting most things working. Really want to use Ring alarm door sensors for a few automations if I could so followed your guide.
Can’t find anything Ring related (except the 4 cameras we have) in “States”, nor on Lovelace UI, nor in devices, etc…
Any help would be appreciated.
I’ve tried deleting and setting up “integration” for mqtt and now it just says MQTT: configuration.yaml (should i delete that and add it with details which i tried without success?)
From configuration.yaml
mqtt:
broker: core-mosquitto
username: mqtt
password: #########
discovery: true
discovery_prefix: homeassistant
birth_message:
topic: ‘hass/status’
payload: ‘online’
qos: 0
retain: false
System log
19-11-05 00:01:46 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-11-05 00:05:22 INFO (SyncWorker_7) [hassio.docker.interface] Restart homeassistant/raspberrypi3-64-homeassistant
19-11-05 00:05:54 INFO (MainThread) [hassio.auth] Auth request from core_mosquitto for mqtt
19-11-05 00:05:54 ERROR (MainThread) [hassio.homeassistant] Error on call https://172.30.32.1:8123/api/: Cannot connect to host 172.30.32.1:8123 ssl:None [Connection refused]
19-11-05 00:05:54 INFO (MainThread) [hassio.auth] Home Assistant not running, check cache
19-11-05 00:05:54 INFO (MainThread) [hassio.auth] Cache hit for mqtt
19-11-05 00:06:26 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance
19-11-05 00:26:23 INFO (SyncWorker_2) [hassio.docker.interface] Stop addon_core_mosquitto application
19-11-05 00:26:24 INFO (SyncWorker_2) [hassio.docker.interface] Clean addon_core_mosquitto application
19-11-05 00:26:26 INFO (SyncWorker_15) [hassio.docker.addon] Start Docker add-on homeassistant/aarch64-addon-mosquitto with version 5.1
19-11-05 00:26:32 INFO (MainThread) [hassio.services.modules.mqtt] Set core_mosquitto as service provider for mqtt
19-11-05 00:27:17 INFO (SyncWorker_14) [hassio.docker.interface] Restart homeassistant/raspberrypi3-64-homeassistant
19-11-05 00:28:22 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance
19-11-05 00:34:46 INFO (MainThread) [hassio.host.info] Update local host information
Go ahead and remove that last comment, been reading and tweaking and sure enough it was my mqtt settings. I’v finally got my alarm devices showing up in states and dashboard. thank you so much for the guide
One thing that was unclear, for hassio add-on, is that your ring add-on configuration host need to be the lan ip of the machine. Example,
{
“host”: “192.168.x.x”, <== lan ip of your hassio device
“port”: 1883,
“ring_topic”: “ring”,
“hass_topic”: “hass/status”,
“mqtt_user”: “mqtt-user”, <== asssume you created a hassio user/pw
“mqtt_pass”: “mqtt-pass”,
“ring_user”: “<ring_email_login>”,
“ring_pass”: “<ring_password>”
}
TKVU – thank you for ending my misery. “<== lan ip of your hassio device” comment of the year. No, decade.
Do you have to be paying for the monthly Ring subscription to get this to work? or will it work directly with the hardware? I am hoping to be able to move away from the ring contract and still have use of my alarm system, in HA.
I have been attempting to do this integration. This was so quick and easy. Thank you for creating it.
AWESOME
I was wondering do you have to have the ring monthly $10 subscription for this to work? Or does it integrate directly into HA?
I don’t know for sure, but I’m pretty sure you don’t need that. That $10 a month is solely for them to also keep an eye on things and call you when something happens.
Will this work with Ring 2-Factor auth?
I’m having trouble getting anything to show up in my States. I’ve got a single Pi with Hass.io and the built in mosquitto broker, and it appears that everything is set up correctly, but no dice. Here’s my config:
config.yaml:
mqtt:
broker: 192.168.0.249
username: mqtt
password: mqttpw
discovery: true
discovery_prefix: homeassistant
birth_message:
topic: ‘hass/status’
payload: ‘online’
qos: 0
retain: false
mosquitto config:
{
“logins”: [
{
“username”: “mqtt”,
“password”: “mqttpw”
}
],
“anonymous”: true,
“customize”: {
“active”: false,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”,
“require_certificate”: false
}
ring config:
{
“host”: “192.168.0.249”,
“port”: 1883,
“ring_topic”: “ring”,
“hass_topic”: “hass/status”,
“mqtt_user”: “mqtt”,
“mqtt_pass”: “mqttpw”,
“ring_user”: “<myringusr>”,
“ring_pass”: “<myringpw>”
}
Had the addin working but now it stopped functioning. Ring now sends new login verification and app can’t work with it.
I’ve got the same issue as Teknowiz, its annoying as it seems Ring is forcing 2FA even if you don’t want this to happen. I do see a lot of logins on the control centre for “Python android” under authorised devices, wondering if deleting these and trying again would help?
So it looks like Ring has added in 2FA as mandatory. That has broken the original plugin. Luckily there is a solution(which I haven’t tried, but others have confirmed it working). So there are 2 components. One is the actual integration created by tsightler. The other is the addon I reference, which simply pulls down that integration into HA. Supposedly, in the addon, you can click ‘rebuild’ to pull down the latest code from tsightler. However, tsightler has now created his own hass.io addon, which I would recommend people use. https://github.com/tsightler/ring-mqtt-hassio-addon
Load that up and follow the steps there and you should be good to go. There is a little more work to get it setup due to the 2FA.