[WITHDRAWN] Unofficial Ring Integration

I will try that, thanks!

@codahq
Just in case this affects your integration (hopefully not):

After the last breakage a few days ago, HA got this working again in short order. However it broke again last night and they found out why by speaking with Ring directly. They do want the token refreshes using Oauth2 rather than user/pass....See post below.

1 Like

Just in case I'm going to disable the app and restart my HE hub. I'll look at it tonight or tomorrow hopefully.

2 Likes

I'm not a web developer and my job and tinkering pretty much keep me busy away from completely being comfortable with OAuth2. That being said, I understand a little and I don't think we can implement what we need to without a client ID and client secret from Ring. Meaning... we can't do this the correct way without Ring working with either me or Hubitat. So, Ring will probably always be able to turn this off if they want to.

However, we also weren't doing it as wrong as the Home Assistant group. It appears that they were using username and password every time the session went dry to get another one. I was already using the refresh token instead.

*Edit: Also, I don't appear to be affected yet. And another also... I may have found a bug in how I'm using the refresh token. I'm going to add some additional temporary debug output to see what is really happening when I try to use the refresh token.

4 Likes

Thanks for keeping us updated!

1 Like

I am not affected yet either... I wish ring would step up like inovelli did and provide the code

Really appreciate the effort!

1 Like

Is it possible to add capability to set in-home mechanical doorbell on and off for the ring pro doorbell? That would be great for sleep / awake mode automation

I guess it probably would be but unless a few people give me a very compelling reason I don't think I would add it for these reasons.

  1. I would think that if somebody is ringing my bell it very well be to save my life e.g. a fire is burning nearby and my neighbor is trying to get us out of the house. I can't imagine ever wanting to turn off the mechanical chime. I can use video to screen anybody I don't want to talk to.
  2. I don't really want to get into the game of adding all a device's possible configuration options. It's a lot of work. It's where a lot of the churn is e.g. new features change the way things work. You may have noticed that for the most part I have completely avoided it. When Mike Maxwell and I talked about this he had a fairly strong desire for me to try and use the composite OOB drivers to make this easier for people to install. There is a chance I may still do that. What it means though, I think, is that I can't really use custom attributes or preferences. I'm not too sure if I'm willing to give up all of the information I am gathering right now so this may not be a factor.
  3. I think the bigger issue is that telling the Pro whether or not you have a mechanical doorbell or not implicitly tells it that you are using a Pro Power Kit or not. At least I think this is how it worked back when my Pro was still powered by the mechanical chime's AC transformer. Now I power it with a separate transformer. Anyway, there very may well be some changes in how the Ring manages power between those two settings. Have you tested to see what happens if you give the varying information there and switch back and forth?

Is this pearl really worth the dive?

3 Likes

Error: No signature of method: javax.net.ssl.SSLHandshakeException.getStatusCode() is applicable for argument types: () values: [] any clue wont let me sigh in

I'm assuming that is being thrown by the app? Can you turn on the rest of the logging (don't paste it here) and look through it to see if there is anything else?

It looks to me like I'm getting an exception that doesn't have getStatusCode on it in the doSynchronousAction method. Are you forcing SSL through a proxy or a VPN that would downgrade it or change it?

dumb mistake. your work is great

@codahq

Hey there, I added my ring devices to Device Watchdog - Inactive devices and it seems like none are reporting. They are working fine through ring but nothing reporting into HE, for example

Rick

I have run into a problem setting my alarm status. It wouldn't take the set mode command anymore. I tried from Rule Machine or manually in the devices, got no response in either. I also noticed that the mode weren't being reported to the current mode (ex.: It said that it was Disarmed when it was actually in Home status.) I was also unable to control my locks - same issue.

Then after 10 minutes or so, everything started working again.

The app did tell me all along that I was logged in:

Ring Account Information ( Successfully Logged In! )

Here is what I get in my logs:

dev:1862020-01-07 23:39:14.696 infoRing Alarm Hub already set to Home. No change necessary

dev:1862020-01-07 23:39:14.677 debugsetMode(Home)

dev:1862020-01-07 23:39:05.264 debugsetMode(Disarmed)

Is there anything I can do to debug this?

Thanks!
Sébastien

I'm seeing something similar.

I can setMode(Home) and it works fine, I can setMode(Away) and it works fine, but setMode(Disarmed) does not work. I can run it manually through the device but not through any external rule engines.

Edit:
I modified the code to show the current value of the mode before it runs setMode() and it shows "off" when triggering setMode(Disarmed) externally (through Rule Machine or through WebCORE)

logDebug "Current Mode: ${device.currentValue("mode")}"

When triggering setMode(Disarmed) from the device itself, it shows "Current Mode: home". Any idea why the mode is not updating for external apps?

I have no idea what Device Watchdog is. Is this a Hubitat OOB app?

@codahq I think they are referring to this:

1 Like

Any idea what getLastActivity looks at? If it's looking at some internal Z-Wave or Zigbee timestamp my integration will never support Device Watchdog unless I can set that timestamp manually.

No idea... never used it ..

1 Like

According to this thread getLastActivity()? Mike says that it is based on events. If no events happen it goes inactive after 24 hours. Are you guys seeing those devices inactive always or do they show up once a device has an event? If they aren't showing up check your "Ring API Virtual Device" to see if it is connected or not. If it's not manually connect it by hitting initialize.

I have noticed that Ring is disconnecting the websocket now instead of leaving it connected indefinitely. This is probably another security precaution they have implemented. There is supposed to be a scheduled call to check every 60 minutes if the websocket is connected and reconnect it if it isn't. I have noticed this has failed a few times. I will try to make it more robust.