nickandrew / LS30

Control software for LS-30 alarm system
11 stars 3 forks source link

Is there anyway to get notified about the actual state of the alarm #11

Closed rossdargan closed 7 years ago

rossdargan commented 7 years ago

I know that I can call arm.pl and see whats going on but ideally what I want to do is have some code execute any time the alarm state changes (away/disarm etc)

The events just doesn't have enough information.

I'm guessing if it could be done it would have been :)

nickandrew commented 7 years ago

From what I can gather (looking through my logs), it's possible to capture a Disarm command from a remote control via both device event and ContactID message. An Arm or Home command will be reported via a device event.

So if you only arm/disarm the alarm system through a remote control then yes, you can process an appropriate event with a watch script.

Otherwise, and in the more general case, you'll have to poll the device for 'Operation Mode' - see bin/get-mode.pl for example.

rossdargan commented 7 years ago

Thats what I thought :) Thanks!