-
Notifications
You must be signed in to change notification settings - Fork 2
Event Helpers
When you installed ideAlarm you already downloaded an Event Helpers file with predefined but quite empty functions. The Event Helpers file is named $OPENHAB_CONF/automation/lib/python/idealarm/custom.py
Every installation is unique and has it's own needs. Therefore ideAlarm has a number of alarm events that will trigger your custom script functions (if you choose to define them). That way you can choose whatever shall happen on those events. You define those functions in the event helpers file. The helper functions provides useful ideAlarm objects that makes your custom scripting easy.
There is an example event helpers script available if you'd like to get inspired.
This function will be called when there is a change of arming mode for a zone.
Function arguments:
- zone: The zone object.
- newArmingMode: The current arming mode.
- oldArmingMode: The previous arming mode.
This function will be called when there is a change of zone status. oldZoneStatus is None when initializing.
Function arguments:
- zone: The zone object.
- newZoneStatus: The current zone status.
- oldZoneStatus: The previous zone status.
- errorMessage: Holds an error message (string) when an error has occurred, typically when trying to arm a zone with tripped sensors.
There might be open sensors when trying to arm. If so, this function gets called. (That doesn't necessarily need to be an error condition). However if the zone has been configured not to allow opened sensors during arming, the function onZoneStatusChange will be called with status ERROR.
Function arguments:
- zone: The zone object.
- armingMode: The current arming mode.
If you have set up "nagging", this function will be called to remind you to close them.
Function arguments:
- zone: The zone object.
- nagSensors: A python list with all sensor objects that have been active (OPEN, ON) for too long.