Ring Binding [3.2.0.0;5.0.0.0)

The binding as posted should work for the newer versions. I’m on a 4.3.0 snapshot and have no issues. Is it failing?

Unfortunately I can’t see it in my add-on-store for bindings.
Still try to investigate the reason - if you have a hint please let me know

I’m on the 4.3 snapshot and have no issues finding it

https://[YOUR OH]/addons/binding/marketplace:145245

1 Like

Hi,

I have been trying to set the Ring Account Binding Thing to connect but same problems referred in this post happen. I review this forum thread and try several things but no luck so far. Binding installed manually from the jar file at the beginning of the post, also through add-on Store, enter token directly as well… Final result: COMMUNICATION_ERROR 2 factor enabled, enter code, although I entered the six digit SMS code received. In Karaf console I received as posted. Any clues? Thank you.
Screenshot 2024-12-11 at 09.02.35

installed successfully on OH 4.3.1.

All seems to be working well, so far! :smiley:

I wonder, would there be a possibility to add a channel to read out the Disarmed/Home/Away mode from the Ring account/Location?

thanks a lot & best regards - Gerry

Anyone else seeing significant delays with the binding?

See snip from events.log below:

2025-03-10 14:21:03.189 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Ring_Account_Binding_Thing_When_the_event_was_created' changed from 2025-03-10T12:43:45.970+1030 to 2025-03-10T14:14:28.502+1030

Almost 7 minutes from the event being logged by ring, and reaching openhab.

What works for me is to trick Ring by trying to login to the web app and using the 2FA code it provides in the binding. Ring does not provide a 2FA code when I just try to login with the binding. (May not be your problem).

same here. error username/password invalid. Using SMS code as 2fa token by trying to login via browser did work. but of course that must be a workaround and need to be fixed (kindly mentioning :slight_smile: )

FWIW, given morph166955 has moved on to other camera, I’ve been able to bring across his latest code into https://github.com/psmedley/openhab-addons/tree/ring and will see about getting it building here, and hopefully see where he left off on the PR (ie https://github.com/openhab/openhab-addons/pull/14600)

1 Like

I have it building and am working on fixing the warnings from the compilation. I don’t appear to have broken anything yet with https://smedley.id.au/tmp/org.openhab.binding.ring-5.0.0-SNAPSHOT.jar

Whilst this is built against the main branch that will become OH 5.0; it’s compiled with compatibility for OH 4.3.

1 Like

I’ve now fixed the remaining SAT warnings… there are still some posisble null pointer failures that I need to resolve. I have tested this as a drop-in replacement for the ‘old’ code. I haven’t (yet) tested it on a new setup to confirm autodetection, etc still work.

Hey @Paul_Smedley,

I was one of the original testers of this binding many years ago, I’m currently running this version as a drop in within OH 4.3.5.

org.openhab.binding.ring-3.2.0-4.1.0-SNAPSHOT-93b326a.jar

Is your 5.0 link above the most recent that I can try with OH 4.3.5?

Best, Jay

Hi - yes the link is still the latest. Although the filename says 5.0 it works with 4.3.x

1 Like

I’m getting unresolved modules when I dropped it in.

2025-05-27 16:42:27.892 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.ring-5.0.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.ring [362]
Unresolved requirement: Require-Capability: osgi.ee; filter:=“(&(osgi.ee=JavaSE)(version=21))”

Here’s the java version I’m running.

[16:46:59] root@openhabian:~# java -version
openjdk version “17.0.9” 2023-10-17
OpenJDK Runtime Environment (build 17.0.9+9-Raspbian-1deb11u1rpt1)
OpenJDK Client VM (build 17.0.9+9-Raspbian-1deb11u1rpt1, mixed mode, emulated-client)

Best, Jay

Let me work out how to ensure compatability with Java 17… I thought the 4.3 compatability would take care of that :frowning:

I’ve tried compiling with: mvn clean install -Pj17 -Dohc.version=4.3.0 and am getting:

[ERROR] Unknown source: java.lang.NullPointerException: Cannot invoke "java.nio.file.FileSystem.getPath(String, String[])" because "this.fs" is null

Will try work out why it’s building OK with Java 21 and not with 17… Will post here once fixed

Other bindings also give me the same error when I try and compile them with the Java 17 profile :frowning:

OK I installed maven on another machine and recompiled the binding with Java 17 support. Same link as before.

Rebuild with some reviewer suggestions:
Java 17: https://smedley.id.au/tmp/org.openhab.binding.ring-5.0.0-SNAPSHOT-java17.jar
Java 21: https://smedley.id.au/tmp/org.openhab.binding.ring-5.0.0-SNAPSHOT.jar

With BIG thanks to @J-N-K, this binding has been merged and will be part of OH5.0!

I’ve refreshed the links about for both Java17 (compatible with OH 4.3) and Java 21 (compatible with OH 5.0)

2 Likes

Short info for the Java17 Version for Openhab 4.3.5…this is not working, because of the missing semantic-equipment-tag-feature (cant add things with ring addon)

[re.xml.osgi.XmlDocumentBundleTracker] - The XML document '/OH-INF/thing/thing-types.xml' in module 'org.openhab.binding.ring' could not be parsed: 

---- Debugging information ----

cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException

cause-message       : semantic-equipment-tag

class               : java.util.ArrayList

required-type       : java.util.ArrayList

converter-type      : com.thoughtworks.xstream.converters.collections.CollectionConverter

path                : /thing-descriptions/thing-type/semantic-equipment-tag

line number         : 63

class[1]            : org.openhab.core.thing.xml.internal.ThingTypeXmlResult

required-type[1]    : org.openhab.core.thing.xml.internal.ThingTypeXmlResult

converter-type[1]   : org.openhab.core.thing.xml.internal.ThingTypeConverter

class[2]            : org.openhab.core.thing.xml.internal.ThingDescriptionList

required-type[2]    : org.openhab.core.thing.xml.internal.ThingDescriptionList

converter-type[2]   : org.openhab.core.thing.xml.internal.ThingDescriptionConverter

version             : 1.4.21

-------------------------------

com.thoughtworks.xstream.converters.ConversionException: 

---- Debugging information ----

cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException

cause-message       : semantic-equipment-tag

class               : java.util.ArrayList

required-type       : java.util.ArrayList

converter-type      : com.thoughtworks.xstream.converters.collections.CollectionConverter

path                : /thing-descriptions/thing-type/semantic-equipment-tag

line number         : 63

class[1]            : org.openhab.core.thing.xml.internal.ThingTypeXmlResult

required-type[1]    : org.openhab.core.thing.xml.internal.ThingTypeXmlResult

converter-type[1]   : org.openhab.core.thing.xml.internal.ThingTypeConverter

class[2]            : org.openhab.core.thing.xml.internal.ThingDescriptionList

required-type[2]    : org.openhab.core.thing.xml.internal.ThingDescriptionList

converter-type[2]   : org.openhab.core.thing.xml.internal.ThingDescriptionConverter

version             : 1.4.21

-------------------------------

I am not sure, if it make sense to fix this version. This is just a info.

Sorry about this, I must have forgotten to remove that tag. With some later changes to the binding, there are some java 21 features used, so it’s not easy to build for OH 4.3. Best to install OH 5 M2 or above :slight_smile:

Currently I am using Alexa as gateway to trigger unlock of my intercom via openhab. I searched a little bit on Ring API documentation, and based on ring/packages/ring-client-api/ring-intercom.ts at main · dgreif/ring · GitHub it should possible to trigger the unlock command with a PUT request to https://api.ring.com/commands/v1/devices/deviceID/device_rpc with payload

json: {
        command_name: 'device_rpc',
        request: {
          jsonrpc: '2.0',
          method: 'unlock_door',
          params: {
            door_id: 0,
            user_id: 0,
          },
        },

I have not written anything in Java since 20 years, but if I find some time I will try to setup an environment to try this out

1 Like