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
347 stars 92 forks source link

MQTT Topics #61

Closed emildevil closed 4 years ago

emildevil commented 5 years ago

System MG5050 USB307 and IP150

Describe the bug Stay and Sleep Arm also receives regular Arm.

Hi there - is it possible to have a separate state for Arm, behavior right now is when you Sleep/Stay Arm you also receive a Arm message which theoretically is correct. This makes it harder to maintain state across STAY/ARM/SLEEP/DISARM - easy for ARM/DISARM or STAY/SLEEP/DISARM but struggling with the combination.

Kind regards, Emi

jpbarraca commented 5 years ago

Hi,

I'm not sure I fully understood your comment. In paradox/states/partitions/PARTITION_NAME/current you will have information about the current state.

This is intended for homekit but can be used for other means.

emildevil commented 5 years ago

Hi there,

Am using with homekit and works great - let me try and explain;

Below messages from ARM/DISARM and STAY - SLEEP is same as STAY;

Arm Panel

paradox/states/partitions/Outside/arm - "True" paradox/states/partitions/Outside/current - "AWAY_ARM"

Disarm Panel

paradox/states/partitions/Outside/arm - "False" paradox/states/partitions/Outside/current - "DISARMED"

Arm Stay Panel

paradox/states/partitions/Outside/arm - "True" paradox/states/partitions/Outside/current "AWAY_ARM" paradox/states/partitions/Outside/stay_arm - "True"

Disarm from Stay Panel paradox/states/partitions/Outside/stay_arm - "False" paradox/states/partitions/Outside/arm - "False" paradox/states/partitions/Outside/current - "DISARMED"

As you can see the paradox/states/partitions/Outside/arm is always present regardless of the mode, this makes it difficult to follow the state through the messages. If there was a message like paradox/states/partitions/Outside/full_arm the states would be separate, hope im explaining ok. Maybe a simpler view is not to get the paradox/states/partitions/Outside/arm True messages when in SLEEP or STAY, just the false as it would indicate the partition is disarmed.

So given the above if I filter only on;

paradox/states/partitions/Outside/stay_arm - "True/False" paradox/states/partitions/Outside/sleep_arm - "True/False" paradox/states/partitions/Outside/arm - "False"

I can get accurate state of SLEEP/STAY and DISARM for both of these - ARM is not possible as im excluding paradox/states/partitions/Outside/arm - "True"

Kind regards, Emil

emildevil commented 5 years ago

Just to add;

paradox/states/partitions/Outside/current_hass

Sometimes it is correct for STAY and SLEEP i.e. "armed_night", but most of the time for all armed states it is just "armed_away"

E

jpbarraca commented 5 years ago

There is a custom mapping for each platform. The mapping is limited to the states that exist in the target platform (homekit or hass).

See the configuration variables MQTT_PARTITION_HOMEBRIDGE_STATES and MQTT_PARTITION_HOMEASSISTANT_STATES as these states can be customized.

emildevil commented 5 years ago

Thank you so much - there is still a bug somewhere as the status for ARM/STAY/SLEEP stays on armed_away most of the times - this was also the case in Tertuis's MQTTIP150 script - I could never get this to work reliable - not sure if other people are using all 3 armed states.

iondarie commented 5 years ago

i am using all the arm states on a daily basis and have not encountered any issues.

emildevil commented 5 years ago

Ok so just bought a new panel as messing with a active alarm not a good idea :-)

Issue still the same for hass - states not correct for STAY and SLEEP.

Anybody that can assist me to validate this - Iondarie confirmed all states is working for him/her. Only Warnings I get;

019-04-01 16:30:20,779 - WARNING - PAI.paradox.paradox - Missing element ID in system/ 2019-04-01 16:30:21,259 - WARNING - PAI.paradox.paradox - Missing type special for event: 30.3 Partial arming

Kind regards, Emil

jpbarraca commented 5 years ago

You can adjust the state map in the configuration file. Regarding the warnings: please enable DEBUG log and send it to me at https://gitter.im/paradox-alarm-interface

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.