From e485872b78f13a1dcc68e658656003a65847366c Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Mon, 12 May 2014 11:29:40 -0700 Subject: [PATCH] Fixed issues where SYSTEM messages were causing zones to bounce. Fixed an issue where ZONES FAULTED messages were causing premature restoration on the 128. --- alarmdecoder/zonetracking.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/alarmdecoder/zonetracking.py b/alarmdecoder/zonetracking.py index 2bb4bf5..36334b0 100644 --- a/alarmdecoder/zonetracking.py +++ b/alarmdecoder/zonetracking.py @@ -158,14 +158,17 @@ class Zonetracker(object): # multiple partitions. In it's current state a ready on # partition #1 will end up clearing all zones, even if they # exist elsewhere and it shouldn't. - if message.ready: + # + # NOTE: SYSTEM messages provide inconsistent ready statuses. This + # may need to be extended later for other panels. + if message.ready and not message.text.startswith("SYSTEM"): for zone in self._zones_faulted: self._update_zone(zone, Zone.CLEAR) self._last_zone_fault = 0 # Process fault - elif "FAULT" in message.text or message.check_zone: + elif message.check_zone or message.text.startswith("FAULT"): # Apparently this representation can be both base 10 # or base 16, depending on where the message came # from.