Ring Binding [3.2.0;4.0.0)

logo

NOTE: This is an early beta pulling the original Ring binding from OH2.5 into OH3/OH4. All original author credit goes to Wim Vissers who originally wrote the OH2.5 binding.

Ring

This is an experimental binding to the Ring.com API. It currently supports a Ring account
and is able to discover Ring Video Doorbells, Stickup Cameras, Chimes, and Other devices.
They need to be registered in the Ring account before they will be detected.

It currently does not support live video streaming, but you can view recorded video’s,
if this service is enabled in the Ring account.

Supported Things

The binding currently supports Ring Video Doorbell, Sickup Cameras, Chimes, and Others.
Other is identified as any of the non-traditional types such as the intercom.

Discovery

Auto-discovery is applicable to this binding. After (manually) adding a Ring Account thing,
registered doorbells and chimes will be auto discovered.

Binding Configuration

There is binding configuration necessary. The easiest way to do this is from the Paper UI. Just
add a new thing, select the Ring binding, then Ring Account Binding Thing, and enter username and password.
Optionally, you can also specify a unique hardware ID and refresh interval for how often to check ring.com for
events. If hardware ID is not specified, the MAC address of the system running OpenHAB is used.

Channels

Control group (all things):

Channel Type ID Item Type Description
Enabled Switch Enable polling of this device/account

Events group (Ring Account Binding Thing only):

Todo: Move these to the device thing

Channel Type ID Item Type Description
URL to recorded video String The URL to a recorded video (only when subscribed on ring.com)
When the event was created DateTime The date and time the event was created
The kind of event String The kind of event, usually ‘motion’ or ‘ding’
The id of the doorbot String The internal id of the doorbot that generated the currently selected event
The description of the doorbot String The description of the doorbot that generated the currently selected event (e.g. Front Door)

Device Status (Video Doorbell Binding Thing, Stickup Cam Binding Thing, Other Binding Thing only):

Channel Type ID Item Type Description
Battery level Number Battery level in %

Full Example

NOTE 1: Replace <ring_device_id> with a valid ring device ID when manually configuring. The easiest way to currently get that is to define the account thing and pull the device ID from the last event channel.

ring.things:

ring:account:ringAccount                "Ring Account"           [ username="user@domain.com", password="XXXXXXX", hardwareId="AA-BB-CC-DD-EE-FF", refreshInterval=5 ]
ring:doorbell:<ring_device_id>          "Ring Doorbell"          [ refreshInterval=5, offOffset=0 ]
ring:chime:<ring_device_id>             "Ring Chime"             [ refreshInterval=5, offOffset=0 ]
ring:stickupcam:<ring_device_id>        "Ring Stickup Camera"    [ refreshInterval=5, offOffset=0 ]
ring:other:<ring_device_id>             "Ring Other Device"      [ refreshInterval=5, offOffset=0 ]

ring.items:

Switch     RingAccountEnabled             "Ring Account Polling Enabled"    { channel="ring:account:ringAccount:control#enabled" }
String     RingEventVideoURL              "Ring Event URL"                  { channel="ring:account:ringAccount:event#url" }
DateTime   RingEventCreated               "Ring Event Created"              { channel="ring:account:ringAccount:event#createdAt" } 
String     RingEventKind                  "Ring Event Kind"                 { channel="ring:account:ringAccount:event#kind" }
String     RingEventDeviceID              "Ring Device ID"                  { channel="ring:account:ringAccount:event#doorbotId" }
String     RingEventDeviceDescription     "Ring Device Description"         { channel="ring:account:ringAccount:event#doorbotDescription" }

Switch     RingDoorbellEnabled            "Ring Doorbell Polling Enabled"   { channel="ring:doorbell:<ring_device_id>:control#enabled" }
Number     RingDoorbellBattery            "Ring Doorbell Battery [%s]%"     { channel="ring:doorbell:<ring_device_id>:status#battery"}

Switch     RingChimeEnabled               "Ring Chime Polling Enabled"      { channel="ring:chime:<ring_device_id>:control#enabled" }

Switch     RingStickupEnabled            "Ring Stickup Polling Enabled"   { channel="ring:stickupcam:<ring_device_id>:control#enabled" }
Number     RingStickupBattery            "Ring Stickup Battery [%s]%"     { channel="ring:stickupcam:<ring_device_id>:status#battery"}

Switch     RingOtherEnabled            "Ring Other Polling Enabled"   { channel="ring:other:<ring_device_id>:control#enabled" }
Number     RingOtherBattery            "Ring Other Battery [%s]%"     { channel="ring:other:<ring_device_id>:status#battery"}

Changelog

Version 0.7 (93b326a)

  • Fixes text based things
  • Makes changes to CLI
  • BREAKING CHANGE - See post 103 below for details

Version 0.6 (2a0dbc6)

  • Adds chime and other types

Version 0.5.1 (127eaa7)

  • Additional fixes for battery

Version 0.5 (a78a12b)

  • Moves URL to separate thread
  • Fixes battery

Version 0.4.1 (34af1e0)

  • Fixes 2 regressions from 0.4

Version 0.4 (f66fca8)

  • Updates event URL to cloud
  • Fixes several logger issues
  • Other minor bug fixes

Version 0.3 (be0dca2)

  • Updates thing properties
  • Updates discovery name
  • Updates logging

Version 0.2 (c32ebe1)

  • Updates from review
  • Fixes multiple exceptions

Version 0.1 (363a2f6)

  • initial release

Resources

https://github.com/morph166955/openhab-addons/releases/download/ring/org.openhab.binding.ring-3.2.0-4.1.0-SNAPSHOT-93b326a.jar

1 Like

Reserved for future use.

I’m posting this as a test jar for anyone who is using this binding. This includes several updates from the recent review. There are no new features in this, but it gets us closer to this getting through the PR process. I would greatly appreciate if people could test and let me know if there are any regressions. I’m specifically concerned about the refresh tokens. I’ve done some updates in the way that we store and update the persistent data and I need to know that we haven’t done anything to break that. Once we get some positive feedback I’ll update the main thread. Also to note, anyone using a text based configuration needs to be aware that you could have issues storing the refresh tokens through reboots. I have this on the to-do list to fix.

EDIT: Removed due to regression. Updated jar posted to main thread.

I was able to install the binding and link to my ring account using 2FA. I only see the channels below.

Is this the new jar or the one posted on the main thread? What kind of ring device is it? What OH version are you on?

If its a battery powered camera thats normal. The status channel is actually not implemented and is going to be removed shortly. You should see the event channels under the account thing.

I found the events under account - sorry was looking under the device. Everything seems to be working!

Binding version immediate above, 5397c5

Ring camera

Awesome! Thank you!

1 Like

I’ve identified a regression happening when restarting OH with the new code when 2fa is enabled. I’ll be pushing an updated jar shortly.

Version 0.2 (c32ebe1) now posted. This fixes the regression with 2fa I mentioned. This also aligns with what is currently in the PR. Please post any issues identified or just general success so we know everything is working as expected. Thanks!

EDIT: just to note, there seems to be a problem with battery level on stickup cams. I’ll try to work through that in the next week. I’m also going to try to push some more things to the thing properties (like the user set description) to make it easier to identify and manage the devices.

OH 3.2 with 2 different locations, one wired and one battery. So far so good with your changes.

Thanks for the battery level now!

Capture

Best, Jay

What kind of device is that? My doorbells are working but my stickups are null.

Video Doorbell (2nd Gen). Removable battery unit.

Best, Jay

Cool. I have the same one.

Hi morph166955

thank you for all your work, appreciate it.
My device is a Video Doorbell 3, secured with MFA.
As stated, file-based configuration is not working, used the GUI way instead and was able to bring the account as well as the device online.
The only channel I see working on the device:

  • Battery Level

The only channel I see working on the account thing:

  • Account Polling Enabled (on=yes, off=no)
  • The description of the Ring device

When the button is pressed on the bell, no other channels are updated, the remain NULL.

If I can help, please let me know.

Best
Marcus

That’s expected behavior at this time.

To make sure I’m understanding, the event channels arent updating at all when you have motion or a doorbell press?

Hi again

to be a little more precise:

  • Ring Account Binding Thing: Channel event#createdAt (DateTime)
    – shows the date / time of the last ring, but hours after the bell was pressed (for me it shows the ring from yesterday night)
    – after restarting OpenHab it shows me the event from today
  • Ring Account Binding Thing: Channel Ring event#kind (String)
    – shows the string “ding” (which seems to be fine for me)
  • Ring Account Binding Thing: event#doorbotId (String)
    – remains NULL
  • Ring Account Binding Thing: event#doorbotDescription (String)
    – remains NULL

Best
Marcus

Hi,

I’m having diffculty getting the Ring Account Binding Thing authenticated. I have tried this, but still getting errors. Current error is “2 factor enabled, enter code” despite there being both a code and refresh token entered.
Are there any better instructions for adding the 2FA code and Refresh Token?
Thanks,

You shouldn’t have to be doing all of that to get it working. The binding will generate the refresh token. All you should need to do is create the account thing (via the GUI is my suggestion at this time, the text config is not saving the tokens properly right now). When you create the thing in the GUI and enter your username, password, and 2fa, a refresh token is generated. (From what I can tell) you can remove the data once the token is generated and the account thing comes online.

Thanks for the update.
I just tried using that method (also removed the Thing and re-added from new) but still no success.
I was receiving the 2FA code by SMS so I enabled Google Authenticator and also tried using a code generated from within the Ring app, but still no luck.
I still have the error:

Status: OFFLINE
COMMUNICATION_ERROR
2 factor enabled, enter code

Can you please enable trace logging on the binding and send me the details in a DM (to not clog up here). Please make sure you sanitize off any usernames/passwords before sending (just put something like REMOVED-USERNAME). Thanks!