Page 1 sur 1

[Résolu] start_zigpy_task error in radio_start: near "<": syntax error

Publié : 05 juil. 2025, 12:21
par Chrominator
Hello, j'ai un peu besoin d'aide.

Contexte :
Homebrige se plaignait de node.js trop vieux à son goût, et node.js avait besoin d'un GLIBC >=2.31, ce que je n'avais pas.

J'ai mis à jour mon Ubuntu vers 24.02.2

Code : Tout sélectionner

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.2 LTS
Release:        24.04
Codename:       noble
et concernant domoticz :

Code : Tout sélectionner

Version: 2025.1 (build 16615)
Build Hash: ab452c0b3
Compile Date: 2025-04-07 08:58:56
dzVents Version: 3.1.8
Python Version: 3.12.3 (main, Jun 18 2025, 17:59:45) [GCC 13.3.0]
Python est passé en version 3.12.3

C'est là que les ennuis commencent.
Zigbee4domoticz ne démarrait plus.
J'ai suivi le tuto https://zigbeefordomoticz.github.io/wiki/fr-fr/Tuto_PythonVirtualEnv.html et ça a plutôt bien fonctionné.
Enfin après avoir ajouté manuellement pip dans l'environnement virtuel car l'update du plugin plantait.

Bref j'en arrive à ce qui bloque maintenant, j'ai une erreur au démarrage du plugin et je n'arrive pas à résoudre celle là (à 12:07:35.993 plus bas ici).

zigbee4domoticz Plugin: 7.1.022 [6.466]
et son error log :
errors(2).json
(34.75 Kio) Téléchargé 370 fois
Log de domoticz :

Code : Tout sélectionner

 2025-07-05 12:07:31.508 Zigbee TI CC2531: Worker thread started.
2025-07-05 12:07:31.508 Status: Zigbee TI CC2531: Entering work loop.
2025-07-05 12:07:31.509 Status: Zigbee TI CC2531: Started.
2025-07-05 12:07:31.944 Status: Zigbee TI CC2531: Initialized version 7.1, author 'pipiche38'
2025-07-05 12:07:31.947 Status: Zigbee TI CC2531: Welcome to Zigbee for Domoticz (Z4D) plugin. (c)pipiche38 - 2018 - 2025
2025-07-05 12:07:31.947 Zigbee TI CC2531: PYTHONPATH is set to: /home/domoticz/Domoticz_Python_Environment:
2025-07-05 12:07:31.947 Status: Zigbee TI CC2531: Z4D requires python3.9 or above and you are running 3.12
2025-07-05 12:07:31.948 Status: Zigbee TI CC2531: Z4D is loading configuration settings
2025-07-05 12:07:31.948 Zigbee TI CC2531: Loading PluginConf - from Domoticz sqlite Db
2025-07-05 12:07:31.949 Zigbee TI CC2531: /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-41.json timestamp is 1742821606.3352556
2025-07-05 12:07:31.949 Zigbee TI CC2531: Dz PluginConf is older than Json Dz: 0 Json: 1742821606.3352556
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: PluginAnalytics set to 1
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: EnergyScanAtStatup set to 0
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: Lang set to fr_FR
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: channel set to 11
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: filename set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-41.json
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: pluginHome set to /home/pi/domoticz/plugins/Domoticz-Zigbee
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: homedirectory set to /home/pi/domoticz/plugins/Domoticz-Zigbee
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: pluginData set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Data
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: pluginConfig set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Conf
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: pluginOTAFirmware set to /home/pi/domoticz/plugins/Domoticz-Zigbee/OTAFirmware
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: pluginReports set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Reports
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: pluginWWW set to /home/pi/domoticz/plugins/Domoticz-Zigbee/www
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: pluginLogs set to /home/pi/domoticz/plugins/Domoticz-Zigbee/Logs
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: SSLCertificate set to /home/pi/domoticz/plugins/Domoticz-Zigbee/certs/server.crt
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: SSLPrivateKey set to /home/pi/domoticz/plugins/Domoticz-Zigbee/certs/server.key
2025-07-05 12:07:31.949 Status: Zigbee TI CC2531: Lumi set to 1
2025-07-05 12:07:31.950 Status: Zigbee TI CC2531: ControllerInRawMode set to True
2025-07-05 12:07:31.950 Status: Zigbee TI CC2531: expJsonDatabase set to 0
2025-07-05 12:07:31.950 Status: Zigbee TI CC2531: ControllerInRawMode set to True
2025-07-05 12:07:32.048 Status: Zigbee TI CC2531: Z4D is checking the python modules requirements
2025-07-05 12:07:32.048 Status: Zigbee TI CC2531: Checking Python modules /home/pi/domoticz/plugins/Domoticz-Zigbee/constraints.txt
2025-07-05 12:07:32.049 Status: Zigbee TI CC2531: - zigpy==0.80.0 version required 0.80.0 installed 0.80.0
2025-07-05 12:07:32.050 Status: Zigbee TI CC2531: - zigpy_znp==0.14.0 version required 0.14.0 installed 0.14.0
2025-07-05 12:07:32.051 Status: Zigbee TI CC2531: - zigpy_deconz==0.25.0 version required 0.25.0 installed 0.25.0
2025-07-05 12:07:32.051 Status: Zigbee TI CC2531: - bellows==0.45.0 version required 0.45.0 installed 0.45.0
2025-07-05 12:07:32.052 Status: Zigbee TI CC2531: - dnspython==2.7.0 version required 2.7.0 installed 2.7.0
2025-07-05 12:07:32.053 Status: Zigbee TI CC2531: - pyserial>=3.5 version required 3.5 installed 3.5
2025-07-05 12:07:32.054 Status: Zigbee TI CC2531: - charset-normalizer==2.0.11 version required 2.0.11 installed 2.0.11
2025-07-05 12:07:32.054 Status: Zigbee TI CC2531: - jsonschema==4.17.3 version required 4.17.3 installed 4.17.3
2025-07-05 12:07:32.055 Status: Zigbee TI CC2531: - cryptography<=40.0.2 version required 40.0.2 installed 40.0.2
2025-07-05 12:07:32.055 Status: Zigbee TI CC2531: Z4D is installing the WebUI in the domoticz custom menu
2025-07-05 12:07:32.056 Status: Zigbee TI CC2531: Z4D Please watch plugin logs into /home/pi/domoticz/plugins/Domoticz-Zigbee/Logs/PluginZigbee_41.log
2025-07-05 12:07:32.057 Status: Zigbee TI CC2531: Z4D is initializing a connection to Domoticz Api/Json
2025-07-05 12:07:32.059 Status: Zigbee TI CC2531: Z4D is starting with stable7-7.1.022
2025-07-05 12:07:32.117 Status: Zigbee TI CC2531: Z4D loads ZCL Cluster definitions
2025-07-05 12:07:32.127 Status: Zigbee TI CC2531: Z4D loaded 16 configuration from legacy database.
2025-07-05 12:07:32.128 Status: Zigbee TI CC2531: Z4D loads 0 configuration from the local certified Db.
2025-07-05 12:07:32.203 Status: Zigbee TI CC2531: Z4D loads 644 certified devices from repository version [6.466]
2025-07-05 12:07:32.203 Status: Zigbee TI CC2531: Z4D loading plugin database
2025-07-05 12:07:32.322 Status: Zigbee TI CC2531: Z4D loads 24 entries from /home/pi/domoticz/plugins/Domoticz-Zigbee/Data/DeviceList-41.txt
2025-07-05 12:07:32.331 Status: Zigbee TI CC2531: Z4D is starting transport Mode: 'ZigpyZNP' Serial: '/dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0019386DD0-if00' IP: '0.0.0.0 'Port: '9999'
2025-07-05 12:07:32.874 Status: Zigbee TI CC2531: Z4D starting ZNP
2025-07-05 12:07:32.874 Status: Zigbee TI CC2531: Z4D starting WebUI on port 9440
2025-07-05 12:07:32.880 Status: Zigbee TI CC2531: Plugin looks to upgrade the Certified Device package
2025-07-05 12:07:33.347 Error: Zigbee TI CC2531: Certified Device package upgrade results
2025-07-05 12:07:33.348 Error: Zigbee TI CC2531:
2025-07-05 12:07:33.350 Status: Zigbee TI CC2531: Z4D Widgets usage is at 22.7% (197 units free)
2025-07-05 12:07:33.350 Status: Zigbee TI CC2531: Z4D started with Domoticz legacy Framework
2025-07-05 12:07:35.943 Status: Zigbee TI CC2531: ++ Started radio znp port: /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0019386DD0-if00
2025-07-05 12:07:35.943 Status: Zigbee TI CC2531: ++ Use of Zigpy Persistent Db
2025-07-05 12:07:35.993 Error: Zigbee TI CC2531: start_zigpy_task error in radio_start: near "<": syntax error
2025-07-05 12:09:32.066 Error: Zigbee TI CC2531: [120] I have hard time to get Coordinator Version. Most likely there is a communication issue
2025-07-05 12:09:42.092 Error: Zigbee TI CC2531: [130] I have hard time to get Coordinator Version. Most likely there is a communication issue
2025-07-05 12:09:52.070 Error: Zigbee TI CC2531: [140] I have hard time to get Coordinator Version. Most likely there is a communication issue
Merci de m'avoir lu jusqu'ici, et merci de vos conseils pour réussir à démarrer ce plugin qui me manque terriblement ! ;)

Re: start_zigpy_task error in radio_start: near "<": syntax error

Publié : 06 juil. 2025, 10:27
par pipiche
peux-tu faire la manip suivante:

1- changement de branch du plugin

Code : Tout sélectionner

git pull
git checkout rc-7.1.023
git pull
2- update des modules python dans l'env

Code : Tout sélectionner

export PYTHONPATH=/home/domoticz/Domoticz_Python_Environment:$PYTHONPATH
Tools/plugin-auto-upgrade.sh
3- Arret de domoticz + plugin

4- activer du debug

edition du fichier

Code : Tout sélectionner

/home/pi/domoticz/plugins/Domoticz-Zigbee/Conf/PluginConf-41.json


et ajouter les 2 lignes suivantes (fais le au milieu du fichier, pour faire simple)

Code : Tout sélectionner

 
   "Python/zigpy": 1,
  "Python/zigpy-appdb": 1,
  "Python/zigpy-application": 1, 
  "TransportZigpy": 1,
  "ZigpyZNP": 1,
  
5- relances Domoticz et le Plugin

6- droppes ici le fichier de log

Code : Tout sélectionner

/home/pi/domoticz/plugins/Domoticz-Zigbee/Logs/PluginZigbee_41.log


[EDIT] could be linked to https://github.com/zigpy/zigpy/issues/1493

Re: start_zigpy_task error in radio_start: near "<": syntax error

Publié : 06 juil. 2025, 12:16
par Chrominator
Merci Pipiche pour ton temps à me répondre.

Le premier git pull a indiqué que j'étais à jour.
Le second aussi, après le changement de branche "git checkout rc-7.1.023"

Ensuite le script Tools/plugin-auto-upgrade.sh s'est mal terminé (voir log ci-dessous).
trace plugin-auto-upgrade.sh.zip
(1.94 Kio) Téléchargé 115 fois
Après redémarrage de domoticz et du plugin, j'ai eu un message d'erreur dans le log de dz :

Code : Tout sélectionner

2025-07-06 11:13:52.373  Error: Zigbee TI CC2531: Looks like zigpy==0.80.1 Python module is not installed or does not meet the required version. Requires 0.80.1, Installed 0.80.0.Make sure to install the required Python3 module with the correct version.
2025-07-06 11:13:52.373  Error: Zigbee TI CC2531: Use the command:
2025-07-06 11:13:52.373  Error: Zigbee TI CC2531: sudo python3 -m pip install -r requirements.txt --upgrade
2025-07-06 11:13:52.373  Zigbee TI CC2531: onStop()
J'ai forcé la mise à jour avec

Code : Tout sélectionner

python3 -m pip install -r requirements.txt --upgrade -t /home/domoticz/Domoticz_Python_Environment
Ca a bien installé la bonne version de zigpy, mais maintenant je butte sur bellows==0.45.1

Au démarrage j'ai ce message d'erreur dans dz :

Code : Tout sélectionner

 2025-07-06 12:07:22.459 Error: Zigbee TI CC2531: Looks like bellows==0.45.1 Python module is not installed or does not meet the required version. Requires 0.45.1, Installed 0.45.0.Make sure to install the required Python3 module with the correct version.
2025-07-06 12:07:22.459 Error: Zigbee TI CC2531: Use the command:
2025-07-06 12:07:22.459 Error: Zigbee TI CC2531: sudo python3 -m pip install -r requirements.txt --upgrade
2025-07-06 12:07:22.459 Zigbee TI CC2531: onStop()
Pourtant quand je lance

Code : Tout sélectionner

python3 -m pip --no-input install -r requirements.txt --ignore-requires-python --upgrade -t /home/domoticz/Domoticz_Python_Environment
la trace confirme que bellows-0.45.1 est bien installé.
trace_pip_manuel.log
(11.17 Kio) Téléchargé 73 fois
Le fichier /home/pi/domoticz/plugins/Domoticz-Zigbee/Logs/PluginZigbee_41.log n'a pas évolué depuis ces changements, je suppose que le process stoppe un peu tôt pour qu'on ait quelque chose dedans.

Que faire ?

Re: start_zigpy_task error in radio_start: near "<": syntax error

Publié : 06 juil. 2025, 19:55
par pipiche
As-tu la possibilité d'etre avec python3.11 au lieu de 3.12 ? je pense que c'est la source de ton problème ?

Re: start_zigpy_task error in radio_start: near "<": syntax error

Publié : 07 juil. 2025, 00:06
par Chrominator
Bon je n'avais pas python3.11
Je suis allé le chercher dans des dépôts parallèles (Deadsnakes PPA) car il ne fait plus partie de la distribution d'Ubuntu, maintenant je l'ai.
Même erreur.
Je suis allé chercher python3.10 et j'ai effacé des restes de son installation avant ma migration vers 24.04.
Même erreur.

Je me suis dit que ça valait la peine de reprendre depuis le début, surtout que j'avais installé manuellement zigpy (le script Tools/plugin-auto-upgrade.sh se terminant sur une erreur).
J'ai supprimé zigpy et bellows.
J'ai bien mis par défaut python3.10 :

Code : Tout sélectionner

update-alternatives --config python
There are 3 choices for the alternative python (providing /usr/bin/python).

  Selection    Path                 Priority   Status
------------------------------------------------------------
* 0            /usr/bin/python3.10   3         auto mode
  1            /usr/bin/python3.10   3         manual mode
  2            /usr/bin/python3.11   2         manual mode
  3            /usr/bin/python3.12   1         manual mode
J'ai supprimé tous ce que contenait /home/domoticz/Domoticz_Python_Environment et j'ai relancé la procédure https://zigbeefordomoticz.github.io/wiki/fr-fr/Tuto_PythonVirtualEnv.html en choisissant l'environnement spécifique python3.10, et cette fois-ci les versions correspondent bien.
Et bien, domoticz s'en fiche, il fonctionne avec python3.12, et le plugin zigbee4domoticz aussi.

Du coup l'erreur est différente maintenant, mais ça n'a pas beaucoup avancé.

Code : Tout sélectionner

2025-07-06 23:35:35,637 ERROR   : [ ZigpyCom_41 6523] [   TransportZigpy] start_zigpy_task error in radio_start: 'App_znp' object has no attribute 'log'
2025-07-06 23:35:35,639 INFO    :b'worker_loop - ZigyTransport: worker_loop start.'
J'ai essayé plein de trucs, même de modifier les liens de/usr/bin/pythonxxx pour limiter les possibilités à python3.10 (dangereux pour un système où python3.12 est la version de base), ça n'a rien changé. Toujours le 3.12 qui sert aux plugins et à domoticz.
Je n'ai pas envie de rétrograder mon système vers Ubuntu 22.04 que j'avais hier matin, ça ne va pas dans le bon sens.
Mais je suis bien embêté quand même.

Ce n'est peut-être pas le bon timing pour passer à Ubuntu 24.04.

Re: start_zigpy_task error in radio_start: near "<": syntax error

Publié : 07 juil. 2025, 09:28
par Chrominator
pipiche a écrit : 06 juil. 2025, 10:27 [EDIT] could be linked to https://github.com/zigpy/zigpy/issues/1493
En effet, il doit y avoir un souci pour zigpy avec python3.12

J'ai remis l'installation sur la branche stable, refait la procédure https://zigbeefordomoticz.github.io/wiki/fr-fr/Tuto_PythonVirtualEnv.html puis j'ai modifié le script tel que l'a fait stevedh42 dans https://github.com/zigpy/zigpy/issues/1493#issue-2617653046 et tout fonctionne.

Merci pipiche pour ta patience, de mon côté tout est ok.

Re: [RESOLU] start_zigpy_task error in radio_start: near "<": syntax error

Publié : 07 juil. 2025, 09:43
par pipiche
super !