Ring Device integration via MQTT w/ Video Streaming

@mhoogenbosch I had been considering including some native WebRTC support directly into the ring-mqtt addon using an approach similar to go2rtc, but the go2rtc addon makes setup so painless I think it isn’t worth doing at this point. Startup with go2rtc is fast, and it shuts down more quickly as well and I agree it’s a good solution.

Unfortunately, it does still suffer from one issue that impacts most WebRTC solutions, it can be difficult to configure for access from outside of the network. For example, attempting to access the stream works fine on my local network, but if I’m remote, it will only work if I connect back to my home network with VPN, so, for example, attempting to access the live streams from my phone over 5G doesn’t work, even though it works fine with the native stream integration. This might not matter to some users, but it’s a reason I still don’t recommend it as the default setup for now.

–Update–
Actually, I was able to get external network access working, just had to create the go2rtc.yaml file in the Home Assistant configuration directory to set a static TCP port and then forward that with my router. Much more reliable than the previous setup. Would be nice if this could be configured in the standard configuration settings, but I’m guessing that will come along eventually. I have to say, this is the nicest setup option so far for viewing Ring cameras in Home Assistant with fast startup and low latency.

Yes, was just about to mention; the external access has improved a lot. All users who don’t use the native cloud access of HA already have experience with port forwards, it is now only one port, compared to the previous solution where you needed to open 10k UDP ports, this works a lot better.

I agree; I’d not put any effort into implementing this solution in yours. It works great as it is.

What I haven’t tried is having two-way audio. This should be possible with go2rtc, I now have a https proxy in front of it and thus microphone gets detected and is allowed through. Haven’t had time to actually test this.

I have found one issue with go2rtc, when a stream times out on the source side, for example if you watch the entire event clip, or leave it alive for 10 minutes, there’s no retry in the current go2rtc code and the only way to recover is to restart the addon. This had been noted by other go2rtc users with other cameras as well and I see that there is already a task with enhancements planned, so hopefully that will come soon enough.

What I haven’t tried is having two-way audio. This should be possible with go2rtc, I now have a https proxy in front of it and thus microphone gets detected and is allowed through. Haven’t had time to actually test this.

I don’t see how this would work as I’m not setting up any return channel within the stream and, unless something has changed, I also don’t believe the WebRTC framework in HA supports this yet, but I haven’t followed it’s development closely as of late.

This is correct, but with using an Iframe it should work. There have been a couple of successes for example with nest cams. But not having a return channel would probably pose a problem.

Hello,
for a few days now, the Ring Alarm device has been getting the message Unavailable.

I don´t change anything oder don´t Update Home Assistant.

But what I see in the log of Ring-mqtt addon is:
2022-09-23T16:40:32.066Z ring-mqtt Attempting to reconnect to MQTT broker…
2022-09-23T16:40:32.075Z ring-mqtt Unable to connect to MQTT broker Connection refused: Not authorized

What can I do to resolve the issue to get my Ring Alarm working again in Home Assistant?

Thank You.

The ring MQTT container can’t talk to your MQTT broker. Has got nothing to do with the alarm itself. Does your broker still work and have you put in the correct credentials ?

I think you mean in the Mosquitto broker right?

I don´t change anything in the Mosquitto broker.

But now I see in the logs of Mosquitto broker the following:
2022-09-23 20:57:40: New connection from 172.30.32.1:50266 on port 1883.
error: received null username or password for unpwd check

Which username and password do I have to enter and how exactly?

The broker receives an authentication which isn’t correct. Most probably you have upgraded the broker to a newer version where empty usernames and passwords aren’t supported anymore. But, as this has got nothing to do with ring I’d advice to use the search or open a own thread where people can help you with this specific problem.

ok thank you

I sent my T-Mobile home internet back because I could not forward ports. Then I found ZeroTier. There is an addon for HA and an app for my Samsung phone.Works great and free…

I do not think of it as a VPN to my network, But a direct IPv6 connection from my phone to my HA instance.

Alas, now T-Mobile says they have reached capacity in my area and will not sell me a device now.

In general the best solution is to use automatic user/password detection, at least assuming you are using the addon (automatic username/password detection only works for the addon). Unfortunately, recently there has been some strange issue where sometimes autodetection doesn’t work (also reported for other addons that use auto detect like zigbee2mqtt).

So far it remains completely reliable for me so I’m not really 100% sure why this is happening, but I think the issue is that sometimes the ring-mqtt addon starts too early, before the MQTT service account has been advertised. I’m suspicious this may have been caused by the move to s6-overlay v3, which appears to startup much more quickly. I’m thinking I may just add a few seconds of delay before calling the automatic username/password detection.

That being said, the workaround for this should be to just restart the ring-mqtt addon and see if it reconnects. If it doesn’t then it’s something else that is the problem. You can always manually create a home assistant user for MQTT and then manually define that in the MQTT URL.

I have restart the addon " Ring-MQTT with Video Streaming".

After this, I dont´t get an error in the addon logs.

I have this logs:

device: {
    ids: [ '343ea4667fc6' ],
    name: 'Gang',
    mf: 'Ring',
    mdl: 'Stick Up Cam'
  }
}
2022-09-26T15:47:26.821Z ring-disc HASS config topic: homeassistant/sensor/8edc0d96-e1fd-4090-ae5a-823aaef19d31/343ea4667fc6_info/config
2022-09-26T15:47:26.822Z ring-disc {
  name: 'Gang Info',
  unique_id: '343ea4667fc6_info',
  state_topic: 'ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/info/state',
  device_class: 'timestamp',
  value_template: '{{ value_json["lastUpdate"] | default("") }}',
  json_attributes_topic: 'ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/info/state',
  icon: 'mdi:information-outline',
  availability_topic: 'ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/status',
  payload_available: 'online',
  payload_not_available: 'offline',
  device: {
    ids: [ '343ea4667fc6' ],
    name: 'Gang',
    mf: 'Ring',
    mdl: 'Stick Up Cam'
  }
}
2022-09-26T15:47:26.822Z ring-disc HASS config topic: homeassistant/sensor/8edc0d96-e1fd-4090-ae5a-823aaef19d31/343ea4667fc6_wireless/config
2022-09-26T15:47:26.823Z ring-disc {
  name: 'Gang Wireless',
  unique_id: '343ea4667fc6_wireless',
  state_topic: 'ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/info/state',
  device_class: 'signal_strength',
  unit_of_measurement: 'dBm',
  value_template: '{{ value_json["wirelessSignal"] | default("") }}',
  json_attributes_topic: 'ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/wireless/attributes',
  availability_topic: 'ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/status',
  payload_available: 'online',
  payload_not_available: 'offline',
  device: {
    ids: [ '343ea4667fc6' ],
    name: 'Gang',
    mf: 'Ring',
    mdl: 'Stick Up Cam'
  }
}
2022-09-26T15:47:26.824Z ring-disc HASS config topic: homeassistant/sensor/8edc0d96-e1fd-4090-ae5a-823aaef19d31/343ea4667fc6_battery/config
2022-09-26T15:47:26.824Z ring-disc {
  name: 'Gang Battery',
  unique_id: '343ea4667fc6_battery',
  state_topic: 'ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/info/state',
  device_class: 'battery',
  unit_of_measurement: '%',
  state_class: 'measurement',
  value_template: '{{ value_json["batteryLevel"] | default("") }}',
  json_attributes_topic: 'ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/battery/attributes',
  availability_topic: 'ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/status',
  payload_available: 'online',
  payload_not_available: 'offline',
  device: {
    ids: [ '343ea4667fc6' ],
    name: 'Gang',
    mf: 'Ring',
    mdl: 'Stick Up Cam'
  }
}
2022-09-26T15:47:30.827Z ring-mqtt [Home Alarm] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/865a9968-1259-47f6-8382-0fe3f3a5eb04/alarm/state disarmed
2022-09-26T15:47:30.828Z ring-mqtt [Home Alarm] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/865a9968-1259-47f6-8382-0fe3f3a5eb04/siren/state OFF
2022-09-26T15:47:30.829Z ring-mqtt [Home Alarm] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/865a9968-1259-47f6-8382-0fe3f3a5eb04/police/state OFF
2022-09-26T15:47:30.830Z ring-mqtt [Home Alarm] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/865a9968-1259-47f6-8382-0fe3f3a5eb04/fire/state OFF
2022-09-26T15:47:30.831Z ring-attr [Home Alarm] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/865a9968-1259-47f6-8382-0fe3f3a5eb04/info/state {"alarmState":"all-clear","commStatus":"ok","lastCommTime":"2022-09-26T04:38:59Z","lastUpdate":"2022-09-26T04:38:59Z","tamperStatus":"ok"}
2022-09-26T15:47:30.833Z ring-mqtt [Home Base Station] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/0a205983-e974-46b6-b41b-9aa5c0909324/volume/state 0
2022-09-26T15:47:30.834Z ring-attr [Home Base Station] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/0a205983-e974-46b6-b41b-9aa5c0909324/info/state {"acStatus":"ok","batteryStatus":"charged","brightness":0.06439389,"commStatus":"ok","lastCommTime":"2022-09-26T15:44:51Z","lastUpdate":"2022-09-26T15:44:51Z","serialNumber":"BHBE22025PB002967","tamperStatus":"ok","volume":0}
2022-09-26T15:47:30.836Z ring-mqtt [Haustür] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/2cd05f28-12b0-446f-a2a4-2915e9b388b5/contact/state OFF
2022-09-26T15:47:30.836Z ring-mqtt [Haustür] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/2cd05f28-12b0-446f-a2a4-2915e9b388b5/bypass_mode/state Never
2022-09-26T15:47:30.837Z ring-attr [Haustür] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/2cd05f28-12b0-446f-a2a4-2915e9b388b5/info/state {"batteryLevel":100,"batteryStatus":"full","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2022-09-26T15:27:08Z","lastUpdate":"2022-09-26T15:27:08Z","linkQuality":"ok","serialNumber":"BHDE21950EL002502","tamperStatus":"ok"}
2022-09-26T15:47:30.838Z ring-attr [Haustür] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/2cd05f28-12b0-446f-a2a4-2915e9b388b5/battery/attributes {"batteryLevel":100,"batteryStatus":"full"}
2022-09-26T15:47:30.840Z ring-mqtt [Keypad OG] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/70e3a284-075e-41c6-9ddc-e7202abc9d0b/volume/state 3
2022-09-26T15:47:30.841Z ring-attr [Keypad OG] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/70e3a284-075e-41c6-9ddc-e7202abc9d0b/info/state {"acStatus":"error","batteryLevel":40,"batteryStatus":"ok","brightness":0.09015149,"chirps":"enabled","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2022-09-26T15:40:48Z","lastUpdate":"2022-09-26T15:40:48Z","linkQuality":"ok","powerSave":"off","serialNumber":"BHKE22016LD005735","tamperStatus":"ok","volume":0.03}
2022-09-26T15:47:30.842Z ring-attr [Keypad OG] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/70e3a284-075e-41c6-9ddc-e7202abc9d0b/battery/attributes {"batteryLevel":40,"batteryStatus":"ok"}
2022-09-26T15:47:30.843Z ring-mqtt [Bewegunsmelder] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/220e3e2f-bd34-4573-94bd-7aa894f9091c/motion/state OFF
2022-09-26T15:47:30.843Z ring-mqtt [Bewegunsmelder] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/220e3e2f-bd34-4573-94bd-7aa894f9091c/bypass_mode/state Never
2022-09-26T15:47:30.844Z ring-attr [Bewegunsmelder] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/220e3e2f-bd34-4573-94bd-7aa894f9091c/info/state {"batteryLevel":100,"batteryStatus":"full","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2022-09-26T15:45:58Z","lastUpdate":"2022-09-26T15:45:58Z","linkQuality":"ok","serialNumber":"BHME22012EL002514","tamperStatus":"ok"}
2022-09-26T15:47:30.844Z ring-attr [Bewegunsmelder] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/220e3e2f-bd34-4573-94bd-7aa894f9091c/battery/attributes {"batteryLevel":100,"batteryStatus":"full"}
2022-09-26T15:47:30.846Z ring-attr [Home Range Extender] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/32732ffe-5b89-48c5-9931-2a6ce30db593/info/state {"acStatus":"ok","batteryLevel":100,"batteryStatus":"charged","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2022-09-26T15:32:52Z","lastUpdate":"2022-09-26T15:32:52Z","linkQuality":"ok","serialNumber":"BHRE22016LD007108","tamperStatus":"ok"}
2022-09-26T15:47:30.846Z ring-attr [Home Range Extender] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/32732ffe-5b89-48c5-9931-2a6ce30db593/battery/attributes {"batteryLevel":100,"batteryStatus":"charged"}
2022-09-26T15:47:30.847Z ring-mqtt [Keypad EG] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/7749377a-14ba-4bbf-a5b8-2088b135cfae/volume/state 50
2022-09-26T15:47:30.848Z ring-attr [Keypad EG] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/7749377a-14ba-4bbf-a5b8-2088b135cfae/info/state {"acStatus":"error","batteryLevel":73,"batteryStatus":"ok","brightness":0.1022727,"chirps":"enabled","commStatus":"ok","firmwareStatus":"up-to-date","lastCommTime":"2022-09-26T15:41:32Z","lastUpdate":"2022-09-26T15:41:32Z","linkQuality":"ok","powerSave":"off","serialNumber":"BHKE21942LD007515","tamperStatus":"ok","volume":0.5}
2022-09-26T15:47:30.849Z ring-attr [Keypad EG] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/alarm/7749377a-14ba-4bbf-a5b8-2088b135cfae/battery/attributes {"batteryLevel":73,"batteryStatus":"ok"}
2022-09-26T15:47:30.850Z ring-mqtt [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/siren/state OFF
2022-09-26T15:47:30.850Z ring-attr [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/motion/attributes {"lastMotion":0,"lastMotionTime":"","personDetected":false,"motionDetectionEnabled":false}
2022-09-26T15:47:30.851Z ring-mqtt [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/stream/state OFF
2022-09-26T15:47:30.851Z ring-attr [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/stream/attributes {"status":"inactive"}
2022-09-26T15:47:30.852Z ring-mqtt [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/motion/state OFF
2022-09-26T15:47:30.852Z ring-attr [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/motion/attributes {"lastMotion":0,"lastMotionTime":"","personDetected":false,"motionDetectionEnabled":false}
2022-09-26T15:47:30.853Z ring-mqtt [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/snapshot_mode/state Auto
2022-09-26T15:47:30.853Z ring-mqtt [Gang] Snapshots are unavailable, check if motion capture is disabled manually or via modes settings
2022-09-26T15:47:30.853Z ring-mqtt [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/snapshot_interval/state 600
2022-09-26T15:47:31.265Z ring-attr [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/info/state {"batteryLevel":"67","firmwareStatus":"Up to Date","lastUpdate":"2022-09-26T10:53:04Z","wirelessNetwork":"archery","wirelessSignal":-65,"stream_Source":"rtsp://03cabcc9-ring-mqtt:8554/343ea4667fc6_live","still_Image_URL":"https://homeassistant:8123{{ states.camera.gang_snapshot.attributes.entity_picture }}"}
2022-09-26T15:47:31.266Z ring-attr [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/wireless/attributes {"wirelessNetwork":"archery","wirelessSignal":-65}
2022-09-26T15:47:31.267Z ring-attr [Gang] ring/8edc0d96-e1fd-4090-ae5a-823aaef19d31/camera/343ea4667fc6/battery/attributes {"batteryLevel":"67"}

But even after that, my Ring Alarm has the status “unavailable”

Do you have another idea?

No other ideas really, as that’s a fully functional ring-mqtt. My guess is that, for whatever reason, the Home Assistant side of the MQTT integration is not working, so you could try restarting HA or reconfiguring the HA Mosquitto integration. But, realistically, once ring-mqtt is connected to the broker and sending data the problem pretty much has to be somewhere else and that’s somewhat off-topic for this thread. Good luck.

Ok I’ll keep trying in this post:

I really hope it works again soon.

I am having this same problem. I cannot find anything that makes sense right now. Mosquito is saying it it getting null user and password. Ring-MQTT is set to use auto name, password, and host. I am not sure where to check that the auto information is set correctly but it has been working till I upgraded to 2022.9.7. Not sure if that is when it happened but was about the same time.

I have been having issues with mqtt add-on recently (nothing related to ring) and i had to restart the mqtt add-on and restart the dependent add-on as a follow up.

I’m not sure if this is basic HA functionality, or how this add-on/integration implements it. I noticed that I have 2 ways to disarm the Ring Alarm in an automation.

Under the Action pane:

  1. I can choose the “Device” option, select the Ring alarm device and the “Action” as "Disarm ". It also has a code option, where I added the disarm code.
  2. I can use the “Service” option, choose “alarm_control_panel.alarm_disarm” as the service, and the Ring Alarm entity (not device, but the entity) as the target. I did not provide the disarm code in this case.

Behavior:
In #1, the alarm gets disarmed, but my Alexa/Echo devices (which are connected to Ring via the “Guard” feature) ask me for the voice code to disarm the alarm, even though I provided it in the HA action.
In case of #2, the alarm gets disarmed, Alexa doesn’t ask for anything, and neither do I have to provide the code.

TL;DR: If I provide code, then Alexa asks for it again. If I don’t provide it, Alexa doesn’t ask for it. :man_shrugging:

Thoughts or suggestions?

Thanks

I have make an issue (Mosquitto broker Error · Issue #2688 · home-assistant/addons · GitHub) on github.

But I got this answer:

“Ring-MQTT with Video Streaming” is not sending proper authentication, report the issue with the author of “Ring-MQTT with Video Streaming”

I’m not really sure I understand the response in that thread. The logs you provided don’t have anything to do with ring-mqtt, you only mentioned it when opening the issue which confused things.

Regardless, it’s exceedingly unlikely that the problem is with the Mosquitto addon or the ring-mqtt addon. According to analytics the Mosquitto addon is deployed by over 50% of all HA users, like 100’s of thousands of users, if there was a basic problem with it there would be literally hundreds of posts about it. Even ring-mqtt, which has a paltry few thousand users (analytics suggest around 4000 total users) there would be dozens of posts on the Github project about this.

I run a fully updated HA for both my production and development instances, everything works without issues and nothing has changed with MQTT authentication of any significance for years, other than the change to the MQTT URL that occurred with the upgrade of ring-mqtt to 5.x. Over 90% of users are on a 5.x version with nearly no reports of this issue.

This means that the problems pretty much have to be caused by specific environmental issues. Now, it could still be a bug that is tickled by a specific setup issue, but the point is, that bug can’t be widespread. Trust me, if even the slightly thing goes wrong globally with ring-mqtt I get dozens of posts in a matter of hours.

So, we’ll need to troubleshoot your specific issues, but this isn’t the place for that. If you are willing and able to share full logs, and all configs, then feel free to open an issue on the Github page.

1 Like
  1. I can choose the “Device” option, select the Ring alarm device and the “Action” as "Disarm ". It also has a code option, where I added the disarm code.

The ring-mqtt integration has no access to the codes in the alarm. This “disarm code” for the device is used only within Home Assistant and you have to manually define this code in the ring-mqtt configuration (this is covered in the documentation).

In #1, the alarm gets disarmed, but my Alexa/Echo devices (which are connected to Ring via the “Guard” feature) ask me for the voice code to disarm the alarm, even though I provided it in the HA action.

I don’t understand what you are trying to do. Ring already has direct integration with Alexa for arming/disarming, why would you attempt to use this through Home Assistant? It’s way easier to just link you Alexa to your Ring account and call it a day vs attempting to go from Alexa to Home Asisstant, to ring-mqtt back to Ring. Of course you can do this, but in that case you’ll need to provide the disarm code you’ve defined for ring-mqtt, not the codes for your actual Ring alarm.