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
130 stars 21 forks source link

Vista 120 zone F7 messages not recognized #72

Closed giukio closed 2 years ago

giukio commented 2 years ago

Hello, first of all, congratulations for this project it's really amazing and I've almost got it to work! I have a Vista120 with zones using addresses up to 80 (not all of them are populated.). I've been able to use the virtual keypad on home assistant, arm and disarm the alarm, but It's not fully clear to me how to configure the zone expanders on the yaml file.

To be honest I'm not even sure I have zone expanders in my system (I'll check later with my dad who installed the alarm).

I am using an ESP32 and hardware-wise I think I'm fine, here is part of my yaml image

I also added up to zone80 in the lambda VistaECP->onZoneStatusChange and text_sensor: sections, home assistant sees the entities but from zone 49 onwards just as unknown value.

I am reading F7 messages regarding a Zone open and close, but home assistant doesn't seem to react to them. Here you can see an example of zone 11 (door) opening and closing several times. I can provide you logs where I open and close every zone if it helps. [10:27:48][I][CMD:445]: F7 03 00 05 00 11 00 00 08 02 00 00 41 [10:27:55][I][CMD:445]: F7 03 00 05 00 11 00 0C 08 02 00 00 47 [10:27:59][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A [10:28:05][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A [10:28:07][I][CMD:445]: F7 03 00 05 00 11 00 00 08 02 00 00 41 [10:28:14][I][CMD:445]: F7 03 00 05 00 11 00 0C 08 02 00 00 47 [10:28:17][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A [10:28:23][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A [10:28:30][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A [10:28:37][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A [10:28:41][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A [10:28:48][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A [10:32:53][I][CMD:445]: F7 03 00 05 00 11 00 00 08 02 00 00 41 [10:32:56][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A [10:33:03][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A [10:37:49][I][CMD:445]: F7 03 00 05 00 11 00 00 08 02 00 00 41 [10:37:53][I][CMD:445]: F7 03 00 05 00 11 00 1C 08 02 00 00 5A

Here is an example of zone 75 (PIR motion sensor) [10:58:51][I][CMD:445]: F7 04 00 06 00 75 00 1C 08 02 00 00 20 [10:58:52][I][CMD:445]: F7 04 00 06 00 75 00 00 08 02 00 00 41 [10:58:54][I][CMD:445]: F7 04 00 06 00 75 00 0C 08 02 00 00 4E

Let me know if these seems ok to you or if I have to send you the full logs.

Thanks again!

Dilbert66 commented 2 years ago

You need to change the MAX_ZONES value at the top of vistaAlarm.h to 80 instead of the current 48 to be able to see those zones.
As to the zoneExpanders section in the yaml, that is used only to emulate a physical zone expander if you don't have one in your system. Those emulated zones could then be used by home assistant to trigger open/close events on your alarm system using external sensors.

giukio commented 2 years ago

Thank you for explaining to me the simulated zone expanders, now it makes sense! Increasing MAX_ZONES did in fact populate the entities in home assistant, but still, I have the same problem: all zones show as "C" regardless of the F7 messages, here an example: I've opened and closed my window (Zone 53, CAMERA GIULIO, ie my bedroom)

[20:18:54][D][text_sensor:067]: 'vistaalarm Lrr Msg': Sending state '' [20:18:54][D][text_sensor:067]: 'vistaalarm zone 031': Sending state 'C' [20:18:54][D][text_sensor:067]: 'vistaalarm zone 061 Finestra Camera Loriana?': Sending state 'C' [20:18:54][D][text_sensor:067]: 'vistaalarm zone 011 Porta Ingresso': Sending state 'C' [20:18:54][D][text_sensor:067]: 'vistaalarm zone 046': Sending state 'C' [20:18:54][D][text_sensor:067]: 'vistaalarm zone 053 Finestra Camera Giulio': Sending state 'C' [20:18:55][D][text_sensor:067]: 'vistaalarm zone 068': Sending state 'C' [20:18:55][D][text_sensor:067]: 'vistaalarm zone 062': Sending state 'C' [20:18:55][I][CMD:445]: F7 04 00 06 00 53 00 00 08 02 00 00 41 [20:18:55][I][INFO:724]: Prompt: APERT 053 FINEST {65,80,69,82,84,0} [20:18:55][I][INFO:725]: Prompt: CAMERA GIULIO [20:18:55][I][INFO:726]: Beeps: 0

[20:18:55][I][CMD:445]: F7 04 00 06 00 53 00 0C 08 02 00 00 4E [20:18:55][D][text_sensor:067]: 'vistaalarm Line1': Sending state 'NOTT DISATTIVATO' [20:18:55][D][text_sensor:067]: 'vistaalarm Line2': Sending state ' ZONE APERTE ' [20:18:55][I][INFO:724]: Prompt: NOTT DISATTIVATO [20:18:55][I][INFO:725]: Prompt: ZONE APERTE [20:18:55][I][INFO:726]: Beeps: 0

[20:18:55][D][text_sensor:067]: 'vistaalarm zone 012 Finestra Est Sala?': Sending state 'C' [20:18:55][D][text_sensor:067]: 'vistaalarm zone 002': Sending state 'C' [20:18:56][D][text_sensor:067]: 'vistaalarm zone 057 Finestra Cappellina': Sending state 'C' [20:18:56][I][CMD:445]: F7 04 00 06 00 53 00 0C 08 02 00 00 4E [20:18:56][I][INFO:724]: Prompt: NOTT DISATTIVATO [20:18:56][I][INFO:725]: Prompt: ZONE APERTE [20:18:56][I][INFO:726]: Beeps: 0

[20:18:56][D][text_sensor:067]: 'vistaalarm zone 008': Sending state 'C' [20:18:56][D][text_sensor:067]: 'vistaalarm zone 027': Sending state 'C' [20:18:56][I][CMD:445]: F7 03 00 01 00 C0 00 1C 08 02 1F 00 5A [20:18:56][D][text_sensor:067]: 'vistaalarm zone 063 Finestra Camera Mariachiara': Sending state 'C' [20:18:57][I][CMD:445]: F7 04 00 06 00 53 00 00 08 02 00 00 41 [20:18:57][D][text_sensor:067]: 'vistaalarm Line1': Sending state 'APERT 053 FINEST' [20:18:57][D][text_sensor:067]: 'vistaalarm Line2': Sending state 'CAMERA GIULIO ' [20:18:57][I][INFO:724]: Prompt: APERT 053 FINEST {65,80,69,82,84,0} [20:18:57][I][INFO:725]: Prompt: CAMERA GIULIO [20:18:57][I][INFO:726]: Beeps: 0

I believe this means Open [20:18:55][I][CMD:445]: F7 04 00 06 00 53 00 00 08 02 00 00 41 while this Closed [20:18:55][I][CMD:445]: F7 04 00 06 00 53 00 0C 08 02 00 00 4E

Why do you think Home assistant always shows "C"? did I configure something wrong?

Thank you :)

Dilbert66 commented 2 years ago

Ah I see, your panel is non-english. Ok, you will need to go into vistaalarm.h and change the lines below to match what your panel sends for the associated statuses. For example, you would use "APERT" instead of "FAULT" Line 65:

    const char * FAULT = "FAULT";    
    const char * BYPAS = "BYPAS";
    const char * ALARM = "ALARM";
    const char * FIRE = "FIRE";
    const char * CHECK = "CHECK";
    const char * HITSTAR = "Hit *";   
giukio commented 2 years ago

Yes! that did it! thank you.

Then I can only monitor the status if the key * is pressed, right?

Also, I have two partitions with two physical keypads, (day downstairs, night upstairs) this means I cannot monitor both partitions with one ESP, correct? (to get the logs I had to temporarily change partition using then to show open zones.)

Dilbert66 commented 2 years ago

Yes, to trigger the key , either arm and disarm or press the # key. You should see that message. Then you can enter it where it says "HITSTAR" and the system will automatically send the key.

As to monitoring multiple partitions, you can try the code in the "dev" branch. That is designed to work with any number of partitions and allows to have separate virtual keypads if needed. It is still in test but works well so far.

giukio commented 2 years ago

Now I'm starting to understand how the system works. I think we can close this issue now. Wrapping Up I had to increase the MAX_ZONES in vistaAlarm.h and translate the relevant messages at line 65.

I'm a developer myself and I'll definitely try the dev branch, maybe I'll open another issue in case I have troubles.

Thank you again!

Dilbert66 commented 2 years ago

Yes, unfortunately, i could not find a reasonable bit flag status consistent enough to identify the F7 message type for zones so I rely on the actual content of the text message for identification , but this has issues with being dependent on the panel language so will require some extra configuration when the panel is not english.

lorenzodeveloper commented 1 year ago

Ciao @giukio , Can you please post the translations you used? I'm struggling to find the right translation for some of the lines below.

    const char * FAULT = "APERT"; 
    const char * BYPAS = "ESCL."; // Is it this one?
    const char * ALARM = "ALARM";
    const char * FIRE = "FIRE"; // No clue, but not important since I have no fire/smoke sensor
    const char * CHECK = "CHECK"; // No clue on how to retrieve it
    const char * HITSTAR = "Premi*";  

Thank you !

giukio commented 1 year ago

Ciao Lorenzo, Sorry for getting back to you this late, here are those lines I'm using for the italian keyboard:

const char * FAULT = "APERT";
const char * BYPAS = "BYPAS";
const char * ALARM = "ALARM";
const char * FIRE = "FIRE";
const char * CHECK = "CHECK";
const char * HITSTAR = " * Per";

As you can see I've only translated FAULT and HITSTAR unfortunately.

Hope this helps, Giulio

Il giorno ven 25 nov 2022 alle ore 09:06 Lorenzo Fiorani < @.***> ha scritto:

Ciao @giukio https://github.com/giukio , Can you please post the translations you used? I'm struggling to find the right translation for some of the lines below.

const char * FAULT = "APERT";
const char * BYPAS = "ESCL."; // Is it this one?
const char * ALARM = "ALARM";
const char * FIRE = "FIRE"; // No clue, but not important since I have no fire/smoke sensor
const char * CHECK = "CHECK"; // No clue on how to retrieve it
const char * HITSTAR = "Premi*";

Thank you !

— Reply to this email directly, view it on GitHub https://github.com/Dilbert66/esphome-vistaECP/issues/72#issuecomment-1327133742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEKCMNT2GB7RARBA7L36YMLWKBXO5ANCNFSM5VH3ZINA . You are receiving this because you were mentioned.Message ID: @.***>

lorenzodeveloper commented 1 year ago

Ciao Giulio, No worries, I still cannot find the translation of the FIRE variable as I'm not using any smoke detector in my system, but I managed to find the others looking at the logs and reading the prompt messages when doing some tests. These are the translations I found for the Vista 25IT:

    const char *const FAULT = "APERT";
    const char *const BYPAS = "ESCL.";
    const char *const ALARM = "ALARM";
    const char *const FIRE = "INCEND"; // just a guessing
    const char *const CHECK = "VERIF";
    const char *const ARMED = "INSERIM."; // 25IT is like Vista20SE - ignore this

    const char *const HITSTAR = "SPENTO Premi* e ";
    const char *const HITSTAR_ALT = "Premere *"; // sometimes it is displayed like this so I added an or condition to check also for this in vistaAlarm.h

Thank you!

Lorenzo

Dilbert66 commented 1 year ago

Thanks! I will add these translations to the code. Probably using a dedicated include file for it.