Dilbert66 / esphome-vistaECP

This is an implementation of an ESPHOME custom component and ESP Library to interface directly to a Safewatch/Honeywell/Ademco Vista 15/20 alarm system using the ECP interface and very inexpensive ESP8266/ESP32 modules .
GNU Lesser General Public License v2.1
124 stars 21 forks source link

Keypad 6139 Macro keys #73

Closed giukio closed 3 months ago

giukio commented 2 years ago

Hello, I am using the multi-partition dev branch and I'm quite happy with it! My system has two 6139 keypads on two partitions, and we are using its 4 macro keys to arm/disarm both partitions at once.

Is it possible to call the macro commands from home assistant?

thanks

Dilbert66 commented 2 years ago

You can't call a macro but you can send any key sequence to one are all partitions using the alarm_keypress_partition service. The cmd to arm all is \<code> + 0 + the arm code#. where \<code> is your alarm/disarm code. Note the addition of the 0 in front of the cmd# which indicates its a multi partition cmd. For example if your arm/disarm code is 1234 and want to arm all zones away, you send 123402 to partition 1. To disarm all it's \<code> + 0 + 1. You can send the code partition 1 and it should send to all. eg 123401 The macros keys just do the same thing. You can then program the virtual keypad spare buttons with those key sequences.

To bypass all open zones on all partitions, the cmd is \<code> + 0 + 6 + #

Note: I don't know much about the vista120, but this sequence above works fine with the vista20p

giukio commented 2 years ago

Thanks for your answer, unfortunately, code+0+armcode# does not work on vista120. On the user manual at page23 you can have a look at how macros work (tlrd: hold macro key 2s, the system asks your code then performs the macro).

I totally could program a virtual keypad button to perform the same sequence of actions, but as far as I understood, I would have to hard-code an access code into home assistant and I would strongly avoid that.

I had a deeper look at your code, vista.cpp#L623, they are mapped A to D! Its really trivial then to achieve what I need :)

Now I will slightly modify the home assistant custom component to make it look like The 6139 Keypad. ( Wife approval factor goes instantly to 100%) I may share it if you want.

Dilbert66 commented 2 years ago

Ah ok, I see what you are doing. i had forgotten about the function key trigger codes. You are correct. I am developing for 2 different systems: DSC and Vista and sometimes some details get astay! As to the custom component it's designed to be totally customizable by users so they can modify as they choose.