I'm interested in something opposite of Messagesend. Is it possible to determine device status, or housemode, etc from the command-line?
One example of why I ask is that I have a doorbell event which launches a bash script and does a variety of different things:
1) If the user has simply pressed the doorbell that's one branch.
2) If the user has pressed the doorbell in the correct morse-code sequence, the system gets disarmed.
A) If the housemode is armed or vacation, and 1 happens, the script sends an SMS message to myself and my wife saying that the doorbell was rung.
B) If the housemode is unarmed, secure-at-home, or entertaining, and 1 happens, the script rings the doorbell
C) If 2 happens, and the housemode was armed or vacation, the script sends an SMS to myself and my wife saying that the system was disarmed via the doorbell.
D) If 2 happens, and the housemode was sleep, the script rings the doorbell.
I've created rather complicated logic within a bash script to log the times for which doorbell push and release events occur, and to interpret these as morse code.
I'd rather not have to create and manage a bunch of respond-to events within web-admin (with various criteria), and then re-use the Morse-code interpretation routine within each event. Preferable would be to have one doorbell push event, one doorbell release event, and then test the various criteria within the code.
Sorry for the drawn out explanation. Is this doable?