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

Dev branch with ESPhome 2023.10.1 #112

Closed AlexandreUSA closed 9 months ago

AlexandreUSA commented 10 months ago

Hi, I just updated my VistaAlarm with ESPhome 2023.10.1. I had no issues for months. I know, don't fix it if not broke.... but I like ot keep up to date with my systems. After the update, I got two false burglar alarms and all sirens blasting. I had to disconnect my VistaAlarm module to stop it for happening again. Is there anythine new in ESPhome that can mess us my system? I am using the current DEV branch release with an Vista 21ip. Thanks.

Dilbert66 commented 10 months ago

I don't see any issues here. I'd have to see logs. Sounds like your esp is crashing. If you can get logs from the usb serial port that would be best as if it is crashing, we'll see the debug message

hacsjalano commented 10 months ago

I haven't had quite the same symptoms, but my system has been acting up also with 2023.10.1, and now 2023.10.3:

I'm seeing a lot of this in the logs:

[05:13:08][I][CMD:620]: 2023-10-28 05:13 F8 59 1C 00 00 00 00 00 00 00 00 00 77 [05:13:08][I][CMD:620]: 2023-10-28 05:13 F8 59 1C 5A 03 00 00 00 00 00 00 00 77 [05:13:08][I][CMD:620]: 2023-10-28 05:13 F8 59 1C 5A 03 00 00 00 00 00 00 00 77 [05:13:09][I][CMD:620]: 2023-10-28 05:13 F8 59 1C 5A 03 00 00 00 00 00 00 00 77 [05:13:09][I][CMD:620]: 2023-10-28 05:13 F8 59 1C 5A 03 00 00 00 00 00 00 00 77

Dilbert66 commented 10 months ago

You'll need to show more of the log with the other data that comes through. Just showing bad packets doesnt mean anything. Usually that type of issue is related to a weak or noisy connection to the panel. If you are using the optcoupled isolated version that is usually the problem. I provided the isolate version because some people were asking for it without knowing the possible related issues. The system is very dependent on the optocoupler gain. I usually recommend the simple resistor based version for better signal quality. I do not see any issues on my systems so can't say what your problem is for sure.

Also specifiy if you are using an ESP32 or ESP8266 design. The ESP8266 has been problematic for some people.

hacsjalano commented 10 months ago

Looks like I've chosen poorly on both fronts! I'm using an ESP8266 and my board is the PCB made using the design that boobeechen did here:

https://oshwlab.com/boobeechen/vistaesphome_copy

Because ordering this requires making a minimum of 5 boards, and I also bought a package of 5 ESP8266's from Amazon, I have 5 setups - I've switched out the circuit board and the ESP8266 and the behavior is identical, so I'm going to have to check the wiring in my house next to make sure nothing got loose. Things have been working great with this board for almost 2 months, so perhaps it is just bad luck/timing that I upgraded my ESPHome and this happened.

My logs are basically those lines repeated so rapidly I had a hard time seeing much else besides that. Looks like I need to check the wiring!

Dilbert66 commented 10 months ago

I can resurrect my esp8266 and try it. Haven't used it a while. I develop on esp32 nowadays

On Sat, Oct 28, 2023, 9:16 AM hacsjalano @.***> wrote:

Looks like I've chosen poorly on both fronts! I'm using an ESP8266 and my board is the PCB made using the design that boobeechen did here:

https://oshwlab.com/boobeechen/vistaesphome_copy

Because ordering this requires making a minimum of 5 boards, and I also bought a package of 5 ESP8266's from Amazon, I have 5 setups - I've switched out the circuit board and the ESP8266 and the behavior is identical, so I'm going to have to check the wiring in my house next to make sure nothing got loose. Things have been working great with this board for almost 2 months, so perhaps it is just bad luck/timing that I upgraded my ESPHome and this happened.

My logs are basically those lines repeated so rapidly I had a hard time seeing much else besides that. Looks like I need to check the wiring!

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

hacsjalano commented 10 months ago

logs_VistaAlarm_run.txt

hacsjalano commented 10 months ago

I did a new build and checked the wiring to the panel; I used some fresh wires to make sure there was no damage there. This is the logs from this run.

hacsjalano commented 10 months ago

I'm want to close this issue because I think it's not related to the ESPHome version. I'd like to continue this conversation someplace else; not sure if it's appropriate for Github issues or perhaps the Home Assistant Forums.

One thing that I just found out is that my Residio TotalConnect account got disabled at the same time yesterday at my request. I was having a great month with the ESPHome-Vista that I thought I should cancel the Residio TotalConnect service since this was doing a much better job. I thought it was supposed to get disconnect Oct 31st but it appears they shut off my account on Friday, the same day when this issue appeared. I'm still using my LRR to communicate with my central service - I will call them on Monday to see if there is some configuration that needs to happen to complete the disabling of TotalConnect. I'm wondering if this change had any effect, like my LRR being extra noisy.

I can still send keypresses, disarm and arm the panel fine using the ESPHome-Vista; it's responsive as ever and doesn't seem to be affected by the extra noise. The only thing I can't see reliably is the keypad display which shows me whether the armed/disarmed status and of course all of the RF device statuses.

Anyway, thanks for your help and I will have to look into purchasing some parts to build an ESP32 version if this doesn't pan out. It's a bummer because I really like those elegant little printed circuit boards!

Dilbert66 commented 10 months ago

No worries. Sounds like your panel is sending packets that my firmware is not recognizing. I can correct that. Let me look at your logs further and I can look at what needs to happen

hacsjalano commented 10 months ago

Thanks! Here are some additional logs now that it has been running a bit, if this helps. logs_VistaAlarm_logs.txt

Dilbert66 commented 10 months ago

Looking at it, it's not noise but a new command that my code is not handling correctly. I'll post a debug file that you can try out which will print details on unknown commands it finds. It's not an f8 as the command is not right so it's something else.

Dilbert66 commented 10 months ago

I believe *29 is the program field for setting up/disabling ip comms and lrr. I don't know how yours is but mine only has lrr since it does not support total connect.

hacsjalano commented 10 months ago

I did try turning of LRR by using *29 - it didn't appear to change anything unfortunately. I left it off for about 15 minutes and then re-enabled it.

I'm running the dev version of the code that I pulled on Sept 9th; for the debugging let me know if I should pull that branch (or another one) again or if it's just some files I can patch.

Dilbert66 commented 10 months ago

I've modified the file vista.cpp to add some code to try and capture unknown commands and display them. (last byte will be 0x90). Lets see if it works for you. Rename this file from vista.txt -> vista.cpp , replace the one on your system and recompile. Lets see what your logs look like after. vista.txt

Dilbert66 commented 10 months ago

hacsjalano, does *29 allow you to also just turn off ip communications while leaving lrr on?

hacsjalano commented 10 months ago

logs_VistaAlarm_run.txt

hacsjalano commented 10 months ago

This is already a massive improvement! The keypad display comes through without being garbled now! I'm still testing the rfSerial lookups but those seem to be working again too!

Regarding *29 - I only have 1 option to turn it on or off, and one to re-configure it. Unfortunately I have no documentation on how to navigate the re-configuration so I don't know if there is something in there that will allow more granular control.

But for now it appears your fix has made things work again for me!

hacsjalano commented 10 months ago

Is it okay to leave this version running for now? Or should I revert it back until you have a more information?

Dilbert66 commented 10 months ago

You can leave it running. I will add the debug to the main code. The main issue with your system right now is you have setting that is causing the panel to keep sending this f8 command which is flooding the esp firmware (it looks to be a valid cmd after all but different then some I've seen as it does not use a chksum). You might need to find a way to disable the ip communicator you have. Is it the built in one of the vista21? If so, that might require changing a jumper on your panel and rebooting. Some systems have a setting in program *29 to turn off ip communications. I'm assuming this is all related to your totalconnect changes though.

hacsjalano commented 10 months ago

Yes, I will have a call on Monday with my monitoring service to see what they can tell me. I suspect there may be some options I can shut off. I'm using a Vista-20P that is 15 years old but 2 years ago it was updated to use a new Residio 4G LTE communicator for which I haven't found any documentation for. It provides both a cell radio as well as my internet service, which I understand my central monitoring service uses in addition to the LRR (or maybe it replaced it? I don't know for certain). The Total Connect service apparently lives "on top of" that service, but I am not certain.

I did unplug the ethernet cable to the communicator and it did not appear to do anything; it very well may be something I have to disable on the communicator itself.

Dilbert66 commented 10 months ago

I've pushed a new vista.cpp to dev with some small updated changes including the ones I did for your debugging.

hacsjalano commented 10 months ago

I applied the current dev branch and everything works. Thanks again for all your work!

Malt0178 commented 10 months ago

Believe the F8 message supports Remote Interactive Services (RIS) i.e. Total Connect. Later revision panels have a second option in Data Field 91 that is used to enable/disable this feature ( 0=disable, 2=enable). Confirmed to suppress F8 messages on Vista-20P Rev 9.18 by setting to 0.

Dilbert66 commented 9 months ago

Thanks Malt0178! hacsjalano, does that setting work on your system? If it fixes it, please let us know.

hacsjalano commented 9 months ago

Thank you @Malt0178 that worked perfectly! I did a bit of Googling to find the documentation about 91 first, since the original manual I had did not mention anything about Remote Interactive Services. I found a file called Vista-15P v9 Addendum.pdf which specifically calls out changes to 91 which apparently I had. I actually have a Vista-20P Rev 9.12 and this option exists here too. So I set the second digit to "0" and all of my F8 messages have gone away, and it's as quiet as it was before!

Dilbert66 commented 9 months ago

Awesome! FYI, i've changed the way the RF devices are entered in the yaml to make it easier. It will use whatever info you have setup from program *56 for loop# and zone#. No need to worry about masks. Just enter the serial:loop#:zone#. You can see this document for default loop numbers for various devices: https://advancedsecurityllc.com/wp-content/uploads/5800%20Wireless%20Device%20List.pdf

Just so you know as the entry format has changed.

Dilbert66 commented 9 months ago

If your system is still crashing, sometimes after a new esphome update you first need to do a "Clean Build Files" first. Not a bad idea to always do that anyways.

hacsjalano commented 9 months ago

Not a problem with the new code - I just noticed the sensors have changed so I needed to update my automations to use the new names. It builds fine and I was able to convert my rfSerialLookup entries to use the new loop settings.

hacsjalano commented 9 months ago

Oh, I forgot one thing - I commented out this section because I wasn't sure whether this is correct for the 8266:

status_led:

pin:

#number: GPIO2
#inverted: yes

I also got these compile-time warnings. They don't appear to have affected the final product, but let me know if these are important. logs.txt

Dilbert66 commented 9 months ago

Thanks for the note about the warnings. They are not an issue but i've pushed an update to clear those out. As to the sensor changes, that is only if you use the simplified yaml which is better but the code will still work with the older version of the yaml in case you prefer that. Unfortunately ESPHome makes it impossible to use the id: field as a lookup in custom components so instead I have to make the id as part of the name: field so it can be identified from the C++ custom code. I've put a feature request with the ESPHOME team to allow that but I'm not going to hold my breath on it. Tks for reporting back!

Oh, dont' worry about the status_led section. That is dependent on some esp boards. It really doesnt add any use except for flashing the led when active. If you know what the gpio of your specific board led is, you can change it to that.

Dilbert66 commented 9 months ago

FYI, there was an issue for those that were using the old version yaml and the new code. It would crash because of a missing callback that is present in the new yaml versions. I've corrected the issue and posted a new version of vistaalarm.h.

hacsjalano commented 9 months ago

Just rebuilt using the new code; I'm using the simplified yaml and decided I'm sticking with the new sensor names with the zone numbers in them.

Everything works great!

Dilbert66 commented 9 months ago

Good to hear! Tks.

AlexandreUSA commented 9 months ago

Hi, It took me a while as I was traveling for work and I did not want to mess my system up while away. I installed the new version this weekend. Mostly all good. I used the latest Master yaml and restarted from scratch with the repository in the cloud. Really easy. I like the new way to get it done. No more crashing. All good here. However, I have another issue and I will create a new post so you can close this one.