Merci pour ces réponses.
J’ai fait qq modifs, je n’ai pas touché au type Statut pour le passer en binaire pour le moment, je verrais quand les commandes seront ok.
Donc de manière visuelle, voici ce que j’ai fait :
Et voici le log (j’ai utilisé le bouton de test sur le capteur, a priori, c’est la commande qui termine en 079)
[2022-09-09 18:23:21][DEBUG] : Message: 082004000c0d2d8079
[2022-09-09 18:23:21][DEBUG] : Decode : 082004000c0d2d8079
[2022-09-09 18:23:21][DEBUG] : Test message: 082004000c0d2d8079
[2022-09-09 18:23:21][DEBUG] : PacketType: 0x20
[2022-09-09 18:23:21][DEBUG] : Length: 9
[2022-09-09 18:23:21][DEBUG] : Start decoding packet type 0x20
[2022-09-09 18:23:21][DEBUG] : Subtype = Visonic PowerCode door/window sensor primary contact with alive packets
[2022-09-09 18:23:21][DEBUG] : Data : {'packetlen': '0x08', 'packettype': '0x20', 'subtype': '0x04', 'seqnbr': '0x00', 'id1': '0x0C', 'id2': '0x0D', 'id3': '0x2D', 'status': 128, 'battery': 9, 'rssi': 7}
[2022-09-09 18:23:21][DEBUG] : Decoded info : {'packettype': '0x20', 'subtype': '0x04', 'id': '0C0D2D', 'status': 128, 'battery': 9, 'rssi': 7}
[2022-09-09 18:23:21][DEBUG] : Device is known id : 0C0D2D
[2022-09-09 18:23:21][DEBUG] : Send to jeedom : {'devices': {'0C0D2D20': {'packettype': '0x20', 'subtype': '0x04', 'id': '0C0D2D', 'status': 128, 'battery': 9, 'rssi': 7}}}
[2022-09-09 18:23:21][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2022-09-09 18:23:21][DEBUG] : {"devices":{"0C0D2D20":{"packettype":"0x20","subtype":"0x04","id":"0C0D2D","status":128,"battery":9,"rssi":7}}}
[2022-09-09 18:23:21][DEBUG] : http://127.0.0.1:80 "POST /plugins/rfxcom/core/php/jeeRfxcom.php?apikey=iciApikey HTTP/1.1" 200 0
[2022-09-09 18:23:25][DEBUG] : Client connected to [127.0.0.1:44032]
[2022-09-09 18:23:25][DEBUG] : Message read from socket: b'{"apikey":"iciApikey","cmd":"send","data":["082004DD0C0D2D0690"]}'
[2022-09-09 18:23:25][DEBUG] : Client disconnected from [127.0.0.1:44032]
[2022-09-09 18:23:25][DEBUG] : Message received in socket JEEDOM_SOCKET_MESSAGE
[2022-09-09 18:23:25][DEBUG] : Test message: 082004DD0C0D2D0690
[2022-09-09 18:23:25][DEBUG] : flushOutput serial port
[2022-09-09 18:23:25][DEBUG] : flushInput serial port
[2022-09-09 18:23:25][DEBUG] : Write message to serial port
[2022-09-09 18:23:25][DEBUG] : Write data to serial port : 082004dd0c0d2d0690
[2022-09-09 18:23:25][DEBUG] : Write message ok : 082004DD0C0D2D0690
[2022-09-09 18:23:25][DEBUG] : Message: 1401ffdd0c53190000800001021c04524658434f4d
[2022-09-09 18:23:25][DEBUG] : Decode : 1401ffdd0c53190000800001021c04524658434f4d
[2022-09-09 18:23:25][DEBUG] : Test message: 1401ffdd0c53190000800001021c04524658434f4d
[2022-09-09 18:23:25][DEBUG] : PacketType: 0x01
[2022-09-09 18:23:25][DEBUG] : Length: 21
[2022-09-09 18:23:25][DEBUG] : Start decoding packet type 0x01
[2022-09-09 18:23:25][DEBUG] : Data : {'packetlen': '0x14', 'packettype': '0x01', 'subtype': '0xFF', 'seqnbr': '0xDD', 'cmnd': '0x0C', 'msg1': '0x53', 'msg2': '0x19', 'msg3': '0x00', 'msg4': '0x00', 'msg5': '0x80', 'msg6': '0x00', 'msg7': '0x01', 'msg8': '0x02', 'msg9': 28, 'msg10': '0x04', 'msg11': '0x52', 'msg12': '0x46', 'msg13': '0x58', 'msg14': '0x43', 'msg15': '0x4F', 'msg16': '0x4D'}
[2022-09-09 18:23:25][DEBUG] : Subtype = wrong command received from the application
[2022-09-09 18:23:34][DEBUG] : Client connected to [127.0.0.1:54200]
[2022-09-09 18:23:34][DEBUG] : Message read from socket: b'{"apikey":"iciApikey","cmd":"send","data":["082004DD0C0D2D0990"]}'
[2022-09-09 18:23:34][DEBUG] : Client disconnected from [127.0.0.1:54200]
[2022-09-09 18:23:34][DEBUG] : Message received in socket JEEDOM_SOCKET_MESSAGE
[2022-09-09 18:23:34][DEBUG] : Test message: 082004DD0C0D2D0990
[2022-09-09 18:23:34][DEBUG] : flushOutput serial port
[2022-09-09 18:23:34][DEBUG] : flushInput serial port
[2022-09-09 18:23:34][DEBUG] : Write message to serial port
[2022-09-09 18:23:34][DEBUG] : Write data to serial port : 082004dd0c0d2d0990
[2022-09-09 18:23:34][DEBUG] : Write message ok : 082004DD0C0D2D0990
[2022-09-09 18:23:34][DEBUG] : Message: 1401ffdd0c53190000800001021c04524658434f4d
[2022-09-09 18:23:34][DEBUG] : Decode : 1401ffdd0c53190000800001021c04524658434f4d
[2022-09-09 18:23:34][DEBUG] : Test message: 1401ffdd0c53190000800001021c04524658434f4d
[2022-09-09 18:23:34][DEBUG] : PacketType: 0x01
[2022-09-09 18:23:34][DEBUG] : Length: 21
[2022-09-09 18:23:34][DEBUG] : Start decoding packet type 0x01
[2022-09-09 18:23:34][DEBUG] : Data : {'packetlen': '0x14', 'packettype': '0x01', 'subtype': '0xFF', 'seqnbr': '0xDD', 'cmnd': '0x0C', 'msg1': '0x53', 'msg2': '0x19', 'msg3': '0x00', 'msg4': '0x00', 'msg5': '0x80', 'msg6': '0x00', 'msg7': '0x01', 'msg8': '0x02', 'msg9': 28, 'msg10': '0x04', 'msg11': '0x52', 'msg12': '0x46', 'msg13': '0x58', 'msg14': '0x43', 'msg15': '0x4F', 'msg16': '0x4D'}
[2022-09-09 18:23:34][DEBUG] : Subtype = wrong command received from the application
[2022-09-09 18:24:08][DEBUG] : Message: 082004010c0d2d8079
[2022-09-09 18:24:08][DEBUG] : Decode : 082004010c0d2d8079
[2022-09-09 18:24:08][DEBUG] : Test message: 082004010c0d2d8079
[2022-09-09 18:24:08][DEBUG] : PacketType: 0x20
[2022-09-09 18:24:08][DEBUG] : Length: 9
[2022-09-09 18:24:08][DEBUG] : Start decoding packet type 0x20
[2022-09-09 18:24:08][DEBUG] : Subtype = Visonic PowerCode door/window sensor primary contact with alive packets
[2022-09-09 18:24:08][DEBUG] : Data : {'packetlen': '0x08', 'packettype': '0x20', 'subtype': '0x04', 'seqnbr': '0x01', 'id1': '0x0C', 'id2': '0x0D', 'id3': '0x2D', 'status': 128, 'battery': 9, 'rssi': 7}
[2022-09-09 18:24:08][DEBUG] : Decoded info : {'packettype': '0x20', 'subtype': '0x04', 'id': '0C0D2D', 'status': 128, 'battery': 9, 'rssi': 7}
[2022-09-09 18:24:08][DEBUG] : Device is known id : 0C0D2D
[2022-09-09 18:24:08][DEBUG] : Send to jeedom : {'devices': {'0C0D2D20': {'packettype': '0x20', 'subtype': '0x04', 'id': '0C0D2D', 'status': 128, 'battery': 9, 'rssi': 7}}}
[2022-09-09 18:24:08][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2022-09-09 18:24:08][DEBUG] : {"devices":{"0C0D2D20":{"packettype":"0x20","subtype":"0x04","id":"0C0D2D","status":128,"battery":9,"rssi":7}}}
[2022-09-09 18:24:08][DEBUG] : http://127.0.0.1:80 "POST /plugins/rfxcom/core/php/jeeRfxcom.php?apikey=iciApikey HTTP/1.1" 200 0
Les tests d’envoi de commande ne font pas bouger la valeur du statut.