Ring Alarm - MQTT Discovery Alarm integration

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, :wink:

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.

1 Like

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.

1 Like

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.

Hi rajansub,
I just stumbled upon this thread and I now have a ring alarm. Does your comment means that I should this this addon on the hass.io repo? I do not see it.

Thanks

You wont find it on the hassio addon store as I have not submitted it there. To use it you should goto your add on store in your hassio instance and in the repositories section insert the URL and click the add button. At that stage you should see this addon appear in the list in a separate category by itself. You should then be able to install it like any other addon

Thank you all for working hard making it.
I’m a bit lost - I run home assistant from bass.io on rpi.

I added the add on through the add on store. In the log it seems to be fine. I even see an update in the log on every state change of a sensor.

From here, how do I use the updates? Hass.io doesn’t see the sensors.

I’m trying to do it also through node-red but not sure how.

Thank you!!

1 Like

Hi all, just as a final note on this thread, I just dropped @tsightler’s script onto my hassbian instance and it fired right up. I’m archiving my repos and moving to other stuff so do make sure you switch over to his work going forward.

@rajansub I’ve been having problems using Node Red to call the disarm service. The second it gets called, the alarm becomes disconnected. Have you had this problem at all?

I’ve been using your hassio plugin on my RPi, but I’m in the process of migrating to a vmware install of hassio. When I add the URL into the repository, it doesn’t give me an option to install. Will this only run on RPi arch?