Pb prise aqara Zigbee chinoise plugin Xiaomihome

les erreurs ci-dessous ont l’air d’etre sur un cron5:

[2021-04-26 16:20:03.233][ERROR] : SOCKET-READ------Exception on socket : IV must be 16 bytes long
[2021-04-26 16:20:03.534][ERROR] : SOCKET-READ------Exception on socket : IV must be 16 bytes long
[2021-04-26 16:25:03.322][ERROR] : SOCKET-READ------Exception on socket : IV must be 16 bytes long
[2021-04-26 16:25:03.622][ERROR] : SOCKET-READ------Exception on socket : IV must be 16 bytes long
[2021-04-26 16:25:04.524][ERROR] : SOCKET-READ------Exception on socket : 'str' object has no attribute 'decode'

je viens de passer en debug pour avoir plus de détail, je mettrai les détails.

je ne sais pas du tout si c’est lié a mon erreur d’installation des dépendances au dessus…

Oui en effet après la réinstallation des dépendances le daemon est ok.
J’ai rebooté mon PI4 et voici avec mes équipements le bilan :

  • Yeelight : OK
  • Ventilateurs Xiaomi : HS
  • Aspirateur STYJ02YM : HS

J’avais mis mon fichier en debug sur un autre topic que je recolle ici :

021-04-26 13:37:49.010][DEBUG] : SOCKET-READ------Executing action on : vacuumviomi
[2021-04-26 13:37:49.010][DEBUG] : 'str' object has no attribute 'decode'
[2021-04-26 13:38:04][DEBUG] : Rafraîchissement de Yeelight : Yeelight Lyne
[2021-04-26 13:38:04][DEBUG] : Envoi : {"apikey":"MONAPIKEYxxxxxxxxxxxxxxxxxxxxxxx","type":"yeelight","cmd":"refresh","model":"color","dest":"192.168.0.177","token":"","devtype":"76","serial":"0x00000000035ecc90","id":"192.168.0.177"}
[2021-04-26 13:38:04.515][DEBUG] : Client connected to [127.0.0.1:46622]
[2021-04-26 13:38:04.515][DEBUG] : Message read from socket: b'{"apikey":"MONAPIKEYxxxxxxxxxxxxxxxxxxxxxxx","type":"yeelight","cmd":"refresh","model":"color","dest":"192.168.0.177","token":"","devtype":"76","serial":"0x00000000035ecc90","id":"192.168.0.177"}'
[2021-04-26 13:38:04.516][DEBUG] : Client disconnected from [127.0.0.1:46622]
[2021-04-26 13:38:04][DEBUG] : Rafraîchissement de Yeelight : Yeelight Salon
[2021-04-26 13:38:04][DEBUG] : Envoi : {"apikey":"MONAPIKEYxxxxxxxxxxxxxxxxxxxxxxx","type":"yeelight","cmd":"refresh","model":"color","dest":"192.168.0.169","token":"","devtype":"76","serial":"0x00000000035c1458","id":"192.168.0.169"}
[2021-04-26 13:38:04.551][DEBUG] : Client connected to [127.0.0.1:46624]
[2021-04-26 13:38:04.551][DEBUG] : Message read from socket: b'{"apikey":"MONAPIKEYxxxxxxxxxxxxxxxxxxxxxxx","type":"yeelight","cmd":"refresh","model":"color","dest":"192.168.0.169","token":"","devtype":"76","serial":"0x00000000035c1458","id":"192.168.0.169"}'
[2021-04-26 13:38:04.551][DEBUG] : Client disconnected from [127.0.0.1:46624]
[2021-04-26 13:38:04.629][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 13:38:04.630][DEBUG] : SOCKET-READ------Received command from jeedom : refresh
[2021-04-26 13:38:04.630][DEBUG] : SOCKET-READ------Refreshing : color
[2021-04-26 13:38:04.630][DEBUG] : Bulb<192.168.0.177:55443, type=BulbType.Unknown> > {'id': 0, 'method': 'get_prop', 'params': ['power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'delayoff', 'music_on', 'name', 'bg_power', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
[2021-04-26 13:38:04.638][DEBUG] : Bulb<192.168.0.177:55443, type=BulbType.Unknown> < {'id': 0, 'result': ['off', '100', '6500', '16738740', '330', '58', '2', '0', '0', '0', '', '', '', '', '', '', '', '', '', '']}
[2021-04-26 13:38:04.677][DEBUG] : Send to jeedom : {'devices': {'yeelight_192.168.0.177': {'ip': '192.168.0.177', 'capabilities': {'id': '192.168.0.177', 'power': 'off', 'bright': '100', 'ct': '6500', 'rgb': '16738740', 'hue': '330', 'sat': '58', 'color_mode': '2', 'flowing': '0', 'delayoff': '0', 'music_on': '0', 'name': None, 'bg_power': None, 'bg_flowing': None, 'bg_ct': None, 'bg_bright': None, 'bg_hue': None, 'bg_sat': None, 'bg_rgb': None, 'nl_br': None, 'active_mode': None, 'current_brightness': '100'}}}}
[2021-04-26 13:38:04.680][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-04-26 13:38:04.705][DEBUG] : http://127.0.0.1:80 "POST /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=MONAPIKEYxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0
[2021-04-26 13:38:04.939][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 13:38:04.940][DEBUG] : SOCKET-READ------Received command from jeedom : refresh
[2021-04-26 13:38:04.940][DEBUG] : SOCKET-READ------Refreshing : color
[2021-04-26 13:38:04.940][DEBUG] : Bulb<192.168.0.169:55443, type=BulbType.Unknown> > {'id': 0, 'method': 'get_prop', 'params': ['power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'delayoff', 'music_on', 'name', 'bg_power', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
[2021-04-26 13:38:04.946][DEBUG] : Bulb<192.168.0.169:55443, type=BulbType.Unknown> < {'id': 0, 'result': ['off', '95', '6500', '2717685', '217', '83', '2', '0', '0', '0', '', '', '', '', '', '', '', '', '', '']}
[2021-04-26 13:38:04.958][DEBUG] : Send to jeedom : {'devices': {'yeelight_192.168.0.169': {'ip': '192.168.0.169', 'capabilities': {'id': '192.168.0.169', 'power': 'off', 'bright': '95', 'ct': '6500', 'rgb': '2717685', 'hue': '217', 'sat': '83', 'color_mode': '2', 'flowing': '0', 'delayoff': '0', 'music_on': '0', 'name': None, 'bg_power': None, 'bg_flowing': None, 'bg_ct': None, 'bg_bright': None, 'bg_hue': None, 'bg_sat': None, 'bg_rgb': None, 'nl_br': None, 'active_mode': None, 'current_brightness': '95'}}}}
[2021-04-26 13:38:04.961][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-04-26 13:38:04.981][DEBUG] : http://127.0.0.1:80 "POST /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=MONAPIKEYxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1" 200 0

Après restauration de ma sauvegarde + 1 reboot de mon PI (obligatoire sinon HS) mes équipements sont tous opérationnels.

idem, meme type d’erreurs

[2021-04-26 16:35:06.616][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 16:35:06.616][DEBUG] : SOCKET-READ------Received command from jeedom : refresh
[2021-04-26 16:35:06.616][DEBUG] : SOCKET-READ------Refreshing : vacuum2
[2021-04-26 16:35:06.616][ERROR] : SOCKET-READ------Exception on socket : 'str' object has no attribute 'decode'

voila plus de logs pour la premiere :

[2021-04-26 16:30:03][DEBUG] : execute : action aquara brightness-set
[2021-04-26 16:30:03][DEBUG] : Envoi : {"apikey":"XXXX","type":"aquara","cmd":"send","dest":"192.168.0.4","password":"3c4eyy92fk254cb7","model":"gateway","sidG":"286c07fa26aa","sid":"286c07fa26aa","short_id":"0","switch":"rgb","request":1661009793,"vol":99}
[2021-04-26 16:30:03.866][DEBUG] : Client connected to [127.0.0.1:39792]
[2021-04-26 16:30:03.867][DEBUG] : Message read from socket: b'{"apikey":"XXXX","type":"aquara","cmd":"send","dest":"192.168.0.4","password":"3c4eyy92fk254cb7","model":"gateway","sidG":"286c07fa26aa","sid":"286c07fa26aa","short_id":"0","switch":"rgb","request":1661009793,"vol":99}'
[2021-04-26 16:30:03.867][DEBUG] : Client disconnected from [127.0.0.1:39792]
[2021-04-26 16:30:03.873][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 16:30:03.874][DEBUG] : SOCKET-READ------Received command from jeedom : send
[2021-04-26 16:30:03.874][DEBUG] : SOCKET-READ------Executing action on : gateway
[2021-04-26 16:30:03.874][DEBUG] : executing {'apikey': 'XXXX', 'type': 'aquara', 'cmd': 'send', 'dest': '192.168.0.4', 'password': '3c4eyy92fk254cb7', 'model': 'gateway', 'sidG': '286c07fa26aa', 'sid': '286c07fa26aa', 'short_id': '0', 'switch': 'rgb', 'request': 1661009793, 'vol': 99}
[2021-04-26 16:30:03.874][ERROR] : SOCKET-READ------Exception on socket : IV must be 16 bytes long
[2021-04-26 16:30:03][DEBUG] : execute : action aquara rgb-set
[2021-04-26 16:30:03][DEBUG] : Envoi : {"apikey":"XXXX","type":"aquara","cmd":"send","dest":"192.168.0.4","password":"3c4eyy92fk254cb7","model":"gateway","sidG":"286c07fa26aa","sid":"286c07fa26aa","short_id":"0","switch":"rgb","request":1661009793,"vol":99}
[2021-04-26 16:30:03.994][DEBUG] : Client connected to [127.0.0.1:39796]
[2021-04-26 16:30:03.996][DEBUG] : Message read from socket: b'{"apikey":"XXXX","type":"aquara","cmd":"send","dest":"192.168.0.4","password":"3c4eyy92fk254cb7","model":"gateway","sidG":"286c07fa26aa","sid":"286c07fa26aa","short_id":"0","switch":"rgb","request":1661009793,"vol":99}'
[2021-04-26 16:30:03.997][DEBUG] : Client disconnected from [127.0.0.1:39796]
[2021-04-26 16:30:04.175][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 16:30:04.175][DEBUG] : SOCKET-READ------Received command from jeedom : send
[2021-04-26 16:30:04.176][DEBUG] : SOCKET-READ------Executing action on : gateway
[2021-04-26 16:30:04.176][DEBUG] : executing {'apikey': 'XXXX', 'type': 'aquara', 'cmd': 'send', 'dest': '192.168.0.4', 'password': '3c4eyy92fk254cb7', 'model': 'gateway', 'sidG': '286c07fa26aa', 'sid': '286c07fa26aa', 'short_id': '0', 'switch': 'rgb', 'request': 1661009793, 'vol': 99}
[2021-04-26 16:30:04.176][ERROR] : SOCKET-READ------Exception on socket : IV must be 16 bytes long
[2021-04-26 16:30:05.632][DEBUG] : {'cmd': 'heartbeat', 'model': 'gateway', 'sid': '286c07fa26aa', 'short_id': '0', 'token': 'Bamsjz9dcvnjexnv', 'data': '{"ip":"192.168.0.4"}'}
[2021-04-26 16:30:05.663][DEBUG] : Send to jeedom : {'devices': {'aquara_286c07fa26aa': {'model': 'gateway', 'sid': '286c07fa26aa', 'cmd': 'heartbeat', 'short_id': '0', 'source': '192.168.0.4', 'token': 'Bamsjz9dcvnjexnv', 'data': {'ip': '192.168.0.4'}}}}
[2021-04-26 16:30:05.668][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-04-26 16:30:05.683][DEBUG] : {'cmd': 'report', 'model': 'motion', 'sid': '158d00015a8794', 'short_id': 54805, 'data': '{"status":"motion"}'}
[2021-04-26 16:30:05.705][DEBUG] : http://127.0.0.1:80 "POST /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=XXXX HTTP/1.1" 200 0
[2021-04-26 16:30:05.757][DEBUG] : Send to jeedom : {'devices': {'aquara_158d00015a8794': {'model': 'motion', 'sid': '158d00015a8794', 'cmd': 'report', 'short_id': 54805, 'source': '192.168.0.4', 'token': '', 'data': {'status': 'motion'}}}}
[2021-04-26 16:30:05.760][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-04-26 16:30:05.773][DEBUG] : http://127.0.0.1:80 "POST /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=XXXX HTTP/1.1" 200 0
[2021-04-26 16:30:09][DEBUG] : execute : action aquara brightness-set
[2021-04-26 16:30:09][DEBUG] : Envoi : {"apikey":"XXXX","type":"aquara","cmd":"send","dest":"192.168.0.4","password":"3c4eyy92fk254cb7","model":"gateway","sidG":"286c07fa26aa","sid":"286c07fa26aa","short_id":"0","switch":"rgb","request":1661009793,"vol":99}
[2021-04-26 16:30:09.996][DEBUG] : Client connected to [127.0.0.1:39862]
[2021-04-26 16:30:09.996][DEBUG] : Message read from socket: b'{"apikey":"XXXX","type":"aquara","cmd":"send","dest":"192.168.0.4","password":"3c4eyy92fk254cb7","model":"gateway","sidG":"286c07fa26aa","sid":"286c07fa26aa","short_id":"0","switch":"rgb","request":1661009793,"vol":99}'
[2021-04-26 16:30:09.996][DEBUG] : Client disconnected from [127.0.0.1:39862]
[2021-04-26 16:30:09][DEBUG] : execute : action aquara rgb-set
[2021-04-26 16:30:10][DEBUG] : Envoi : {"apikey":"XXXX","type":"aquara","cmd":"send","dest":"192.168.0.4","password":"3c4eyy92fk254cb7","model":"gateway","sidG":"286c07fa26aa","sid":"286c07fa26aa","short_id":"0","switch":"rgb","request":1661009773,"vol":99}
[2021-04-26 16:30:10.041][DEBUG] : Client connected to [127.0.0.1:39864]
[2021-04-26 16:30:10.041][DEBUG] : Message read from socket: b'{"apikey":"XXXX","type":"aquara","cmd":"send","dest":"192.168.0.4","password":"3c4eyy92fk254cb7","model":"gateway","sidG":"286c07fa26aa","sid":"286c07fa26aa","short_id":"0","switch":"rgb","request":1661009773,"vol":99}'
[2021-04-26 16:30:10.041][DEBUG] : Client disconnected from [127.0.0.1:39864]
[2021-04-26 16:30:10.189][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 16:30:10.189][DEBUG] : SOCKET-READ------Received command from jeedom : send
[2021-04-26 16:30:10.190][DEBUG] : SOCKET-READ------Executing action on : gateway
[2021-04-26 16:30:10.190][DEBUG] : executing {'apikey': 'XXXX', 'type': 'aquara', 'cmd': 'send', 'dest': '192.168.0.4', 'password': '3c4eyy92fk254cb7', 'model': 'gateway', 'sidG': '286c07fa26aa', 'sid': '286c07fa26aa', 'short_id': '0', 'switch': 'rgb', 'request': 1661009793, 'vol': 99}
[2021-04-26 16:30:10.190][ERROR] : SOCKET-READ------Exception on socket : IV must be 16 bytes long
[2021-04-26 16:30:10.490][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 16:30:10.491][DEBUG] : SOCKET-READ------Received command from jeedom : send
[2021-04-26 16:30:10.491][DEBUG] : SOCKET-READ------Executing action on : gateway
[2021-04-26 16:30:10.491][DEBUG] : executing {'apikey': 'XXXX', 'type': 'aquara', 'cmd': 'send', 'dest': '192.168.0.4', 'password': '3c4eyy92fk254cb7', 'model': 'gateway', 'sidG': '286c07fa26aa', 'sid': '286c07fa26aa', 'short_id': '0', 'switch': 'rgb', 'request': 1661009773, 'vol': 99}
[2021-04-26 16:30:10.491][ERROR] : SOCKET-READ------Exception on socket : IV must be 16 bytes long
[2021-04-26 16:30:15.616][DEBUG] : {'cmd': 'heartbeat', 'model': 'gateway', 'sid': '286c07fa26aa', 'short_id': '0', 'token': 'flDPel5hAGUz6Dla', 'data': '{"ip":"192.168.0.4"}'}
[2021-04-26 16:30:15.665][DEBUG] : Send to jeedom : {'devices': {'aquara_286c07fa26aa': {'model': 'gateway', 'sid': '286c07fa26aa', 'cmd': 'heartbeat', 'short_id': '0', 'source': '192.168.0.4', 'token': 'flDPel5hAGUz6Dla', 'data': {'ip': '192.168.0.4'}}}}
[2021-04-26 16:30:15.674][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-04-26 16:30:15.686][DEBUG] : http://127.0.0.1:80 "POST /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=XXXX HTTP/1.1" 200 0
[2021-04-26 16:30:16][DEBUG] : Offline Wifi : Aspirateur
[2021-04-26 16:30:16][DEBUG] : Rafraîchissement de Aqara : Gateway
[2021-04-26 16:30:25.590][DEBUG] : {'cmd': 'heartbeat', 'model': 'gateway', 'sid': '286c07fa26aa', 'short_id': '0', 'token': 'KK9lC8PlKrLbOAUF', 'data': '{"ip":"192.168.0.4"}'}
[2021-04-26 16:30:25.623][DEBUG] : Send to jeedom : {'devices': {'aquara_286c07fa26aa': {'model': 'gateway', 'sid': '286c07fa26aa', 'cmd': 'heartbeat', 'short_id': '0', 'source': '192.168.0.4', 'token': 'KK9lC8PlKrLbOAUF', 'data': {'ip': '192.168.0.4'}}}}
[2021-04-26 16:30:25.631][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-04-26 16:30:25.641][DEBUG] : http://127.0.0.1:80 "POST /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=XXXX HTTP/1.1" 200 0
[2021-04-26 16:30:35.571][DEBUG] : {'cmd': 'heartbeat', 'model': 'gateway', 'sid': '286c07fa26aa', 'short_id': '0', 'token': 'arRSwWwqzYRtONzM', 'data': '{"ip":"192.168.0.4"}'}
[2021-04-26 16:30:35.617][DEBUG] : Send to jeedom : {'devices': {'aquara_286c07fa26aa': {'model': 'gateway', 'sid': '286c07fa26aa', 'cmd': 'heartbeat', 'short_id': '0', 'source': '192.168.0.4', 'token': 'arRSwWwqzYRtONzM', 'data': {'ip': '192.168.0.4'}}}}
[2021-04-26 16:30:35.623][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-04-26 16:30:35.635][DEBUG] : http://127.0.0.1:80 "POST /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=XXXX HTTP/1.1" 200 0
[2021-04-26 16:30:45.550][DEBUG] : {'cmd': 'heartbeat', 'model': 'gateway', 'sid': '286c07fa26aa', 'short_id': '0', 'token': 'qJJuGS7MtfgjgXyf', 'data': '{"ip":"192.168.0.4"}'}
[2021-04-26 16:30:45.562][DEBUG] : Send to jeedom : {'devices': {'aquara_286c07fa26aa': {'model': 'gateway', 'sid': '286c07fa26aa', 'cmd': 'heartbeat', 'short_id': '0', 'source': '192.168.0.4', 'token': 'qJJuGS7MtfgjgXyf', 'data': {'ip': '192.168.0.4'}}}}
[2021-04-26 16:30:45.573][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-04-26 16:30:45.584][DEBUG] : http://127.0.0.1:80 "POST /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=XXXX HTTP/1.1" 200 0
[2021-04-26 16:30:55.529][DEBUG] : {'cmd': 'heartbeat', 'model': 'gateway', 'sid': '286c07fa26aa', 'short_id': '0', 'token': '6fwqpGh7apazOv0s', 'data': '{"ip":"192.168.0.4"}'}
[2021-04-26 16:30:55.548][DEBUG] : Send to jeedom : {'devices': {'aquara_286c07fa26aa': {'model': 'gateway', 'sid': '286c07fa26aa', 'cmd': 'heartbeat', 'short_id': '0', 'source': '192.168.0.4', 'token': '6fwqpGh7apazOv0s', 'data': {'ip': '192.168.0.4'}}}}
[2021-04-26 16:30:55.553][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-04-26 16:30:55.565][DEBUG] : http://127.0.0.1:80 "POST /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=XXXX HTTP/1.1" 200 0

je pense que c’est les actions sur la luminosité/couleur gateway
donc pas un cron5 (j’ai dit une connerie), mais mis à jour sur refresh de la météo qui elle doit etre sur un cron5…

et pour la 2eme qui est l’aspirateur:

[2021-04-26 16:45:05][DEBUG] : Rafraîchissement de XiaomiWifi : Aspirateur
[2021-04-26 16:45:05][DEBUG] : Envoi : {"apikey":"XXX","type":"wifi","cmd":"refresh","model":"vacuum","dest":"192.168.0.50","token":"6f74344872664930734f76343130754a","devtype":"034e","serial":"04d8"}
[2021-04-26 16:45:05][DEBUG] : Rafraîchissement de Aqara : Gateway
[2021-04-26 16:45:05.029][DEBUG] : Client connected to [127.0.0.1:43228]
[2021-04-26 16:45:05.030][DEBUG] : Message read from socket: b'{"apikey":"XXX","type":"wifi","cmd":"refresh","model":"vacuum","dest":"192.168.0.50","token":"6f74344872664930734f76343130754a","devtype":"034e","serial":"04d8"}'
[2021-04-26 16:45:05.030][DEBUG] : Client disconnected from [127.0.0.1:43228]
[2021-04-26 16:45:05.047][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 16:45:05.048][DEBUG] : SOCKET-READ------Received command from jeedom : refresh
[2021-04-26 16:45:05.048][DEBUG] : SOCKET-READ------Refreshing : vacuum
[2021-04-26 16:45:05.048][ERROR] : SOCKET-READ------Exception on socket : 'str' object has no attribute 'decode'

dit moi si il te faut d’autres infos (derniere version jeedom V4 stable, buster. je sais pas si ça a un interet)

edit: si tu preferes, je peux aussi créer un ticket avec l’acces support, c’est toi qui vois.

le soucis n’est pas génant chez moi parceque je n’ai presque rien en xiaomi donc pas de roll-back. si un acces peut aider, hésite pas.

Le truc c’est qu’il n’y a pas de message d’erreur dans le log meme en Debug.
De toutes façons j’ai réinstaller l’ancienne version du plugin pour avoir un Jeedom de prod fonctionnel, je vais voir en test si j’ai autre chose.

Bonjour Lunarok,

Voilà mes logs si tu veux autre chose dit nous le.

[2021-04-26 08:38:45][DEBUG] : execute : action aquara on
[2021-04-26 08:38:46][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"rgb","request":838860800,"vol":55}
[2021-04-26 08:38:46.298][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:38:48][DEBUG] : execute : action aquara off
[2021-04-26 08:38:48][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"rgb","request":0,"vol":55}
[2021-04-26 08:38:48.402][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:38:52][DEBUG] : execute : action aquara on
[2021-04-26 08:38:52][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"rgb","request":838860800,"vol":55}
[2021-04-26 08:38:52.909][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:38:57][DEBUG] : execute : action aquara vol-set
[2021-04-26 08:38:57][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"vol","request":"100","vol":100}
[2021-04-26 08:38:58.020][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:39:00][DEBUG] : execute : action aquara mid-list
[2021-04-26 08:39:00][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"mid","request":"1","vol":100}
[2021-04-26 08:39:00.725][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:39:01][DEBUG] : execute : action aquara mid-set
[2021-04-26 08:39:01][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"mid","request":"","vol":100}
[2021-04-26 08:39:01.928][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:39:03][DEBUG] : execute : action aquara mid-set
[2021-04-26 08:39:03][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"mid","request":"","vol":100}
[2021-04-26 08:39:03.739][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:39:05][DEBUG] : execute : action aquara mid-scenar
[2021-04-26 08:39:05][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"mid","request":"","vol":0}
[2021-04-26 08:39:05.243][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:39:07][DEBUG] : Rafraîchissement de Yeelight : ceiling10 0x00000000177dafe4
[2021-04-26 08:39:07][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"yeelight","cmd":"refresh","model":"ceiling10","dest":"192.168.1.88","token":"","devtype":"49","serial":"0x00000000177dafe4","id":"192.168.1.88"}
[2021-04-26 08:39:07][DEBUG] : Rafraîchissement de Yeelight : color 0x000000000371f531
[2021-04-26 08:39:07][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"yeelight","cmd":"refresh","model":"color","dest":"192.168.1.85","token":"","devtype":"76","serial":"0x000000000371f531","id":"192.168.1.85"}
[2021-04-26 08:39:07][DEBUG] : Rafraîchissement de Yeelight : color 0x0000000004cae3ee
[2021-04-26 08:39:07][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"yeelight","cmd":"refresh","model":"color","dest":"192.168.1.86","token":"","devtype":"76","serial":"0x0000000004cae3ee","id":"192.168.1.86"}
[2021-04-26 08:39:07][DEBUG] : Rafraîchissement de Yeelight : stripe 0x0000000004575dd2
[2021-04-26 08:39:07][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"yeelight","cmd":"refresh","model":"stripe","dest":"192.168.1.89","token":"","devtype":"50","serial":"0x0000000004575dd2","id":"192.168.1.89"}
[2021-04-26 08:39:13][DEBUG] : execute : action aquara mid-set
[2021-04-26 08:39:14][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"mid","request":"1","vol":100}
[2021-04-26 08:39:14.061][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:39:16][DEBUG] : execute : action aquara mid-set
[2021-04-26 08:39:17][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"mid","request":"1","vol":100}
[2021-04-26 08:39:17.067][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:39:18][DEBUG] : execute : action aquara mid-set
[2021-04-26 08:39:18][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"mid","request":"1","vol":100}
[2021-04-26 08:39:18.570][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:39:22][DEBUG] : execute : action aquara off
[2021-04-26 08:39:22][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"rgb","request":0,"vol":100}
[2021-04-26 08:39:22.778][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code
[2021-04-26 08:39:27][DEBUG] : execute : action aquara on
[2021-04-26 08:39:28][DEBUG] : Envoi : {"apikey":"aypyWRsBb2OIXWgpj9W39ei4lGxxxxxx","type":"aquara","cmd":"send","dest":"192.168.1.80","password":"8DF5C31B581048AD","model":"gateway","sidG":"7811dcb35db6","sid":"7811dcb35db6","short_id":"0","switch":"rgb","request":838860800,"vol":100}
[2021-04-26 08:39:28.487][ERROR] : SOCKET-READ------Exception on socket : Object type <class 'str'> cannot be passed to C code

Raspberry Pi3B+
Rasbian Buster à Jour
Jeedom 4.1.22
Plugin en stable du 2021-04-15 01:01:54

Cdt,

il ne serait pas possible de faire une « mise a jour de retour en arrière », pour ceux qui ont fait cette mise a jour et qui pose problème pour ceux qui ne sont pas en beta?

Solution de contournement :

2 « J'aime »

Ok Merci,
cette manip est opérationnel car plus loin tu dis que tu a réinstallé une sauvegarde ?

Désolé, je n’ai pas été très clair.
Je n’ai réinstallé que la sauvegarde du plugin Xiaomi Home et non l’intégralité de la sauvegarde Jeedom.
Donc, oui cette manipulation est opérationnelle. :wink:
Bon courage.

1 « J'aime »

Au top ça fonctionne !!
Merci a toi, heureusement que tu es là pour apporter une solution … et non pas une réponse a 2 balles !!

1 « J'aime »

Tant mieux.
Je suis sûr qu’une solution permanente sera bientôt apportée.

1 « J'aime »

c’est semble-t-il un problème en lien avec la cryptographie, et donc le chiffrement et la taille du vecteur d’initialisation (IV).
Des pistes pourraient être

  • bug lors de la migration du code python2 vers python3
  • décodage de la trame reçue
  • version du module python3 cryptography installée :

pip3 list | grep cryptography

akenad :slight_smile:

Je monte une VM avec uniquement le plugin Xiaomi et un Mi Plug Wifi pour voir si ca fonctionne.
Si tu as des pistes de recherche je suis preneur.

Je n’avais jamais remarqué qu’on ne pouvait pas désactiver la recherche de la Gateway et des composants Zigbee, donc ils sont tous remontés. :frowning:

PS : Peut-être qu’une option pour contrôler uniquement les appareils wifi serait bien.

Par contre, lorsque je fais une recherche des infos pour la Mi-Plug j’ai toujours le message :

Equipement non trouvé. Veuillez vérifier l'IP et relancer.

PS :Les informations sont bonnes j’ai fait un copier-coller de ma Jeedom Prod.

Log lorsque je clique sur le bouton « Récupérer les infos » :

[2021-04-26 17:51:17.146][DEBUG] : Client connected to [127.0.0.1:33404]
[2021-04-26 17:51:17.146][DEBUG] : Message read from socket: b'{"apikey":"#Clé_API_Xiaomi_Home#","type":"wifi","cmd":"discover","dest":"#IP_MI_PLUG#","token":"#TOKEN_MI_PLUG#","model":"socket"}'
[2021-04-26 17:51:17.146][DEBUG] : Client disconnected from [127.0.0.1:33404]
[2021-04-26 17:51:17.445][DEBUG] : SOCKET-READ------Message received in socket JEEDOM_SOCKET_MESSAGE
[2021-04-26 17:51:17.446][DEBUG] : SOCKET-READ------Received command from jeedom : discover
[2021-04-26 17:51:17.446][DEBUG] : SOCKET-READ------Discovering : socket
[2021-04-26 17:51:17.446][DEBUG] : Did not find the device try again
[2021-04-26 17:51:17.446][ERROR] : SOCKET-READ------Exception on socket : local variable 'Packet' referenced before assignment
[2021-04-26 17:51:17.447][DEBUG] : Send to jeedom :  {'devices': {'wifi': {'ip': '#IP_MI_PLUG#', 'notfound': 1}}}
[2021-04-26 17:51:17.451][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2021-04-26 17:51:17.472][DEBUG] : http://127.0.0.1:80 "POST /plugins/xiaomihome/core/php/jeeXiaomiHome.php?apikey=#Clé_API_Xiaomi_Home# HTTP/1.1" 200 0

Je suis disponible si plus d’informations sont nécessaires.

  • Plugin Xiaomi :
    • 2021-04-15 01:01:54

  • Matériel :
    • Synology: DS218+
    • VMM: debian-10.9.0-amd64
    • HDD : 11.66 GB / 20 GB (58.31%)
    • Coeurs : 2.
    • RAM : 2 GB.
    • PHP 7.3.27-1~deb10u1 (cli) (built: Feb 13 2021 16:31:40) ( NTS )
    • mariadb Ver 15.1 Distrib 10.3.27-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
    • Server version: Apache/2.4.38 (Debian) Server built: 2020-08-25T20:08:29

  • Jeedom
    • Version : 4.1.22
    • Source : default
    • Branche : V4-stable
    • Système : diy

Ps: Seul le plugin Xiaomi Home est installé.

Log d’installation des dépendances : xiaomihome_dep.log (41,9 Ko)

pip3 list | grep cryptography
cryptography 3.3.1

Jeedom Test :

# pip3 list | grep cryptography
cryptography        2.6.1

Jeedom Prod :

# pip3 list | grep cryptography
cryptography        2.6.1

pip3 list | grep cryptography
cryptography        3.4.7

C’est moi qui ait la plus grosse :stuck_out_tongue:

Nan mais ça reste de l’ordre du « normal » avec le python/pip qui pointent par défaut sur les v2 et les python3/pip3 vers v3 :

pi@jeedom:/var/www/html $ pip --version
pip 18.1 from /usr/lib/python2.7/dist-packages/pip (python 2.7)
pi@jeedom:/var/www/html $ pip3 --version
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
pi@jeedom:/var/www/html $ python --version
Python 2.7.16
pi@jeedom:/var/www/html $ python3 --version
Python 3.7.3

1 « J'aime »

J’ai la 3.3.1 parceque c’est ce qu’installe La commande donnée par @akenad plus haut.

Tu as aussi l’erreur avec cette version?

J’espère au moins que ca marche du coup ! :stuck_out_tongue: