palazzem / econnect-python

API adapter used to control programmatically an Elmo alarm system
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

feat(client): implement get_status() to retrieve the main unit anomalies/alarms/tampering #116

Closed palazzem closed 1 year ago

palazzem commented 1 year ago

Related Issues

Proposed Changes:

ElmoClient.get_status() retrieves the overall main unit status. Such status includes if the alarm system has anomalies (e.g. bypassed inputs, GSM issues, etc...), if it has been tampered or if the alarm is set. External integrations may use such values to trigger automations.

This function returns a dict with the following values:

result == {
        "inputs_led": 2,
        "anomalies_led": 1,
        "alarm_led": 0,
        "tamper_led": 0,
        "has_anomaly": False,
        "panel_tamper": 0,
        "panel_no_power": 0,
        "panel_low_battery": 0,
        "gsm_anomaly": 0,
        "gsm_low_balance": 0,
        "pstn_anomaly": 0,
        "system_test": 0,
        "module_registration": 0,
        "rf_interference": 0,
        "input_failure": 0,
        "input_alarm": 0,
        "input_bypass": 0,
        "input_low_battery": 0,
        "input_no_supervision": 0,
        "device_tamper": 0,
        "device_failure": 0,
        "device_no_power": 0,
        "device_low_battery": 0,
        "device_no_supervision": 0,
        "device_system_block": 0,
    }

Testing:

n/a

Extra Notes (optional):

n/a

Checklist