maisken / Paradox_IP150

Hassio add-on, Python and MQTT bindings for controlling a Paradox alarm via the IP150 web interface
GNU General Public License v3.0
39 stars 10 forks source link

Updates #5

Closed cybertza closed 5 years ago

cybertza commented 6 years ago

Created Read me.

4

3

Added ability to use sleep or stay from inside HA/MQTT

Now accepts: 'DISARM': 'Disarm', 'ARM_AWAY': 'Arm', 'ARM_HOME': 'Arm_sleep' 'ARM_SLEEP': 'Arm_sleep' 'ARM_STAY': 'Arm_stay'

for configuration.yalm option A: alarm_control_panel:

platform: mqtt name: House Paradox state_topic: "paradox/alarm/state/1" command_topic: "paradox/alarm/cmnd/1" payload_disarm: "DISARM" payload_arm_home: "ARM_SLEEP" payload_arm_away: "ARM_AWAY"

Option B alarm_control_panel:

platform: mqtt name: House Paradox state_topic: "paradox/alarm/state/1" command_topic: "paradox/alarm/cmnd/1" payload_disarm: "DISARM" payload_arm_home: "ARM_STAY" payload_arm_away: "ARM_AWAY" Currently the HASS MQTT ALARM ONLY SUPPORTS 3 PAYLOADS. (Disarm,Home,Away) this allows you to customize the Home, to be either stay or sleep, depending on what suits better. CyberTza

pilievwm commented 6 years ago

Hi, thanks for your commit! Can you please think for creating "triggered" event which will handle the "In alarm" state. Currently, it has no such event which makes the system unstable.

alfredopironti commented 5 years ago

Hi all,

@pilievwm comment should be addressed in the latest revision of the add-on: there was a bug when the alarm was triggered that made the software crash; it should now be fixed.

@cybertza patch unfortunately cannot be accepted as of now. The HA MQTT alarm control panel only supports arm_home and arm_away (not sure why arm_sleep is not supported, as the HA component actually supports it), so there's no reason to add support just yet, given it's not clear how to turn those MQTT messages into actions for the Paradox interface (i.e. what message we send to the web interface when we receive such request?)

Happy to re-open and discuss further as you see fit!

cybertza commented 5 years ago

it was just for ease of use, bearing in mind that sometimes you may want to do something from MQTT side, then its good to support it.

Consider pulling the Read.me at least so that its easier for new users to install without the forum.

alfredopironti commented 5 years ago

That's a fair point. At a closer look, the current map actually doesn't even look so right. MQTT ARM_HOME should rather go to Arm_stay.

Since this is a breaking change, I've implemented a patch in the mqtt-commands branch. I plan to merge this when releasing the next version of the add-on, with quite a prominent note about what will need to be updated by the users. Thanks for bringing this up!