From ef6a3854a944df8ace3ec49a0d141b207b6685d6 Mon Sep 17 00:00:00 2001 From: Kevin Roberts Date: Fri, 29 Sep 2017 10:58:55 -0700 Subject: [PATCH] Add special keys S1-S8, fix KEY_PANIC --- alarmdecoder/decoder.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/alarmdecoder/decoder.py b/alarmdecoder/decoder.py index 0d25cb4..c7a18ca 100644 --- a/alarmdecoder/decoder.py +++ b/alarmdecoder/decoder.py @@ -68,8 +68,26 @@ class AlarmDecoder(object): """Represents panel function key #3""" KEY_F4 = chr(4) + chr(4) + chr(4) """Represents panel function key #4""" - KEY_PANIC = chr(5) + chr(5) + chr(5) + KEY_PANIC = chr(2) + chr(2) + chr(2) """Represents a panic keypress""" + KEY_S1 = chr(1) + chr(1) + chr(1) + """Represents panel special key #1""" + KEY_S2 = chr(2) + chr(2) + chr(2) + """Represents panel special key #2""" + KEY_S3 = chr(3) + chr(3) + chr(3) + """Represents panel special key #3""" + KEY_S4 = chr(4) + chr(4) + chr(4) + """Represents panel special key #4""" + KEY_S5 = chr(5) + chr(5) + chr(5) + """Represents panel special key #5""" + KEY_S6 = chr(6) + chr(6) + chr(6) + """Represents panel special key #6""" + KEY_S7 = chr(7) + chr(7) + chr(7) + """Represents panel special key #7""" + KEY_S8 = chr(8) + chr(8) + chr(8) + """Represents panel special key #8""" + + BATTERY_TIMEOUT = 30 """Default timeout (in seconds) before the battery status reverts."""