i wonder if entities from your integration wont show due to it was originally set to “enable_cameras: false" on install and didnt discover them? I originally used HA integration for cameras but not sure if that would be an issue? I now want to use your created camera entities but wont show now by just changing to true and restarting system.
All devices are auto discovered every time the addon is restarted. Note that if you also have the native Ring integration then you will have two entities with different entity names, but this is expected. The camera entities from this addon will always end in “_snapshot” so they should be clearly different from the camera entities created by the native integration. You can absolutely have both configured (I do).
Yeah I have snapshot entities and have used them from first install. I guess I will dig a bit deeper as to why I don’t see the actual camera entity. Thanks again for what you do.
Yeah I have snapshot entities and have used them from first install. I guess I will dig a bit deeper as to why I don’t see the actual camera entity.
I don’t understand this statement. The snapshot entities are the camera entities, the addon only supports snapshots and uses camera entities to present those snapshots.
Well don’t I feel stupid… then yea I’ve always had snapshots from your integration working! I just assumed there was a “camera” option too for a “recorded video” option like the HA integration. I am so sorry to have bugged you with a non issue. Crawling back under my rock now. Lol!
Yeah, this addon uses MQTT for integration and MQTT is not a platform designed for streaming. Based on my own testing the HA MQTT camera component can only display an image about once every 5-10 seconds at best, not exactly usable for streaming, but works well with snapshot images.
I have been considering the implementation of a live streaming component in the webserver of ring-mqtt, but having so little time to maintain this project I can barely even keep the existing features working, I still have a number of new devices I need to add support for, and cameras just introduce a ton of other issues potential issues, plus I needed to get this ongoing problem with cameras that stop reporting status as the highest priority.
Dear Tsightler,
Can you pls advise if there is an option to change time of motion detected in RING doorbell? Once motioned detected, it’s stays for 3 minutes active and then only send status OFF. As well snapshot from camera available only after 10 seconds from start of motion action, that lead to delay. Any option to get snapshot faster?
Best Regards
There’s no setting to change the motion detection duration. I implemented it for cameras this way from the start to have consistency between alarm motion detectors, which require 3 minutes of no motion before they set a zone inactive. Note however that cameras will send additional ON events and update the last event attributes if new motion events are detected even while motion activity is still indicated, so it’s still possible to detect additional motion events.
Normally snapshots should be pretty fast for wired cameras (a few seconds) so If it’s taking 10 seconds from the start of motion to get a snapshot then I’d have to guess you must have a battery powered camera, is that correct?
Now it’s clear. Correct, have battery one…
One more question: if duration of motion event up to 3 minutes and can’t be changed, when the camera can take additional movement event (time period) for second snapshot?
For example in native iOS application it will pop up after 10-15 sec after first, but I never notice it in your mqtt addon. And during 3 minutes it’s not updating snapshot actually. Any suggestion?
P.S. in your latest update there is an option to choose time of snapshot update. How it is working? Does it mean that I have to choose motion as interval action in ha addon?
Regards
Unfortunately Ring’s webhook API is restricted to be registered only with specific push notification implementations (iOS, Android, and Windows push notification frameworks) so it’s not implemented in ring-client-api. Otherwise we could probably get access to the same notification images used in Ring’s native app.
This isn’t too bad for wired cameras, as we can still take snapshots every 10 seconds or so, but battery powered cameras are a challenge because taking frequent snapshots is a huge battery drain and they don’t allow taking snapshots while they are also recording (attempts to call the on-demand snapshot function are simply ignored) and, since motion events pretty much always trigger recordings, the only way to get a “snapshot” is to connect to the livestream and grab a frame and, even worse, I have to keep the livestream active for the entire time or it will stop recording.
Today I connect to the livestream and grab a keyframe as quickly as possible. This involves establishing a SIP session, firing up ffmpeg to convert the stream to MJPEG and a pipeline to grab a JPG image from the MJPEG stream. On fast hardware it normally about 3-5 seconds, but on slower hardware, like an RPi3, 7-10 seconds to get the stream started and grab the first frame is pretty common and I don’t think there’s much I can do about it. Then I have to keep the stream running or it will abort the recording, so basically, today, you’ll get only one frame for every livestream started, which generally run for ~30-60 seconds, no matter how many motion events occur during that time.
Ring battery cameras are simply very limited, exacerbated by the fact that 3rd party applications don’t have access to the push APIs. My best suggestion is to get a line powered camera.
Regarding your question about updating snapshot time, this is used only for interval processing (it was already possible to set this via MQTT, just wasn’t surfaced in Home Assistant since, until they introduced the MQTT number integration, there was no practical way to make it visible). However, as I noted above, setting short intervals for a battery camera will have a very negative impact on battery life, even snapshots every 5 minutes are very noticable.
During motion events I had originally planned to update the image every 10 seconds or so, since MQTT is fast enough for this, however, what I found is that, in the vast majority of cases, the motion event was gone after 10-20 seconds, so then you would end up overwriting the actual useful image of the motion with images showing nothing. However, your comments have given me an idea, since I still have the livestream running and the MJPEG pipeline remains active, I could probably make it update the image if a additional motion event is received, without much overhead at all. I need to think about that.
Fantastic! Thanks for your time and answers! Will keep an eye if you create something new
It was such a good idea that apparently I had already implemented it! The code already attempts to grab a new frame for each new motion ding received. I just tested it and it seems to work for me, but I don’t have actual battery powered cameras so I have to modify my code to make it think my powered cameras are battery cameras. It’s possible something is not working with actual battery powered cameras, but, for me, if I keep walking around, I get updated events and snapshots every 20 seconds or so.
If it’s really not working for you I’d suggest opening an issue on Github and submitting logs.
Ohhh, that was swift implementation . I will try and see. Did you already update new version of addon or there is no need to do this?
There’s no need as it’s actually already in the existing code. That’s why I said if it’s not working for you then you should open an issue on Github and upload logs for investigation (or send me logs directly, my email is the same as username here on Gmail).
Just got a ring device today and gotta say, thank you for the excellent work you put into this. I was just about ready to give up and send this solar light back before I found this thread!
Not working as of 5 hours ago for me, when I check the logs its says 404
2021-07-28T21:03:52.412Z ring-mqtt Using configuration file: /data/options.json
2021-07-28T21:03:52.413Z ring-mqtt Reading latest data from state file: /data/ring-state.json
2021-07-28T21:03:52.505Z ring-mqtt Attempting connection to Ring API using saved refresh token.
2021-07-28T21:03:53.542Z ring-mqtt Response code 404 (Not Found)
2021-07-28T21:03:53.542Z ring-mqtt Unable to connect to Ring API using saved refresh token.
2021-07-28T21:03:53.543Z ring-mqtt Could not connect with saved refresh token and no refresh token exist in config file.
2021-07-28T21:03:53.543Z ring-mqtt Restart the addon to try again or use the web interface to generate a new token.
Ive tried restarting and ive tried to use the web interface to generate a new key. I get an email from ring warning me of a new sign in but still no new token.
I get the message that token generation is complete but I dont see it so I cant copy it and if I leave the page im asked to log into ring again
I am having the same issue. Perhaps the problem is on Ring side?
Yeah I was hoping thats the case but thought it worth posting anyway, I will have to check on it tomorrow I guess see if it starts working again
Ring pushed out updates yesterday which made breaking changes to the API calls being used by ring-client-api. This required a new version to pull in the required changes. Version 4.6.2 was pushed last night to resolve the issue. If you update to this version everything should work again.
Once again impressed by your development. Thanks!!