pyg90alarm.notifications.protocol
Defines notification protocol for NotificationBase class.
Classes
Protocol for notification handling. |
- class pyg90alarm.notifications.protocol.G90NotificationProtocol
Bases:
objectProtocol for notification handling.
- async on_armdisarm(state)
Invoked when device is armed or disarmed.
- Parameters:
state (
G90ArmDisarmTypes) – State of the device- Return type:
- async on_sensor_activity(idx, name)
Invoked on sensor activity.
- async on_door_open_when_arming(event_id, zone_name)
Invoked when door open is detected when panel is armed.
- async on_door_open_close(event_id, zone_name, is_open)
Invoked when door sensor reports it opened or closed.
- async on_low_battery(event_id, zone_name)
Invoked when a sensor reports it is low on battery.
- async on_alarm(event_id, zone_name, is_tampered)
Invoked when device triggers the alarm.
- async on_remote_button_press(event_id, zone_name, button)
Invoked when a remote button is pressed.
Please note there will only be call to the method w/o invoking
G90DeviceNotifications.on_sensor_activity().- Parameters:
event_id (
int) – Index of the sensor associated with the remote.zone_name (
str) – Name of the sensor that reports remote button press.button (
G90RemoteButtonStates) – The button pressed on the remote
- Return type:
- async on_sos(event_id, zone_name, is_host_sos)
Invoked when SOS is triggered.
Please note that the panel might not set its status to alarm internally, so that
G90DeviceNotifications()might need an explicit call in the derived class to simulate that.
- async on_sensor_change(sensor_idx, sensor_name, added)
Invoked when a sensor is added or changed on the panel.
- async on_rfid_keypad(event_id, zone_name, state)
Invoked when an RFID keypad event occurs.
- Parameters:
event_id (
int) – Index of the RFID keypad.zone_name (
str) – Name of the RFID keypad.state (
G90RFIDKeypadStates) – State of the RFID keypad.
- Return type: