Mais, après avoir consulté les différents posts, je n’ai pas vu de conclusion (sauf erreur) disant la position à adopter quant à la mise à jour de z2m vers une v2.1.x. depuis la 1.42.0.
Je rencontre le même problème que beaucoup, à savoir que le démon de jeezigbee ne démarre pas en version 2.1.x. Je suis en version 1.42.0 sous jeedom 4.4.19 sur raspberry pi4.
Et j’ai le dongle sonoff ZBDongle-E en version firmware EZSP.
J’ai essayé de supprimer la ligne « device » dans la config yaml sans succès.
Ma question est donc de savoir s’il faut rester en 1.42 en attendant une correction, ou est-ce que le problème vient de ma conf ?
OK merci pour l’intérêt que tu portes à mon problème. Je vais fournir ces éléments. Je vais faire ça demain, il faut que je redémarre sur la carte SD qui me sert d’environnement de test.
Bonjour Antoine,
Etant dans mon environnement de test en z2m 1.42.0, je viens donc de relancer l’installation des dépendances, z2m est bien passé en v2.1.3 et comme prévu le démon ne démarre pas. Voici les logs :
log z2m_packages:
0000|+ echo '*******************Begin of package installation******************'
0001|*******************Begin of package installation******************
0002|+ touch /tmp/jeedom_install_in_progress_z2m
0003|+ echo 1
0004|+ echo 2
0005|+ sudo chmod +x /var/www/html/core/class/../../plugins/z2m/resources/pre-install.sh
0006|+ sudo /var/www/html/core/class/../../plugins/z2m/resources/pre-install.sh
0007|Launch pre-install of z2m dependancy
0008|+ echo 3
0009|+ php /var/www/html/core/class/../php/jeecli.php plugin install mqtt2
0010|+ echo 4
0011|+ sudo killall apt apt-get unattended-upgr
0012|apt: no process found
0013|apt-get: no process found
0014|+ sudo rm /var/lib/apt/lists/lock
0015|+ sudo rm /var/cache/apt/archives/lock
0016|+ sudo rm /var/lib/dpkg/lock /var/lib/dpkg/lock-frontend
0017|+ sudo sudo dpkg --configure -a --force-confdef
0018|+ sudo apt update
0019|WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0020|Hit:1 https://deb.nodesource.com/node_20.x nodistro InRelease
0021|Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease
0022|Hit:3 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
0023|Reading package lists...
0024|Building dependency tree...
0025|Reading state information...
0026|85 packages can be upgraded. Run 'apt list --upgradable' to see them.
0027|+ echo 5
0028|+ sudo chmod +x /var/www/html/core/class/../../resources/install_nodejs.sh
0029|+ sudo /var/www/html/core/class/../../resources/install_nodejs.sh
0030|Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
0031|Hit:2 https://deb.nodesource.com/node_20.x nodistro InRelease
0032|Hit:3 http://archive.raspberrypi.org/debian bullseye InRelease
0033|Reading package lists...
0034|Reading package lists...
0035|Building dependency tree...
0036|Reading state information...
0037|apt-utils is already the newest version (2.2.4).
0038|build-essential is already the newest version (12.9).
0039|git is already the newest version (1:2.30.2-1+deb11u4).
0040|lsb-release is already the newest version (11.1.0+rpi1).
0041|0 upgraded, 0 newly installed, 0 to remove and 85 not upgraded.
0042|[Check Version NodeJS actuelle : v20.18.1 : [ OK ]
0043|[Check Prefix : /usr and sudo prefix : /usr and www-data prefix : /usr : [ OK ]
0044|Clean npm cache
0045|npm warn using --force Recommended protections disabled.
0046|+ echo 6
0047|+ sudo apt install -o Dpkg::Options::=--force-confdef -y php-yaml
0048|WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0049|Reading package lists...
0050|Building dependency tree...
0051|Reading state information...
0052|php-yaml is already the newest version (2.2.1+2.1.0+2.0.4+1.3.2-2).
0053|0 upgraded, 0 newly installed, 0 to remove and 85 not upgraded.
0054|+ echo 7
0055|+ sudo systemctl restart apache2
0056|+ echo 8
0057|+ sudo chmod +x /var/www/html/core/class/../../plugins/z2m/resources/post-install.sh
0058|+ sudo /var/www/html/core/class/../../plugins/z2m/resources/post-install.sh
0059|+ echo Launch post-install of z2m dependancy
0060|Launch post-install of z2m dependancy
0061|+ realpath /var/www/html/core/class/../../plugins/z2m/resources/post-install.sh
0062|+ dirname /var/www/html/plugins/z2m/resources/post-install.sh
0063|+ BASEDIR=/var/www/html/plugins/z2m/resources
0064|+ [ -d /var/www/html/plugins/z2m/resources/zigbee2mqtt ]
0065|+ rm -rf /var/www/html/plugins/z2m/resources/zigbee2mqtt
0066|+ mkdir /var/www/html/plugins/z2m/resources/zigbee2mqtt
0067|+ git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /var/www/html/plugins/z2m/resources/zigbee2mqtt
0068|Cloning into '/var/www/html/plugins/z2m/resources/zigbee2mqtt'...
0069|+ cd /var/www/html/plugins/z2m/resources/zigbee2mqtt
0070|+ [ -f /var/www/html/plugins/z2m/resources/../data/wanted_z2m_version ]
0071|+ npm ci
0072|npm error code EUSAGE
0073|npm error
0074|npm error The `npm ci` command can only install with an existing package-lock.json or
0075|npm error npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or
0076|npm error later to generate a package-lock.json file, then try again.
0077|npm error
0078|npm error Clean install a project
0079|npm error
0080|npm error Usage:
0081|npm error npm ci
0082|npm error
0083|npm error Options:
0084|npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
0085|npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
0086|npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
0087|npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
0088|npm error [--no-bin-links] [--no-fund] [--dry-run]
0089|npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
0090|npm error [-ws|--workspaces] [--include-workspace-root] [--install-links]
0091|npm error
0092|npm error aliases: clean-install, ic, install-clean, isntall-clean
0093|npm error
0094|npm error Run "npm help ci" for more info
0095|npm error A complete log of this run can be found in: /root/.npm/_logs/2025-03-08T09_17_56_129Z-debug-0.log
0096|+ npm run build
0097|> zigbee2mqtt@2.1.3 build
0098|> tsc && node index.js writehash
0099|sh: 1: tsc: not found
0100|+ chown www-data:www-data -R /var/www/html/plugins/z2m/resources/zigbee2mqtt
0101|+ echo 9
0102|+ php /var/www/html/core/class/../php/jeecli.php plugin dependancy_end z2m
0103|rm: invalid option -- '/'
0104|Try 'rm --help' for more information.
0105|+ echo 10
0106|+ rm /tmp/jeedom_install_in_progress_z2m
0107|+ echo '*******************End of package installation******************'
0108|*******************End of package installation******************
log z2md:
0000|> zigbee2mqtt@1.42.0 start
0001|> node index.js
0002|Starting Zigbee2MQTT without watchdog.
0003|[2025-03-06 19:28:27] e[31merrore[39m: z2m: Failed to load external converter file '/var/www/html/plugins/z2m/core/class/../config/converters/Danfoss/icon.js' (Cannot find module 'zigbee-herdsman-converters/lib/extend'
0004|Require stack:
0005|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/dist/util/utils.js
0006|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/dist/util/settings.js
0007|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js)
0008|[2025-03-06 19:28:27] e[31merrore[39m: z2m: Probably there is a syntax error in the file or the external converter is not compatible with the current Zigbee2MQTT version
0009|[2025-03-06 19:28:27] e[31merrore[39m: z2m: Note that external converters are not meant for long term usage, it's meant for local testing after which a pull request should be created to add out-of-the-box support for the device
0010|> zigbee2mqtt@1.42.0 start
0011|> node index.js
0012|Starting Zigbee2MQTT without watchdog.
0013|[2025-03-07 10:15:31] e[31merrore[39m: z2m: Failed to load external converter file '/var/www/html/plugins/z2m/core/class/../config/converters/Danfoss/icon.js' (Cannot find module 'zigbee-herdsman-converters/lib/extend'
0014|Require stack:
0015|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/dist/util/utils.js
0016|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/dist/util/settings.js
0017|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js)
0018|[2025-03-07 10:15:31] e[31merrore[39m: z2m: Probably there is a syntax error in the file or the external converter is not compatible with the current Zigbee2MQTT version
0019|[2025-03-07 10:15:31] e[31merrore[39m: z2m: Note that external converters are not meant for long term usage, it's meant for local testing after which a pull request should be created to add out-of-the-box support for the device
0020|> zigbee2mqtt@1.42.0 start
0021|> node index.js
0022|Starting Zigbee2MQTT without watchdog.
0023|[2025-03-07 20:15:04] e[31merrore[39m: z2m: Failed to load external converter file '/var/www/html/plugins/z2m/core/class/../config/converters/Danfoss/icon.js' (Cannot find module 'zigbee-herdsman-converters/lib/extend'
0024|Require stack:
0025|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/dist/util/utils.js
0026|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/dist/util/settings.js
0027|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js)
0028|[2025-03-07 20:15:04] e[31merrore[39m: z2m: Probably there is a syntax error in the file or the external converter is not compatible with the current Zigbee2MQTT version
0029|[2025-03-07 20:15:04] e[31merrore[39m: z2m: Note that external converters are not meant for long term usage, it's meant for local testing after which a pull request should be created to add out-of-the-box support for the device
0030|> zigbee2mqtt@2.1.3 start
0031|> node index.js
0032|node:internal/modules/cjs/loader:1228
0033|throw err;
0034|^
0035|Error: Cannot find module 'semver'
0036|Require stack:
0037|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js
0038|at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
0039|at Module._load (node:internal/modules/cjs/loader:1051:27)
0040|at Module.require (node:internal/modules/cjs/loader:1311:19)
0041|at require (node:internal/modules/helpers:179:18)
0042|at Object.<anonymous> (/var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js:1:16)
0043|at Module._compile (node:internal/modules/cjs/loader:1469:14)
0044|at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
0045|at Module.load (node:internal/modules/cjs/loader:1288:32)
0046|at Module._load (node:internal/modules/cjs/loader:1104:12)
0047|at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12) {
0048|code: 'MODULE_NOT_FOUND',
0049|requireStack: [ '/var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js' ]
0050|}
0051|Node.js v20.18.1
0052|> zigbee2mqtt@2.1.3 start
0053|> node index.js
0054|node:internal/modules/cjs/loader:1228
0055|throw err;
0056|^
0057|Error: Cannot find module 'semver'
0058|Require stack:
0059|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js
0060|at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
0061|at Module._load (node:internal/modules/cjs/loader:1051:27)
0062|at Module.require (node:internal/modules/cjs/loader:1311:19)
0063|at require (node:internal/modules/helpers:179:18)
0064|at Object.<anonymous> (/var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js:1:16)
0065|at Module._compile (node:internal/modules/cjs/loader:1469:14)
0066|at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
0067|at Module.load (node:internal/modules/cjs/loader:1288:32)
0068|at Module._load (node:internal/modules/cjs/loader:1104:12)
0069|at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12) {
0070|code: 'MODULE_NOT_FOUND',
0071|requireStack: [ '/var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js' ]
0072|}
0073|Node.js v20.18.1
0074|> zigbee2mqtt@2.1.3 start
0075|> node index.js
0076|node:internal/modules/cjs/loader:1228
0077|throw err;
0078|^
0079|Error: Cannot find module 'semver'
0080|Require stack:
0081|- /var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js
0082|at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
0083|at Module._load (node:internal/modules/cjs/loader:1051:27)
0084|at Module.require (node:internal/modules/cjs/loader:1311:19)
0085|at require (node:internal/modules/helpers:179:18)
0086|at Object.<anonymous> (/var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js:1:16)
0087|at Module._compile (node:internal/modules/cjs/loader:1469:14)
0088|at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
0089|at Module.load (node:internal/modules/cjs/loader:1288:32)
0090|at Module._load (node:internal/modules/cjs/loader:1104:12)
0091|at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12) {
0092|code: 'MODULE_NOT_FOUND',
0093|requireStack: [ '/var/www/html/plugins/z2m/resources/zigbee2mqtt/index.js' ]
0094|}
0095|Node.js v20.18.1
OK merci pour ta réponse. J’en déduis qu’il faut forcer la version de npn avec la commande : ```
npm install -g pnpm@10.4.1. C’est bien ça ?
Entre temps j’ai refais l’installation de npm et j’ai la version 10.6.1, donc ce n’est pas bon je pense.
Parfait. Alors comme j’avais déjà passé la commande « npm install -g pnpm » je n’ai pas modifié le fichier .sh pour forcer la version pnpm en 10.4.1.
J’ai donc la version 10.6.1 de pnpm. J’ai relancé l’installation des dépendances et ça fonctionne.
Super. Encore merci pour vos réponses et réactivité.
En fait ça ne fonctionne pas. J’ai du redémarré Jeedom ce matin et le démon jeezigbee ne redémarre pas alors qu’il a tourné hier toute la journée. Je ne comprends pas.
La log z2md indique maintenant un problème de configuration au niveau du « device_options ».
Voici le fichier de conf, effectivement la ligne « device » apparait avec des « [ » « ] » après les « : » Je ne sais pas comment elle était à l’issue de la migration.
J’ai mis un # devant pour la mettre en commentaire. Le démon est démarré et tient.
Je préfère ça !
Merci mille fois. Je me voyais reparti dans une galère.