XaF / qolsysgw

Qolsys IQ Panel 2+ gateway to an Home Assistant Alarm Control Panel
MIT License
131 stars 13 forks source link

Add support for tampered sensors as a `tampered` attribute on the sensor itself #73

Closed XaF closed 1 year ago

XaF commented 1 year ago

Even if the panel interactions are not clear for tampered sensors, there seem to be a pattern, while the qolsysgw is connected to the panel, that we can identify as tampered. However, there does not seem to be a way to identify that a sensor is currently tampered at start time (the summary we get from the panel only tells us the sensor is open).

In any case, a tampered sensor will be a sensor that is open, and has the tampered flag set to true if we are able to determine that the sensor is currently tampered (thus, not upon restart, but only during runtime and kept-alive connection).

Summary of the identified interactions

Identified interactions

While the sensor is currently closed

Tampering

Time Event type Event subtype Pertinent data
T1 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Open", ... }, ... }
T2 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Open", ... }, ... }

Untampering (sensor still closed)

Time Event type Event subtype Pertinent data
T1 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Closed", ... }, ... }
T2 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Closed", ... }, ... }

Untampering (sensor now open)

Time Event type Event subtype Pertinent data
T1 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Open", ... }, ... }
T1' (same second as T1) ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Closed", ... }, ... }
T2 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Open", ... }, ... }

While the sensor is currently open

Tampering

Time Event type Event subtype Pertinent data
T1 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Open", ... }, ... }

Untampering (sensor now closed)

Time Event type Event subtype Pertinent data
T1 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Open", ... }, ... }
T1' (same second as T1) ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Closed", ... }, ... }
T2 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Closed", ... }, ... }

Untampering (sensor still open)

Time Event type Event subtype Pertinent data
T1 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Open", ... }, ... }
T1' (same second as T1) ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Closed", ... }, ... }
T2 ZONE_EVENT ZONE_ACTIVE { "zone": { "status": "Open", ... }, ... }