Openhabian Optional Components - Update Zigbee2MQTT 2.0.0

Hi all, has somebody tried to update zigbee2mqtt when installed via openhabian, cause for me it always stops the update.

There was an error or interruption during the execution of: │
│ “20 | Optional Components” │
│ │
│ Please try again. If the error persists, please read │
│ /opt/openhabian/docs/openhabian-DEBUG.md or │
https://github.com/openhab/openhabian/blob/main/docs/openhabian-DEBUG.md how │
│ to proceed.

Does this have to to with the change from npm to pnpm?

I run openhabian 64bit on pi4 with 4 GB.

BR

I don’t know if this is a related problem but after updating all my docker containers (also zigbee2mqtt to 2.0.0) this evening I had to add a line to the Z2M configuration.yaml as described here:

Thx for your reply but I already had to add this line in the past with zigbee 1.4 to get my coordinator running: adapter: ember

And the problem is, that the update does not even start - I have to restart zigbee service but then I’m still on 1.42.0.

I did it manually then - if somebody else struggles here the way I did it:

Install pnpm global:

sudo npm install -g pnpm

Stop Z2M:

sudo systemctl stop zigbee2mqtt

move config:

mv /opt/zigbee2mqtt/data/configuration.yaml /opt/zigbee2mqtt/data/configuration.yaml.bak

navigate to z2m:

cd /opt/zigbee2mqtt

pull changes from git with

git pull --no-rebase

run update script:

./update.sh

move config back:

mv /opt/zigbee2mqtt/data/configuration.yaml.bak /opt/zigbee2mqtt/data/configuration.yaml

start z2m:

sudo systemctl start zigbee2mqtt

THX to Koenkk at Z2M - Update Infos

1 Like

Thanks!!! Yesterday was a no go for me I gave up. Today found your steep by steep and all is working after five minutes.

I upgraded my Debian 12 to the version 2 and noticed that my Hue motion sensors were not working.
It turned out the motion sensors were working but the rule I was using had a condition for the lux value.
I noticed the lux value was not changing.
Further investigation revealed the mqtt name had changed with V2.
The illumination topic changed from illuminance_lux to illuminance
I changed my Incoming Value Transformations to: JSONPATH:$.illuminance
and then it worked.
I have not noticed if anything else has changed yet. It seems OK so far.
This is something others may want to check after upgrading.

P.S I had to add adapter: zstack to get it to work.

serial:
  disable_led: true
  port: tcp://192.168.1.9:6638
  adapter: zstack
  baudrate: 115200

I am using a SLZB-06 co-ordinator.

1 Like

Yes those are also good hints!

For all who want to do the update better read the Zigbee2MQTT Release Discussion, linked here, because there are really some braking changes!

The question is to get the optional components update back working we need to bring up pnpm for the next opanhab release?

that’s within the openhabian scripts, not openhab.
They can be changed anytime, It just takes a PR and a merge. They’re updated online at each start.
I wrote those zigbee2mqtt routines long ago but would be happy if somebody else jumps in and updates them for v2.
I think we shouldn’t cover any major release updates, just plain installation of v2 and the update process within v2

I would really like to help but I’m more of a smarthome enthusiast and not a developer, so I probably wouldn’t be much help.

Hi Larsen, same problem here. I’m very pleased to help testing

Tried:

  1. execute on the command line: “npm install -g pnpm”
  2. edit the file “/opt/openhabian/functions/nodejs-apps.bash”
    replace “npm ci” with “pnpm i --frozen-lockfile” (2 times, update and install section)
  3. install “zigbee2mqtt” via “openhabian-config”
  4. edit “/opt/zigbee2mqtt/data/configuration.yaml”
    add: “adapter: zstack”
  5. reboot

Worked for me (serveral times)

Mh if I try I get the same error as in my first post.

I fixed installation & update routine for v1.42.
You need to choose the latest branch (01) for it.
Be aware that this will install v1.42.
So this is just a first step before supporting v2.

If you need/want v2 you have to do it manually by now.

Hi,
I have installed z2m with openhabian-config. Now, when I try to update z2m I get the following error message

Im Moment auf keinem Branch.
Bitte geben Sie den Branch an, welchen Sie zusammenführen möchten.
Siehe git-pull(1) für weitere Details.

  • git pull *

Any hints what to do in this case?

Peter

Sorry, after issuing the command: git pull --no rebase this error occur:
“You are not currently on a branch
Please specify which branch you want to merge with”
Thanks

Chatgpt says:

This means you’re currently in a detached HEAD state — most likely because you checked out a specific commit or tag instead of a branch like master or main.

To fix it, you need to switch back to the main branch before pulling updates.

Try one of these:

git checkout master

or

git checkout main

Then you can run:

git pull --no-rebase

If you’re unsure which branch is the main one, you can list all remote branches with:

git branch -r

Look for something like origin/master or origin/main and check it out accordingly.

hope it helps

I have tried all the above but still failing to start.
Also updating the Zigbee stick, didn’t solved the problem.
The service keeps restarting.
Unfortunatly the log files aren’t being written, so no idee what the error is.

So, I started over and removed de Ziggbee2MQTT and then installed it again.
Unfortunatly, still not te latest version?!?! But 1.43.0, but starting again and working fine.

Did the upgrade again and the issue still persists.
In the log I see now the error:
Failed to start zigbee-herdsman

Set the log level to Debug.
The log output is the following:
[2025-09-27 14:38:49] debug: z2m: Removing old log directory ‘/var/log/zigbee2mqtt/2025-09-27.14-38-13al’
[2025-09-27 14:38:49] info: z2m: Logging to console, file (filename: log.log)
[2025-09-27 14:38:50] debug: z2m: Loaded state from file /opt/zigbee2mqtt/data/state.json
[2025-09-27 14:38:50] info: z2m: Starting Zigbee2MQTT version 2.6.1 (commit #d44463a3)
[2025-09-27 14:38:50] info: z2m: Starting zigbee-herdsman (6.0.4)
[2025-09-27 14:38:50] debug: z2m: Using zigbee-herdsman with settings: '“{“network”:{“panID”:54509,“extendedPanID”:[221,221,221,221,221,221,221,221],“channelList”:[25],“networkKey”:“HIDDEN”},“databasePath”:“/opt/zigbee>
[2025-09-27 14:38:50] debug: zh:adapter:discovery: Connected devices: [{“path”:”/dev/ttyACM0”,“manufacturer”:“ITEAD”,“serialNumber”:“20230221151926”,“pnpId”:“usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230221151926-if00”,“vendor>
[2025-09-27 14:38:50] debug: zh:adapter:discovery: Unable to match USB adapter: zstack | /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230221151926-if00
[2025-09-27 14:38:50] debug: zh:controller: Starting with options '{“network”:{“networkKeyDistribute”:false,“networkKey”:“HIDDEN”,“panID”:54509,“extendedPanID”:[221,221,221,221,221,221,221,221],“channelList”:[25]},“serialPort”:{“path>
[2025-09-27 14:38:50] info: zh:zstack:znp: Opening SerialPort with {“path”:”/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230221151926-if00”,“baudRate”:115200,“rtscts”:false,“autoOpen”:false}
[2025-09-27 14:38:50] info: zh:zstack:znp: Serialport opened
[2025-09-27 14:38:50] debug: zh:zstack:znp: → SREQ: SYS - ping - {“capabilities”:1}
[2025-09-27 14:38:50] debug: zh:zstack:unpi:writer: → frame [254,0,33,1,32]
[2025-09-27 14:38:50] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2025-09-27 14:38:50] debug: zh:zstack:unpi:writer: → buffer [239]
[2025-09-27 14:38:51] debug: zh:zstack:znp: → SREQ: SYS - ping - {“capabilities”:1}
[2025-09-27 14:38:51] debug: zh:zstack:unpi:writer: → frame [254,0,33,1,32]
[2025-09-27 14:38:51] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2025-09-27 14:38:51] error: z2m: Error while starting zigbee-herdsman
[2025-09-27 14:38:51] error: z2m: Failed to start zigbee-herdsman
[2025-09-27 14:38:51] error: z2m: Check ``https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html\`\` for possible solutions
[2025-09-27 14:38:51] error: z2m: Exiting…
[2025-09-27 14:38:51] error: z2m: Error: Error: Operation not supported, cannot set

No idea why this is so difficult to upgrade.

v2 is a major update with a few breaking changes. It brings additional requirements:

  • nodejs with at least v20
  • pnpm

We will solve the requirements soon within openhabian. But the plain update still has to be done manually. If you can’t wait those steps have to be done:
https://www.zigbee2mqtt.io/guide/installation/01_linux.html

But instead of starting z2m you have to run update.sh and then proceed.

Additional information here:
https://github.com/Koenkk/zigbee2mqtt/discussions/24198

1 Like
  1. Hello

    I’ve reached this point after using the “git pull --no-rebase” command (see below point 2), and I’m stuck because I don’t understand what I need to do. Can you help me?

  2. openhabian@openhabian:/opt/zigbee2mqtt $ git pull --no-rebase

    remote: Enumerating objects: 838, done.

    remote: Counting objects: 100% (353/353), done.

    remote: Compressing objects: 100% (83/83), done.

    remote: Total 838 (delta 314), reused 278 (delta 270), pack-reused 485 (from 4)

    Receiving objects: 100% (838/838), 700.67 KiB | 6.49 MiB/s, done.

    Resolving deltas: 100% (532/532), completed with 40 local objects.

    From GitHub - Koenkk/zigbee2mqtt: Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨

    7bd7bce6..592c256f dev → origin/dev

    61b460a3..7213913c dev-types → origin/dev-types

    * [new branch] fix/duplicate-onevent-call → origin/fix/duplicate-onevent-call

    bda5bf9e..1ea7f650 master → origin/master

    • 8afc0c2b…a3cc3c5e release-please–branches–dev–components–zigbee2mqtt → origin/release-please–branches–dev–components–zigbee2mqtt (forced update)

    • 8ab8c620…8baa06ea release-please–branches–dev–components–zigbee2mqtt–release-notes → origin/release-please–branches–dev–components–zigbee2mqtt–release-notes (forced update)

    * [new tag] 2.6.1 → 2.6.1

    * [new tag] 2.6.2 → 2.6.2

    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 $

And here’s the rest…

  • openhabian@openhabian:/opt/zigbee2mqtt $ git checkout master

    Previous HEAD position was 861cba63 chore(dev): release 1.42.0 (#24569)

    Switched to branch ‘master’

    Your branch is behind ‘origin/master’ by 104 commits, and can be fast-forwarded.

    (use “git pull” to update your local branch)

    openhabian@openhabian:/opt/zigbee2mqtt $ git checkout main

    error: pathspec ‘main’ did not match any file(s) known to git

    openhabian@openhabian:/opt/zigbee2mqtt $ git branch -r

    origin/HEAD → origin/master

    origin/chore/windfront-changelog

    origin/dev

    origin/dev-types

    origin/fix/duplicate-onevent-call

    origin/master

    origin/release-please–branches–dev–components–zigbee2mqtt

    origin/release-please–branches–dev–components–zigbee2mqtt–release-notes

    openhabian@openhabian:/opt/zigbee2mqtt $

What exactly should I send?