Ring Device integration via MQTT w/ Video Streaming

I have a google wifi mesh network, and in there I could see which devices were using the most data. Home Assistant on my PI was by far the most, using over 1 GB per hour. After disabling the Ring the usage dropped to almost nothing.

To run HA DNS INFO I have the Terminal & SSH add-on installed and ran it there.

How would I configure the DNSMASQ? If this is too much of an ask, thatā€™s fine, Iā€™m just curious.

Right, but I guess what Iā€™m trying to understand is if itā€™s using that traffic from the Internet, or just on the local network. It sounds like, based on what youā€™re saying, is that the traffic is just on the local network, in which case itā€™s really nothing to be concerned about. The Google mesh network should certainly be answering those DNS queries locally, so while I agree itā€™s a lot of data, itā€™s largely inconsequential.

There is an addon for dnsmasq in the HA addon store. You simply install the addon and start it, and then point your HA instance to use it as the DNS, then it will cache all of these requests internally.

It is using the internet, or it was, thatā€™s how I discovered the issue. It almost consumed my entire 1 TB limit for the month from Xfinity.

What would I need to do for the dnsmasq config?

defaults:
  - 8.8.8.8
  - 8.8.4.4
forwards: []
hosts: []
services: []

Got it, OK, well, then I guess your devices donā€™t actually cache DNS, which surprises me a little, but who knows.

Honestly, you probably donā€™t need to change anything in the config to solve this problem, but you may want to change defaults to use your local router DNS instead, and then modify HA to use the dnsmasq.

To be clear, Iā€™ve used dnsmasq plenty, but Iā€™ve never used this addon specifically, so Iā€™m not going to be a ton of help, and these days I used Unbound for local DHCP/DNS caching.

I will try to implement a local dnsmasq process in the container for the next release to overcome this problem in the API. Worst case, Iā€™ll go back to using a modified version of the API that includes fixes for this issue, but it will probably be a few days.

If you want to use 8.8.8.8 Google that is fine or you can also use your isp dns or you may want to look at opendns

In any event that config is fine. The key is you need to set a static ip for HA so you can point the dns server to itself. As in if you simply start dnsmasq using dhcp from your router it will still look at your router for dns. The ip of my homeassistant is 192.168.1.50 so I set my dns to point to that and I see entries in the dnsmasq log

Iā€™m still encountering the issue, could it be a configuration problem with MQTT?

These directions seemed to help reduce the traffic:

Disable listening on insecure (1883/1884) ports

Remove the ports from the add-on page network card (set them as blank) to disable them.

I donā€™t think so unless you are using MQTT to connect to some external entity and, even then, the amount of data sent over MQTT is very minimal.

I donā€™t really have any ideas, but, as I suggested earlier, this is probably not the best place to attempt to track it down. Iā€™d suggest opening an issue on the Github project and we can try to dig deeper as I think this is going to need to go deeper than a forum discussion and require logs and perhaps even a debug build of some type.

Also, strangely enough, I was able to reproduce this issue somewhat on Sunday, but now canā€™t get it to trigger no matter what I do.

Hi there! I noticed over the last few weeks Ring has been disconnecting regularly. I suspect this may be to required updates to my devices or devices detecting as ā€œtamperedā€.

Iā€™ve been tweaking my set-up to prevent tampered state (I updated my door jamb so my deadlock can better connect) and to prevent pending updates (by manually updating since disconnects are typically at night when the system is set to ā€œHomeā€).

Is there any way to get a read out on device state before the websocket disconnects and my home assistant ring integration stops functioning? E.g. a dump of the most recent device state?

Iā€™ve noticed my disconnections are frequently around 10 pm Pacific Time (Ā± 30m), and my suspicion is that this is when my system finds a device update.

2021-09-02T06:47:32.402Z ring-mqtt Websocket for location id <location-id> is disconnected

Does it not reconnect? I would consider occasional disconnections ā€œnormalā€, but the code actually just try forever underneath the covers so those issues should be transient. I donā€™t think any update or anything else should cause this, other than perhaps the base station going offline of failing over to cellular.

Thereā€™s no method in ring-mqtt to dump the current state, but you could just monitor the MQTT data with any tool and then youā€™d be able to review the state data.

1 Like

@tsightler congratulations ! The add-on was wonderful even before the live stream and now thatā€™s tremendous as it creates a rstp stream even without a Ring Protect Plan.

Now I have to learn RSTP, how to make it externalā€¦ Actually I donā€™t even know what to write in Configuration page under ā€œHostā€ and how to launch record in a google drive or something like this.

Well I certainly didnā€™t add streaming support so that people could bypass purchasing a Ring Protect plan. Of course, people can do what they want, itā€™s certainly possible to record video with FFmpeg from the RTSP stream and put it wherever they want, but I believe the experience will be less useful than a protect plan since youā€™ll almost certainly miss the start of events. If that doesnā€™t matter to you then great, youā€™ll get a little more out of your camera, but really, there are better camera options for local recording than a super expensive Ring device. Iā€™d probably just sell the Ring device and buy one of those.

To be honest, one of the reasons Iā€™ve been so hesitant to add streaming support, beyond just the nightmare of supporting it, is that people would try to use it to get around the limitations of Ring streaming and end up getting the entire addon blocked, which is certainly within Ringā€™s power to do. So far theyā€™ve seemed to tolerate those of us hacking on these addons, but they could certainly do things to completely block any 3rd party capabilities at all.

You are all right. I do not say the contrary.

I have a Protect Plan in one location and not in the other one so that I am able to test both configurations.

I just noticed the fact that accessing (and optionaly recording the stream) does not need a Protect Plan. It is a useful fact to know for people who try to figure out what they could do it in such a configuration too.

From my point of view, the big advantage of Ring is the powerful and easy-to-use ergonomics of its integrated system, hardware - software (depending the plan). Thatā€™s why I chose Ring cams rather than cheaper alternatives.

Home assistant integration is for other use cases. Firstly it is a great feature that you offer to connect all Ring system in Home assistant for information. Secondly Home Assistant will offer interaction/automations with other devices. I was never able to do so with my previous Honeywell ā€œLeSucreā€ alarm.

I am really grateful to you. And I am also grateful to Ring policy too. I do not want to buy Google Nest products anymore because they do not give such openess (less and less in the API). I believe RING make the right strategy by gaining ā€œtechiesā€ to satisfied clients and promotors of their brand. I would be sad if Ring would choose to limit its API.

(Sorry for my english - I am a French guy)

1 Like

Dear Tsightler,

Hello again :slight_smile: I have a question: is there any significant changes in last update and something need to be changed in configuration in HA? My door bell snapshot suddenly stop workingā€¦ So it means that if motion detected no new snapshot coming, idle shows old one, which was taken on addon start :(((. I tried to reinstall addon but no success.

Ohhh, that real nightmare, cant understand way camera stop taking new updated snapshots. Tried everything in configuration, set mode for motion, all, intervalā€¦Same resultā€¦no news pictures

Live streaming is working, but snapshotsā€¦

Nothing significant changed for most devices. One possibility, do you have a battery powered doorbell vs a wired one? Battery cameras are an absolute pain to get snapshots when a stream is active because of the fact that they canā€™t take a snapshot while streaming so I have to grab a snapshot from the video stream itself. As I donā€™t actually own any battery powered Ring cameras testing that code path is difficult for me. I certainly have no issues with snapshots on my setup after the upgrade. There were no real changes in that code as the biggest difference between 4.8.1 and 4.8.2 is just the addition of event streams which is mostly a separate code path (streams from an HTTP path instead of a SIP/RTP connection) but there was some reorganization in some of the properties that the live stream snapshot code references, so perhaps a bug snuck in there.

Dear Tsightler,

Rolling back to 4.8.1 set all back to normal and snapshots are fine. Problem definitely with 4.8.2. and I dont know where actuallyā€¦ Live streaming as well good. What cant I do to find the problem if there is no changes? Kindly advise.

PS camera is battery one (but as I told was everything wonderful on 4.8.1

Regards

BTW, there is an error in HA logs for camera templates (it was apper after stream live option, but nothing to do with snapshots (just for you info))

Logger: homeassistant.components.generic.camera
Source: components/generic/camera.py:138
Integration: generic (documentation, issues)
First occurred: 20:27:26 (81 occurrences)
Last logged: 20:39:05

Error parsing template Template(ā€œhttp://localhost:8123{{ states.camera.front_door_snapshot.attribute.entity_picture }}ā€): UndefinedError: ā€˜homeassistant.helpers.template.TemplateState objectā€™ has no attribute ā€˜attributeā€™