rorr73 / LifeSOSpy_MQTT

MQTT Client to communicate with LifeSOS alarm systems.
MIT License
5 stars 2 forks source link

HA alarm panel freezes if triggered by tampering #4

Closed bereska closed 5 years ago

bereska commented 5 years ago

Hi Robert, there is this one more thing I noticed long time ago which is rather an inconvenience than an issue ... when the alarm gets triggered in disarmed mode by tampering with sensors (battery change, etc.), the HA alarm panel changes its state to TRIGGERED and does not allow to change it even though the DISARM button in present. Pressing the DISARM button has no effect. It stays this way until I manually reset it on the main unit and then run lifesosd.service restart do you think it's possible to modify your code to allow for reset after triggered by tampering in HA alarm panel?

P.S. this morning I switched to from Samsung 32G SD card to a 2.5" SATA 128G SSD and it's been running just great on my rpi 3b+! Before the switch the boot time was about 6 min, now its only 2 min. Hope it will be more reliable and durable than SD, too.

rorr73 commented 5 years ago

Thanks Dmitry... I've recreated the issue and are currently working on a fix. The issue also affects the Panic alarm while disarmed.

In both cases, it causes the Home Assistant UI to indicate an alarm has been triggered with Disarm the only available button, but clicking it has no effect since the LifeSOS unit is already in Disarm mode.

Sequence of events:

  1. LifeSOSpy_MQTT detects Alarm event while in Disarm mode (eg. tamper or panic), changes the internally managed ha_state topic to triggered for HA.
  2. User presses the Disarm button (the only visible button in HA) in order to clear the triggered state.
  3. LifeSOSpy_MQTT passes a Disarm command to the LifeSOS unit, but gets no acknowledgement as it is already in Disarm mode. As a result, ha_state remains as triggered instead of changing back to disarmed. The user is only able to resolve by toggling Away/Disarm on the base unit / remote control or restarting LifeSOSpy_MQTT.
rorr73 commented 5 years ago

A new version (0.11.2) has been published with the fix.

bereska commented 5 years ago

Hi Richard, thank you very much it works great Dmitry