Ran into yet another 4.3.1 upgrade trouble … this time with zigbee2mqtt.
I have not been able to update zigbee2mqtt from openhabian-config. the process ends with “error” and a not very helpful reference to the openhabian.md file.
(Also tried the same on a fresh 4.3.1 installation/SD card from scratch – same problem).
The culprit is: the npm ci command in the nodejs-apps.bash file.
2025-01-08_08:49:58_CET [openHABian] Downloading Zigbee2MQTT... OK
2025-01-08_08:50:24_CET [openHABian] Creating log directory... OK
2025-01-08_08:50:24_CET [openHABian] Zigbee2MQTT install & config... FAILED (npm ci)
When issuing the npm ci command manually outside of the bash (as user openhabian), the following ensues:
/usr/share/nodejs/npm/lib/cli.js:48
throw err
^
Error: ENOENT: no such file or directory, uv_cwd
at process.wrappedCwd [as cwd] (node:internal/bootstrap/switches/does_own_process_state:126:28)
at Object.<anonymous> (/usr/share/nodejs/depd/index.js:23:24)
at Module._compile (node:internal/modules/cjs/loader:1356:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
at Module.load (node:internal/modules/cjs/loader:1197:32)
at Module._load (node:internal/modules/cjs/loader:1013:12)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/usr/share/nodejs/npm/node_modules/agentkeepalive/lib/agent.js:6:19)
at Module._compile (node:internal/modules/cjs/loader:1356:14) {
errno: -2,
code: 'ENOENT',
syscall: 'uv_cwd'
}
Node.js v18.19.0
I’m afraid, this is where my competence of linux / npm ends.
I’m not sure if I understand your question.
I upgraded my personal system to v2 without any problems. You only have to follow the steps documented on the z2m page.
I haven’t included v2 within openhabian yet. Anyway the switch from v1 to v2 will remain a manual process because there are too many cases to cover (z2m versions, node versions, changes in config…). The only thing openhabian could provide is updates within v2 and an installation of v2 during a fresh install.
Currently I’m lacking time, so if somebody wants to jump in I would be happy to help.
I thought z2m installed via openhabian could only be updated via openhabian… I didn’t know what the internal dependencies are between z2m and openhabian.
So you’re saying it’s safe to update using the guidelines for the linux version with:
# Run the update script from the Zigbee2MQTT directory
cd /opt/zigbee2mqtt
./update.sh
unfortunately it turns out that it is not as simple as it seems.
Have you experienced a similar problem?
openhabian@openhabian:/opt/zigbee2mqtt $ ./update.sh
Checking Zigbee2MQTT status...
Creating backup of configuration...
Checking out changes to package-lock.json...
Updated 0 paths from the index
Updating...
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
openhabian@openhabian:/opt/zigbee2mqtt $ git-pull
-bash: git-pull: command not found
are you on v1? As far as I remember I did a fresh install and copied my old configuration.yaml after a few changes. It worked but don’t know if that was the intended way. The z2m forum has all the information
Yes Larsen, I have version v1.42, maximum available for update via openhabian.
From what I saw you are actively involved in the implementation of z2m to openhabian. Could you tell me what the future plan is regarding updates?
Is there any plan for official upgrade path from version 1.42 to 2.x.x? The most convenient would be via the update option in openhabian but from what I have read the changes are too major and require additional actions.
In that case is there any instruction planned on what users should do to move forward? The official website still informs about the update via Optional Components in openhabian.
Let’s assume I decided to uninstall and reinstall. From what I understand, I should uninstall in Openhabian, but reinstall ONLY from the description for Linux
Will later replacement of the configuration.yaml require me to pairing devices again? I currently have 60+ devices and I feel bad just thinking about having to pair them again
yes, I added the z2m install and update-routines to openhabian.
Sorry, but I’m not going to support an upgrade from v1 to v2. There are too many combinations that are hard to cover with automated routines.
But I do plan to support the installation of v2 during a fresh install (not sure when).
Regarding re-pairing: According to the z2m-docs you won’t have to re-pair if you keep your data directory (FAQ | Zigbee2MQTT)