HomeKit-Bridge
HomeKit-Bridge copied to clipboard
Enhancements for Security System Support (DSC) and "Tripped" State Bug Fix
While trying to integrate my DSC PC1864 panel into HomeKit, I noticed that the Security System implementation only keeps track of a single state, duplicating the current state into the target state characteristic that's reported to HomeKit.
self.required["SecuritySystemCurrentState"] = {"*": "attr_onState", "indigo.Device.com.frightideas.indigoplugin.dscAlarm.alarmKeypad": "special_dscKeypadState"}
self.required["SecuritySystemTargetState"] = {"*": "attr_onState", "indigo.Device.com.frightideas.indigoplugin.dscAlarm.alarmKeypad": "special_dscKeypadState"}
This causes HomeKit to be unable to determine when the panel is transitioning between states (e.g. "disarmed" to "armed"). The first commit in this PR extends the implementation to handle the current and target states independently.
I also noticed that the "tripped" state doesn't get set correctly, so the second commit in this PR addresses this issue.
These changes work for my DSC setup, but I acknowledge that my limited understanding of how the overall HKB plugin is implemented in general may mean that I've overlooked something critical for other setups. It's probably best if someone else with a DSC panel tests this on their setup before merging.
@Colorado4Wheeler Is it safe to assume that this repo no longer maintained?
It isn’t currently maintained but it’s not dead just yet. I got tied up in work and haven’t circled back around to the project, mostly because it still works great for my environment. I do plan to do an update on this in the next few months I hope, but just haven’t had time. This was one of a handful of add-ons that I actively developed for the community more than myself, most were designed for my needs and then shared with the community, and since this has been working for me still (a key part of my home automation to this day) I haven’t made any changes.