Ring Binding [3.2.0;4.0.0)

Hi @alkaline. I apologize I completely forgot about this message. Are you still seeing this behavior?

Iā€™ve just posted version 0.03 (be0dca2).

Big changes are the addition of some more thing properties. Specifically, since this has always been a problem for me, the description of the device as set. This helps correlate ā€œring device 12345ā€ to ā€œGarage Doorā€ so you know what youā€™re looking at. Iā€™ve also added that description to the discovery process so in theory adding things will now be easier/more intuitive for end users.

Iā€™ve also added some additional logging to help me debug. In that process, Iā€™ve also added some pieces to filter the logs from sharing sensitive data. For example, instead of dumping your password into the log, we do some validation and just dump ā€œNOTEMPTYā€ or ā€œNULLā€ into the log. Itā€™s a middle ground that should give me enough to know that youā€™ve put something into the field that ā€œcould be rightā€ but not get your private data.

Please report any issues. Thanks!

Iā€™m looking for some opinions from the users. Iā€™ve identified the (probable) cause of the delay in the events hitting the bus. Itā€™s likely tied to the URL. Basically, the event doesnā€™t hit the bus until the video is downloaded. Because videos can be 90-120 seconds, this can cause a delay of that time PLUS the time it takes ring to process PLUS the time it takes to download. Thatā€™s why itā€™s been potentially minutes behind.

The fix is to remove the URLs or some how fork off the processing. The problem with that is, if you get multiple updates in a short window, you may not get the URL. Itā€™s a catch 22.

So the question is, is anyone actually using the URLs? Is this something we would want to make some how a separate set of channels that would come in ā€œwhen availableā€ and may be delayed? Other thoughts on how to do this better?

Here is my tests without URLs enabled:

2023-04-03 17:32:02.056 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜RingEventCreatedā€™ changed from 2023-04-03T17:27:33.000-0500 to 2023-04-03T17:29:58.000-0500
2023-04-03 17:32:33.886 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜RingEventCreatedā€™ changed from 2023-04-03T17:29:58.000-0500 to 2023-04-03T17:32:04.000-0500
2023-04-03 17:35:22.454 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜RingEventCreatedā€™ changed from 2023-04-03T17:32:04.000-0500 to 2023-04-03T17:35:11.000-0500
2023-04-03 17:37:48.570 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ā€˜RingEventCreatedā€™ changed from 2023-04-03T17:35:11.000-0500 to 2023-04-03T17:37:39.000-0500

Notice the gap between the event timestamp and the actual time set (4 seconds, 29 seconds, 11 seconds, 9 seconds respectively). Itā€™s still erratic, and my timers are set a little higher than sane (I may get rate blocked if I grind this hard for long), but weā€™ve answered the ā€œis it possible to get events fasterā€ question.

My process uses the file downloaded and I use my own url to the file on my system.

I vote, alert us quickly, then fork off downloading file.

My email to me will reference the correct filename, I will have to wait a few minutes to see the video against my url.

Best, Jay

How would you want to correlate the URLs to the event? For example, when my landscaper shows up my cameras go insane. I could have an event every few seconds. This is going to cause the videos to queue up but not necessarily be related to the current event because they will take a few minutes to be ready to download (since we arenā€™t doing live streams). At that rate, they may all roll in slowly over a long period of time. Also, in a time of high load, that queue could potentially get quite long and become a drain on system resources.

I actually donā€™t have that problem, my ring doorbells only capture the event then it waits X minutes for another event. Not sure why that is? Maybe a setting I have?

For example, if I come to my door and open it and go inside (captures event), then within a minute go back out the door, it doesnā€™t capture the exiting event.

We have a condo which the door is by a stair case door, people coming and going through that door all the time, it only captures the first event and then waits X minutes before another one occurs.

EDIT: looks like there is a setting in the app called ā€œMotion Frequencyā€, mine is defaulted to Regular which states it takes a short break after each motion.

Best, Jay

Thereā€™s definitely a log jam that was happening in the binding as well. Iā€™m considering making the URL downloads controllable as a thing property. Iā€™ll keep hacking at it to see if thereā€™s a better way to do this without just forking a ton of threads.

@jwiseman What if I were to give you the URL directly instead of pulling it down? Then you could download it via rules or w/e as needed. That should eliminate the lag (because Iā€™m just providing info and not actually doing it) and still give you the ability to grab it as you want.

Meaning that I would just reference the URL in the cloud vs. hosting the file myself? Iā€™m fine with that!

The only issue for those that do NOT subscribe to a hosting plan is that they couldnā€™t go back and see older videos X days. Really not our issue, really a subscriber to Ring issue.

I have a plan for Ring storage.

Best, Jay

Correct. It would be a link up to AWS I believe. The only concern I have is that it may be necessary to provide access to the oauth token so you can pull those down (the binding handles this in the backend). I could expose that through a channel easily enough.

Sure, I would just change my email logic to myself to point to AWS.

Iā€™m assuming an email with the URL will be able to authenticate to see the video?

Best, Jay

Probably not. The tokens are somewhat long. You could however easily script the same behavior so that when the url channel updates, a rule fires, and runs the (lengthy) curl that would be required to pull it down to the same place. Then it would work the same. Iā€™m just suggesting abstracting the download process from the binding.

Ok, but Iā€™m not using CURL now, the binding is doing it for me. If you can provide the syntax to download it, Iā€™ll use it.

Best, Jay

Iā€™m pushing 0.4 (b976893) to the main thread. This has the update to the events that hopefully will make them go faster

THIS IS A BREAKING CHANGE - I am now publishing the cloud URLS instead of a local URL. I am also now NOT downloading the videos to a local file. Letā€™s see how this goes. Iā€™ve merely commented out the line in the code that does this, so if it needs to go back itā€™s not a huge deal. That said, this makes stuff run much cleaner.

ALSO - Iā€™ve noticed my system disconnecting periodically with authentication issues in the last 2 days. I believe that I may have been flooding. If you notice the same, set refreshInterval under the account thing properties higher than 5 (Iā€™m trying 15 right now). Mine seems more stable like this.

EDIT: There was an issue with the jar, I have reuploaded a new copy, b976893 is the correct version.

EDIT2: Sorry yā€™all found a regression seconds after posting. New new new copy 0e95268 is uploaded

EDIT3: I swear Iā€™m not doing this on purpose. Last version had a thread leak. Final final 0.4 uploaded f66fca8

In the event someone grabbed one of the bad versions, please update and restart OH. There was a thread leak which was causing the accounts to fall offline. Thatā€™s fixed in the current version. Otherwise a stray thread keeps running looking for events and when the token is updated it burns the whole thing down.

I found two regressions from the drop from yesterday. After several hours the accounts would throw an exception and die. Iā€™ve dropped 0.4.1 (34af1e0) which resolves those regressions.

Hi morph166955

thank you very much for your question, unfortunately, at this time I can not respond experientially.
I will test again in the coming days, please excuse the delay

Hi Mr. Wiseman,
could you please be so nice to share your rule how to download the video and send it via mail? I didnt figured out how to do it ā€¦

Hey Christian,

This is NOT possible with the current version of the binding, it has been turned off to download locally to your OH machine.

@morph166955 has it on his list to get it working again in a better way.

Best, Jay

Hey Jay,
thanks for your response. Is there current another way how to maybe send the video to a recipient? I tried to send the video link through the telegram binding, but this not possible to open the link because of the 2FA authentication ā€¦
grafik

The second problem that Iā€™m forcing is that the battery status doesnā€™t refresh to the actual state ā€¦

OpenHab Screenshot

Ring APP Screenshot
grafik

Are there any hints you can give me how to get those things working?
The rest is working really fine! Thanks a lot @morph166955 for the update of the binding.

Greetings Christian