fmartinou / tydom2mqtt

Deltadore Tydom to MQTT Bridge
https://fmartinou.github.io/tydom2mqtt/
MIT License
86 stars 49 forks source link

Obligé d'envoyer 2 commandes pour avoir 1 exécution #105

Open Ouiskie opened 1 year ago

Ouiskie commented 1 year ago

Bonjour, Depuis que j'ai mis en place tydom2mqtt avec ma box tydom 1.0, il faut toujours que j'envoie 2 commandes pour que mon volet fasse ce que je lui demande. Soit je clique 2 fois ur le bouton, soit je lance 2 fois la commande dans le script pour être sur que ça soit pris en compte. Si je lance une autre commande juste derrière, ça fonctionne. Si j'attends quelques minutes, il faudra que je relance 2 commandes pour avoir une exécution( comme si quelque chose se mettait en veille et qu'il fallait le réveiller). Voici un log ou je clique une fois sur un volet, rien ne se passe, puis une 2ème fois avec l'ordre bien pris en compte :

2023-05-30 22:41:25,485 - gmqtt.mqtt.handler - DEBUG - [CMD 0x30] b'\x001cover/tydom/1630415227_1630415227/set_positionCmd\x00DOWN' 2023-05-30 22:41:25,486 - gmqtt.mqtt.handler - DEBUG - [RECV cover/tydom/1630415227_1630415227/set_positionCmd with QoS: 0] b'\x00DOWN' 2023-05-30 22:41:25,486 - gmqtt.mqtt.utils - DEBUG - FREE MID: None 2023-05-30 22:41:25,486 - mqtt.MqttClient - INFO - set_positionCmd message received (topic=cover/tydom/1630415227_1630415227/set_positionCmd, message=DOWN) 2023-05-30 22:41:25,486 - sensors.Cover - INFO - 1630415227 positionCmd DOWN 2023-05-30 22:41:25,486 - tydom.TydomClient - DEBUG - Sending message to tydom (PUT data [{"name":"positionCmd","value":"DOWN"}]) 2023-05-30 22:41:25,486 - websockets.client - DEBUG - > BINARY 50 55 54 20 2f 64 65 76 69 63 65 73 2f 31 36 33 ... 4e 22 7d 5d 0d 0a 0d 0a [187 bytes] 2023-05-30 22:41:25,492 - websockets.client - DEBUG - < BINARY 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d ... 64 3a 20 30 0d 0a 0d 0a [172 bytes] 2023-05-30 22:41:25,946 - gmqtt.client - DEBUG - [QoS query IS EMPTY] 2023-05-30 22:41:30,023 - gmqtt.mqtt.handler - DEBUG - [CMD 0x30] b'\x001cover/tydom/1630415227_1630415227/set_positionCmd\x00DOWN' 2023-05-30 22:41:30,023 - gmqtt.mqtt.handler - DEBUG - [RECV cover/tydom/1630415227_1630415227/set_positionCmd with QoS: 0] b'\x00DOWN' 2023-05-30 22:41:30,023 - gmqtt.mqtt.utils - DEBUG - FREE MID: None 2023-05-30 22:41:30,023 - mqtt.MqttClient - INFO - set_positionCmd message received (topic=cover/tydom/1630415227_1630415227/set_positionCmd, message=DOWN) 2023-05-30 22:41:30,023 - sensors.Cover - INFO - 1630415227 positionCmd DOWN 2023-05-30 22:41:30,023 - tydom.TydomClient - DEBUG - Sending message to tydom (PUT data [{"name":"positionCmd","value":"DOWN"}]) 2023-05-30 22:41:30,023 - websockets.client - DEBUG - > BINARY 50 55 54 20 2f 64 65 76 69 63 65 73 2f 31 36 33 ... 4e 22 7d 5d 0d 0a 0d 0a [187 bytes] 2023-05-30 22:41:30,030 - websockets.client - DEBUG - < BINARY 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d ... 64 3a 20 30 0d 0a 0d 0a [172 bytes] 2023-05-30 22:41:30,948 - gmqtt.client - DEBUG - [QoS query IS EMPTY] 2023-05-30 22:41:33,812 - websockets.client - DEBUG - < BINARY 50 55 54 20 2f 64 65 76 69 63 65 73 2f 64 61 74 ... 0a 0d 0a 30 0d 0a 0d 0a [253 bytes] 2023-05-30 22:41:33,812 - tydom.MessageHandler - DEBUG - PUT /devices/data message detected ! 2023-05-30 22:41:33,812 - tydom.MessageHandler - DEBUG - Message received detected as (msg_data) 2023-05-30 22:41:33,812 - tydom.MessageHandler - INFO - Device update (id=1630415227, endpoint=1630415227, name=Volet Parents, type=shutter) 2023-05-30 22:41:33,812 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'homeassistant/cover/tydom/1630415227_1630415227/config'', ... (592 bytes) 2023-05-30 22:41:33,813 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'homeassistant/sensor/tydom/device_id_tydom_1630415227_1630415227/config'', ... (322 bytes) 2023-05-30 22:41:33,813 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'sensor/tydom/device_id_tydom_1630415227_1630415227/state'', ... (10 bytes) 2023-05-30 22:41:33,813 - sensors.Sensor - INFO - Sensor created / updated : device_id_tydom__Volet_Parents 1630415227 2023-05-30 22:41:33,813 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'homeassistant/sensor/tydom/endpoint_id_tydom_1630415227_1630415227/config'', ... (330 bytes) 2023-05-30 22:41:33,813 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'sensor/tydom/endpoint_id_tydom_1630415227_1630415227/state'', ... (10 bytes) 2023-05-30 22:41:33,813 - sensors.Sensor - INFO - Sensor created / updated : endpoint_id_tydom__Volet_Parents 1630415227 2023-05-30 22:41:33,813 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'homeassistant/sensor/tydom/id_tydom_1630415227_1630415227/config'', ... (294 bytes) 2023-05-30 22:41:33,813 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'sensor/tydom/id_tydom_1630415227_1630415227/state'', ... (21 bytes) 2023-05-30 22:41:33,813 - sensors.Sensor - INFO - Sensor created / updated : id_tydom__Volet_Parents 1630415227_1630415227 2023-05-30 22:41:33,813 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'homeassistant/sensor/tydom/position_tydom_1630415227_1630415227/config'', ... (318 bytes) 2023-05-30 22:41:33,813 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'sensor/tydom/position_tydom_1630415227_1630415227/state'', ... (1 bytes) 2023-05-30 22:41:33,813 - sensors.Sensor - INFO - Sensor created / updated : position_tydom__Volet_Parents 0 2023-05-30 22:41:33,813 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'cover/tydom/1630415227_1630415227/current_position'', ... (1 bytes) 2023-05-30 22:41:33,813 - gmqtt.mqtt.package - DEBUG - Sending PUBLISH (q0), 'b'cover/tydom/1630415227_1630415227/attributes'', ... (178 bytes) 2023-05-30 22:41:33,813 - sensors.Cover - INFO - Cover created / updated : Volet Parents 1630415227_1630415227 2023-05-30 22:41:33,813 - tydom.MessageHandler - DEBUG - Incoming data parsed with success 2023-05-30 22:41:33,815 - gmqtt.mqtt.handler - DEBUG - [CMD 0x30] b'\x008sensor/tydom/device_id_tydom_1630415227_1630415227/state\x001630415227' 2023-05-30 22:41:33,815 - gmqtt.mqtt.handler - DEBUG - [RECV sensor/tydom/device_id_tydom_1630415227_1630415227/state with QoS: 0] b'\x001630415227' 2023-05-30 22:41:33,816 - gmqtt.mqtt.utils - DEBUG - FREE MID: None 2023-05-30 22:41:33,816 - gmqtt.mqtt.handler - DEBUG - [CMD 0x30] b'\x00:sensor/tydom/endpoint_id_tydom_1630415227_1630415227/state\x001630415227' 2023-05-30 22:41:33,816 - gmqtt.mqtt.handler - DEBUG - [RECV sensor/tydom/endpoint_id_tydom_1630415227_1630415227/state with QoS: 0] b'\x001630415227' 2023-05-30 22:41:33,816 - gmqtt.mqtt.utils - DEBUG - FREE MID: None 2023-05-30 22:41:33,817 - gmqtt.mqtt.handler - DEBUG - [CMD 0x30] b'\x001sensor/tydom/id_tydom_1630415227_1630415227/state\x001630415227_1630415227' 2023-05-30 22:41:33,817 - gmqtt.mqtt.handler - DEBUG - [RECV sensor/tydom/id_tydom_1630415227_1630415227/state with QoS: 0] b'\x001630415227_1630415227' 2023-05-30 22:41:33,817 - gmqtt.mqtt.utils - DEBUG - FREE MID: None 2023-05-30 22:41:33,817 - gmqtt.mqtt.handler - DEBUG - [CMD 0x30] b'\x007sensor/tydom/position_tydom_1630415227_1630415227/state\x000' 2023-05-30 22:41:33,817 - gmqtt.mqtt.handler - DEBUG - [RECV sensor/tydom/position_tydom_1630415227_1630415227/state with QoS: 0] b'\x000' 2023-05-30 22:41:33,817 - gmqtt.mqtt.utils - DEBUG - FREE MID: None 2023-05-30 22:41:33,818 - gmqtt.mqtt.handler - DEBUG - [CMD 0x30] b'\x002cover/tydom/1630415227_1630415227/current_position\x000' 2023-05-30 22:41:33,818 - gmqtt.mqtt.handler - DEBUG - [RECV cover/tydom/1630415227_1630415227/current_position with QoS: 0] b'\x000' 2023-05-30 22:41:33,818 - gmqtt.mqtt.utils - DEBUG - FREE MID: None 2023-05-30 22:41:33,819 - gmqtt.mqtt.handler - DEBUG - [CMD 0x30] b'\x00,cover/tydom/1630415227_1630415227/attributes\x00{"device_id": 1630415227, "endpoint_id": 1630415227, "id": "1630415227_1630415227", "cover_name": "Volet Parents", "name": "Volet Parents", "device_type": "cover", "position": 0}' 2023-05-30 22:41:33,819 - gmqtt.mqtt.handler - DEBUG - [RECV cover/tydom/1630415227_1630415227/attributes with QoS: 0] b'\x00{"device_id": 1630415227, "endpoint_id": 1630415227, "id": "1630415227_1630415227", "cover_name": "Volet Parents", "name": "Volet Parents", "device_type": "cover", "position": 0}' 2023-05-30 22:41:33,819 - gmqtt.mqtt.utils - DEBUG - FREE MID: None 2023-05-30 22:41:35,951 - gmqtt.client - DEBUG - [QoS query IS EMPTY] 2023-05-30 22:41:36,321 - websockets.client - DEBUG - % sending keepalive ping 2023-05-30 22:41:36,321 - websockets.client - DEBUG - > PING af d2 68 10 [binary, 4 bytes] 2023-05-30 22:41:36,323 - websockets.client - DEBUG - < PONG '' [0 bytes]

Merci d'avance pour l'aide.