Ring doorbell

2.5M1 is based on the 2.4 code stream in the old Dev environment. Beginning with 2.5.M2 the complete build system was restructured.

The message shows that the binding is returning null when the framework tries to create the thing. This should be easy to debug.

You should also consider to switch to the 2.5.x branch. Maybe a simple rebuild in that environment solves the problem (I had this once in the past)

1 Like

Ah, that makes sense. I’ll give that a try, hopefully it’s something simple that needs to be fixed and we can get going again. Also, when I contacted Joshua Roth, he mentioned that in order to get any API documentation I/we would need to get involved in their “partner” program. I asked for details on what would be involved with that, i’m guessing that it would involve money and/or closing the binding source though, which I don’t think we can do and keep with the OpenHAB licensing if I understand things correctly. As I get more info on that, i’ll report back as well.

3 Likes

Been running this new alpha/beta JAR for a few days now on OH 2.4. One thing I do is monitor THING status on key bindings.

I’m noticing the Ring THING Account goes offline then back online around 4 - 8 times a day for me. I’m in the US if that matters or not?

Best, Jay

Do you notice if it’s specific times and any chance you can coordinate any logs with those times? That would go a long way to helping find out what’s going on

I put it in DEBUG mode now; will post once it does it again.

Best, Jay

I think I worked out 2-factor and also got it working with the new 2.5.1 addons repo, if you want to test here’s the links - use whichever one that your version supports.
org.openhab.binding.ring-2.4.0.jar
org.openhab.binding.ring-2.5.1-SNAPSHOT.jar

You’re going to want to delete and recreate your account thing at the very least, if you use two factor put in your username and password and save. When you get the SMS from ring.com, go back into the account thing configuration and enter the 2 factor code and save again. If all goes well, it will come online and start discovery of your other ring devices. This should also fix the issue @jwiseman was having with the account going offline, that was just set up when the session refreshed it would put it “offline” while it refreshed - it now keeps the account Thing online during that.

I’m also still trying to sort out the video URL, my focus was more on getting 2 factor working first because that seemed more important. I’ll try to get it going soon but I don’t have an ETA at the moment.

1 Like

Thanks @zolakk !

I have pulled down the 2.4 version and installed it. I deleted the doorbell but couldn’t delete the account THING because it’s defined in the THING file. I did however see the 2 factor option in there now (not using it though on my account).

After a bit; it found the door bell which is NOT defined in the THING file.

I will keep you posted . . .

Thanks again for your time getting this to work again!

Best, Jay

My account was online when I first put the JAR into the Addon’s - now it’s in this state below:

Capture

I can still go into the THING account and see the linking of the items.

Best, Jay

I commented out the THING account definition and added the account via PaperUI instead and it’s working now again.

Best, Jay

I just installed the org.openhab.binding.ring-2.5.1-SNAPSHOT.jar, not sure if this is an issue or not, but both my account and the doorbell are showing as “online”, but both have the status of “OFF” from the REST API, and the date time stamp is updating, but it’s off by several hours.

~John

Hi, i have installed this and its all working great bar the video URL, states " Not implemented by binding" any ideas?

Thanks.

@jsable when you say “but both have the status of “OFF” from the REST API” do you mean the Status switch under Control or are you looking somewhere else?

@Greigc As per my previous posts, the video URL is currently something that is being worked on. I’m honestly not sure how to tackle that one because they changed the format so the credentials aren’t in the actual URL anymore but as part of the HTTP POST message. Having just the URL will only get you a “unauthorized” error because you didn’t supply the authentication parts and a valid user-agent string in the HTTP header as part of the request, so I’ve disabled it for now until I can figure out how to handle that from the binding, or if it’s at all possible. If anyone has any ideas on how to present a URL, HTTP headers, and an HTTP POST body from a binding, I would welcome suggestions.

1 Like

Wh not implementing a feature kn the binding, which automatically downloads the video and stores it in a defined folder (account thing setting). The binding has the credentials, the token and could set the http header. I could manage the number of files in that folder (to limit space, delete the oldest if max files is reached) and provide the filename of the last recording as a channel value so it could be easily included in a dashboard.

That sounds like.a solution and would be a cool feature.

1 Like

Hi @jsable, I have exactly the same issue.
Account and Doorbell are showing online in Paper UI / Things, both have status “OFF” Paper UI / Control.The Ring Event Created timestamp is exactly one hour of (1 hour earlier listed in Paper UI).
Best,
E

I would expect this could be related a different time zone bzw. the RIng service platform and you local one.

@zolakk
Maybe I just need an explanation, does the the switch channel “ring:account:XXXX:control#status” in the “Ring Account Binding Thing” and the switch “ring:doorbell:ZZZZ:control#status” channel in the “Ring Video Doorbell” thing actually do anything? Both have the status of “OFF” when I added these things in PaperUI.
I do have another question, that is about the event time, I followed the ring.items from your GitHub page, and the RingEventCreated is displayed as:

2020-01-19 @ 14:54:16

In the Rest API, when I get the item state, it’s showing:

2020-01-19T14:54:16.000-0500

Which should be 2020-01-19 @ 09:54:16, do I need to do some formatting in the item label, I’ve tried but formatting does not seem to correct for the -5 hours?

Thanks,
~John

I have installed and got the account working (with 2FA), thanks for a great job!

Haven’t tested the things yet, but they are both online.

/Peter

@markus7017 That’s certainly an option I hadn’t thought of, that I think might be doable. I’ll have to look into that. This project seems to have that ability, it’s a matter of decoding the .ts to java and seeing if the libraries used are available in a binding.

@EdwardV @jsable I took a look through the code, and the original code I forked and hacked to get working and I don’t see any code that actually uses the “Status” channel, so I think I’ll just remove it in the next build unless I find some reason for it that I haven’t found yet.

The time thing is something that has been driving me nuts to be honest. Here’s the code for that, which I’m sure is wrong but I haven’t been able to find good documentation on time handling. I think I will need to dig into what other bindings are doing and see if I can find one I can understand.

    ZonedDateTime zoned = ZonedDateTime
                .parse(jsonObject.getOrDefault(ApiConstants.EVENT_CREATED_AT, "?").toString());
        return zoned.toLocalDateTime().toString();

Maybe its possible by the use of ffmpeg, (I believe it can handle ts stream as well).
And maybe you could have some ideas from @matt1 who make the ipcamera binding.

I´m pretty sure there may be some ideas to work on even though Ring doorbell isnt a dedicated IP camera.

Yes ffmpeg can read and write h264.ts and mpeg2.ts as it is more about the contents of the file and not the container.

1 Like