davesmeghead / visonic

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

MP-902 PG2 sensor, unknown device #32

Closed aderumier closed 3 years ago

aderumier commented 3 years ago

Hi,

thanks for your integration !

I'm using a powermaster 33 with 0.6.8

but it seem that sensors MP-902 PG2 are not correctly detected https://catalog.visonic.com/fr/powermaster/intrusion-detectors-outdoor/148/

device is show as unknown model

(I have other sensors models like SD-304 PG2, MP-802 PG2, and they are correctly detected)

debug log:

2021-04-27 13:40:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0XB0     pmIncomingPduLen 14
2021-04-27 13:40:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_validatePDU] Validated a Packet with a checksum that is 1 more than the actual checksum!!!! 10 and 9
2021-04-27 13:40:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0] Received PowerMaster33 message 3/57 (len = 6)    full data = 03 39 06 ff 08 ff 01 59 5e 43 
2021-04-27 13:40:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]      Sending special PowerMaster33 Commands to the panel
2021-04-27 13:40:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-04-27 13:40:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 1
2021-04-27 13:40:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Powermaster Command)    raw data 0d b0 01 04 06 02 ff 08 03 00 00 43 f3 0a    waiting for message response ['0XB0']
2021-04-27 13:40:00 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype02] Ack Received  data = 43 
2021-04-27 13:40:01 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0XB0     pmIncomingPduLen 77
2021-04-27 13:40:01 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0XB0 got it so removed from list, list is now []
2021-04-27 13:40:01 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0XB0 resetting expected response counter, it got up to 0
2021-04-27 13:40:01 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0] Received PowerMaster33 message 3/4 (len = 69)    full data = 03 04 45 ff 08 03 40 11 08 08 11 08 15 11 04 08 15 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5f 43 
2021-04-27 13:40:01 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]         Received PowerMaster33 message, continue
2021-04-27 13:40:01 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]         Checking if time delay is within 5 seconds
2021-04-27 13:40:01 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0XB0     pmIncomingPduLen 14
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_validatePDU] Validated a Packet with a checksum that is 1 more than the actual checksum!!!! 8 and 7
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0] Received PowerMaster33 message 3/57 (len = 6)    full data = 03 39 06 ff 08 ff 01 59 60 43 
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]      Sending special PowerMaster33 Commands to the panel
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 1
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Powermaster Command)    raw data 0d b0 01 04 06 02 ff 08 03 00 00 43 f3 0a    waiting for message response ['0XB0']
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype02] Ack Received  data = 43 
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0XB0     pmIncomingPduLen 77
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0XB0 got it so removed from list, list is now []
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0XB0 resetting expected response counter, it got up to 0
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0] Received PowerMaster33 message 3/4 (len = 69)    full data = 03 04 45 ff 08 03 40 11 08 08 11 08 15 11 04 08 15 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 61 43 
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]         Received PowerMaster33 message, continue
2021-04-27 13:40:14 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]         Checking if time delay is within 5 seconds
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_validatePDU] Validated a Packet with a checksum that is 1 more than the actual checksum!!!! 43 and 42
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeAB]  data 03 00 1e 00 32 2e 31 34 00 00 43 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeAB] ***************************** Got PowerLink Keep-Alive ****************************
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic] =============================================== Display Status ===============================================
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 0  Sensor id=1  dname=Z01  stype=Shock    zname=Attic          ztypeName=Delay 1    ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 1  Sensor id=2  dname=Z02  stype=Shock    zname=Back door      ztypeName=Delay 1    ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 2  Sensor id=3  dname=Z03  stype=Shock    zname=Garage door    ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 3  Sensor id=4  dname=Z04  stype=Shock    zname=Custom 1       ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 4  Sensor id=5  dname=Z05  stype=Shock    zname=Custom 2       ztypeName=Perimeter  ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 5  Sensor id=6  dname=Z06  stype=Motion   zname=Attic          ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 6  Sensor id=7  dname=Z07  stype=Motion   zname=Hall           ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 7  Sensor id=8  dname=Z08  stype=Motion   zname=Emergency      ztypeName=Interior   ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 8  Sensor id=9  dname=Z09  stype=Unk 15   zname=Master bathroo ztypeName=Perimeter  ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 9  Sensor id=10 dname=Z10  stype=Unk 15   zname=Master bathroo ztypeName=Perimeter  ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]      key 10 Sensor id=11 dname=Z11  stype=Unk 15   zname=Master bathroo ztypeName=Perimeter  ztamper=0  ztrip=0  bypass=0  lowbatt=0  status=0  tamper=0  enrolled=1  triggered=0 
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]    Model PowerMaster33          PowerMaster Yes                    LastEvent None                   Ready   Yes          
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic]    Mode  Powerlink              Status      Disarmed               Armed     No                     Trouble None              AlarmStatus None        
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic] ==============================================================================================================
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-04-27 13:40:15 DEBUG (MainThread) [custom_components.visonic.client] No Code Required as powerlink or std plus ********
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0XB0     pmIncomingPduLen 14
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_validatePDU] Validated a Packet with a checksum that is 1 more than the actual checksum!!!! 6 and 5
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0] Received PowerMaster33 message 3/57 (len = 6)    full data = 03 39 06 ff 08 ff 01 59 62 43 
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]      Sending special PowerMaster33 Commands to the panel
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 1
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Powermaster Command)    raw data 0d b0 01 04 06 02 ff 08 03 00 00 43 f3 0a    waiting for message response ['0XB0']
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype02] Ack Received  data = 43 
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0XB0     pmIncomingPduLen 77
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0XB0 got it so removed from list, list is now []
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0XB0 resetting expected response counter, it got up to 0
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0] Received PowerMaster33 message 3/4 (len = 69)    full data = 03 04 45 ff 08 03 40 11 08 08 11 08 15 11 04 08 15 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 43 
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]         Received PowerMaster33 message, continue
2021-04-27 13:40:19 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]         Checking if time delay is within 5 seconds
2021-04-27 13:40:20 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-04-27 13:40:23 DEBUG (MainThread) [custom_components.visonic.client] No Code Required as powerlink or std plus ********
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0XB0     pmIncomingPduLen 14
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_validatePDU] Validated a Packet with a checksum that is 1 more than the actual checksum!!!! 4 and 3
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0] Received PowerMaster33 message 3/57 (len = 6)    full data = 03 39 06 ff 08 ff 01 59 64 43 
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]      Sending special PowerMaster33 Commands to the panel
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Resetting expected response counter, it got to 0   Response list length before 0  after 1
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Powermaster Command)    raw data 0d b0 01 04 06 02 ff 08 03 00 00 43 f3 0a    waiting for message response ['0XB0']
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtype02] Ack Received  data = 43 
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] Variable length Message Being Received  Message Type 0XB0     pmIncomingPduLen 77
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0XB0 got it so removed from list, list is now []
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [data receiver] msgType 0XB0 resetting expected response counter, it got up to 0
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0] Received PowerMaster33 message 3/4 (len = 69)    full data = 03 04 45 ff 08 03 40 11 08 08 11 08 15 11 04 08 15 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 43 
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]         Received PowerMaster33 message, continue
2021-04-27 13:40:33 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [handle_msgtypeB0]         Checking if time delay is within 5 seconds
2021-04-27 13:40:34 DEBUG (MainThread) [custom_components.visonic.pyvisonic] [_sendPdu] Sending Command (Ack Long)    raw data 0d 02 43 ba 0a    waiting for message response []
  q^[[A^C
davesmeghead commented 3 years ago

With a PowerMaster panel I need to add specific sensors as people such as you tell me about them.
I have added the MP-902 and it will be in the next release.

aderumier commented 3 years ago

Thanks !

aderumier commented 3 years ago

@davesmeghead I have tested your last patch, my MP-902 PG2 works perfectly ! Thanks again !