Mise à jour des dépendances Z2M version 2.1.2 en erreur

Merci, mais cela ne passe pas lors de l’installation du deamon malgré la modif.

Le log :

#######################################################
#    INSTALL : Zigbee2mqtt                            #
#######################################################
#######################################################
##### apt-get update in progress
Hit:1 http://security.debian.org bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://deb.debian.org/debian bullseye-backports InRelease
Hit:5 https://deb.nodesource.com/node_20.x nodistro InRelease
Hit:6 http://www.deb-multimedia.org bullseye InRelease
Hit:7 https://oph.mdrjr.net/meveric all InRelease
Hit:8 https://oph.mdrjr.net/meveric bullseye InRelease
Reading package lists...
#######################################################
##### Install or update Git
Reading package lists...
Building dependency tree...
Reading state information...
g++ is already the newest version (4:10.2.1-1).
gcc is already the newest version (4:10.2.1-1).
make is already the newest version (4.3-4.1).
git is already the newest version (1:2.30.2-1+deb11u4).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
#######################################################
##### Install or update NodeJs
NodeJs 20 already installed : Nothing to do !
pnpm install version 9.15.6
changed 1 package in 8s
1 package is looking for funding
run `npm fund` for details
#######################################################
#    INSTALLING : Mosquitto for Php                   #
#######################################################
Mosquitto for Php is already installed, nothing to do
##### Z2M BRANCH version to install : master
#######################################################
##### Install Socat
Socat is already installed, nothing to do
#######################################################
##### Install yaml php and restart apache
Yaml is already installed, nothing to do
#######################################################
#####    Stopping Zigbee2mqtt deamon                  #
## Supprime l'installation dans /opt/zigbee2mqtt
#######################################################
##### Complete installation : Download Zigbee2mqtt git
Cloning into '/opt/zigbee2mqtt'...
#######################################################
##### Install/Update Zigbee2mqtt
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +363
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 363, reused 0, downloaded 0, added 0
Progress: resolved 363, reused 0, downloaded 4, added 0
Progress: resolved 363, reused 0, downloaded 32, added 19
Progress: resolved 363, reused 0, downloaded 54, added 43
Progress: resolved 363, reused 0, downloaded 85, added 75
Progress: resolved 363, reused 0, downloaded 133, added 119
Progress: resolved 363, reused 0, downloaded 163, added 157
Progress: resolved 363, reused 0, downloaded 181, added 167
Progress: resolved 363, reused 0, downloaded 217, added 205
Progress: resolved 363, reused 0, downloaded 237, added 230
Progress: resolved 363, reused 0, downloaded 264, added 254
Progress: resolved 363, reused 0, downloaded 311, added 298
Progress: resolved 363, reused 0, downloaded 319, added 311
Progress: resolved 363, reused 0, downloaded 325, added 312
Progress: resolved 363, reused 0, downloaded 355, added 347
Progress: resolved 363, reused 0, downloaded 363, added 363, done
.../node_modules/unix-dgram install$ node-gyp rebuild
.../node_modules/sd-notify install$ node-gyp rebuild
.../@serialport/bindings-cpp install$ node-gyp-build
.../esbuild@0.24.2/node_modules/esbuild postinstall$ node install.js
.../node_modules/unix-dgram install: gyp info it worked if it ends with ok
.../node_modules/unix-dgram install: gyp info using node-gyp@11.1.0
.../node_modules/unix-dgram install: gyp info using node@20.17.0 | linux | arm64
.../node_modules/sd-notify install: gyp info it worked if it ends with ok
.../node_modules/sd-notify install: gyp info using node-gyp@11.1.0
.../node_modules/sd-notify install: gyp info using node@20.17.0 | linux | arm64
.../esbuild@0.24.2/node_modules/esbuild postinstall: Done
.../@serialport/bindings-cpp install: Done
.../node_modules/sd-notify install: gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
.../node_modules/unix-dgram install: gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
.../node_modules/sd-notify install: gyp info spawn /usr/bin/python3
.../node_modules/unix-dgram install: gyp info spawn /usr/bin/python3
.../node_modules/sd-notify install: gyp info spawn args [
.../node_modules/sd-notify install: gyp info spawn args '/usr/lib/node_modules/pnpm/dist/node_modules/node-gyp/gyp/gyp_main.py',
.../node_modules/sd-notify install: gyp info spawn args 'binding.gyp',
.../node_modules/sd-notify install: gyp info spawn args '-f',
.../node_modules/sd-notify install: gyp info spawn args 'make',
.../node_modules/sd-notify install: gyp info spawn args '-I',
.../node_modules/sd-notify install: gyp info spawn args '/opt/zigbee2mqtt/node_modules/.pnpm/sd-notify@2.8.0/node_modules/sd-notify/build/config.gypi',
.../node_modules/sd-notify install: gyp info spawn args '-I',
.../node_modules/sd-notify install: gyp info spawn args '/usr/lib/node_modules/pnpm/dist/node_modules/node-gyp/addon.gypi',
.../node_modules/sd-notify install: gyp info spawn args '-I',
.../node_modules/sd-notify install: gyp info spawn args '/root/.cache/node-gyp/20.17.0/include/node/common.gypi',
.../node_modules/sd-notify install: gyp info spawn args '-Dlibrary=shared_library',
.../node_modules/sd-notify install: gyp info spawn args '-Dvisibility=default',
.../node_modules/sd-notify install: gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/20.17.0',
.../node_modules/sd-notify install: gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/pnpm/dist/node_modules/node-gyp',
.../node_modules/sd-notify install: gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/20.17.0/<(target_arch)/node.lib',
.../node_modules/sd-notify install: gyp info spawn args '-Dmodule_root_dir=/opt/zigbee2mqtt/node_modules/.pnpm/sd-notify@2.8.0/node_modules/sd-notify',
.../node_modules/sd-notify install: gyp info spawn args '-Dnode_engine=v8',
.../node_modules/sd-notify install: gyp info spawn args '--depth=.',
.../node_modules/sd-notify install: gyp info spawn args '--no-parallel',
.../node_modules/sd-notify install: gyp info spawn args '--generator-output',
.../node_modules/sd-notify install: gyp info spawn args 'build',
.../node_modules/sd-notify install: gyp info spawn args '-Goutput_dir=.'
.../node_modules/sd-notify install: gyp info spawn args ]
.../node_modules/unix-dgram install: gyp info spawn args [
.../node_modules/unix-dgram install: gyp info spawn args '/usr/lib/node_modules/pnpm/dist/node_modules/node-gyp/gyp/gyp_main.py',
.../node_modules/unix-dgram install: gyp info spawn args 'binding.gyp',
.../node_modules/unix-dgram install: gyp info spawn args '-f',
.../node_modules/unix-dgram install: gyp info spawn args 'make',
.../node_modules/unix-dgram install: gyp info spawn args '-I',
.../node_modules/unix-dgram install: gyp info spawn args '/opt/zigbee2mqtt/node_modules/.pnpm/unix-dgram@2.0.6/node_modules/unix-dgram/build/config.gypi',
.../node_modules/unix-dgram install: gyp info spawn args '-I',
.../node_modules/unix-dgram install: gyp info spawn args '/usr/lib/node_modules/pnpm/dist/node_modules/node-gyp/addon.gypi',
.../node_modules/unix-dgram install: gyp info spawn args '-I',
.../node_modules/unix-dgram install: gyp info spawn args '/root/.cache/node-gyp/20.17.0/include/node/common.gypi',
.../node_modules/unix-dgram install: gyp info spawn args '-Dlibrary=shared_library',
.../node_modules/unix-dgram install: gyp info spawn args '-Dvisibility=default',
.../node_modules/unix-dgram install: gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/20.17.0',
.../node_modules/unix-dgram install: gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/pnpm/dist/node_modules/node-gyp',
.../node_modules/unix-dgram install: gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/20.17.0/<(target_arch)/node.lib',
.../node_modules/unix-dgram install: gyp info spawn args '-Dmodule_root_dir=/opt/zigbee2mqtt/node_modules/.pnpm/unix-dgram@2.0.6/node_modules/unix-dgram',
.../node_modules/unix-dgram install: gyp info spawn args '-Dnode_engine=v8',
.../node_modules/unix-dgram install: gyp info spawn args '--depth=.',
.../node_modules/unix-dgram install: gyp info spawn args '--no-parallel',
.../node_modules/unix-dgram install: gyp info spawn args '--generator-output',
.../node_modules/unix-dgram install: gyp info spawn args 'build',
.../node_modules/unix-dgram install: gyp info spawn args '-Goutput_dir=.'
.../node_modules/unix-dgram install: gyp info spawn args ]
.../node_modules/sd-notify install: gyp info spawn make
.../node_modules/sd-notify install: gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
.../node_modules/sd-notify install: make: Entering directory '/opt/zigbee2mqtt/node_modules/.pnpm/sd-notify@2.8.0/node_modules/sd-notify/build'
.../node_modules/sd-notify install:   CXX(target) Release/obj.target/notify/notify.o
.../node_modules/unix-dgram install: gyp info spawn make
.../node_modules/unix-dgram install: gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
.../node_modules/unix-dgram install: make: Entering directory '/opt/zigbee2mqtt/node_modules/.pnpm/unix-dgram@2.0.6/node_modules/unix-dgram/build'
.../node_modules/unix-dgram install:   CXX(target) Release/obj.target/unix_dgram/src/unix_dgram.o
.../node_modules/sd-notify install: ../notify.cc:5:10: fatal error: systemd/sd-daemon.h: No such file or directory
.../node_modules/sd-notify install:     5 | #include <systemd/sd-daemon.h>
.../node_modules/sd-notify install:       |          ^~~~~~~~~~~~~~~~~~~~~
.../node_modules/sd-notify install: compilation terminated.
.../node_modules/sd-notify install: make: *** [notify.target.mk:104: Release/obj.target/notify/notify.o] Error 1
.../node_modules/sd-notify install: make: Leaving directory '/opt/zigbee2mqtt/node_modules/.pnpm/sd-notify@2.8.0/node_modules/sd-notify/build'
.../node_modules/sd-notify install: gyp ERR! build error
.../node_modules/sd-notify install: gyp ERR! stack Error: `make` failed with exit code: 2
.../node_modules/sd-notify install: gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/build.js:216:23)
.../node_modules/sd-notify install: gyp ERR! System Linux 6.5.13-arm64
.../node_modules/sd-notify install: gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
.../node_modules/sd-notify install: gyp ERR! cwd /opt/zigbee2mqtt/node_modules/.pnpm/sd-notify@2.8.0/node_modules/sd-notify
.../node_modules/sd-notify install: gyp ERR! node -v v20.17.0
.../node_modules/sd-notify install: gyp ERR! node-gyp -v v11.1.0
.../node_modules/sd-notify install: gyp ERR! not ok
.../node_modules/sd-notify install: Failed
.../node_modules/unix-dgram install: In file included from ../../../../nan@2.22.1/node_modules/nan/nan.h:62,
.../node_modules/unix-dgram install:                  from ../src/unix_dgram.cc:5:
.../node_modules/unix-dgram install: /root/.cache/node-gyp/20.17.0/include/node/node.h:1232:7: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>)' to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
.../node_modules/unix-dgram install:  1232 |       (node::addon_register_func) (regfunc),                          \
.../node_modules/unix-dgram install:       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../node_modules/unix-dgram install: /root/.cache/node-gyp/20.17.0/include/node/node.h:1266:3: note: in expansion of macro 'NODE_MODULE_X'
.../node_modules/unix-dgram install:  1266 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
.../node_modules/unix-dgram install:       |   ^~~~~~~~~~~~~
.../node_modules/unix-dgram install: ../src/unix_dgram.cc:404:1: note: in expansion of macro 'NODE_MODULE'
.../node_modules/unix-dgram install:   404 | NODE_MODULE(unix_dgram, Initialize)
.../node_modules/unix-dgram install:       | ^~~~~~~~~~~
.../node_modules/unix-dgram install:   SOLINK_MODULE(target) Release/obj.target/unix_dgram.node
.../node_modules/unix-dgram install:   COPY Release/unix_dgram.node
.../node_modules/unix-dgram install: make: Leaving directory '/opt/zigbee2mqtt/node_modules/.pnpm/unix-dgram@2.0.6/node_modules/unix-dgram/build'
.../node_modules/unix-dgram install: gyp info ok
.../node_modules/unix-dgram install: Done
dependencies:
+ ajv 8.17.1
+ bind-decorator 1.0.11
+ debounce 2.2.0
+ express-static-gzip 2.2.0
+ fast-deep-equal 3.1.3
+ finalhandler 1.3.1
+ git-last-commit 1.0.1
+ humanize-duration 3.32.1
+ js-yaml 4.1.0
+ json-stable-stringify-without-jsonify 1.0.1
+ jszip 3.10.1
+ moment 2.30.1
+ mqtt 5.10.3
+ object-assign-deep 0.4.0
+ rimraf 6.0.1
+ semver 7.7.1
+ source-map-support 0.5.21
+ throttleit 2.1.0
+ winston 3.17.0
+ winston-syslog 2.7.1
+ winston-transport 4.9.0
+ ws 8.18.1
+ zigbee-herdsman 3.2.7
+ zigbee-herdsman-converters 23.2.0
+ zigbee2mqtt-frontend 0.9.4
optionalDependencies:
+ sd-notify 2.8.0
devDependencies:
+ @eslint/core 0.12.0
+ @eslint/js 9.21.0
+ @ianvs/prettier-plugin-sort-imports 4.4.1
+ @types/finalhandler 1.2.3
+ @types/humanize-duration 3.27.4
+ @types/js-yaml 4.0.9
+ @types/node 22.13.5
+ @types/object-assign-deep 0.4.3
+ @types/readable-stream 4.0.18
+ @types/sd-notify 2.8.2
+ @types/serve-static 1.15.7
+ @types/ws 8.5.14
+ @vitest/coverage-v8 3.0.7
+ eslint 9.21.0
+ eslint-config-prettier 10.0.1
+ prettier 3.5.2
+ tmp 0.2.3
+ typescript 5.7.3
+ typescript-eslint 8.25.0
+ vitest 3.0.7
Done in 37.3s using pnpm v10.4.1
> zigbee2mqtt@2.1.3 build /opt/zigbee2mqtt
> tsc && node index.js writehash
#######################################################
##### Configure deamon and start it
#######################################################
#                         END                         #
#######################################################

Cela m’amène à une réflexion générale.

Les mises à jour z2m proposées par les plugins zigbee sous jeedom devraient être repoussées de quelques jours par rapport à leurs publications officielles. Histoire que les auteurs des plugins jeedom puissent tester les évolutions avant de suggérer la mise à jour.

Christophe.

2 « J'aime »

oui, j’ajouterais qu’au regard des plugins Jeezigbee et ZigbeeLinker, la version stable de zigbee2mqtt est actuellement 2.1.0. (C’est juste moi qui le dit. Ce n’est ni le plugin ni le dev du plugin qui le dit)
Les autres tentatives doivent être considérées comme expérimentales à ce stade.

akenad :slight_smile:

2 « J'aime »

Bonjour à tous
En dehors du fait que je rencontre les mêmes problèmes que précédemment cités je n’arrive pas à revenir à la version 2.1.0. Après paramétrages et lancement des dépendances (même procédure qu’ici Plugin ZigbeeLinker (Jeedom) : FAQ – Pasteck, le passe technique) la version reste inexorablement sur la 2.1.3…
Je ne sais pas trop quoi faire…

Bonjour à tous,
Comme indiqué dans un autre post j’ai le même problème avec Jeezigbee évidemment.

Je tenterais bien les propositions de @akenad mais il n’y a pas de fichier
/plugins/zigbee2mqtt/resources/install_nodejs.sh
par contre j’ai un « /var/www/html/plugins/z2m/resources/post-install.sh » dans lequel il y a :

if [ -n "${wanted_z2m_version}" ] && [ $(echo $wanted_z2m_version | head -c 1) -lt 2 ] ; then
 npm ci
 npm run build
else
 npm install -g pnpm
 pnpm i --frozen-lockfile
 pnpm run build
fi

faut-il ajouter ici @10.4.1 à pnpm ?
faut-il aussi passer en --no-frozen-lockfile ?

merci d’avance.

Fabrice

Ce sujet concerne zigbeelinker.
Eviter de confondre les plugins Jeezigbee et zigbeelinker :

Pour Jeezigbee, voir : Problème démon jeezigbee - #25 par akenad

akenad :slight_smile:

1 « J'aime »

Merci @akenad,

J’ai déjà lu ton article RTEX qui m’a en effet éclairci les différences. Je t’en remercie.
Mais je ne confonds pas.
C’est même le sens de ma question pour essayer de faire le parallèle de ta proposition de solution provisoire en forçant la version de pnpm pour zigbeelinker en adaptant la même chose dans jeezigbee.
J’avais posté à l’origine avec le tag plugin-z2m mais on m’a renvoyé sur cet article.
Du coup je retourne voir l’article que tu me conseilles et je teste demain.
Merci encore.
Fabrice

1 « J'aime »

Bonjour,
J’avais tenté la mise à jour en version 2.1.1 pensant que c’était toujours la version stable.
Je ne vois pas où cela est indiqué dans le plugin. Je pense qu’il faudrait indiquer quelle est la version stable actuelle. Si c’est indiqué quelque part alors je suis passé à côté :grin:
En tout cas merci @akenad pour les explications.

1 « J'aime »

Bonjour,
comment fait on pour downgrader en 2.1.1 sans perdre la config du plugin ?
Merci

j’ai forcé en 2.1.0
tout est revenu à la normal

avec 2.1.3
ni sudo pnpm i --no-frozen-lockfile
ni sudo npm install -g pnpm

n’ont fonctionné

comment force t on une version ?

J’ai le meme soucis et les commande ci dessus ne permettent pas d’installer les dépendance, quelqu’un à une solution pour repasser en 2.1.1 facilement ?

Je viens de lancer une mise à jour de ZigbeeLinker qui devrait résoudre ce problème sur toutes les versions de zigbee2mqtt.
A suivre…

Merci à ceux qui m’ont aidé pour le problème dans Jeezigbee. J’ai réussi en forçant la version de pnpm dans
« /var/www/html/plugins/z2m/resources/post-install.sh »

if [ -n "${wanted_z2m_version}" ] && [ $(echo $wanted_z2m_version | head -c 1) -lt 2 ] ; then
 npm ci
 npm run build
else
 npm install -g pnpm@10.4.1
 pnpm i --frozen-lockfile
 pnpm run build
fi

tout marche bien.

j’ai mis a jour et j’ai la meme erreur :
…/node_modules/sd-notify install: make: Entering directory ‹ /opt/zigbee2mqtt/node_modules/.pnpm/sd-notify@2.8.0/node_modules/sd-notify/build ›
…/node_modules/sd-notify install: CXX(target) Release/obj.target/notify/notify.o
…/node_modules/sd-notify install: …/notify.cc:5:10: fatal error: systemd/sd-daemon.h: No such file or directory
…/node_modules/sd-notify install: 5 | #include <systemd/sd-daemon.h>
…/node_modules/sd-notify install: | ^~~~~~~~~~~~~~~~~~~~~
…/node_modules/sd-notify install: compilation terminated.

oui il y a cette erreur, mais le démon doit démarrer maintenant
(il y a toujours eu des erreurs dans les installations zigbee2mqtt…)

entre temps j’ai installé « libsystemd-dev » et je n’ai plus que des warnings
par contre, zigbee2mqtt s’arrete juste apres avoir demarré :

[2025-03-03 16:14:41] INFO  : ##### Le service Zigbee2MQTT démarre... #####
[2025-03-03 16:14:41] INFO  : ##### Démarrage du service Client MQTT (MQTTClient) #####
[2025-03-03 16:14:41] INFO  : ##### Le service Client MQTT a démarré (MQTTClient) #####
[2025-03-03 16:14:41] INFO  : ##### Le service Client MQTT ([Aucun][MQTTClient]) s'est connecté. #####
[2025-03-03 16:14:41] INFO  : [Aucun][MQTTClient] : Client MQTT subscribe : 1
[2025-03-03 16:14:41] INFO  : ##### Le client MQTT MQTTClient a reçu un premier message de Zigbee2MQTT #####
[2025-03-03 16:14:42] INFO  : ##### Démarrage du service Client MQTT (MQTTClient) terminé avec succès #####
[2025-03-03 16:14:42] INFO  : ##### Le service zigbee2mqtt a démarré #####
[2025-03-03 16:14:53] ERROR  : ##### Le service zigbee2mqtt s'est arrêté #####

ok je vais voir s’il faut le rajouter à l’installation des dépendances (ça coute rien)

merci mais ca ne marche toujours pas .
le service zigbee2mqtt s’arrete a chaque demarrage.
je ne vois pas de souci dans les logs

log des dépendances stp, et log …_debug de zigbee2mqtt démarré en mode debug (le bouton est dans configuration → expert pour démarrer en mode debug)