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 │
openhabian/docs/openhabian-DEBUG.md at main · openhab/openhabian · GitHub 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.

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.