[Résolu] Stable6 : Error - JSON call command setKelvinlevel -> Call to function 'onCommand' failed

Forum dédié au plugin ZigBeeForDomoticZ : installation, paramétrage, utilisation, interfaces ...
yahtala
Messages : 39
Inscription : 15 févr. 2023, 17:42

[Résolu] Stable6 : Error - JSON call command setKelvinlevel -> Call to function 'onCommand' failed

Message par yahtala »

Bonjour,
J’ai remarqué que mon script pour changer les couleurs du blanc (chaud / froid) de mes ampoules IKEA (TRÅDFRI Ampoule à LED E14 470 lumen) ne marchait plus.
J’envoie la commande : /json.htm?type=command&param=setkelvinlevel&idx=2191&kelvin=1.568627
Et je reçois le réponse suivante :

Code : Tout sélectionner

 2023-02-25 18:20:03.386 Status: setkelvinlevel: t: 1.568627, color: '{m: 2, RGB: 000000, CWWW: fb04, CT: 4}'
2023-02-25 18:20:03.400 Error: Zigate: Call to function 'onCommand' failed, exception details:
2023-02-25 18:20:03.402 Error: Zigate: Traceback (most recent call last):
2023-02-25 18:20:03.402 Error: Zigate: File "/opt/domoticz/userdata/plugins/Zigate/plugin.py", line 1567, in onCommand
2023-02-25 18:20:03.402 Error: Zigate: _plugin.onCommand(Unit, Command, Level, Hue)
2023-02-25 18:20:03.402 Error: Zigate: File "/opt/domoticz/userdata/plugins/Zigate/plugin.py", line 881, in onCommand
2023-02-25 18:20:03.402 Error: Zigate: mgtCommand(self, Devices, Unit, Command, Level, Color)
2023-02-25 18:20:03.402 Error: Zigate: File "/opt/domoticz/userdata/plugins/Zigate/Modules/command.py", line 1319, in mgtCommand
2023-02-25 18:20:03.402 Error: Zigate: actuator_setcolor(self, NWKID, EPout, Level, Color)
2023-02-25 18:20:03.402 Error: Zigate: File "/opt/domoticz/userdata/plugins/Zigate/Modules/actuators.py", line 236, in actuator_setcolor
2023-02-25 18:20:03.402 Error: Zigate: transitionMoveLevel = "%04x" % int(self.ListOfDevices[nwkid]["Param"]["moveToLevel"]) if "moveToLevel" in self.ListOfDevices[nwkid]["Param"] else "0000"
2023-02-25 18:20:03.402 Error: Zigate: KeyError: 'Param'
Je ne pourrai pas dire exactement quand est apparu le problème avant ou après le nouvelle version de domoticz.

Merci d’avance pour vos réponses.

Version de DomoticZ : 2023.1 dans un container docker
Version de Python utilisée par DomoticZ (dans Configuration / A propos) : Python Version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
Système sur lequel tourne DomoticZ avec le plugin : Synology DS-415+ DSM 7.1.1-42962 Update 4
Modèle de coordinateur : ZiGate+V2
Version de coordinateur : USB
Version du firmware : numéro 03a0
Version du plugin : 6.3.010
Branche du plugin : stable6
Dernière modification par yahtala le 26 févr. 2023, 16:55, modifié 1 fois.
Yannick

Ma config :
DomoticZ 2023.1 - docker stable
Python Version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
Domoticz + Z4D : Synology DS923+ DSM 7.1.1-42962 Update 4
pipiche
Messages : 4677
Inscription : 04 avr. 2018, 16:16
Contact :

Re: Stable6 : Error - JSON call command setKelvinlevel -> Call to function 'onCommand' failed

Message par pipiche »

je pense que le bug est fixé sur la version à venir.
Si tu veux tu peux basculer sur la branche config-release-6.3.011 si tu veux vérifier, sinon attends la version 6.3.011 qui devrait sortir début Mars.

Code : Tout sélectionner

git checkout config-release-6.3.011
puis relancer le plugin

pour rebasculer sur la version stable6

Code : Tout sélectionner

git checkout stable6
git pull
yahtala
Messages : 39
Inscription : 15 févr. 2023, 17:42

Re: Stable6 : Error - JSON call command setKelvinlevel -> Call to function 'onCommand' failed

Message par yahtala »

Bonjour pipiche,

Merci pour ta réponse, toutefois ça n’a pas été un succès.
Après le passage sur la branche config-release-6.3.011 j’avais toujours les mêmes erreurs et d’autres sont apparues :

- Au chargement du plugin j’ai eu de nouvelles erreurs:

Code : Tout sélectionner

 2023-02-26 09:38:55.435 Error: Zigate: --> JSON ConfFile: /opt/domoticz/userdata/plugins/Zigate/Conf/Certified/Lixee/ZLinky_TIC-historique-mono.json load failed with error: 'ascii' codec can't decode byte 0xc3 in position 75: ordinal not in range(128)
2023-02-26 09:38:55.436 Error: Zigate: --> JSON ConfFile: /opt/domoticz/userdata/plugins/Zigate/Conf/Certified/Lixee/ZLinky_TIC-standard-tri.json load failed with error: 'ascii' codec can't decode byte 0xc3 in position 73: ordinal not in range(128)
2023-02-26 09:38:55.436 Error: Zigate: --> JSON ConfFile: /opt/domoticz/userdata/plugins/Zigate/Conf/Certified/Lixee/ZLinky_TIC-historique-tri.json load failed with error: 'ascii' codec can't decode byte 0xc3 in position 74: ordinal not in range(128)
2023-02-26 09:38:55.436 Error: Zigate: --> JSON ConfFile: /opt/domoticz/userdata/plugins/Zigate/Conf/Certified/Lixee/ZLinky_TIC-standard-tri-prod.json load failed with error: 'ascii' codec can't decode byte 0xc3 in position 73: ordinal not in range(128)
2023-02-26 09:38:55.438 Error: Zigate: --> JSON ConfFile: /opt/domoticz/userdata/plugins/Zigate/Conf/Certified/Lixee/ZLinky_TIC-standard-mono.json load failed with error: 'ascii' codec can't decode byte 0xc3 in position 73: ordinal not in range(128)
2023-02-26 09:38:55.438 Error: Zigate: --> JSON ConfFile: /opt/domoticz/userdata/plugins/Zigate/Conf/Certified/Lixee/ZLinky_TIC-standard-mono-prod.json load failed with error: 'ascii' codec can't decode byte 0xc3 in position 73: ordinal not in range(128)
2023-02-26 09:38:55.508 Error: Zigate: --> JSON ConfFile: /opt/domoticz/userdata/plugins/Zigate/Conf/Certified/Tuya/TS0202-_TZ3210_jijr1sss.json load failed with error: 'ascii' codec can't decode byte 0xe2 in position 28: ordinal not in range(128)
2023-02-26 09:38:55.542 Error: Zigate: --> JSON ConfFile: /opt/domoticz/userdata/plugins/Zigate/Conf/Certified/Profalux/MOT-C1Z06C.json load failed with error: 'ascii' codec can't decode byte 0xc3 in position 41: ordinal not in range(128)
2023-02-26 09:38:55.544 Error: Zigate: --> JSON ConfFile: /opt/domoticz/userdata/plugins/Zigate/Conf/Certified/Profalux/MOT-C1Z06F.json load failed with error: 'ascii' codec can't decode byte 0xc3 in position 41: ordinal not in range(128)
- Après être repassé en stable6, j’ai redémarré le plugin par l’interface web et j’ai eu ça :

Code : Tout sélectionner

 2023-02-26 09:44:45.738 Error: Zigate: Call to function 'onMessage' failed, exception details:
2023-02-26 09:44:45.743 Error: Zigate: Traceback (most recent call last):
2023-02-26 09:44:45.743 Error: Zigate: File "/opt/domoticz/userdata/plugins/Zigate/plugin.py", line 1557, in onMessage
2023-02-26 09:44:45.743 Error: Zigate: _plugin.onConnect(Connection, Status, Description)
2023-02-26 09:44:45.743 Error: Zigate: File "/opt/domoticz/userdata/plugins/Zigate/plugin.py", line 813, in onMessage
2023-02-26 09:44:45.743 Error: Zigate: self.webserver.onMessage(Connection, Data)
2023-02-26 09:44:45.743 Error: Zigate: File "/opt/domoticz/userdata/plugins/Zigate/Classes/WebServer/onMessage.py", line 65, in onMessage
2023-02-26 09:44:45.743 Error: Zigate: self.do_rest(Connection, Data["Verb"], Data["Data"], parsed_query[1], parsed_query[2], parsed_query[3:])
2023-02-26 09:44:45.743 Error: Zigate: File "/opt/domoticz/userdata/plugins/Zigate/Classes/WebServer/dispatcher.py", line 112, in do_rest
2023-02-26 09:44:45.743 Error: Zigate: HTTPresponse = REST_COMMANDS[command]["function"](verb, data, parameters)
2023-02-26 09:44:45.743 Error: Zigate: File "/opt/domoticz/userdata/plugins/Zigate/Classes/WebServer/WebServer.py", line 386, in rest_plugin_restart
2023-02-26 09:44:45.743 Error: Zigate: KeyError: 'Mode5'
J’ai donc redémarré le container pour redémarrer domoticz, les erreurs sur les fichiers de conf sont toujours là mais le plugin zigate redémarre normalement.
Yannick

Ma config :
DomoticZ 2023.1 - docker stable
Python Version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
Domoticz + Z4D : Synology DS923+ DSM 7.1.1-42962 Update 4
yahtala
Messages : 39
Inscription : 15 févr. 2023, 17:42

Re: Stable6 : Error - JSON call command setKelvinlevel -> Call to function 'onCommand' failed

Message par yahtala »

Le problème initial à disparu…
Plus d’erreur au changement de couleur (Kelvin level) et la chaleur des ampoules changent bien.

Il semblerait que les ampoules ne recevait plus d’instruction du coordinateur.
Dans la partie gestion des objets, elles étaient en « not reachable », je ne sais pas si c’est vraiment lié, parce que j’ai quelques objets dans le même état et qui pourtant reçoivent bien l’instruction On/Off.

Par contre pour les autres erreurs c’est encore présent. Je ferai un autre sujet pour les traiter.
Yannick

Ma config :
DomoticZ 2023.1 - docker stable
Python Version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
Domoticz + Z4D : Synology DS923+ DSM 7.1.1-42962 Update 4
Répondre