Ring Device integration via MQTT w/ Video Streaming

I think for some people the love stream can stop working for a variety of reasons, sometimes it’s just age…

3 Likes

Lol I almost asked WTH you’re talking about until I reread my post

On a serious note though LIVE streams. Anyone have an idea why this is happening?

I just updated to 5.0.3 this morning. It is not working anymore. When I try to start the live stream:

2022-08-29T08:32:49.806Z ring-mqtt [Voordeur] Received set live stream state ON-DEMAND
2022-08-29T08:32:49.807Z ring-mqtt [Voordeur] ring/u1hrxc-4o007-0/camera/3ce1a1b06608/stream/state ON
2022-08-29T08:32:49.808Z ring-attr [Voordeur] ring/u1hrxc-4o007-0/camera/3ce1a1b06608/stream/attributes {"status":"activating"}
2022-08-29T08:32:49.809Z ring-mqtt [Voordeur] Starting a live stream session via Ring servers
2022-08-29T08:32:49.998Z ring-rtsp [Voordeur] State indicates live stream is activating
2022-08-29T08:32:50.237Z ring-mqtt [Voordeur] HTTPError: Response code 424 (Failed Dependency)
2022-08-29T08:32:50.237Z ring-mqtt [Voordeur] Live stream failed to activate
2022-08-29T08:32:50.238Z ring-mqtt [Voordeur] ring/u1hrxc-4o007-0/camera/3ce1a1b06608/stream/state OFF
2022-08-29T08:32:50.238Z ring-attr [Voordeur] ring/u1hrxc-4o007-0/camera/3ce1a1b06608/stream/attributes {"status":"failed"}
2022-08-29T08:32:50.375Z ring-rtsp [Voordeur] ERROR - State indicates live stream failed to activate
2022-08-29T08:32:50.386Z ring-rtsp INF [path 3ce1a1b06608_live] runOnDemand command exited with code 0
2022-08-29T08:32:54.035Z ring-mqtt [Voordeur] Requesting an updated interval snapshot
2022-08-29T08:32:54.036Z ring-mqtt [Voordeur] Error: Cannot fetch snapshot for Voordeur because it is offline
2022-08-29T08:32:54.036Z ring-mqtt [Voordeur] Failed to retrieve updated snapshot

@tsightler forgot to mention you, don’t know how actively you monitor this thread.

I’m running a docker on a pi4 btw

In general I ask that people use the project discussion page to request help. The project has become too large and complex to try to support people directly in this thread.

Ignoring the streaming error, this message is from the underlying API and came during an attempt to request a snapshot from the camera and appears to clearly indicate that the camera is offline. If you can’t get snapshots because the camera is offline then it’s also unlikely that you will be able to stream from it as being online is a dependency for the stream to activate (thus the 424 Failed Dependency error).

While I can’t be sure that this status is correct, it is based solely on the value of the device.data.alerts.connection property which is returned directly from the Ring API and is the same value used by the Ring app to show if a camera is online or offline. This method has not changed in years, so I have a tendency to trust that it is accurate, thus I would ask that you verify that this camera is online.

1 Like

Have been working for sometime now with Go2RTC (Go2rtc project - help thread) works really good. The startup of the stream has improved a lot.

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