Visonic Powermax and Powermaster Component

I had a strange issue today: the fire alarm went off suddenly in the evening:
What is strange is that the smoke detector itself didn’t sound the alarm, it was only the panel.

Last time I had an issue with real smoke, and both the smoke detector and the panel did sound the alarm.

Luckily I was in debug mode:

It is perhaps a bug in the Powermax Pro panel (the smoke detector is really far away) but this is really strange.

I don’t think it is related at all with the Home Assistant Visonic integration, but as I had the logs, some people may find that interesting.

Hey!

I managed to get my connection started via USB a few weeks ago but have unfortunately experienced problems with losing contact after 2-3 days sometimes more often. I can not get it to reconnect in any way except to remove visonic integration restart HA then boot up and add the control panel from scratch. If I choose Baudrate 38400 then I do not choose a download code its the only way i got it to work.

“2020-12-18 07:11:46 DEBUG (MainThread) [custom_components.visonic.config_flow] Detected a powermaster so asking about B0 parameters”

I always check the box that comes up there, dont know if its good or not. I dont change the values that standing… (I run powermaster 10)

if i check the log i can see the panel put this in my log every third minute
“2020-12-18 12:19:03 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format number as force numeric keypad set in config file”

Please tell me if you have any ides what it can be that makes my central to lose connection and not reconnect.

Reconnect works for me. Thanks.
Did it a couple times to check.

I’ve looked at you log and it’s mostly good news. The initial startup only achieved “Standard” Mode because the panel ignored the download command itself and did not report the panel type and model numbers. I’ve taken a look and I’ve made a tweak to the code that I’ll upload soon. The restart worked well and it achieved “Powerlink” Mode. So we end with good news.

I agree it is really strange! I looked through the log file and what you describe is what is represented by the log file so I don’t really know what to suggest.

Please keep an eye on it and let me know if you have further problems, I’m trying to make the integration robust to the various conditions across all the different panel types.
:slight_smile:

Please set you logger settings as per the wiki and upload a log file, the first 1500 lines from the start and then around 200 lines each side of the disconnection in the log file. Upload to pastebin/dropbox and leave a link in response to this post please.

As you have a powermaster it should be OK, sometimes a powermaster sends a B0 message and so I attempt to interpret it but as I don’t have a powermaster it’s a bit difficult for me. The B0 message is only sent by a powermaster and I’m not 100% sure I’m decoding it correctly, hence it’s a bit experimental.

This is OK. This is Home Assistant core asking the integration whether to draw the keypad in the frontend or not.

I need a log file to help you :slight_smile:

One status, I had my Alarm panel reconnect automatically once today. Never had that before.
I have set up an alert on telegram whenever alarm is disabled, usually when my children comes home from school. And that gets triggered by going from unavailable to disarmed as well.

So now I can get an idea how bad the connectivity is.

I wonder why… even after a reboot the latest version I can see to install is 0.6.0.0
Is there a way to tell HACS to update the versions?
I tried switching Show Beta on and off but it didnt work

Ah no, sorry. I need to do a formal release on github for HACS to pick up a new version. I’m just doing a few final tweaks and I’ll upload a new version and if there are no reported problems in the mean time, then I’ll create a HACS release.

1 Like

That’s OK. If you want finer control … when there’s a disconnection from the panel, the HA event alarm_panel_state_update is fired with condition set to 0. This is what I have as the trigger.

- alias: 'Visonic Panel Disconnection'
  initial_state: true
  trigger:
    platform: event
    event_type: alarm_panel_state_update
    event_data:
      condition: 0

It does not tell you about the reconnection however, just that an exception has caused a disconnection. For that you would need to test the “Panel Mode” Attribute which is always 1 of the following values:
Not Connected, Problem, Starting, Standard, Standard Plus, Powerlink, Download
It may never be set to “Not Connected” and only briefly set to “Starting” depending on how quickly the restart progresses.

Hi,

First, thanks Dave for the excellent work! I’m using this integration for quite a long time and it’s awesome!

I have the panel connected thru an FTDI adapter to a RPi3 where I have the HA running.

Now I’m migrating my HA setup from RPi3 to a RPi4 and everything is fine except this integration.

The process I’ve used to migrate was a brand-new install of Hassio on RPi4 and then applied a full snapshot from RPi3.

When I start HA on RPi4 my alarm panel start beeping in fixed cycle and shows on its display “Sending Data”. If I switch back to RPi3 plus a panel restart (exiting operator menu) it restores normal operation.

Logs from RPi3: https://pastebin.com/W9p4dRFS

Logs from RPi4: https://pastebin.com/FBuKzx6B

This is probably related whit some environment configuration specific to RPi4 but I’m not sure where should I start digging in.

Any thoughts?

Hi,
I’ve had a look at both log files and I’ve put the long rpi4 messages in my checksum tester and the checksums in the rpi4 log file for the long messages are incorrect. The integration looks for 5 or more checksum errors within a rolling 10 minute period and if so tries to restart the integration. This is what is happening on the Rpi4, hence the disconnected due to exception CRC errors message where the restart occurs.

As it works on your Rpi3 (although it only gets to Standard Plus, you could try manually enrolling) I assume that your hardware is set up correctly.

Have you checked the comms settings on your rpi4? I’m struggling to work out what could be wrong to be honest. I do have one theory though but no real evidence …

If I look at this data for an A6 message from your rpi4 log file

Warning : Construction of incoming packet validation failed - Message = 0d a6 04 03 25 25 25 29 29 1f bf 93 a1 73 05    checksum calcs 0X7C

An A6 message should be a fixed number of 15 bytes. But this message is not terminated correctly, all messages from the panel should end with “0A” and this does not.

It is as if the USB you are using is being used for more than one thing that is inserting extra bytes sometimes and corrupting some messages. Is this possible?

:slight_smile:

This is my log :

2020-12-20 20:39:23 DEBUG (MainThread) [pyvisonic] Initialising Protocol - Protocol Version 1.0.2
2020-12-20 20:39:24 DEBUG (MainThread) [custom_components.visonic] ************* create connection here **************
2020-12-20 20:39:24 DEBUG (MainThread) [custom_components.visonic.client] init self.config = PYVConst.DownloadCode  {'type': 'ethernet', 'host': '192.168.0.29', 'port': '23', 'language': 'FR', 'download_code': 'AAAA', 'force_standard': False, 'force_autoenroll': False, 'sync_time': True, 'exclude_sensor': [], 'exclude_x10': [], 'motion_off': 120, 'siren_sounding': ['intruder'], 'override_code': '2309', 'arm_without_usercode': True, 'force_numeric_keypad': True, 'arm_away_instant': False, 'arm_home_instant': False, 'allow_remote_arm': True, 'allow_remote_disarm': True, 'allow_sensor_bypass': True, 'panellog_logentry_event': True, 'panellog_complete_event': True, 'panellog_reverse_order': False, 'panellog_csv_add_title_row': True, 'panellog_max_entries': 10000, 'panellog_xml_filename': './custom_components/visonic/visonic_template.xml', 'panellog_csv_filename': 'panel_log.csv'}
2020-12-20 20:39:24 DEBUG (MainThread) [custom_components.visonic.client] Exclude sensor list = []     Exclude x10 list = []
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.jour_travail
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.lave_linge
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.alerte_chaudiere
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.workday_sensor
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.updater
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.porte_garage
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] connect_to_alarm self.config = {'type': 'ethernet', 'host': '192.168.0.29', 'port': '23', 'language': 'FR', 'download_code': 'AAAA', 'force_standard': False, 'force_autoenroll': False, 'sync_time': True, 'exclude_sensor': [], 'exclude_x10': [], 'motion_off': 120, 'siren_sounding': ['intruder'], 'override_code': '2309', 'arm_without_usercode': True, 'force_numeric_keypad': True, 'arm_away_instant': False, 'arm_home_instant': False, 'allow_remote_arm': True, 'allow_remote_disarm': True, 'allow_sensor_bypass': True, 'panellog_logentry_event': True, 'panellog_complete_event': True, 'panellog_reverse_order': False, 'panellog_csv_add_title_row': True, 'panellog_max_entries': 10000, 'panellog_xml_filename': './custom_components/visonic/visonic_template.xml', 'panellog_csv_filename': 'panel_log.csv'}
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] Visonic Connection Device Type is ethernet {<PYVConst.DownloadCode: 0>: 'AAAA', <PYVConst.ForceStandard: 15>: False, <PYVConst.ForceAutoEnroll: 1>: False, <PYVConst.AutoSyncTime: 2>: True, <PYVConst.PluginLanguage: 3>: 'FR', <PYVConst.EnableRemoteArm: 4>: True, <PYVConst.EnableRemoteDisArm: 5>: True, <PYVConst.EnableSensorBypass: 6>: True, <PYVConst.MotionOffDelay: 7>: 120, <PYVConst.OverrideCode: 8>: '2309', <PYVConst.ForceKeypad: 9>: True, <PYVConst.ArmWithoutCode: 10>: True, <PYVConst.SirenTriggerList: 11>: ['intruder'], <PYVConst.B0_Enable: 12>: False, <PYVConst.B0_Min_Interval_Time: 13>: 5, <PYVConst.B0_Max_Wait_Time: 14>: 30}
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] [Settings] Log Max Entries   10000
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] [Settings] Log Reverse       False
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] [Settings] Log Create Event  True
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] [Settings] Log Final Event   True
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] [Settings] Log XML Filename  ./custom_components/visonic/visonic_template.xml
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] [Settings] Log CSV Filename  panel_log.csv
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [custom_components.visonic.client] [Settings] Log CSV title Row True
2020-12-20 20:39:26 DEBUG (SyncWorker_4) [pyvisonic] Setting TCP socket Options
2020-12-20 20:39:28 DEBUG (SyncWorker_4) [pyvisonic] Waiting for Protocol Handler to Start
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Force Standard set to False
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Force Auto Enroll set to False
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Force Auto Sync Time set to True
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Download Code set to AA AA
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Language set to FR
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Remote Arm set to True
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Remote DisArm set to True
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Enable Sensor Bypass set to True
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Motion Off Delay set to 120
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Override Code in new settings, the length is 4   isdigit = True
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings]     Override Code set <omitted for security>
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Force Numeric Keypad set to True
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Arm Without Code set to True
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] Siren Trigger List set to ['intruder']
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] B0 Enable set to False
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] B0 Min Interval set to 5
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Settings] B0 Max Wait Time set to 30
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [EventHandling]  client is not None, calling setPyVisonic <class 'pyvisonic.dummyclient'>
2020-12-20 20:39:28 INFO (SyncWorker_1) [custom_components.myEnedis.sensor] call update
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Connection] Connected to local Protocol handler and Transport Layer
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [ClearList] Setting queue empty
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [StartDownload] Starting download mode
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Exit)    raw data 0d 0f f0 0a    waiting for message response []
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [pmSendPdu]          Command has a wait time after transmission 1.5
2020-12-20 20:39:28 DEBUG (MainThread) [pyvisonic] [Controller] download_counter is 1
2020-12-20 20:39:29 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?)
2020-12-20 20:39:29 DEBUG (MainThread) [pyvisonic] [Controller] download_counter is 2
2020-12-20 20:39:30 WARNING (SyncWorker_1) [custom_components.myEnedis.sensor] myEnedis ...05179594745209 update lancé, status precedent : True, lastCall :None
2020-12-20 20:39:31 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Stop)    raw data 0d 0b f4 0a    waiting for message response []
2020-12-20 20:39:31 DEBUG (MainThread) [pyvisonic] [pmSendPdu]          Command has a wait time after transmission 1.5
2020-12-20 20:39:31 DEBUG (MainThread) [pyvisonic] [Controller] download_counter is 3
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [Controller] download_counter is 4
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 4   Response list length before 0  after 1
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Setting Download Mode to true
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Start Download Mode)    raw data 0d 24 00 00 aa aa 00 00 00 00 00 00 86 0a    waiting for message response ['0X3C']
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [handle_msgtype02] Ack Received  data = 
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=False    Is PM Ack Reqd=False    This is an Ack for message=0X3C
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3C got it so removed from list, list is now []
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3C resetting expected response counter, it got up to 0
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [handle_msgtype3C] PanelType=1 : PowerMax+ , Model=32   Powermaster False
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [handle_msgtype3C] interval=0:03:16.322234  td=0:01:30   self.lastSendOfDownloadEprom=2020-12-20 20:36:18.393618    timenow=2020-12-20 20:39:34.715898
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [Panel Settings] Uploading panel settings
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 2
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack)    raw data 0d 02 fd 0a    waiting for message response ['0X3F', '0X2']
2020-12-20 20:39:34 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Download Data Set)    raw data 0d 3e 00 00 80 00 b0 00 00 00 00 00 90 0a    waiting for message response ['0X3F', '0X2']
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X2 got it so removed from list, list is now ['0X3F']
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [handle_msgtype02] Ack Received  data = 
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0X3F     pmIncomingPduLen 135
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=False    Is PM Ack Reqd=False    This is an Ack for message=0X3F
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3F got it so removed from list, list is now []
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3F resetting expected response counter, it got up to 0
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [handle_msgtype3F]
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack)    raw data 0d 02 fd 0a    waiting for message response []
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 2
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Download Data Set)    raw data 0d 3e 80 00 80 00 b0 00 00 00 00 00 10 0a    waiting for message response ['0X3F', '0X2']
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X2 got it so removed from list, list is now ['0X3F']
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [handle_msgtype02] Ack Received  data = 
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0X3F     pmIncomingPduLen 135
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=False    Is PM Ack Reqd=False    This is an Ack for message=0X3F
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3F got it so removed from list, list is now []
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3F resetting expected response counter, it got up to 0
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [handle_msgtype3F]
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack)    raw data 0d 02 fd 0a    waiting for message response []
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 2
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Download Data Set)    raw data 0d 3e 00 01 80 00 b0 00 00 00 00 00 8f 0a    waiting for message response ['0X3F', '0X2']
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X2 got it so removed from list, list is now ['0X3F']
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [handle_msgtype02] Ack Received  data = 
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0X3F     pmIncomingPduLen 135
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=False    Is PM Ack Reqd=False    This is an Ack for message=0X3F
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3F got it so removed from list, list is now []
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3F resetting expected response counter, it got up to 1
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [handle_msgtype3F]
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack)    raw data 0d 02 fd 0a    waiting for message response []
2020-12-20 20:39:35 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 2
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Download Data Set)    raw data 0d 3e 80 01 80 00 b0 00 00 00 00 00 0f 0a    waiting for message response ['0X3F', '0X2']
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X2 got it so removed from list, list is now ['0X3F']
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [handle_msgtype02] Ack Received  data = 
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0X3F     pmIncomingPduLen 135
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=False    Is PM Ack Reqd=False    This is an Ack for message=0X3F
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3F got it so removed from list, list is now []
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3F resetting expected response counter, it got up to 0
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [handle_msgtype3F]
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack)    raw data 0d 02 fd 0a    waiting for message response []
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 2
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Download Data Set)    raw data 0d 3e 00 02 80 00 b0 00 00 00 00 00 8e 0a    waiting for message response ['0X3F', '0X2']
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X2 got it so removed from list, list is now ['0X3F']
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [handle_msgtype02] Ack Received  data = 
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0X3F     pmIncomingPduLen 135
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=False    Is PM Ack Reqd=False    This is an Ack for message=0X3F
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3F got it so removed from list, list is now []
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [data receiver] msgType 0X3F resetting expected response counter, it got up to 0
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [handle_msgtype3F]
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack)    raw data 0d 02 fd 0a    waiting for message response []
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 2
2020-12-20 20:39:36 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Download Data Set)    raw data 0d 3e 80 0
 2020-12-21 16:57:03 DEBUG (MainThread) [pyvisonic] [ClearList] Setting queue empty
2020-12-21 16:57:03 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 2
2020-12-21 16:57:03 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Restore PowerMax/Master Connection)    raw data 0d ab 06 00 00 00 00 00 00 00 00 00 43 0b 0a    waiting for message response ['0XA5', '0X2']
2020-12-21 16:57:13 DEBUG (MainThread) [pyvisonic] [Controller] ****************************** Response Timer Expired ********************************
2020-12-21 16:57:13 DEBUG (MainThread) [pyvisonic] [ClearList] Setting queue empty
2020-12-21 16:57:13 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 2
2020-12-21 16:57:13 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Restore PowerMax/Master Connection)    raw data 0d ab 06 00 00 00 00 00 00 00 00 00 43 0b 0a    waiting for message response ['0XA5', '0X2']
2020-12-21 16:57:14 ERROR (MainThread) [pyvisonic] ERROR Connection Lost : disconnected due to exception [Errno 110] Operation timed out
2020-12-21 16:57:19 ERROR (MainThread) [pyvisonic]                         Calling Exception handler.
2020-12-21 16:57:19 DEBUG (MainThread) [custom_components.visonic.client] PyVisonic has caused an exception [Errno 110] Operation timed out
2020-12-21 16:57:24 DEBUG (MainThread) [custom_components.visonic.client]  ........... setting up reconnection
2020-12-21 16:57:24 DEBUG (MainThread) [custom_components.visonic.client]  ........... attempting reconnection
2020-12-21 16:57:24 DEBUG (MainThread) [custom_components.visonic.client]           ........... Closing down Current Task
2020-12-21 16:57:24 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none, armcode is zero and user arm without code is true
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client]           ........... Current Task Done
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] ........... attempting connection
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Found existing HA alarm_control_panel ['alarm_control_panel.visonic_alarm']
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client]     Checking HA Alarm ID: alarm_control_panel.visonic_alarm
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client]        ***** Matched - Alarm Control Panel already exists so keep it ***** : alarm_control_panel.visonic_alarm
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.jour_travail
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.lave_linge
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.alerte_chaudiere
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.workday_sensor
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.updater
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.porte_garage
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.rpi_power_status
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.telephone_elodie_en_charge
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.nas_loic_security_status
2020-12-21 16:57:26 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.nas_loic_update_available

I can send you my entiere log if you wont ?!

Thank you.

This has probably been asked but I can’t find anything - is there a way to manually trigger the alarm to siren? It’d be useful to integrate my non-Visonic PIRs as automations to trigger the alarm. I’m guessing it’s not possible but thought it was worth asking.

Hi,
No need to send the whole log file yet, what I can tell you from what you have uploaded so far is:

  • This is trivial but you do not set the xml log file to the template. Set the xml log file to something else such as panel_log.xml. The integration uses the template file to create panel_log.xml as a jinja2 template
  • Apart from that your startup looks OK, I can only see to part way downloading the EPROM but I assume it finishes OK.
  • Your second part of the log file showing the disconnection. There is a definitely a disconnection in the communication, it would be good to see a few minutes before the 2020-12-21 16:57:03 time but the integration definitely loses the ethernet tcp connection. First of all the integration declares a response time expired problem 2020-12-21 16:57:13 i.e. we have sent a request for data to the alarm panel and not received that data. The underlying python library for the ethernet connection then states that it has timed out and the connection is broken at 2020-12-21 16:57:14, this causes an exception where the integration tries to reconnect to your panel. I cannot tell whether this happens as I don’t have the remainder of the log file.

Are you using wifi, if so then I believe that the wifi is disconnecting. I’m sorry but I don’t know what else to suggest.
:slight_smile:

It has been asked before and I do not believe there is a way to trigger the external siren. Other plugins/integrations for other systems (such as Vera) cannot do this either as far as I’m aware.

There is a sort of a way that’s cheating :wink:.
Buy a device that you can control from within Home Assistant that is a relay. You can use this relay across one of the hardwired inputs to your panel (as a wired sensor) with the appropriate resistors. Configure your alarm panel to treat this as an immediate alarm state.
When you want to sound the external siren, simply trigger this relay. Hope this makes sense
:slight_smile:

Your theory was probably correct, I ended up changing the setup and I’m now using esp-link.
So far it’s working pretty well. :+1:

yes I use wifi. I use a wemos d1 r2 (esp_link) + arduino assembly to make the connection with the alarm.


I put a device_tracker on the wemos wifi connection and I don’t seem to have an interruption.

A restart of homeassistant is enough to reconnect with the alarm.
The service visonic.alarm_panel_reconnect is not working.
Is there an easier solution to reactivate the connection without restarting HA?

OK

Please set your logger settings to debug, try calling the service and then upload a log file so I can see what is going wrong.

I don’t think so, no.
:slight_smile:

Hi Daves
First, I want to say: good job !, I’m using your Visonic integration and it’s amazing !
I’m trying to solve a problem very similar to Loic_Mounier.
The only difference is : the panel is connected with Serial to Ethernet Adaptater (an USR-TCP232).

Actually I can’t reconnect using the service: visonic.alarm_panel_reconnect.

If you have any suggestion…

Here is my log:

2021-01-02 18:47:59 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] User has requested visonic panel reconnection
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Request to Stop the Comms and it is already stopped
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Request to Stop the HA alarm_control_panel and it is already stopped
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] ........... attempting connection
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Found existing HA alarm_control_panel ['alarm_control_panel.visonic_alarm']
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client]     Checking HA Alarm ID: alarm_control_panel.visonic_alarm
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client]        ***** Matched - Alarm Control Panel already exists so keep it ***** : alarm_control_panel.visonic_alarm
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.updater
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.rpi_power_status
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.portail
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.bravia_4k_2015_is_charging
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Sensor ID: binary_sensor.snapshots_stale
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Switch ID: switch.portail
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Switch ID: switch.server_fan_relay
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Switch ID: switch.adguard_protection
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Switch ID: switch.adguard_filtering
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Switch ID: switch.adguard_parental_control
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Switch ID: switch.adguard_safe_browsing
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Switch ID: switch.adguard_safe_search
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Checking HA Entity Switch ID: switch.visonic_pgm
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] connect_to_alarm self.config = {'type': 'ethernet', 'host': '192.168.0.20', 'port': '12571', 'language': 'FR', 'download_code': 'AAAA', 'force_standard': False, 'force_autoenroll': True, 'sync_time': True, 'exclude_sensor': [], 'exclude_x10': [], 'motion_off': 120, 'siren_sounding': ['intruder', 'tamper', 'panic'], 'override_code': '9999', 'arm_without_usercode': True, 'force_numeric_keypad': False, 'arm_away_instant': False, 'arm_home_instant': False, 'allow_remote_arm': True, 'allow_remote_disarm': True, 'allow_sensor_bypass': False, 'panellog_logentry_event': True, 'panellog_complete_event': True, 'panellog_reverse_order': False, 'panellog_csv_add_title_row': True, 'panellog_max_entries': 10000, 'panellog_csv_filename': '', 'panellog_xml_filename': ''}
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] Visonic Connection Device Type is ethernet {<PYVConst.DownloadCode: 0>: 'AAAA', <PYVConst.ForceStandard: 15>: False, <PYVConst.ForceAutoEnroll: 1>: True, <PYVConst.AutoSyncTime: 2>: True, <PYVConst.PluginLanguage: 3>: 'FR', <PYVConst.EnableRemoteArm: 4>: True, <PYVConst.EnableRemoteDisArm: 5>: True, <PYVConst.EnableSensorBypass: 6>: False, <PYVConst.MotionOffDelay: 7>: 120, <PYVConst.OverrideCode: 8>: '9999', <PYVConst.ForceKeypad: 9>: False, <PYVConst.ArmWithoutCode: 10>: True, <PYVConst.SirenTriggerList: 11>: ['intruder', 'tamper', 'panic'], <PYVConst.B0_Enable: 12>: False, <PYVConst.B0_Min_Interval_Time: 13>: 5, <PYVConst.B0_Max_Wait_Time: 14>: 30}
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] [Settings] Log Max Entries   10000
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] [Settings] Log Reverse       False
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] [Settings] Log Create Event  True
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] [Settings] Log Final Event   True
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] [Settings] Log XML Filename  
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] [Settings] Log CSV Filename  
2021-01-02 18:48:01 DEBUG (MainThread) [custom_components.visonic.client] [Settings] Log CSV title Row True
2021-01-02 18:48:01 DEBUG (MainThread) [pyvisonic] Setting TCP socket Options
2021-01-02 18:48:01 DEBUG (MainThread) [pyvisonic] Setting TCP socket Options Exception [Errno 111] Connection refused
2021-01-02 18:48:01 WARNING (MainThread) [custom_components.visonic.client] Failed to connect into Visonic Alarm. Check Settings.
2021-01-02 18:48:16 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2021-01-02 18:48:16 DEBUG (MainThread) [pyvisonic] [handle_msgtypeA5] Parsing A5 packet 00 02 00 00 00 00 02 00 00 00 43 
2021-01-02 18:48:16 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-01-02 18:48:16 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?)
2021-01-02 18:48:23 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2021-01-02 18:48:23 DEBUG (MainThread) [pyvisonic] [handle_msgtypeA5] Parsing A5 packet 00 02 00 00 00 00 02 00 00 00 43 
2021-01-02 18:48:23 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-01-02 18:48:23 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?)
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XAB
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic] [handle_msgtypeAB]  data 03 00 1e 00 31 2e 31 34 00 00 43 
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic] [handle_msgtypeAB] ***************************** Got PowerLink Keep-Alive ****************************
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic] =============================================== Display Status ===============================================
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic]      key 0  Sensor id=1  dname=Z01  stype=Motion   zname=Front door     ztypeName=Intérieure ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic]      key 1  Sensor id=2  dname=Z02  stype=Motion   zname=Living room    ztypeName=Intérieure ztamper=0  ztrip=0  bypass=0  lowbatt=1  status=0  tamper=0  enrolled=1  triggered=0 
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic]      key 2  Sensor id=3  dname=Z03  stype=Motion   zname=Custom 1       ztypeName=Intérieure ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic]      key 3  Sensor id=4  dname=Z04  stype=Motion   zname=Bedroom        ztypeName=Intérieure ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic]      key 4  Sensor id=5  dname=Z05  stype=Motion   zname=Garage         ztypeName=Voie Périp ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic]      key 5  Sensor id=6  dname=Z06  stype=Motion   zname=Custom 2       ztypeName=Voie Périp ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic]    Model PowerMax Pro Part      PowerMaster No                     LastEvent Rétablissement Supervision (Active) / Zone 06     Ready   Yes          
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic]    Mode  Powerlink              Status      Désarmé                Armed     No                     Trouble None              AlarmStatus None        
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic] ==============================================================================================================
2021-01-02 18:48:29 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-01-02 18:48:47 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2021-01-02 18:48:47 DEBUG (MainThread) [pyvisonic] [handle_msgtypeA5] Parsing A5 packet 00 04 00 25 02 05 00 00 22 00 43 
2021-01-02 18:48:47 DEBUG (MainThread) [pyvisonic] [handle_msgtypeA5]      log: Disarmed(Désarmé), arm: Disarmed
2021-01-02 18:48:47 DEBUG (MainThread) [pyvisonic] [handle_msgtypeA5]      Zone Event
2021-01-02 18:48:47 DEBUG (MainThread) [pyvisonic] [handle_msgtypeA5]            Zone: 2    Type: 5, Violation (Mouvement)
2021-01-02 18:48:47 DEBUG (MainThread) [custom_components.visonic.client] Visonic update event 1 {'Zone': 2, 'Event': 5, 'Description': 'Violation (Mouvement)', 'condition': 1}
2021-01-02 18:48:47 DEBUG (MainThread) [pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-01-02 18:48:47 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?)
2021-01-02 18:48:47 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?)
2021-01-02 18:48:47 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as armcode is none (panel starting up?)
2021-01-02 18:48:59 DEBUG (MainThread) [pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XAB
2021-01-02 18:48:59 DEBUG (MainThread) [pyvisonic] [handle_msgtypeAB]  data 03 00 1e 00 31 2e 31 34 00 00 43 
2021-01-02 18:48:59 DEBUG (MainThread) [pyvisonic] [handle_msgtypeAB] ***************************** Got PowerLink Keep-Alive ****************************