Ring Device integration via MQTT w/ Video Streaming

I noticed the same behavior in early 2022.2 builds although I had never really noticed it before. I believe it is this bug which was fixed in 2022.2.6 and, at least so far, I can’t reproduce it on that version. The bug says it was a fix for Nest, but the fix is in the stream component used by all cameras, and the error I was seeing is nearly identical, i.e. any unexpected stream error would cause future attempts to fail to retry (which is also very similar to what @RogTP posted above). Have you already updated to 2022.2.6?

When I posted this I may or may not have been on 2022.2.6. I see it was released on the 11th, so that may or may not have been after I posted. I tend to update fairly quickly though.

That said, it doesn’t seem to stop working at the moment, though I do get this in my logs:

2022-02-15 15:09:53 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.front_door_events] Error from stream worker: Stream ended; no additional packets

I have just updated to 2022.2.6, and indeed it seems to be working fine now. I will have a look how it progresses throughout the next few days.

Yes, but I would consider that error “normal”, in that it’s true, the stream does end (Ring allows a stream for a maximum of about 10 minutes and there are many other reasons it might end earlier, but Home Assistant assumes every camera is capable of streaming “forever”). The issue that was fixed in 2022.2.6 is that an error of that type would cause the camera to go “unavailable” and then never retry.

Well I can tune it out of my logs, but I don’t really like to. If it’s expected to happen at some point, it isn’t an Error as such.

HELP please!!!

I removed zwave locks out of Ring and somehow they still show up even after hard reset on these devices. Also, all of Ring devices are under Mosquito Broker MQTT w/ the exception of camera doorbell which shows up under Ring integration. Any ideas?

2022-02-20T14:42:59.789Z ring-attr [Lock - Front Door]
2022-02-20T14:42:59.786Z ring-attr [Lock - Garage Entry]

The devices show up under MQTT because that is how the information is being recieved. This is not the official Ring integration.

Consequently, because it’s MQTT, it updates based on alerts that are recieved, and Ring has no reason to send OUT a message that a device has been deleted, so they don’t. Remember, this isn’t an official API, so the API itself is missing some of the integrator-friendly features like that. That said, it’s also an easy fix. Go into MQTT device list, click on the device you’ve removed, and there will be a ‘delete’ button. Just delete the device and it will be gone.

Thanks for the feedback. I’ve deleted these devices under MQTT but then they come back again after HA restart. Not a big deal, just annoying to see “disabled devices”.

Weird. I’ve not had that happen with devices I deleted, something must be causing them to be called out specifically in the log maybe? I’m not sure. Sorry.

Guys, hi, I’m new in this community.
I sincerely thank tsightler for this tremendous work.
I’m quite new to the world of HA but I successfully use the mqtt server for some sensors.
Forgive my English.
In the ring-mqtt log I get a message for devices not found:
… ring-mqtt No devices found for location ID d821efa8-94f4-4e…

I have searched through the numerous messages, but I can’t find a situation like mine. Is it possible that the problem is related to the fact that the device is connected in a different wifi than my hassio on raspberry?

I use the first standard auto configuration without change.
Can you help me please??

The token and connection to the server is accepted.

Marco from italy

My guess is different wifi does not matter, but should be on the same subnet.
But that brings the question I am not sure of. Does it work when ring is on cellular backup?

on my mobile device the official ring app works correctly.
everything looks ok. Here is the complete log.
Can you help me?
Thank you guys.

ring-mqtt.js version: 4.9.1
Node version v16.13.2
NPM version 8.1.3
git version 2.34.1

Using discovered MQTT Host: core-mosquitto
Using discovered MQTT Port: 1883
Using discovered MQTT User: addons
Using discovered MQTT password:

Running ring-mqtt…
2022-02-21T20:42:50.899Z ring-mqtt Using configuration file: /data/options.json
2022-02-21T20:42:50.910Z ring-mqtt Reading latest data from state file: /data/ring-state.json
2022-02-21T20:42:51.098Z ring-mqtt Attempting connection to Ring API using saved refresh token.
2022-02-21T20:42:52.546Z ring-mqtt Connection to Ring API successful
2022-02-21T20:42:52.552Z ring-mqtt Starting connection to MQTT broker…
2022-02-21T20:42:52.696Z ring-mqtt File /data/ring-state.json saved with updated refresh token.
2022-02-21T20:42:52.714Z ring-mqtt MQTT connection established, processing locations…
2022-02-21T20:42:54.749Z ring-mqtt --------------------------------------------------------------------------------
2022-02-21T20:42:54.750Z ring-mqtt New location: Petriolo (d821efa8-94f4-4e2b-b04f-0319a6621505)
2022-02-21T20:42:54.752Z ring-mqtt --------------------------------------------------------------------------------
2022-02-21T20:42:54.752Z ring-mqtt Ring location/device data updated, sleeping for 5 seconds.
2022-02-21T20:42:59.757Z ring-mqtt No devices found for location ID d821efa8-94f4-4e2b-b04f-0319a6621505

So I’m a bit confused. My installation was running just fine. MQTT-Ring was workking as expected and very good I might add.

Today I added:

</s> <s>mqtt:</s> <s> broker: 192.168.20.72</s> <s> username: mosquitto</s> <s> discovery: true</s> <s> discovery_prefix: hahomey</s> <s>

to my configuration.yaml. I need this to be able to get some additional MQTT lights into my HA installation. After adding this my preview picture goes missing:

image

Clicking the camera, it shows the stream. WIth VLC it works too. So the MQTT-Ring docker is running fine.

When commenting out the mqtt: in my configuration.yaml. It presents my preview picture again:

image

How can I troubleshoot this? I just don’t know where to look. Everything seems to work, but not with MQTT: in my configuration. Without the mqtt: in my config I also have the plugin mqtt configured through gui and it’s pulling devices too.

Solved by editing the originating system pushing everything to MQTT.

Dynamically adding/removing devices is not currently supported by this addon, if you add or remove a device you must restart the addon, not just Home Assistant. Otherwise, the addon will still have the device in its device list and continue to send discovery messages to re-add the device each time Home Assistant restarts.

My guess is that you only have cameras but you haven’t set the config option to enable camera support.

A thousand thanks! next days i will try to reconfigure from the beginning. Thank you.

Hello everybody,
I have the ring doorbell
i installed ring-mqtt.
from the log it seems to work perfectly,
but how do i add the camera and entities available on lovelance?

another question:
can I just watch and not interact by hearing and talking?

Hi,
I’ve installed the add-on and configured. All worked correctly. What I’m trying to achieve is, when someones rings the doorbell, it starts streaming the live video on my chromecast. Was anyone able to achieve this and can give me some help? Thanks!

Actually that’s pretty simple : you have 2 solutions
1st : use last HA version 2022.3 and cast media to your chormecast
didn’t try this yet as i’m waiting the end of march to install this version

2 : it’s what’ve done : i used the camera.play_stream function
note that you have TO NOT forget to add in your script the function : media_player.media_stop in order to save your camera battery :slight_smile:

see my code example right down :

service: camera.play_stream
data:
media_player: media_player.shield
target:
entity_id: camera.porte_entree_video

1 Like

Mine is probably a bit more complex than you want, but

alias: Front Door - Stream Cam to TV
description: ''
trigger:
  - type: occupied
    platform: device
    device_id: 94b893224c260206c2f7963114b338f7
    entity_id: binary_sensor.front_door_ding_2
    domain: binary_sensor
condition: []
action:
  - service: input_text.set_value
    data_template:
      value: |
        {{ states('select.lounge_room_activities') }}
    target:
      entity_id: input_text.loungeactivity
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.front_door_live_stream
  - device_id: a2a210e8cef52f03f779f6f05912dea8
    domain: select
    entity_id: select.lounge_room_activities
    type: select_option
    option: Chromecast
  - service: media_player.play_media
    target:
      entity_id: media_player.lounge_tv
    data:
      media_content_id: media-source://camera/camera.ring_mqtt
      media_content_type: application/vnd.apple.mpegurl
    metadata:
      title: Ring MQTT
      thumbnail: /api/camera_proxy/camera.ring_mqtt
      media_class: video
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://camera
  - delay:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
  - service: remote.turn_on
    data_template:
      activity: |
        {{ states('input_text.loungeactivity') }}
    target:
      entity_id: remote.lounge_room
  - service: media_player.media_stop
    data: {}
    target:
      entity_id: media_player.lounge_tv
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.front_door_live_stream
mode: single

I use the text helper to remember the state my TV was before the doorbell was pressed - just simply using the Harmony remote component, and then re-instate that after a minute.

The live stream is either enabled by a separate automation for detecting motion - or if that’s not fired in time, there is a second action in the automation that will turn the live stream on.

I make sure to turn it off after a minute, as even with a hardwired Ring, it will run out of battery pretty quickly.

1 Like