Visonic Powermax and Powermaster Component

Well i kind of gave up after testing with alot of other stuff aswell, PC, powermaster remote software, usb-serial cable and stuff.

But today im at it again and it seems i have it working now. Combination of bad breadboard setup (not a good connection) and wrong settings in ESP-LINK was the problem.

Now i have a connection and just received this error in the log. Dont know why yet. Any ideas? :slight_smile:

Edit: I should mention that my alarm is an early version of PM30 , my firmware is version 13. It doenst offically support powerlink3 at all.

Full log - https://pastebin.com/fqmQrkXJ

2020-01-02 17:30:42 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected due to exception Same Packet for 20 times in a row
2020-01-02 17:30:47 ERROR (MainThread) [custom_components.visonic.pyvisonic]                         Calling Exception handler.
2020-01-02 17:30:47 ERROR (MainThread) [custom_components.visonic] PyVisonic has caused an exception Same Packet for 20 times in a row
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format number *****************************
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response ['0X3F']
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=False    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 00 04 00 05 00 00 00 07 00 00 43 
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5]      Got A5 04 message, resetting watchdog
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5]      Zone Event sysStatus 0x0   sysFlags 0x5   eventZone 0   eventType 0   x10status 0x0
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5]      log: Disarmed(Disarmed), arm: Disarmed
2020-01-02 17:30:42 INFO (MainThread) [custom_components.visonic] Exclude sensor list = []     Exclude x10 list = []
2020-01-02 17:30:42 INFO (MainThread) [custom_components.visonic] Visonic update event 1
2020-01-02 17:30:42 INFO (SyncWorker_7) [custom_components.visonic.alarm_control_panel] alarm control panel received update event
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format called *****************************
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format number *****************************
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response ['0X3F']
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=False    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 00 04 00 05 00 00 00 07 00 00 43 
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5]      Got A5 04 message, resetting watchdog
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5]      Zone Event sysStatus 0x0   sysFlags 0x5   eventZone 0   eventType 0   x10status 0x0
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5]      log: Disarmed(Disarmed), arm: Disarmed
2020-01-02 17:30:42 INFO (MainThread) [custom_components.visonic] Exclude sensor list = []     Exclude x10 list = []
2020-01-02 17:30:42 INFO (MainThread) [custom_components.visonic] Visonic update event 1
2020-01-02 17:30:42 INFO (SyncWorker_0) [custom_components.visonic.alarm_control_panel] alarm control panel received update event
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format called *****************************
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format number *****************************
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response ['0X3F']
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=False    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 17:30:42 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_packet] Had the same packet for 20 times in a row : 0d a5 00 04 00 05 00 00 00 07 00 00 43 07 0a 
2020-01-02 17:30:42 ERROR (MainThread) [custom_components.visonic.pyvisonic] ERROR Connection Lost : disconnected due to exception Same Packet for 20 times in a row
2020-01-02 17:30:47 ERROR (MainThread) [custom_components.visonic.pyvisonic]                         Calling Exception handler.
2020-01-02 17:30:47 ERROR (MainThread) [custom_components.visonic] PyVisonic has caused an exception Same Packet for 20 times in a row

Well done for persevering.
When I was developing the component and was connecting and disconnecting to the panel lots and lots then sometimes the panel would do this. I suggest you leave it alone for an hour or so and try again.
I wondered if the panel has a mechanism to deny access as whatever I did the panel just kept sending me that message continually.

Ok, thanks. Its working fine in forced standard mode, but that doesnt seem to collect names and such. What else am i loosing by using standard mode?
You don’t think it’s my low firmware causing this issue then?

I’ll let it sit for a couple off hours then restart HA.

Edit: Restarted and removed your experimental fix. b0 stuff
#b0_enable_motion_processing: ‘yes’
#b0_min_time_between_triggers: 30
#b0_max_time_for_trigger_event: 5

Now it seems like the system survives in powerlink mode.

2020-01-02 22:53:09 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XAB
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeAB]  data 03 00 1e 00 31 2e 32 37 00 00 43 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeAB] ***************************** Got PowerLink Keep-Alive ****************************
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic] =============================================== Display Status ===============================================
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 0  Sensor id=1  dname=Z01  stype=Magnet   zname=Front door     ztypeName=Delay 1    ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 1  Sensor id=2  dname=Z02  stype=Motion   zname=Hall           ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 2  Sensor id=3  dname=Z03  stype=Motion   zname=Downstairs     ztypeName=Delay 1    ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 3  Sensor id=4  dname=Z04  stype=Magnet   zname=Garage door    ztypeName=Delay 2    ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 4  Sensor id=5  dname=Z05  stype=Magnet   zname=Master bedroom ztypeName=Perimeter  ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 5  Sensor id=6  dname=Z06  stype=Magnet   zname=Living room    ztypeName=Perimeter  ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 6  Sensor id=7  dname=Z07  stype=Magnet   zname=Attic          ztypeName=Perimeter  ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 7  Sensor id=8  dname=Z08  stype=Camera   zname=Custom 1       ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 8  Sensor id=9  dname=Z09  stype=Motion   zname=Upstairs       ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 9  Sensor id=10 dname=Z10  stype=Motion   zname=Garage         ztypeName=Home Delay ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 10 Sensor id=11 dname=Z11  stype=Motion   zname=Play room      ztypeName=Home Delay ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]    Model PowerMaster30          PowerMaster Yes                    LastEvent Installer Programming / System      Ready   Yes          
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic]    Mode  Powerlink              Status      Disarmed               Armed     No                     Trouble None              AlarmStatus None        
2020-01-02 22:53:09 INFO (MainThread) [custom_components.visonic.pyvisonic] ==============================================================================================================
2020-01-02 22:53:09 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Resetting expected response counter, it got to 25   Response list before 0  after 2
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.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-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0X2 got it so removed from list, list is now ['0XA5']
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype02] Ack Received  data = 43 
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0XA5 got it so removed from list, list is now []
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0XA5 resetting expected response counter, it got up to 0
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 01 00 00 00 00 00 00 00 00 43 
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Zone Alarm Status
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 02 00 00 00 00 00 00 00 00 43 
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 03 88 00 00 00 00 00 00 00 43 
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5]      Trigger (Inactive) Status Zones 32-01: 00000000000000000000000010001000
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 04 00 05 00 00 00 03 00 00 43 
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5]      Zone Event sysStatus 0x0   sysFlags 0x5   eventZone 0   eventType 0   x10status 0x0
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5]      log: Disarmed(Disarmed), arm: Disarmed
2020-01-02 22:53:34 INFO (MainThread) [custom_components.visonic] Exclude sensor list = []     Exclude x10 list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
2020-01-02 22:53:34 INFO (MainThread) [custom_components.visonic] Visonic update event 1
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:34 INFO (SyncWorker_9) [custom_components.visonic.alarm_control_panel] alarm control panel received update event
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format called *****************************
2020-01-02 22:53:34 DEBUG (MainThread) [custom_components.visonic.alarm_control_panel] code format none as powerlink or standard plus *****************************
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 05 00 00 02 03 03 00 00 00 43 
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 06 ff 07 00 00 00 00 00 00 43 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic] =============================================== Display Status ===============================================
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 0  Sensor id=1  dname=Z01  stype=Magnet   zname=Front door     ztypeName=Delay 1    ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 1  Sensor id=2  dname=Z02  stype=Motion   zname=Hall           ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 2  Sensor id=3  dname=Z03  stype=Motion   zname=Downstairs     ztypeName=Delay 1    ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 3  Sensor id=4  dname=Z04  stype=Magnet   zname=Garage door    ztypeName=Delay 2    ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 4  Sensor id=5  dname=Z05  stype=Magnet   zname=Master bedroom ztypeName=Perimeter  ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 5  Sensor id=6  dname=Z06  stype=Magnet   zname=Living room    ztypeName=Perimeter  ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 6  Sensor id=7  dname=Z07  stype=Magnet   zname=Attic          ztypeName=Perimeter  ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 7  Sensor id=8  dname=Z08  stype=Camera   zname=Custom 1       ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 8  Sensor id=9  dname=Z09  stype=Motion   zname=Upstairs       ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 9  Sensor id=10 dname=Z10  stype=Motion   zname=Garage         ztypeName=Home Delay ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]      key 10 Sensor id=11 dname=Z11  stype=Motion   zname=Play room      ztypeName=Home Delay ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]    Model PowerMaster30          PowerMaster Yes                    LastEvent Installer Programming / System      Ready   Yes          
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic]    Mode  Powerlink              Status      Disarmed               Armed     No                     Trouble None              AlarmStatus None        
2020-01-02 22:53:35 INFO (MainThread) [custom_components.visonic.pyvisonic] ==============================================================================================================
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 07 00 00 00 00 00 03 10 00 43 
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 08 00 00 00 00 00 00 00 00 43 
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 09 00 00 00 00 00 00 00 00 43 
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 0a 00 00 00 00 00 00 00 00 43 
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:35 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 0b 00 00 00 00 00 00 00 00 43 
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 0c 00 00 00 00 00 00 00 00 43 
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 0d 00 00 00 00 00 00 00 00 43 
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 0e 00 00 00 00 00 00 00 00 43 
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [Sending ack] PowerlinkMode=True    Is PM Ack Reqd=True    This is an Ack for message=0XA5
2020-01-02 22:53:36 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeA5] Parsing A5 packet 10 0f 00 00 00 00 00 00 00 00 43 

That’s good news, really well done. I took a more detailed look at your log file and the panel did some unexpected responses, in particular it missed an acknowledge to one of my message to it. This caused a panel timeout.

I’ve uploaded 0.3.4.11 to Github to make the timeout message processing during EPROM download better (this will have no effect on B0 message processing).

Can you please install 0.3.4.11 and put back the B0 experimental fix (if you’re OK with that) and restart. I’d like to make certain that the B0 stuff isn’t associated with the problem that you’re seeing. Hopefully it will still go to powerlink mode :smile:

Yeah, sure. But that’s for tomorrow. Need to get some sleep before work… I’ll be back!
Thanks for the quickfix, i love quickfixes :slight_smile:

In fact i am skeptical with a relation between B0 and PIR sensors, powermaster doc says PIR inactivity is a feature mainly intended for the elderly.
Coupled with a remote monitoring service center, this alerts the center when too long inactivity is detected (5 min, 1 hour, 6 hours …). This is based on the principle that several PIRs are installed at strategic passage locations where the person is likely to pass regularly.

Don’t know if it can help, could be just a wrong path, but digging a bit a different way i share my thoughts.
I’ve extracted strings from powermaster remote programmer exe, pdb and dll files and greping for B0 string, here are “relevants” datas:

/cygdrive/c/Program Files (x86)/Visonic Ltd/PowerMaster Remote Programmer
$ strings PMax2010.pdb|grep B0
enroll_p2_B0_functions
SerialPacket::get_B0_info
??_C@_0CI@HCBPHCEB@?2StringFileInfo?2040904B0?2Product@
__imp_?get_B0_info@SerialPacket@@QBEXAAE00@Z
?enroll_p2_B0_functions@@YAXXZ
MCODE_B0_LOCATION
B0_MESSAGE_SENT_OK
B0_MESSAGE_SENT_FAILURE
enroll_p2_B0_functions
?get_B0_info@SerialPacket@@QBEXAAE00@Z
MCODE_B0_LOCATION
MAX_B0_TLV_LENGTH
check_correctness_of_B0_command
get_B0_info
get_B0_info_ind_eprom_cmd_index
build_B0_msg
MCODE_B0_TLV
B0_MESSAGE_SENT_OK
B0_MESSAGE_SENT_FAILURE

Seems to be an enrollement process for that mysterious B0.

Then greped for enrolled keyword :

$  strings * |grep enrolled
GSM enrolled
Expander enrolled
...
In order that the control panel and the PowerMax Remote Programmer will recognize the Keyfob transmitters, each one must be enrolled in the system, and linked to a specific ordinal number between 1 and 8. Keyfob initiated events are subsequently identified and registered with reference to these numbers.
This table displays the keyfob ordinal number, the name of the user carrying this transmitter, indication whether the keyfob has been enrolled, the keyfob ID, the keyfob sync. counter and the keyfob sync. backup.
The keyfob transmitter that is to be enrolled and sent to the customer.
 Remember the keyfob number you enrolled the keyfob to.
Write down the keyfob ID, the sync. counter and the sync. counter backup numbers displayed on the screen next to the keyfob number you enrolled the keyfob to, in the Keyfob Enrollment table.
enrolled degraded device
known(old) device is asking to be enrolled
No enrolled/PreEnrolled devices for this  table !
Sorry cannot enrolled in armming state !
Expander enrolled
enrolled device
...
m_all_zones_enrolled
m_all_sirens_enrolled
m_all_repeaters_enrolled
m_all_keyfobs_enrolled
m_all_keypads_enrolled
m_all_proxy_tag_enrolled
m_GIVE_type_zone_GET_enrolled_t
m_GIVE_type_zone_GET_pre_enrolled_t
m_type_zone_get_enrolled
m_type_zone_get_pre_enrolled
m_enrolledStatus

@davesmeghead, do i’m wrong saying that this integration is only about sensors and panel ? But what about non sensor/zone visonic devices like keyfobs, keypads… Do you manage and just ignore them or are they unmanaged yet and could lead to unknown messages ?

Just an idea but couldn’t we share what kind of those devices we own in our installation and try to see if some non sensor devices can be in common and maybe related to that B0 ?

Personnaly i’ve got 2 keyfobs(no keypad) and from what i can see on their tiny screen is that communcation with my panel do exist as they both reports arming state, independently which keyfob or direct action on panel was used, they also report panel communication loss on screen.

Edit: Or I am totally wrong and B0 do is that PIR inactivity feature(min inactivity delay seems to be 5min before reporting if enable)

Hi Dave. have tried experimenting with the b0 code and get the following error…

Error doing job: Exception in callback SerialTransport._read_ready()

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.7/site-packages/serial_asyncio/__init__.py", line 106, in _read_ready
    self._protocol.data_received(data)
  File "/config/custom_components/visonic/pyvisonic.py", line 1323, in data_received
    self.handle_received_byte(databyte)
  File "/config/custom_components/visonic/pyvisonic.py", line 1423, in handle_received_byte
    self.packet_callback(self.ReceiveData)
  File "/config/custom_components/visonic/pyvisonic.py", line 2394, in handle_packet
    self.handle_msgtypeB0(packet[2:-2])
  File "/config/custom_components/visonic/pyvisonic.py", line 3183, in handle_msgtypeB0
    if not self.pmSensorDev_t[key].triggered:
NameError: name 'key' is not defined

Oh yeah, sorry but it’s my fault. I’ve uploaded 0.3.4.12 to Github, please try that instead.

That’s what we’re experimenting for, I’m still hopeful that the B0 messages could indicate PIR motion activity.

This PowerMaster function could be the reason for some of the B0 messages that we see that I don’t understand. Especially the enroll_p2_B0_functions function. p2 sould be powerlink2 maybe.

I’ve done this in the past (grepped .exe files etc) and you could be right about the B0 enrollment.
There is only 1 proper way to find out and it’s expensive. With a PowerMaster, buy and install a Powerlink3, then hook up 2 wires to the Rx and Tx lines between the panel and the powerlink to receive all the data that passes between the 2 devices. Only then could we analyse the data going to/from the panel/powerlink3. But I can’t see anyone buying a Powerlink3 just to do that, as to then use it with HA you would be throwing away the Powerlink3.
Apart from doing this we can only guess the B0 protocol handling to/from the panel.

So far the Component tells HA about the sensors, the state of the alarm panel itself and any X10 switches. I do get the information that there are Keypads and Sirens but I do not get a status for them, I know that they exist but nothing else. I can see in my own log file that I have 1 keypad and 1 siren, I can see that Chris has 1 keypad and 2 sirens. I know how to get a list of keyfobs but I removed that code as it’s useless, as there are no state messages. If you can work out the status messages then we can use them. We also have to consider what would you do with them in HA?
By the way, you can already see which keyfob is used to arm/disarm the panel so if you and your familly members have different keyfobs you can tell who did what.

It does look like B0 “03 04” messages are used to indicate PIR motion, but we’ll see what happens over the next few days/weeks for those that are experimenting and see if it is a reliable way to do it.

I suppose this assumes Powerlink 3 is plaintext. If ciphertext, it’ll be practically impossible. Have you captured any communication?

Agreed but I would assume plaintext as it’s all inside the physical panel case. Also the PowerLink3 works with PowerMax panels, although it does state that they must have a recent firmware!

Ah … No :rofl: I have never owned a PowerLink!

Ugh. I thought perhaps you could get into that mode.

Just so we’re not confused here, I have got my Component to connect to the panel using the Powerlink protocols, I have never had a real physical Powerlink hardware attached.

A powerlink3 module, as per the instructions has to connect to the visonic server
“System accessible via Visonic mobile app (Visonic-GO) via the PowerManagesever”

That clarifies things a bit. So, the module converts from one protocol to another. I would assume there’s a security layer somewhere in the path.

Still, there’s likely a way to get the info we need from the regular PowerLink protocol. If only we had a protocol spec. Unfortunately, it’s like being in hell and asking for ice water.

Yes. If you look here for an overview of the powerlink (hardware/firmware) modules, their history and where they are now. The 10 pin ICD connector connects to the panel connector that we do and the ethernet connects to your router and out to the visonic server (I assume in Israel but it could be anywhere I guess). The Powerlink2 has a built in webserver but Powerlink3 doesn’t, it can only connect to Visonics server.

Haha yeah. I see why they don’t make it public though. It is propriatary and they don’t want other companies copying their products and also it is an alarm system, I wouldn’t make the protocols public.

After a bit more digging, the Powerlink3 connects to a Powermanage Platform
This could be the visonic cloud server or anyone could set this up. Anyway, the comms between the powerlink3 and this platform is using SSL protocols.

1 Like

This is the type of situation where having a large installed base of HA systems can be beneficial. The obvious goal is to increase sales for hardware and system vendors. Unfortunately, the opposite is happening as vendors such as Nest and Ubiquity are retreating from letting others access their APIs.

Just thought I’d post an update …

I played around with the code some more and was able to get stability in the end :slight_smile:

As of this morning, test.py has been running for nearly 8 days solid, in Powerlink mode. Prior to that I had 3 or 4 days in Standard Plus mode too.

7 days, 21:50:37.844026 < 3258>     INFO      Model PowerMax+              PowerMaster No                     LastEvent Auto Test / System      Ready   Yes          
7 days, 21:50:37.844255 < 3260>     INFO      Mode  Powerlink              Status      Disarmed               Armed     No                     Trouble None              AlarmStatus None        
7 days, 21:50:37.844482 < 3261>     INFO   ==============================================================================================================
7 days, 21:50:37.845036 < 1578>    DEBUG   [pmSendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []

I have been running 0.3.4.9 as a base, with the following diff being the changes that I made.

root@ahs7 /usr/src/visonic/custom_components/visonic # diff pyvisonic.py ../../../visonic_0.3.4.9_STABLE/custom_components/visonic/pyvisonic.py 
1252c1252
<                 if not self.pmPowerlinkMode:
---
>                 #if not self.pmPowerlinkMode:
1254c1254
<                     self.SendCommand("MSG_ALIVE")
---
>                     #self.SendCommand("MSG_ALIVE")
1261c1261,1262
<                         self.SendCommand("MSG_RESTORE")  # 
---
>                       log.debug("*******************************NOT SENDING MSG RESTORE*********************************")
>                         #self.SendCommand("MSG_RESTORE")  # 
1263a1265,1268
>                 else:
>                     if not self.pmPowerlinkMode:
>                         # Send I'm Alive and request status
>                         self.SendCommand("MSG_ALIVE")

In Standard / Standard Plus mode a MSG_STATUS is sent on every 3rd iteration of the loop, in addition to the MSG_ALIVE, so I made the MSG_STATUS instead of the MSG_ALIVE on that third iteration.

Then in Powerlink mode, every 3rd iteration of the loop sends a MSG_RESTORE. I stopped it from doing that as it doesn’t seem to be needed to repeatedly tell it to “restore” if the panel was already in Powerlink mode (I think this now matches the Vera / openLuup plugin behaviour).

Both these changes seem to have stabilised things for me, perhaps something was getting overloaded specifically with my panel or RS232 converter. In the end the changes I made were pretty minimal as can be seen from the diff.

Today I’ve stopped test.py and moved my changes over to the HA install on Docker and restarted it. Based on the test.py results I believe that this will remain stable now too.

That’s really good news.
I’ve just uploaded 0.3.4.14 to Github, can you all please give it a try. I uploaded 0.3.4.13 yesterday but didn’t tell anyone here as Martyn made his post.

So, changes since 0.3.4.12 are mainly:

  1. Added the record pmLogPowerMasterUser_t in the code (for you coders to look at). This provides the correct information for PowerMaster users for the source of events. I tried to do the Dutch and French translations from the info I had in the PowerMax code, this might need correcting.
  2. Some subtle changes/fixes/additions to the same information used for PowerMax sources of events. I renamed the record to pmLogPowerMaxUser_t in the code.
  3. I have made most of the changes proposed by martynwendon, can you test it. I’ve left Message Restore in powerlink for PowerMaster users as at the moment some users rely on this to get the state of the PIR sensors.

No changes to the Experimental B0 processing as I’m waiting on feedback over the next few days/weeks to make sure that it’s reliable and consistent.

It’s working well. Triggered to notification in HA is very quick and transition to ‘clear’ state is consistently just over 2 minutes. For a feature I thought was unavailable to me, it’s working remarkably well. :clap: