FYI Homebridge AlarmDecoder platform plugin

General Discussion

FYI Homebridge AlarmDecoder platform plugin

Postby michaelpmaley » Sun Jan 14, 2018 4:58 pm

FYI. I just posted a Homebridge AlarmDecoder platform plugin at https://github.com/michaelpmaley/homebridge-alarmdecoderplatform with support for the panel and motion & contact sensors based upon https://github.com/aficustree/homebridge-alarmdecoder. However, I see that https://github.com/aficustree/homebridge-alarmdecoder-platform beat me to the punch.

It is my first Github project and first Node.js project and I had a lot of fun doing it. Constructive feedback is appreciated.

Thanks!
michaelpmaley
newt
newt
 
Posts: 6
Joined: Mon Nov 20, 2017 6:03 pm

Re: FYI Homebridge AlarmDecoder platform plugin

Postby tommyd75 » Sun Jan 14, 2018 8:14 pm

Cool!
I’m using the one from a ficustree and it works great. But we had some issues with smokes and Co Det. He added those characteristics in so I could test and they showed up but the smokes don’t report alarms until I reset the alarm. I think it might be because the fire alarms report differently under notifications in the setup page for the Ad2Pi. Not sure if you were planning on adding smokes and Co detectors? So far his plugin works great, but I might use this one instead if the smokes would work.


Sent from my iPhone using Tapatalk
tommyd75
newt
newt
 
Posts: 15
Joined: Sat Nov 25, 2017 10:54 am

Re: FYI Homebridge AlarmDecoder platform plugin

Postby michaelpmaley » Tue Jan 16, 2018 4:59 pm

I haven't looked at afiscustree's code yet. But doing a few minutes of research I see that the CarbonMonoxideSensor and SmokeSensor services each have one required characteristic that is either 0 or 1, so if the fault like the other sensors/zone, I can easily add them in. If I understand what you are saying, the smoke sensors probably don't fault individually, it is probably that "There is a fire!" message. If that is true, it would be easy to trap that message and manually fault all smoke sensors. My only questions would be how to restore them. I guess on the "The alarm system has been disarmed. " message just restore all smoke sensors. If you have any data, that would be great. I added/modified some of the logging in /opt/alarmdecoder-webapp/ad2web/notifications/types.py to get details. Let me know what you think.
michaelpmaley
newt
newt
 
Posts: 6
Joined: Mon Nov 20, 2017 6:03 pm

Re: FYI Homebridge AlarmDecoder platform plugin

Postby aficustree » Tue Jan 16, 2018 6:40 pm

cool, glad the original version was a good starting point. I was using it to teach myself javascript and node.js at the same time so I don't think it was my finest work. The -platform version was a lot cleaner and avoids all the .bind(this) nonsense by using the await/async features in JS7. Much easier to follow.

I too am struggling with what alarmdecoder is doing with smoke/fire zones, hopefully the alarmdecoder devs can respond on my other thread. I noticed your comment on about the state starting incorrectly. I worried about that too but if you pass a # to the system it will respond with the default status message so in my constructor i force it to post another message and then fetch it to load the state, then with each ping it resyncs in-case there's some sort of transient disruption. The fact that it goes through the object linked list with each ping is inefficient but given computing power, it's a very very very small price to avoid out of sync situations.
aficustree
Junior Nut
Junior Nut
 
Posts: 23
Joined: Sun Jun 11, 2017 7:20 pm

Re: FYI Homebridge AlarmDecoder platform plugin

Postby michaelpmaley » Tue Jan 30, 2018 7:53 pm

@tommyd75 Sorry for the delay. I just posted a bunch of updates. I included CO and smoke sensors per the logic I outlined in the previous post. Also found a couple of bugs. More than happy to make changes based upon your findings.

@aficustree Thanks! I like what I see with your new JS7 code. I too am using this as an excuse to learn something new. Can't decide whether to pursue this further or look into HomeAssistant. My homekit/homebridge setup is very flaky around notifications and sometimes the Home app just gets lost in the weeds.
michaelpmaley
newt
newt
 
Posts: 6
Joined: Mon Nov 20, 2017 6:03 pm


Return to General

Who is online

Users browsing this forum: No registered users and 40 guests

cron