Ring Binding port from 2.5 to 3.x version

I downloaded your jar and put it on my system. Loading fine and binding showing up. However, being on the road as well, I could not get it up/running remotely. As soon as I create the account thing, it shows up as “unitialized”. Regardless of me putting in mail and password only, adding 2fa code or even with the unique refresh token of the formerly working thing.

Might do a scan in my network, once at home, to see if it detects the account by itself.

Sounds good. I won’t have any time to work on this for the next week. I’ll see if I can get 2fa working next week, time permitting. Otherwise, for now, please just let me know if the jar works “the same as the last one”. All I’ve really done at this point is recompile it to work on newer OH builds.

Could not resist and logged in via VPN on my server. Removed all former items, deleted all remains of the old binding jar and started off with ring from scratch. It works like a charm even with 2fa enabled.

Cannot comment though on the delay, as it is 9:15PM here in Germany atm.

Well that’s definitely a good sign!

Let me know how things go over the next week.

Sorry, but don‘t know.

I lied, the json jar was required on that jar…

But this one fixes that issue…

https://github.com/morph166955/openhab-addons/releases/download/ring/org.openhab.binding.ring-3.2.0-4.0.0-SNAPSHOT-363a2f6.jar

No worries, I’ll create a new one then. Thanks!

I’ve pulled the jar onto my OH4 system and can confirm the account comes up and 2FA also works as expected.

Added my devices, I do get these exceptions. I’ll look into it, saving here for notes at this point.

2023-03-13 16:29:55.615 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NoSuchMethodError: 'void org.openhab.core.library.types.DecimalType.<init>(long)'
        at org.openhab.binding.ring.handler.DoorbellHandler.minuteTick(DoorbellHandler.java:101) ~[?:?]
        at org.openhab.binding.ring.handler.AbstractRingHandler$1.run(AbstractRingHandler.java:84) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
2023-03-13 16:34:53.255 [ERROR] [hab.binding.ring.internal.RestClient] - RestApi error in getRequest!
java.net.SocketTimeoutException: Connect timed out
        at sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:546) ~[?:?]
        at sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[?:?]
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[?:?]
        at java.net.Socket.connect(Socket.java:633) ~[?:?]
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304) ~[?:?]
        at sun.net.NetworkClient.doConnect(NetworkClient.java:178) ~[?:?]
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:531) ~[?:?]
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:636) ~[?:?]
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:266) ~[?:?]
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:380) ~[?:?]
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193) ~[?:?]
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1242) ~[?:?]
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1128) ~[?:?]
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179) ~[?:?]
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1665) ~[?:?]
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) ~[?:?]
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529) ~[?:?]
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:308) ~[?:?]
        at org.openhab.binding.ring.internal.RestClient.getRequest(RestClient.java:219) ~[?:?]
        at org.openhab.binding.ring.internal.RestClient.getHistory(RestClient.java:617) ~[?:?]
        at org.openhab.binding.ring.handler.AccountHandler.minuteTick(AccountHandler.java:336) ~[?:?]
        at org.openhab.binding.ring.handler.AbstractRingHandler$1.run(AbstractRingHandler.java:84) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Mine is working as before with this new build.

Best, Jay

Awesome. I’ve created a draft PR to begin to track this and get it integrated into OH formally.

I’ll create a marketplace thread tomorrow (assuming I have time) so that this can be installed from there as opposed to using raw jar files. Also hopefully it garners attention from other users so we can get a good test base.

Hey @morph166955 ,

Another thing to put on the ToDo list, low priority, is these items circled below do not work on the Ring binding. Been this way since it was originally released.

Best, Jay

What are they supposed to be doing?

No clue, they are exposed item switches. I’m guessing they are for turning the account and doorbell OFF?

I’d be fine removing them, never thought about using them :wink:

Best, Jay

I’ll delete the channel for now since we don’t know what it was supposed to do and it doesn’t do anything either. It’s only a few lines we can add back later.

I’ve pushed this out to the marketplace and started a new thread. If everyone is OK with it, let’s please move conversation to that thread to keep it all in one place going forward. Thanks!