Преглед на файлове

Ok. I sure hope that is the last quirk with Ademco system messages and alarms :( It was still cycling with fire on/off during a fire event restoring fire on system messages. Looked at my 20p and 50pul and both would show 3 on the system specific field so I am going to use it!

main
f34rdotcom преди 4 години
родител
ревизия
6218baa611
променени са 2 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. +8
    -3
      alarmdecoder/decoder.py
  2. +1
    -1
      setup.py

+ 8
- 3
alarmdecoder/decoder.py Целия файл

@@ -782,7 +782,7 @@ class AlarmDecoder(object):
if arm_status or stay_status:
exit = False
messageUp = message.text.upper()
if self.mode == ADEMCO:
# skip these messages
if not messageUp.startswith("SYSTEM") and not messageUp.startswith("CHECK"):
@@ -791,7 +791,7 @@ class AlarmDecoder(object):
else:
# preserve last state
exit = self._exit
if self.mode == DSC:
if any(s in messageUp for s in ("QUICK EXIT", "EXIT DELAY")):
exit = True
@@ -922,7 +922,9 @@ class AlarmDecoder(object):
if isinstance(message, Message):
if self.mode == ADEMCO:
# ignore sticky bit on these messages :(
if not message.text.startswith("SYSTEM") and not message.text.startswith("CHECK"):
if (not message.text.startswith("SYSTEM") and
not message.text.startswith("CHECK") and
message.system_fault != 3):

# if we had an alarm and the sticky bit was cleared then clear the alarm
if self._fire_status and not message.alarm_event_occurred:
@@ -948,6 +950,9 @@ class AlarmDecoder(object):
# if we timeout with an alarm set restore it
if time.time() > last_update + self._fire_timeout:
fire_status = False
else:
# Keep the current fire state do not update for SYSTEM messages.
fire_status = self._fire_status

else:
fire_status = message.fire_alarm


+ 1
- 1
setup.py Целия файл

@@ -14,7 +14,7 @@ if sys.version_info < (3,):
extra_requirements.append('future==0.14.3')

setup(name='alarmdecoder',
version='1.13.7',
version='1.13.8',
description='Python interface for the AlarmDecoder (AD2) family '
'of alarm devices which includes the AD2USB, AD2SERIAL and AD2PI.',
long_description=readme(),


Зареждане…
Отказ
Запис