Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements for Security System Support (DSC) and "Tripped" State Bug Fix #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joshsnelling
Copy link

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.

… to HomeKit

The DSC Indigo variables can report both "tripped" and "stay/away" as true at the same time, but HomeKit considers the triggered state to override the armed state. Check the DSC "tripped" state first, then proceed to checking the other states if "tripped" is false.
@joshsnelling
Copy link
Author

@Colorado4Wheeler Is it safe to assume that this repo no longer maintained?

@Colorado4Wheeler
Copy link
Collaborator

Colorado4Wheeler commented Aug 29, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants