diff --git a/alarmdecoder/decoder.py b/alarmdecoder/decoder.py index 0257638..568de9d 100644 --- a/alarmdecoder/decoder.py +++ b/alarmdecoder/decoder.py @@ -300,7 +300,7 @@ class AlarmDecoder(object): msg = None header = data[0:4] - if header[0] != '!' or header == '!KPE': + if header[0] != '!' or header == '!KPM': msg = self._handle_keypad_message(data) elif header == '!EXP' or header == '!REL': diff --git a/alarmdecoder/messages.py b/alarmdecoder/messages.py index 6acb107..a5d67cf 100644 --- a/alarmdecoder/messages.py +++ b/alarmdecoder/messages.py @@ -97,7 +97,7 @@ class Message(BaseMessage): """ BaseMessage.__init__(self) - self._regex = re.compile('^(!KPE:){0,1}(\[[a-fA-F0-9\-]+\]),([a-fA-F0-9]+),(\[[a-fA-F0-9]+\]),(".+")$') + self._regex = re.compile('^(!KPM:){0,1}(\[[a-fA-F0-9\-]+\]),([a-fA-F0-9]+),(\[[a-fA-F0-9]+\]),(".+")$') if data is not None: self._parse_message(data)