Cant setup z2m to OpenHab

I install OpenHab 4.3.3 on a clean memory card (128GB Sandisk) on a Raspberry 4 and Raspberry 5 (two different times). Then I enter openhabian-config, install mosqiutto (successfully), and then run the zigbee2mqtt installation. I consistently get this error - "There was an error or interruption during the execution of: “20 | Optional Components”. What am I doing wrong?

Hard to say. It definitely works with a fresh workind sd card (just tried again).
You can set debug to maximum in /etc/openhabian.conf. If that doesn’t give more insights please describe exactly step-by-step what you did: Etcher of Raspi imager? 32 or 64 bit image? did you set a password for mosquitto? usb-port or network attached zigbee stick?

I used 4 memory cards. Two 128GB and two 16GB. Installed via Etcher and Raspi imager. 64bit. Used Rasberry 4 and 5. Sonoff zigbee 3.0 USB Dongle Plus E firmware 6.10.3 and 7.4.4 and 8. The result is identical. I use standard pass openhabian. Connect to internet by cable.

funny: Your setup is completely identical to my test system.
mosquitto installation seems to fail. please use a different password and enter that during z2m installation and tell me what you get. Are you using the branch "latest"or “release”?

I use release. mosquitto { installed without errors. I tried without changing the password and with changing the password. The result is the same.

i see in log “npm command not found”. I installed it manually npm and node v21.

and result the same

sorry, don’t know what’s wrong.
But anyway: My setup routine in openhabian is currently only installing v1.4.
z2m had a major release change to v2. So maybe consider installing z2m manually as described in the z2m doc so you’ve already got v2. Openhabian won’t support this upgrade anyway so if you want to stay up-to-date you’ll have to do this manual step anyway.

I installed it manually. It is installed but does not work stably. I am not strong in Linux. That is why I want to install it with standard tools.

I see that NPM is not installed as standard

npm is the node package manager which is part of the nodejs package. So it’s not missing in openhabian but gets installed as the first thing when needed. But still I cannot tell why it’s missing in your case.
Openhabian does just the same as a manual install (I wrote it).
I won’t support the upgrade within openhabian but that your choice of course.

the installation source is blocked (i am in russia). that is the problem


I managed to install OH 4.3.3 via VPN. I write the image to the card. After it deploys, I install VPN on the Raspberry. I launch it.
Then I install this https://pkgs.tailscale.com/stable/#raspbian-bookworm
Then this - sudo apt install openresolv
Then from openhabian-config, mosquito and z2m are installed. Under VPN, z2m installed without errors.

1 Like