ParadoxAlarmInterface / pai

Paradox Magellan, Spectra and EVO, with MQTT, Signal, Pushbullet, Pushover and others
https://gitter.im/paradox-alarm-interface
Eclipse Public License 2.0
340 stars 91 forks source link

Error when using arming in stay mode #15

Closed jakezp closed 5 years ago

jakezp commented 5 years ago

When I arm the system in stay mode, I get the following error in the console:

Currently I am still testing and familiarizing myself with everything. So it might very possibly be something I am doing wrong. It seem to still work, as the alarm is armed in stay mode.

I would publish either arm_stay or STAY_ARM (depending if I have MQTT_HOMEBRIDGE_ENABLE as True or False).

topic=paradox/control/partitions/Area_1, payload=arm_stay topic=paradox/control/partitions/Area_1, payload=STAY_ARM

topic=paradox/control/partitions/all, payload=arm_stay topic=paradox/control/partitions/all, payload=STAY_ARM

I experience the same when using the existing remote for the alarm.

Details: Panel MG5050 version 5.33 build 2 IP150 Module (downgraded to <4 firmware)

Current user.conf:

LOGGING_LEVEL_CONSOLE = logging.DEBUG CONNECTION_TYPE = 'IP' IP_CONNECTION_HOST = '1.1.1.1' IP_CONNECTION_PASSWORD = b'my_password' MQTT_ENABLE = True MQTT_HOST = '1.1.1.2' MQTT_USERNAME = None MQTT_PASSWORD = None PASSWORD = None MQTT_HOMEBRIDGEENABLE = True (or False)_

Test, disam the system, wait a few seconds and arm it again. Below is the console output with DEBUG switched on.

Console output: REDACTED

jakezp commented 5 years ago

The console output formatting looks messed up. Here is the output as an attachment - REDACTED

jpbarraca commented 5 years ago

Can you please enable full debug (DEBUG, packet dumps and message dumps) and send the log?

jakezp commented 5 years ago

I've emailed the log file to you. Thank you.

jpbarraca commented 5 years ago

Thanks for the email. The relevant log is the following:

DEBUG    - PAI.paradox.paradox - Handle Event: {'major': (30, 'Special arming'), 'minor': (3, 'Partial arming'), 'type': 'Special'}
DEBUG    - PAI.paradox.paradox - PC -> A b'500080030000000000000000000000000000000000000000000000000000000000010000d4'
DEBUG    - PAI.paradox.paradox - PC <- A b'e214120b15110e061b00000000000000000000000000000000000000000000000000000068'
ERROR    - PAI.paradox.hardware.spectra_magellan - Parsing message
Traceback (most recent call last):
  File "pai/paradox/hardware/spectra_magellan/__init__.py", line 146, in parse_message
    return LiveEvent.parse(message)
 ...
  File "pai/paradox/hardware/spectra_magellan/adapters.py", line 675, in _decode
    'minor': (obj[1], subEventGroupMap[obj[0]][obj[1]]),
KeyError: 27

The bug is confirmed and happens because we do not know what is the event 27 (0x1b) of a Non Reportable Event (0x06)

jakezp commented 5 years ago

Tested the change...

2018-11-21 19:08:16,938 - DEBUG - PAI.paradox.paradox - Handle Event: {'major': (6, 'Non-reportable event'), 'minor': (27, 'Armed with trouble(s)'), 'type': 'NonReportable'}

And looks like it's working.

Thanks!

jpbarraca commented 5 years ago

Great! Thanks.