davesmeghead / visonic

Visonic Custom Component for integration with Home Assistant
Apache License 2.0
92 stars 20 forks source link

Problem setting up second Visonic Panel #113

Closed robermf closed 3 months ago

robermf commented 6 months ago

Hello! I am having this issue in a fresh Instalation of HaOS. I was using (with previous versions) in a supervised HA instance running on Debian.

I have a Powermax Pro and Powermaster 10. When I add the first panel all is ok, but when I add the second panel I only it is in Powerlink mode and everything looks fine but Home Assistant only can get the first sensor (I tried changing the order of adding panels, older versions of the add-on...)

I attach the log (I tried to clean it up a little bit) and read but I don't understad very much. In the log appears a error setting up the sensors:

Captura de pantalla 2024-05-12 a las 16 32 19 Captura de pantalla 2024-05-12 a las 16 32 43 Captura de pantalla 2024-05-12 a las 16 34 54 Captura de pantalla 2024-05-12 a las 16 35 02 Captura de pantalla 2024-05-12 a las 16 35 53

home-assistant-2.log

And here is the info of the panel 2:

code_format: null changed_by: None code_arm_required: false Panel Mode: Powerlink Protocol Version: 1.0.20.0 Watchdog Timeout (Total): 0 Watchdog Timeout (Past 24 Hours): 0 Download Timeout: 0 Download Retries: 0 Panel Problem Count: 0 Panel Problem Time: "" Panel Last Event: None Panel Last Event Data: Zone: 0 Entity: null Tamper: false Siren: false Reset: false Time: "2020-01-01T00:00:00.0" Count: 0 Type: [] Event: [] Mode: [] Name: [] Panel Alarm Status: None Panel Trouble Status: None Panel Siren Active: false Panel Status: Disarmed Panel Status Code: Disarmed Panel Ready: "Yes" Panel Alert In Memory: "No" Panel Trouble: "Yes" Panel Bypass: "No" Panel Status Changed: "No" Panel Alarm Event: "No" Panel Armed: "No" Power Master: "Yes" Panel Model: PowerMaster 10 Panel Type: 7 Model Type: 104 Panel Name: Unknown EPROM Change Time I Think: Not Set Jamming Detection: Disable Entry Delay 1: 30 Seconds Entry Delay 2: 1 Minute Exit Delay: 30 Seconds Bell Time: 4 Minutes Piezo Beeps: Enable Swinger Stop: After 1 Time Aux Key 1: Instant Arm Aux Key 2: Cancel Exit Delay Supevision Interval: 12 Hours No Activity Time: Disable Alarm Cancel Time: 5 Minutes Abort Time: 30 Seconds Confirm Alarm Timer: 60 Minutes Screen Saver: "Off" Reset Option: User Reset Duress: "2580" AC Failure Report: 5 Minutes User Permit: Disable Zone Restore: Report Restore Tamper Option: "On" PGM By Line Fail: "No" Auto Arm Option: Disable Send 2wv Code: Don't Send Memory Prompt: Disable Time Format: Europe - 24H Date Format: Europe DD/MM/YYYY Low Battery Acknowledge: "Off" Not Ready: Normal X10 Flash On Alarm: No Flash Disarm Option: Any Time Siren On Line: Disable on Fail Upload Option: Any Time Panic Alarm: Audible Panic Exit Mode: Normal Bell Report Option: Others Internal/Strobe Siren: Internal Siren Quick Arm: "Off" Back Light Time: Off After 10 Seconds Two-Way Voice - Private: Disable Latchkey Arming: "Off" Bypass: No Bypass Trouble Beeps: Disable Cross Zoning: "Off" Recent Close Report: "Off" Piezo Siren: "On" Dialing Method: Tone (DTMF) Remote Access: "On" Report Confirmed Alarm: Disable Report 1st Account No: "001234" 2nd Account No: "005678" Ringback Time: 1 Minute Report to Central Station: All but Open/Close * Backup Report To Pager: Disable Report Reporting To Private Tel: Disable Report Central Station Dialing Attempts: "8" Report Format: SIA 4/2 Pulse Rate: 20 pps Two-Way Voice To Central Stations: Disable Autotest Time: "12:00" Autotest Cycle: Disable Line Failure Report: Don't Report System Inactive Report: Disable Ambient Level: Low Level PowerLink Failure: Disable Report GSM Line Purpose: SMS Only GSM Report to SMS: Disable Report GSM Line Failure: Don't Report GSM Install: Not Installed GSM Select Antenna: Internal antenna X10 Lockout Time (start HH:MM): "07:00" X10 House Code: B PGM By Arm Away: Disable PGM By Arm Home: Disable PGM By Disarm: Disable PGM By Delay: Disable PGM By Memory: Disable PGM By Keyfob: Disable PGM Act Zone A: Disable PGM Act Zone B: Disable PGM Act Zone C: Disable PGM Pulse Time: 2 Seconds X10 Trouble Indication: Disable X10 3 Phase and frequency: Disable X10 Report on Fail to Central Station 1: Disable X10 Report on Fail to Central Station 2: Disable X10 Report on Fail to Pager: Disable X10 Report on Fail to Private: Disable X10 Report on Fail to SMS: Disable Set Voice Option: Enable Voice Squawk Option: Low Level Auto Arm Time: "12:00" Panel Eprom: J-703069 I18.415 Panel Software: JS702947 I18.415 Panel Serial: "0907030000." Door Zones: "" Motion Zones: "" Smoke Zones: "" Ignored Zones: "" Other Zones: Z01,Z02,Z03,Z04,Z05,Z06,Z07,Z08 Devices: "" Client Version: 0.8.5.2 Exception Count: 0 panel: 2 friendly_name: Visonic Alarm Panel 2 supported_features: 7

Thank you for your help, Dave.

davesmeghead commented 6 months ago

Hi, As you're using HaOS then I assume that you can't download the dev zip for this integration and give that a try?

The entities already exist when trying to create them, have you tried:

What happens? Dave

robermf commented 6 months ago

Hello! With the dev version when I try to add the componente I get: 500 Internal Server Error Server got itself in trouble.

I tried adding the PowerMaster as Panel 2, and PowerMaster as Panel 3. At first see all sensors but after restart only the first sensor is available. It is weird.

Thank you for your help :)

EDIT:

Wait! After another reboot now all the sensors of the PowerMaster are available. And now HA can see the model of all them (first only showed the model name of the first sensor). I will let you know this days if keeps working!

davesmeghead commented 6 months ago

Hi Sorry but this "With the dev version when I try to add the componente I get: 500 Internal Server Error Server got itself in trouble." is my fault. I have since updated the manifest.json file to remove the Pillow library version number. It might take a few restarts of Home Assistant so it downloads and installs the needed libraries, but it looks like you've already done that.

After your edit can you be more clear about what you have installed please? Do you have both Panels installed as the original setup, PowerMax as panel 1 and PowerMaster as panel 2?

And yes please keep me updated as to what works, especially the dev version. I made many many changes from the main to the dev release and so eventually I'd like to replace the main with the dev instead of trying to merge across the changes. Dave

robermf commented 6 months ago

Hello!

I have tried changing the order and the number assigned to the panels. But always the second panel added has the problem: Only show the first sensor of the panel, and sometimes got all sensors but after a few seconds are unavailable.

I installed the dev version with your instructions and it is working fine. Nice changes in the GUI, I like it. But regarding the second panel I am still having issues: I add it, get all sensors but get into a loop: Mode: Download, Standard Plus and then the panel is unavailable. And starts again the loop.

I am uploading the log here.

And if in another VM with HaOS I add one panel is working perfect. I try this to test and because next week and I am leaving home for a couple of weeks and can get notifications from that sensors, just in case I can't fix it before.

Thank you for your help! home-assistant-4.log

davesmeghead commented 6 months ago

OK that's my fault, there's a code problem with pyvisonic.py file. I've updated it in the dev release so can you please grab the dev zipfile again and give it a try please.

According to your log file both panels were doing really well until the error in the log file on line 474

Thanks Dave

robermf commented 6 months ago

Hello Dave! I have been testing since yesterday and looks it is working perfect!

I have to do some tests but I am pretty sure you have fixed. Thank you very much!

davesmeghead commented 6 months ago

Hello, That's good news, let me know of any problems.

Could you please upload a log file for a 20 to 30 minute period. I have a PowerMaster 30 to test with and I'd like to check that the PowerMaster 10 data is being decoded properly, it sounds like it is from what you say but I'd like to look and make sure. That's what the last problem was all about, some messages are different between the panels and I took a guess for some of the new PowerMaster "B0" messages.

Thanks Dave

robermf commented 6 months ago

Hello Dave!

I am testing this week and I don't understand how but after more than 24 hours working the second panel fails, again: Mode: Download, Standard Plus and then the panel is unavailable.

I restart and works fine for more than one day, maybe two. It is strange, right?

I am attaching a 25 minutes log and putting a link to dropbox with a log with the failure, but it is a 300 Mb log. At the end of this log there is:

[img]https://i.imgur.com/ryAW02X.png[/img]

If you prefer I can delete the most part of this big log and upload again.

The big log is here: https://www.dropbox.com/scl/fi/i48fk003l2ll4cuoud6yi/home-assistant-big.log?rlkey=efqpajfya68wknakqnzq1jx6y&dl=0

The 25 minutes log here is attached to the post. home-assistant.log

Thank you!

davesmeghead commented 6 months ago

Hi, In the 25 minute log (home-assitant.log) there are no visonic related errors, both panels are ok. There are a lot of errors from other integrations so could you make sure that you set your logger settings like this please:

logger:
  default: critical
  logs:
    custom_components.visonic: debug

By setting the global default to critical it will stop logging the errors from other integrations, thanks, critical is the highest setting.

I tried looking through the 2 million line log file but the above issue makes it very difficult, I need to work out for each error if it was generated by the visonic integration which makes it very time consuming.

After all that, I did spot a couple of bugs in the code and have uploaded a dev release to github, please give it a try.

Thanks for giving the dev release a try Dave

robermf commented 6 months ago

Hello Dave!

Yeah, the big log is crazy big! Sorry :)

I upgraded to the latest dev version. Aldo change the logger settings. I am on vacations but the system is 4 days since that without missing the second panel. So... It looks you did your magic and it is working great.

In the previous test about after 2 days began to fail. I will let you know but I think it is fixed.

Thank you very much, Dave.

davesmeghead commented 6 months ago

Hello, Good to know, thanks for keeping me updated We'll keep the issue open a bit longer to make certain The only worry now is the size of the log file it generates while you're not there :) Dave

robermf commented 6 months ago

Hello! After one week the two panels are still working fine without issues. I am sure that you fixed it!

I don't want to reboot until I come back home. After that I will post a log hopefully not so big.

Best regards :)

davesmeghead commented 3 months ago

Closing this issue, if the problem continues then either reopen or create a new issue please