I’ve added my z-wave locks to Ring. There are benefits to this. You can manage access through the Ring app for all locks and users and unlocking the lock with the code, disarms the alarm.
Ring now has the ability to recognize a number of locks and control them. Info at https://support.ring.com/hc/en-us/articles/360017691131.
Sure. I knew that. I guess my question is what is the benefit of adding your lock to ring versus adding it to HA? With Ring integration you could do all of that functionality from within HA, yes?
Conceivably, yes. If your lock (or any other z-wave device - like the new dome siren or First Alert smoke alarm) is associated with your Ring Alarm system, then my script will get back a unique identifier for that device. That said, I’d have to build out a use case for each one in the script to create the autodiscovery and status update code. Right now, the script only support setting the base alarm mode and then contact and motion sensors (since those are the only things I have registered on my system). If someone who has these other devices is interested in sharing the API responses from Ring that the script produces, I can probably add those to the script. I’ll have to modify the logging output to output all the alarm devices and push a new version to the repo. This would allow me to add in monitoring for the status of these other devices. Actually controlling the locks is a completely different animal and would require additional development on the underlying API code (which I didn’t write). I do have a to-do to look at the underlying code and see if it’s possible to turn off the alarm using the code rather than just a simple button press but only so many spare minutes in a week, so it’s pretty far down on my list. :-/
Not to take anything away from the script here, but I wrote my own version that tries to fix all of the auto discovery issues, breaks the code into more functions, and includes a few other fixes/enhancements. I mostly wrote it for my personal use but thought perhaps some others might prefer a fully automatic configuration option so decided to share it as well.
Yours looks pretty solid, and a testimony to the power of promises over callback hell. Shows why you never send a wannabe Python dev to write a node app,
I also like how the dgreif API wrapper flattens out the responses from Ring. It was a pain to track down all the individual fields needed for each device type. Anyway, I’d generally tell folks to use yours over mine given how clean it is and since the dgreif API already supports the volume controls which mine definitely doesn’t.
Are you going to extend his device type list with the new devices that Ring’s putting out?
Thanks acolytec3, I appreciate the comments. This was my first real attempt to write any significant javascript (before I had mainly hacked at some existing code and written a few small functions) and it was a real learning curve for me, although actually, that was the point, I really wanted to use this as a learning opportunity. While the final result seemed to work well, I’m still not really sure I fully grasp all the concepts, but I agree with one thing, I really like the dgreif/ring-api a lot, so easy to use and he added the websocket monitor just because I asked about it.
I expect to expand support for devices. I’m actually planning to purchase a few additional devices myself over the next couple of months, so adding those will be practically required and should be pretty easy. I’m currently thinking I’ll split the device support into its own library, but I haven’t fully decided that yet. I’ve been studying how other code bases deal with this. The biggest issue (as with us all most likely), is time, as I have very little of it over the next couple of months.
Great work to all you guys!
Not being a programmer, I don’t know good code from bad. But it sounds as if tsightler has tightened things up!
Is there any way to get his implementation to load directly into Hassio using the same RPi3 that runs the Home Assistant, such as what rajansub and acolytec3 have posted within the past 48 hours?
For right or wrong, for me it seems convenient to depend on a single device to run all the functions of the home automation for me.
can you share this code?
Sorry for radio silence on this. Been busy on some other projects. I’ll try to circle back on this and experiment with some potential fixes to the issue of the autodiscovered sensors not carrying over across a restart in the Hassio plugin over the weekend.
Has anyone else had issues as of last night with the script erroring out?
I am getting an Error: API Returned Status Code 403 when I try to run the script.
It had been running flawlessly up until last night.
I was just coming to check. I just updated HASSIO to .89.1 and upon reboot I can’t get the add-on to connect. I’m not at home right now so I can’t fire up the VM and see if it still connects.
Connected to mqtt and subscribed to homeassistant channel
Error at stations
{ Error: API returned Status Code 403
at IncomingMessage.res.on (/index.js:262:25)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19) code: 403 }
Socket is disconnected
Error at stations
{ Error: API returned Status Code 403
at IncomingMessage.res.on (/index.js:262:25)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19) code: 403 }
I’m guessing Ring updated their API so it’s not working. I’ll look at the logs and see if I can figure out what’s going on.
I got the same. I was able to use “https://github.com/tsightler/ring-alarm-mqtt” successfully though. Just a heads up
At this point, I’d say anybody who had mine switch over to @tsightler’s version. After looking a little further, didn’t this is probably beyond me. The underlying API integration isn’t my work and I don’t have the expertise to resolve the issue.
Okie dokie. I’ll switch over and wait for him to do a HASSIO plugin; that’s why I hadn’t switched yet. Thanks for getting the ball rolling though!
@acolytec3 thank you for all you did with this. Really excellent to know the community has people like you. Much appreciated that you got us this far.
I created an hassio addon for @tsighler’s code - Put the details in that thread.
Just going to round this out, I’m not going to do any further development on my script as I don’t have a clear path forward on getting the backend to start working again. As such, folks should discontinue use of mine and migrate to @tsightler’s version.