roopesh / ad-qolsys

AppDaemon app for Qolsys IQ Panel 2
MIT License
22 stars 10 forks source link

Arm away time configuration/instant arm away #8

Closed smwoodward closed 3 years ago

smwoodward commented 3 years ago

It wouldn’t be a bad idea to have the arm away setting to be configurable. My setup is that if the panel is armed away with the delay, and a door isn’t opened during the count down, it will automatically switch to armed stay. This presents a problem where we normally arm the house with home kit or home assistant when we are outside of the house in the car.

roopesh commented 3 years ago

Is that setup defined in the panel or in HA?

smwoodward commented 3 years ago

Is that setup defined in the panel or in HA?

That is defined in the panel.

roopesh commented 3 years ago

Then I don't understand this request. What would the enhancement be here?

smwoodward commented 3 years ago

Ok, so my alarm panel is setup where if you hit the arm away button it starts the countdown to allow you to exit, if the door is not opened during the countdown, then the panel automatically changes to arm stay. This is a configuration in the panel.

The arm away command that is currently being sent from AD defaults to the 60 second exit delay. If you arm away the panel from home assistant while you are outside of your house, then a door will never be opened and at the end of the 60 second exit delay, it will change to arm stay. I ran into this issue after I reversed engineered the arming commands and was running it in node red.

The solution I found here https://community.home-assistant.io/t/qolsys-iq-panel-2-and-3rd-party-integration/231405/115?u=smwoodward is that adding "delay: 0" to the json arm away command fixed this issue and the panel would arm away and not automatically change over to arm stay.

It wouldn't be a bad idea to add a configuration variable for the default delay time and have the arm away command add the delay: XX to the command, and default the variable to 60, but allow it to be changed for cases like mine.

roopesh commented 3 years ago

Is that kinda like an "Arm Away (Instant)"?

smwoodward commented 3 years ago

It is instant arm away, but there isn't a command that can be sent over the ssl connection to the panel for arm away instant.

I know I could change the setting in the panel, but I do have a need to keep the automatic swap from away to stay if a door isn't open and I also need to keep it to have an exit delay if armed from the panel but allow for remote arming away without changing over to arm stay. This is where I changed my node red flow to add delay:0 and it fixed that problem. Without delay:0 it defaults to a 60 second exit delay.

roopesh commented 3 years ago

Try the 1.7.0 beta release - let me know if that solves your problem. You can test the new instant arm away with a button (here's mine) - be sure to put your token in:

type: button
tap_action:
  action: call-service
  service: mqtt.publish
  service_data:
    payload: >-
      {"event": "ARM", "arm_type": "away", "token": "<token>", "partition_id": 0, "instant": true}
    topic: qolsys/requests
  target: {}
entity: alarm_control_panel.doors_and_sliders
name: Arm Away (Instant)
show_icon: false
smwoodward commented 3 years ago

Where did you find the "instant" topic for the json command?

roopesh commented 3 years ago

Where did you find the "instant" topic for the json command?

I made it up. That will send "delay": 0 to the panel. It's more intuitive to call it instant than to adjust a delay.

roopesh commented 3 years ago

@smwoodward if it works for you, i'll promote the release.

smwoodward commented 3 years ago

Ahh ok. I didn’t dive into your code and I thought that message is what was being sent to the panel and not something that would be interpreted to send a command with delay:0

roopesh commented 3 years ago

@smwoodward See the beta release 1.7.1 - I added an option for all arm away to be instant.

roopesh commented 3 years ago

@smwoodward How did you discover the {"delay":0} option? If I put any other number in there, it seems to ignore it.

smwoodward commented 3 years ago

@roopesh If I'm not mistaken the original C4 system sends a much longer command than you are sending and I think it originally had delay:60 in it. I removed that during testing of the issue I was seeing on the change over and didn't see any other instant arming commands in the c4 driver so I eventually tried delay:0 and it worked. I never tried any other value other than the original 60 and 0.

smwoodward commented 3 years ago

@roopesh That works

smwoodward commented 3 years ago

I'm not familiar with how the availability works in how you set everything up. What are some things that can be used for testing to make sure it works properly?

roopesh commented 3 years ago

Closing this issue. @smwoodward feel free to ask here https://github.com/roopesh/ad-qolsys/issues/6 or see the readme.