node-alarm-dot-com / homebridge-node-alarm-dot-com

Alarm.com plugin for Homebridge using Node.js
MIT License
58 stars 23 forks source link

Virtual Panic Button as a homekit button accessory #124

Open sapireli opened 10 months ago

sapireli commented 10 months ago

Alarm.com provides a virtual panic buttons in the mobile app to trigger a panic i.e. burglary silent alarm etc. It would be great to expose such buttons as homebridge accessories... Ideally once any specific panic button or switch is triggered it stays on until the alarm is cleared etc.

image

More info on the virtual panic buttons here: https://answers.alarm.com/Customer/Website_and_App/System_Management/System_Usage/Trigger_a_panic_using_the_app

chase9 commented 10 months ago

I'm not sure how badly I want to implement this due to a couple of reasons:

  1. HomeKit doesn't have the concept of panic buttons, so I think this would have to be implemented as a regular switch. This means that if Siri hears you wrong, it might call the cops on you!
  2. I'm of the mindset that this plugin shouldn't be used for critical/life-saving tasks because I don't consider the code quality to be at that level. This feature would put us more into that realm.

I'm open to other arguments or even a PR if you feel strongly about it. I think if we implemented this feature I would want it behind an opt-in config setting.

ngori commented 10 months ago

@chase9 I agree with you 100% on point 2. I view this plug-in solely as a convenience feature set and anything critical needs to be ADC native either in their native app or on the panel.

sapireli commented 10 months ago

I agree with all your points. I did have one thought about the implementation. We could implement it as a "door lock" accessory which requires face-id or device unlocking to open so you couldn't really trigger with Siri.

However, triggering PANIC with Siri could also be a feature not a bug. i.e. i fell down call an ambulance...

sapireli commented 10 months ago

Also, I learned today that home homebridge-ring actually implements panic buttons in homekit as follows (from their readme):

Panic Buttons

chase9 commented 9 months ago

I'm still pretty uneasy about it, but locking the functionality behind an "advanced" setting does make me feel a bit better.

sapireli commented 9 months ago

how would i go about this? is there an official api or is the whole thing reverse engineered using a mitm proxy?

ngori commented 9 months ago

@sapireli There is no official API support. As far as I know, all functionality to date has been reversed engineered. I just captured the API calls for garage doors when I added support there. I don't have a panic button on my setup so I'm not sure how those work with respect to the apps and web interfaces