Openhabian - zigbee2mqtt no longer working

After updating some stuff via Openhabian-config my zigbee2mqtt is no longer working.

I’m using:
openHABian Configuration Tool — [openHAB3]{2022-12-18T22:39:53+01:00}(2633096)
openHAB 3.4.2 - Release Build

Looking into the zigbee2mqtt log I get the the following:

debug 2023-03-27 20:26:40: Loaded state from file /opt/zigbee2mqtt/data/state.json
info  2023-03-27 20:26:40: Logging to console and directory: '/var/log/zigbee2mqtt/2023-03-27.20-26-40a$debug 2023-03-27 20:26:40: Removing old log directory '/var/log/zigbee2mqtt/2023-03-27.20-25-06al'
info  2023-03-27 20:26:41: Starting Zigbee2MQTT version 1.25.2 (commit #9b2a9210)
info  2023-03-27 20:26:41: Starting zigbee-herdsman (0.14.34)
debug 2023-03-27 20:26:41: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":$error 2023-03-27 20:26:41: Error while starting zigbee-herdsman
error 2023-03-27 20:26:41: Failed to start zigbee
error 2023-03-27 20:26:41: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-$error 2023-03-27 20:26:41: Exiting...
error 2023-03-27 20:26:41: Error: The module '/opt/zigbee2mqtt/node_modules/@serialport/bindings/build/$was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
NODE_MODULE_VERSION 93. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1275:18)
    at Module.load (node:internal/modules/cjs/loader:1069:32)
    at Function.Module._load (node:internal/modules/cjs/loader:904:12)
    at Module.require (node:internal/modules/cjs/loader:1093:19)
    at require (node:internal/modules/cjs/helpers:108:18)
    at bindings (/opt/zigbee2mqtt/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/opt/zigbee2mqtt/node_modules/@serialport/bindings/lib/linux.js:2:36)
    at Module._compile (node:internal/modules/cjs/loader:1191:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10)
    at Module.load (node:internal/modules/cjs/loader:1069:32)

So it seems like Node.js is not correctly.

When I run the npm install comment I get:

openhabian@openhabian:~/.npm/_logs $ npm install
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/openhabian/.npm/_logs/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/openhabian/.npm/_logs/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/openhabian/.npm/_logs/2023-03-27T18_57_35_074Z-debug-0.log0

And looking into that log-file:

2023-03-27T18_57_35_074Z-debug-0.log0 verbose cli /usr/bin/node /usr/bin/npm
1 info using npm@8.19.3
2 info using node@v16.19.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 10ms
5 timing config:load:file:/usr/lib/node_modules/npm/npmrc Completed in 2ms
6 timing config:load:builtin Completed in 4ms
7 timing config:load:cli Completed in 5ms
8 timing config:load:env Completed in 2ms
9 timing config:load:file:/.npmrc Completed in 9ms
10 timing config:load:project Completed in 15ms
11 timing config:load:file:/home/openhabian/.npmrc Completed in 11ms
12 timing config:load:user Completed in 12ms
13 timing config:load:file:/usr/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 2ms
16 timing config:load:credentials Completed in 3ms
17 timing config:load:setEnvs Completed in 3ms
18 timing config:load Completed in 58ms
19 timing npm:load:configload Completed in 59ms
20 timing npm:load:mkdirpcache Completed in 3ms
21 timing npm:load:mkdirplogs Completed in 1ms
22 verbose title npm install
23 verbose argv "install"
24 timing npm:load:setTitle Completed in 4ms
25 timing config:load:flatten Completed in 11ms
26 timing npm:load:display Completed in 17ms
27 verbose logfile logs-max:10 dir:/home/openhabian/.npm/_logs
28 verbose logfile /home/openhabian/.npm/_logs/2023-03-27T18_57_35_074Z-debug-0.log
29 timing npm:load:logFile Completed in 17ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 104ms
33 timing arborist:ctor Completed in 3ms
34 silly logfile start cleaning logs, removing 1 files
35 silly logfile done cleaning log files
36 timing arborist:ctor Completed in 0ms
37 timing idealTree:init Completed in 39ms
38 timing idealTree:userRequests Completed in 0ms
39 silly idealTree buildDeps
40 timing idealTree Completed in 45ms
41 timing command:install Completed in 83ms
42 verbose stack Error: Tracker "idealTree" already exists
42 verbose stack     at Arborist.[_onError] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/li$

This are the versions of node and npm

openhabian@openhabian:/ $ node --version
v16.19.1
openhabian@openhabian:/ $ npm --version
8.19.3

I’ve also added the terminal-output during an ‘update’ (via openhabian-config) of zigbee2mqtt and debug set to ‘maximum’.

There was an error or interruption during the execution of:                  │
                                                                 │   "20 | Optional Components"


openhabian@openhabian:/etc $ openhabian@openhabian:/etc $ sudo openhabian-config
2023-03-27_20:35:49_CEST [openHABian] Checking for root privileges... OK
+ export UNATTENDED SILENT DEBUGMAX INTERACTIVE
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/auth.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/backup.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/config.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/ext-storage.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/find.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/habapp.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/helpers.bash
++ ESC='\033['
++ COL_DEF='\033[39;49;00m'
++ COL_RED='\033[31;01m'
++ COL_GREEN='\033[32;01m'
++ COL_YELLOW='\033[33;01m'
++ COL_BLUE='\033[34;01m'
++ COL_MAGENTA='\033[35;01m'
++ COL_CYAN='\033[36;01m'
++ COL_LGRAY='\033[37;01m'
++ COL_DGRAY='\033[90;01m'
++ export COL_DEF COL_RED COL_GREEN COL_YELLOW COL_BLUE COL_MAGENTA COL_CYAN COL_LGRAY COL_DGRAY
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/influxdb+grafana.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/java-jre.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/menu.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/nodejs-apps.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/openhab.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/openhabian.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/packages.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/system.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/vpn.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/wifi.bash
+ for shfile in "${BASEDIR:-/opt/openhabian}"/functions/*.bash
+ source /opt/openhabian/functions/zram.bash
++ pwd
+ OLDWD=/etc
+ cd /opt
+ update_openhabian_conf
+ local configFile=/etc/openhabian.conf
+ local referenceConfig=/opt/openhabian/build-image/openhabian.conf
+ cp /etc/openhabian.conf /etc/openhabian.conf.BAK
+ read -r line
+ [[ # Origin: openhabian.conf =~ ^(#)?[a-zA-Z] ]]
+ echo '# Origin: openhabian.conf'
+ read -r line
+ [[ # =~ ^(#)?[a-zA-Z] ]]
+ echo '#'
+ read -r line
+ [[ # Modify your openHABian settings =~ ^(#)?[a-zA-Z] ]]
+ echo '# Modify your openHABian settings'
+ read -r line
+ [[ # Handle with care, only touch if you need to! =~ ^(#)?[a-zA-Z] ]]
+ echo '# Handle with care, only touch if you need to!'
+ read -r line
+ [[ # This file will only be used on unattended initial install. =~ ^(#)?[a-zA-Z] ]]
+ echo '# This file will only be used on unattended initial install.'
+ read -r line
+ [[ # If you want to change anything after unattended install completed, use menu in openhabian-config. =~ ^(#)?[a-zA-Z] ]]
+ echo '# If you want to change anything after unattended install completed, use menu in openhabian-config.'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # ATTENTION: to disable an option a line MUST be of the format '# option=value' =~ ^(#)?[a-zA-Z] ]]
+ echo '# ATTENTION: to disable an option a line MUST be of the format '\''# option=value'\'''
+ read -r line
+ [[ # KEEP THE SPACE IT IS IMPORTANT !! =~ ^(#)?[a-zA-Z] ]]
+ echo '# KEEP THE SPACE IT IS IMPORTANT !!'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Hostname to set this one to =~ ^(#)?[a-zA-Z] ]]
+ echo '# Hostname to set this one to'
+ read -r line
+ [[ hostname=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=hostname=openhabian
+ [[ hostname=openhabian =~ ^#[a-zA-Z] ]]
++ echo hostname=openhabian
++ cut -d= -f1
+ param=hostname
+ [[ -v hostname ]]
+ [[ openhabian == *\ * ]]
+ echo hostname=openhabian
+ read -r line
+ [[ # if it exists, the default user (with its working environment) will be renamed to this username given here ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# if it exists, the default user (with its working environment) will be renamed to this username given here ...'+ read -r line
+ [[ username=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=username=openhabian
+ [[ username=openhabian =~ ^#[a-zA-Z] ]]
++ echo username=openhabian
++ cut -d= -f1
+ param=username
+ [[ -v username ]]
+ [[ openhabian == *\ * ]]
+ echo username=openhabian
+ read -r line
+ [[ # ... and given this password. The password will be removed from this file after completion for security reasons. =~ ^(#)?[a-zA-Z] ]]
+ echo '# ... and given this password. The password will be removed from this file after completion for security reasons.'
+ read -r line
+ [[ userpw=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=userpw=openhabian
+ [[ userpw=openhabian =~ ^#[a-zA-Z] ]]
++ echo userpw=openhabian
++ cut -d= -f1
+ param=userpw
+ [[ -v userpw ]]
+ [[ openhabian == *\ * ]]
+ echo userpw=openhabian
+ read -r line
+ [[ # set this to download a SSH key and authorize the owner to login as the admin user =~ ^(#)?[a-zA-Z] ]]
+ echo '# set this to download a SSH key and authorize the owner to login as the admin user'
+ read -r line
+ [[ adminkeyurl="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='adminkeyurl=""'
+ [[ adminkeyurl="" =~ ^#[a-zA-Z] ]]
++ echo 'adminkeyurl=""'
++ cut -d= -f1
+ param=adminkeyurl
+ [[ -v adminkeyurl ]]
+ [[ '' == *\ * ]]
+ echo adminkeyurl=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Language and timezone. See Debian documentation for valid values. =~ ^(#)?[a-zA-Z] ]]
+ echo '# Language and timezone. See Debian documentation for valid values.'
+ read -r line
+ [[ timezone=Europe/Berlin =~ ^(#)?[a-zA-Z] ]]
+ parsed=timezone=Europe/Berlin
+ [[ timezone=Europe/Berlin =~ ^#[a-zA-Z] ]]
++ echo timezone=Europe/Berlin
++ cut -d= -f1
+ param=timezone
+ [[ -v timezone ]]
+ [[ Europe/Berlin == *\ * ]]
+ echo timezone=Europe/Berlin
+ read -r line
+ [[ locales="en_US.UTF-8 de_DE.UTF-8" =~ ^(#)?[a-zA-Z] ]]
+ parsed='locales="en_US.UTF-8 de_DE.UTF-8"'
+ [[ locales="en_US.UTF-8 de_DE.UTF-8" =~ ^#[a-zA-Z] ]]
++ echo 'locales="en_US.UTF-8 de_DE.UTF-8"'
++ cut -d= -f1
+ param=locales
+ [[ -v locales ]]
+ [[ en_US.UTF-8 de_DE.UTF-8 == *\ * ]]
+ echo 'locales="en_US.UTF-8 de_DE.UTF-8"'
+ read -r line
+ [[ system_default_locale="en_US.UTF-8" =~ ^(#)?[a-zA-Z] ]]
+ parsed='system_default_locale="en_US.UTF-8"'
+ [[ system_default_locale="en_US.UTF-8" =~ ^#[a-zA-Z] ]]
++ echo 'system_default_locale="en_US.UTF-8"'
++ cut -d= -f1
+ param=system_default_locale
+ [[ -v system_default_locale ]]
+ [[ en_US.UTF-8 == *\ * ]]
+ echo system_default_locale=en_US.UTF-8
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # WiFi settings. An ethernet connection is recommended. =~ ^(#)?[a-zA-Z] ]]
+ echo '# WiFi settings. An ethernet connection is recommended.'
+ read -r line
+ [[ # If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi =~ ^(#)?[a-zA-Z] ]]
+ echo '# If you have a RPi4, RPi3, RPi0W or a supported external WiFi dongle, the WiFi'
+ read -r line
+ [[ # interface can be setup and used for the initial installation. =~ ^(#)?[a-zA-Z] ]]
+ echo '# interface can be setup and used for the initial installation.'
+ read -r line
+ [[ # Fill in your SSID and password below, leave empty or put comment in front to =~ ^(#)?[a-zA-Z] ]]
+ echo '# Fill in your SSID and password below, leave empty or put comment in front to'
+ read -r line
+ [[ # have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works. =~ ^(#)?[a-zA-Z] ]]
+ echo '# have your WiFi remain unchanged/uninitialized. Make sure your Ethernet works.'
+ read -r line
+ [[ # ATTENTION: you need to escape these special characters: $, `, ", \, (newline) =~ ^(#)?[a-zA-Z] ]]
+ echo '# ATTENTION: you need to escape these special characters: $, `, ", \, (newline)'
+ read -r line
+ [[ # 'Escaping' means to put an additional \ in front of that character =~ ^(#)?[a-zA-Z] ]]
+ echo '# '\''Escaping'\'' means to put an additional \ in front of that character'
+ read -r line
+ [[ wifi_ssid="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_ssid=""'
+ [[ wifi_ssid="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_ssid=""'
++ cut -d= -f1
+ param=wifi_ssid
+ [[ -v wifi_ssid ]]
+ [[ '' == *\ * ]]
+ echo wifi_ssid=
+ read -r line
+ [[ wifi_password="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_password=""'
+ [[ wifi_password="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_password=""'
++ cut -d= -f1
+ param=wifi_password
+ [[ -v wifi_password ]]
+ [[ '' == *\ * ]]
+ echo wifi_password=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Wi-Fi setting. Select a two-letter country code suitable for your location =~ ^(#)?[a-zA-Z] ]]
+ echo '# Wi-Fi setting. Select a two-letter country code suitable for your location'
+ read -r line
+ [[ # E.g. US (default), DE, AU, NZ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# E.g. US (default), DE, AU, NZ...'
+ read -r line
+ [[ # You may infringe on local legislature otherwise =~ ^(#)?[a-zA-Z] ]]
+ echo '# You may infringe on local legislature otherwise'
+ read -r line
+ [[ # See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab =~ ^(#)?[a-zA-Z] ]]
+ echo '# See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 or /usr/share/zoneinfo/zone.tab'
+ read -r line
+ [[ wifi_country="" =~ ^(#)?[a-zA-Z] ]]
+ parsed='wifi_country=""'
+ [[ wifi_country="" =~ ^#[a-zA-Z] ]]
++ echo 'wifi_country=""'
++ cut -d= -f1
+ param=wifi_country
+ [[ -v wifi_country ]]
+ [[ '' == *\ * ]]
+ echo wifi_country=
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Eventually disable all IPv6 e.g. on installation problems =~ ^(#)?[a-zA-Z] ]]
+ echo '# Eventually disable all IPv6 e.g. on installation problems'
+ read -r line
+ [[ # values: "enable", "disable" =~ ^(#)?[a-zA-Z] ]]
+ echo '# values: "enable", "disable"'
+ read -r line
+ [[ ipv6=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=ipv6=enable
+ [[ ipv6=enable =~ ^#[a-zA-Z] ]]
++ echo ipv6=enable
++ cut -d= -f1
+ param=ipv6
+ [[ -v ipv6 ]]
+ [[ enable == *\ * ]]
+ echo ipv6=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # repo and branch to clone from =~ ^(#)?[a-zA-Z] ]]
+ echo '# repo and branch to clone from'
+ read -r line
+ [[ repositoryurl=https://github.com/openhab/openhabian.git =~ ^(#)?[a-zA-Z] ]]
+ parsed=repositoryurl=https://github.com/openhab/openhabian.git
+ [[ repositoryurl=https://github.com/openhab/openhabian.git =~ ^#[a-zA-Z] ]]
++ echo repositoryurl=https://github.com/openhab/openhabian.git
++ cut -d= -f1
+ param=repositoryurl
+ [[ -v repositoryurl ]]
+ [[ https://github.com/openhab/openhabian == *\ * ]]
+ echo repositoryurl=https://github.com/openhab/openhabian
+ read -r line
+ [[ clonebranch=openHAB3 =~ ^(#)?[a-zA-Z] ]]
+ parsed=clonebranch=openHAB3
+ [[ clonebranch=openHAB3 =~ ^#[a-zA-Z] ]]
++ echo clonebranch=openHAB3
++ cut -d= -f1
+ param=clonebranch
+ [[ -v clonebranch ]]
+ [[ openHAB3 == *\ * ]]
+ echo clonebranch=openHAB3
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # initial openHAB configuration to import (URL or filename) =~ ^(#)?[a-zA-Z] ]]
+ echo '# initial openHAB configuration to import (URL or filename)'
+ read -r line
+ [[ # the file needs to be a zip archive created from openhab-cli backup =~ ^(#)?[a-zA-Z] ]]
+ echo '# the file needs to be a zip archive created from openhab-cli backup'
+ read -r line
+ [[ # initialconfig=/boot/initial.zip =~ ^(#)?[a-zA-Z] ]]
+ echo '# initialconfig=/boot/initial.zip'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # debug verbosity mode =~ ^(#)?[a-zA-Z] ]]
+ echo '# debug verbosity mode'
+ read -r line
+ [[ # off, on (verbose output in log) or maximum (show every command) =~ ^(#)?[a-zA-Z] ]]
+ echo '# off, on (verbose output in log) or maximum (show every command)'
+ read -r line
+ [[ debugmode=off =~ ^(#)?[a-zA-Z] ]]
+ parsed=debugmode=off
+ [[ debugmode=off =~ ^#[a-zA-Z] ]]
++ echo debugmode=off
++ cut -d= -f1
+ param=debugmode
+ [[ -v debugmode ]]
+ [[ maximum == *\ * ]]
+ echo debugmode=maximum
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # the framebuffer on RPi is enabled by default =~ ^(#)?[a-zA-Z] ]]
+ echo '# the framebuffer on RPi is enabled by default'
+ read -r line
+ [[ framebuffer=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=framebuffer=enable
+ [[ framebuffer=enable =~ ^#[a-zA-Z] ]]
++ echo framebuffer=enable
++ cut -d= -f1
+ param=framebuffer
+ [[ -v framebuffer ]]
+ [[ enable == *\ * ]]
+ echo framebuffer=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # fake hardware =~ ^(#)?[a-zA-Z] ]]
+ echo '# fake hardware'
+ read -r line
+ [[ # force treating your box as if it was a ... =~ ^(#)?[a-zA-Z] ]]
+ echo '# force treating your box as if it was a ...'
+ read -r line
+ [[ # pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, pi0w2, x86 =~ ^(#)?[a-zA-Z] ]]
+ echo '# pi4, pi4_8gb, cm4, pi400, pi3, cm3, pi3+, cm3+, pi2, pi1, cm1, pi0, pi0w, pi0w2, x86'
+ read -r line
+ [[ # hw= =~ ^(#)?[a-zA-Z] ]]
+ echo '# hw='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Hardware architecture =~ ^(#)?[a-zA-Z] ]]
+ echo '# Hardware architecture'
+ read -r line
+ [[ # x86_64, amd64, armv6l, armv7l, aarch64, arm64 =~ ^(#)?[a-zA-Z] ]]
+ echo '# x86_64, amd64, armv6l, armv7l, aarch64, arm64'
+ read -r line
+ [[ # hwarch= =~ ^(#)?[a-zA-Z] ]]
+ echo '# hwarch='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # OS distribution/release =~ ^(#)?[a-zA-Z] ]]
+ echo '# OS distribution/release'
+ read -r line
+ [[ # Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bullseye, bionic, focal =~ ^(#)?[a-zA-Z] ]]
+ echo '# Valid arguments: raspios, raspbian, debian, ubuntu, stretch, buster, bullseye, bionic, focal'
+ read -r line
+ [[ # osrelease= =~ ^(#)?[a-zA-Z] ]]
+ echo '# osrelease='
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Java version to install =~ ^(#)?[a-zA-Z] ]]
+ echo '# Java version to install'
+ read -r line
+ [[ java_opt=11 =~ ^(#)?[a-zA-Z] ]]
+ parsed=java_opt=11
+ [[ java_opt=11 =~ ^#[a-zA-Z] ]]
++ echo java_opt=11
++ cut -d= -f1
+ param=java_opt
+ [[ -v java_opt ]]
+ [[ Zulu11-64 == *\ * ]]
+ echo java_opt=Zulu11-64
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # install zram per default, set to "disable" to skip installation =~ ^(#)?[a-zA-Z] ]]
+ echo '# install zram per default, set to "disable" to skip installation'
+ read -r line
+ [[ zraminstall=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=zraminstall=enable
+ [[ zraminstall=enable =~ ^#[a-zA-Z] ]]
++ echo zraminstall=enable
++ cut -d= -f1
+ param=zraminstall
+ [[ -v zraminstall ]]
+ [[ enable == *\ * ]]
+ echo zraminstall=enable
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # start comitup hotspot if internet is not reachable =~ ^(#)?[a-zA-Z] ]]
+ echo '# start comitup hotspot if internet is not reachable'
+ read -r line
+ [[ hotspot=enable =~ ^(#)?[a-zA-Z] ]]
+ parsed=hotspot=enable
+ [[ hotspot=enable =~ ^#[a-zA-Z] ]]
++ echo hotspot=enable
++ cut -d= -f1
+ param=hotspot
+ [[ -v hotspot ]]
+ [[ enable == *\ * ]]
+ echo hotspot=enable
+ read -r line
+ [[ hotspotpw=openhabian =~ ^(#)?[a-zA-Z] ]]
+ parsed=hotspotpw=openhabian
+ [[ hotspotpw=openhabian =~ ^#[a-zA-Z] ]]
++ echo hotspotpw=openhabian
++ cut -d= -f1
+ param=hotspotpw
+ [[ -v hotspotpw ]]
+ [[ openhabian == *\ * ]]
+ echo hotspotpw=openhabian
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # external SD card device to backup and mirror the internal SD card to =~ ^(#)?[a-zA-Z] ]]
+ echo '# external SD card device to backup and mirror the internal SD card to'
+ read -r line
+ [[ # backupdrive=/dev/sda =~ ^(#)?[a-zA-Z] ]]
+ echo '# backupdrive=/dev/sda'
+ read -r line
+ [[ storageconfig=openhab-dir =~ ^(#)?[a-zA-Z] ]]
+ parsed=storageconfig=openhab-dir
+ [[ storageconfig=openhab-dir =~ ^#[a-zA-Z] ]]
++ echo storageconfig=openhab-dir
++ cut -d= -f1
+ param=storageconfig
+ [[ -v storageconfig ]]
+ [[ openhab-dir == *\ * ]]
+ echo storageconfig=openhab-dir
+ read -r line
+ [[ storagedir=/storage =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagedir=/storage
+ [[ storagedir=/storage =~ ^#[a-zA-Z] ]]
++ echo storagedir=/storage
++ cut -d= -f1
+ param=storagedir
+ [[ -v storagedir ]]
+ [[ /storage == *\ * ]]
+ echo storagedir=/storage
+ read -r line
+ [[ storagetapes=15 =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagetapes=15
+ [[ storagetapes=15 =~ ^#[a-zA-Z] ]]
++ echo storagetapes=15
++ cut -d= -f1
+ param=storagetapes
+ [[ -v storagetapes ]]
+ [[ 15 == *\ * ]]
+ echo storagetapes=15
+ read -r line
+ [[ storagecapacity=1024 =~ ^(#)?[a-zA-Z] ]]
+ parsed=storagecapacity=1024
+ [[ storagecapacity=1024 =~ ^#[a-zA-Z] ]]
++ echo storagecapacity=1024
++ cut -d= -f1
+ param=storagecapacity
+ [[ -v storagecapacity ]]
+ [[ 1024 == *\ * ]]
+ echo storagecapacity=1024
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # mail relay settings =~ ^(#)?[a-zA-Z] ]]
+ echo '# mail relay settings'
+ read -r line
+ [[ # adminmail=john.doe@foo.bar =~ ^(#)?[a-zA-Z] ]]
+ echo '# adminmail=john.doe@foo.bar'
+ read -r line
+ [[ # relayuser=john.doe@foo.bar =~ ^(#)?[a-zA-Z] ]]
+ echo '# relayuser=john.doe@foo.bar'
+ read -r line
+ [[ # relaypass=secret =~ ^(#)?[a-zA-Z] ]]
+ echo '# relaypass=secret'
+ read -r line
+ [[ # smarthost=smtp.gmail.com =~ ^(#)?[a-zA-Z] ]]
+ echo '# smarthost=smtp.gmail.com'
+ read -r line
+ [[ # smartport=587 =~ ^(#)?[a-zA-Z] ]]
+ echo '# smartport=587'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Tailscale VPN =~ ^(#)?[a-zA-Z] ]]
+ echo '# Tailscale VPN'
+ read -r line
+ [[ # preauthkey=tskey-xxxxxxxxxxxxxxxxx =~ ^(#)?[a-zA-Z] ]]
+ echo '# preauthkey=tskey-xxxxxxxxxxxxxxxxx'
+ read -r line
+ [[ # tstags=tag:client =~ ^(#)?[a-zA-Z] ]]
+ echo '# tstags=tag:client'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # Custom log files =~ ^(#)?[a-zA-Z] ]]
+ echo '# Custom log files'
+ read -r line
+ [[ # custom_log_files=("/var/log/foo.log" "/var/log/bar.log") =~ ^(#)?[a-zA-Z] ]]
+ echo '# custom_log_files=("/var/log/foo.log" "/var/log/bar.log")'
+ read -r line
+ [[ '' =~ ^(#)?[a-zA-Z] ]]
+ echo ''
+ read -r line
+ [[ # vim: filetype=sh =~ ^(#)?[a-zA-Z] ]]
+ echo '# vim: filetype=sh'
+ read -r line
+ [[ -f /etc/init.d/openhabian-config ]]
+ config_ipv6
+ local aptConf=/etc/apt/apt.conf.d/S90force-ipv4
+ local sysctlConf=/etc/sysctl.d/99-sysctl.conf
+ [[ enable == \d\i\s\a\b\l\e ]]
+ [[ enable == \e\n\a\b\l\e ]]
+ grep -qs '^[[:space:]]*# Disable all IPv6 functionality' /etc/sysctl.d/99-sysctl.conf
+ [[ -n '' ]]
+ apt_update
+ export PID_APT=5311
+ PID_APT=5311
+ nohup apt-get update
+ whiptail_check
++ command -v whiptail
+ [[ -x /usr/bin/whiptail ]]
+ load_create_config
+ local 'questionText=\nWelcome to openHABian!\n\nPlease provide the name of your Linux user i.e. the account you normally log in with.\n\nTypical user names are '\''pi'\'' or '\''ubuntu'\''.'
+ local input
+ [[ -f /etc/openhabian.conf ]]
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2023-03-27_20:35:49_CEST [openHABian] Loading configuration file '\''/etc/openhabian.conf'\''... '
2023-03-27_20:35:49_CEST [openHABian] Loading configuration file '/etc/openhabian.conf'... ++ getent group openhabian
+ [[ ! -n openhabian:x:1000:openhabian,frontail ]]
+ id -u openhabian
+ source /etc/openhabian.conf
++ hostname=openhabian
++ username=openhabian
++ userpw=openhabian
++ adminkeyurl=
++ timezone=Europe/Berlin
++ locales='en_US.UTF-8 de_DE.UTF-8'
++ system_default_locale=en_US.UTF-8
++ wifi_ssid=
++ wifi_password=
++ wifi_country=
++ ipv6=enable
++ repositoryurl=https://github.com/openhab/openhabian
++ clonebranch=openHAB3
++ debugmode=maximum
++ framebuffer=enable
++ java_opt=Zulu11-64
++ zraminstall=enable
++ hotspot=enable
++ hotspotpw=openhabian
++ storageconfig=openhab-dir
++ storagedir=/storage
++ storagetapes=15
++ storagecapacity=1024
+ echo OK
OK
+ openhabian_console_check
+ [[ -z 1 ]]
++ tput cols
+ [[ 120 -ge 120 ]]
+ return 0
+ openhabian_update_check
+ [[ -z 1 ]]
+ local branch
+ local introText
+ local unsupportedOSText
+ branch=openHAB3
+ introText='Additions, improvements or fixes were added to the openHABian configuration tool. Would you like to update now and benefit from them? The update will not automatically apply changes to your system.\n\nUpdating is recommended.'
+ unsupportedOSText='You are running an old Linux release that is no longer officially supported.\nWe recommend upgrading to the most current stable release of your distribution (or current Long Term Support version for distributions that offer LTS).\nDo you really want to continue using openHABian on this system?'
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
++ get_git_revision
++ local branch
++ local commitDate
++ local shorthash
+++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
++ branch=openHAB3
+++ git -C /opt/openhabian log --pretty=format:%aI -n 1
++ commitDate=2022-12-18T22:39:53+01:00
+++ git -C /opt/openhabian log --pretty=format:%h -n 1
++ shorthash=2633096
++ echo '[openHAB3]{2022-12-18T22:39:53+01:00}(2633096)'
+ echo '2023-03-27_20:35:49_CEST [openHABian] openHABian configuration tool version: [openHAB3]{2022-12-18T22:39:53+01:00}(2633096)'
2023-03-27_20:35:49_CEST [openHABian] openHABian configuration tool version: [openHAB3]{2022-12-18T22:39:53+01:00}(2633096)
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2023-03-27_20:35:49_CEST [openHABian] Checking for changes in origin branch openHAB3... '
2023-03-27_20:35:49_CEST [openHABian] Checking for changes in origin branch openHAB3... + is_stretch
+ [[ '' == \s\t\r\e\t\c\h ]]
++ cat /etc/os-release
+ [[ PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/" =~ stretch ]]
+ return 1
+ is_xenial
+ [[ '' == \x\e\n\i\a\l ]]
++ cat /etc/os-release
+ [[ PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/" =~ xenial ]]
+ return 1
+ git -C /opt/openhabian config user.email openhabian@openHABian
+ git -C /opt/openhabian config user.name openhabian
+ git -C /opt/openhabian fetch --quiet origin
++ git -C /opt/openhabian rev-parse openHAB3
++ git -C /opt/openhabian rev-parse '@{u}'
+ [[ 2633096c34712c2a4117c7e2a3763b71f7de16fe == 2633096c34712c2a4117c7e2a3763b71f7de16fe ]]
+ echo OK
OK
+ openhabian_announcements
+ [[ -z 1 ]]
+ local altReadNews
+ local newsFile
+ local readNews
+ altReadNews=/tmp/NEWS.md
+ newsFile=/opt/openhabian/NEWS.md
+ readNews=/opt/openhabian/docs/NEWS.md
+ cmp --silent /opt/openhabian/NEWS.md /opt/openhabian/docs/NEWS.md
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2023-03-27_20:35:50_CEST [openHABian] Switching to branch openHAB3... '
2023-03-27_20:35:50_CEST [openHABian] Switching to branch openHAB3... + git -C /opt/openhabian checkout --quiet openHAB3+ echo OK
OK
+ jsscripting_npm_check openhab
+ '[' openhab == '' ']'
+ '[' '!' -d /etc/openhab/automation/js/node_modules/openhab ']'
+ local 'introText=Additions, improvements or fixes were added to openhab (npm package) for JS Scripting. Would you like to update now and benefit from them?\n\nThe update might include breaking changes, please head over to the JS Scripting docs (https://www.openhab.org/addons/automation/jsscripting/) or to https://www.npmjs.com/package/openhab.'
+ local outdatedReturn
+ node_is_installed
++ command -v npm
+ [[ -x /usr/bin/npm ]]
++ node --version
+ [[ v16.19.1 == \v\1\6* ]]
+ return 0
+ is_armv6l
+ [[ '' == \a\r\m\v\6\l ]]
+ case "$(uname -m)" in
++ uname -m
+ return 1
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2023-03-27_20:35:50_CEST [openHABian] Checking for updates of openhab for JS Scripting... '
2023-03-27_20:35:50_CEST [openHABian] Checking for updates of openhab for JS Scripting... ++ npm outdated --prefix /etc/openhab/automation/js
+ outdatedReturn=
+ [[ '' =~ [[:space:]]openhab[[:space:]] ]]
+ echo 'No update available.'
No update available.
+ jsscripting_npm_check openhab_rules_tools
+ '[' openhab_rules_tools == '' ']'
+ '[' '!' -d /etc/openhab/automation/js/node_modules/openhab_rules_tools ']'
+ local 'introText=Additions, improvements or fixes were added to openhab_rules_tools (npm package) for JS Scripting. Would you like to update now and benefit from them?\n\nThe update might include breaking changes, please head over to the JS Scripting docs (https://www.openhab.org/addons/automation/jsscripting/) or to https://www.npmjs.com/package/openhab_rules_tools.'
+ local outdatedReturn
+ node_is_installed
++ command -v npm
+ [[ -x /usr/bin/npm ]]
++ node --version
+ [[ v16.19.1 == \v\1\6* ]]
+ return 0
+ is_armv6l
+ [[ '' == \a\r\m\v\6\l ]]
+ case "$(uname -m)" in
++ uname -m
+ return 1
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2023-03-27_20:35:52_CEST [openHABian] Checking for updates of openhab_rules_tools for JS Scripting... '
2023-03-27_20:35:52_CEST [openHABian] Checking for updates of openhab_rules_tools for JS Scripting... ++ npm outdated --prefix /etc/openhab/automation/js
+ outdatedReturn=
+ [[ '' =~ [[:space:]]openhab_rules_tools[[:space:]] ]]
+ echo 'No update available.'
No update available.
+ bashrc_copy
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2023-03-27_20:35:55_CEST [openHABian] Adding slightly tuned bash configuration files to system... '
2023-03-27_20:35:55_CEST [openHABian] Adding slightly tuned bash configuration files to system... + cp /opt/openhabian/includes/generic/bash.bashrc /etc/bash.bashrc
+ cp /opt/openhabian/includes/generic/bashrc-root /root/.bashrc
+ cp /opt/openhabian/includes/generic/bash_profile /home/openhabian/.bash_profile
+ cp /opt/openhabian/includes/generic/bash_aliases /home/openhabian/.bash_aliases
+ chown openhabian:openhabian /home/openhabian/.bash_aliases /home/openhabian/.bash_history /home/openhabian/.bash_logout /home/openhabian/.bash_profile
+ echo OK
OK
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=openHAB3
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-12-18T22:39:53+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=2633096
+++ echo '[openHAB3]{2022-12-18T22:39:53+01:00}(2633096)'
++ whiptail --title 'openHABian Configuration Tool — [openHAB3]{2022-12-18T22:39:53+01:00}(2633096)' --menu 'Setup Options' 19 116 12 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Update all installed software packages (incl. openHAB) to their latest version' '03 | Install openHAB' 'Install or upgrade to openHAB 3' '04 | Import config' 'Import an openHAB 3 configuration from file or URL' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB Related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►'
+ choice='20 | Optional Components'
+ RET=0
+ '[' 0 -eq 1 ']'
+ '[' 0 -eq 255 ']'
+ [[ 20 | Optional Components == '' ]]
+ [[ 20 | Optional Components == \0\0* ]]
+ [[ 20 | Optional Components == \0\1* ]]
+ [[ 20 | Optional Components == \0\2* ]]
+ [[ 20 | Optional Components == \0\3* ]]
+ [[ 20 | Optional Components == \0\4* ]]
+ [[ 20 | Optional Components == \1\0* ]]
+ [[ 20 | Optional Components == \2\0* ]]
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=openHAB3
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-12-18T22:39:53+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=2633096
+++ echo '[openHAB3]{2022-12-18T22:39:53+01:00}(2633096)'
++ whiptail --title 'openHABian Configuration Tool — [openHAB3]{2022-12-18T22:39:53+01:00}(2633096)' --menu 'Optional Components' 25 118 18 --cancel-button Back --ok-button Execute '21 | Log Viewer' 'openHAB Log Viewer webapp (frontail)' '   | Add log to viewer' 'Add a custom log to openHAB Log Viewer (frontail)' '   | Remove log from viewer' 'Remove a custom log from openHAB Log Viewer (frontail)' '22 | miflora-mqtt-daemon' 'Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon' '23 | Mosquitto' 'MQTT broker Eclipse Mosquitto' '24 | InfluxDB+Grafana' 'A powerful persistence and graphing solution' '25 | Node-RED' 'Flow-based programming for the Internet of Things' '26 | Homegear' 'Homematic specific, the CCU2 emulation software Homegear' '27 | knxd' 'KNX specific, the KNX router/gateway daemon knxd' '28 | 1wire' '1wire specific, owserver and related packages' '29 | deCONZ' 'deCONZ / Phoscon companion app for Conbee/Raspbee controller' '2A | Zigbee2MQTT' 'Install or Update Zigbee2MQTT' '   | Remove Zigbee2MQTT' 'Remove Zigbee2MQTT from this system' '2B | FIND 3' 'Framework for Internal Navigation and Discovery' '   | Monitor Mode' 'Patch firmware to enable monitor mode (ALPHA/DANGEROUS)' '2C | Install HABApp' 'Python 3 integration and rule engine for openHAB' '   | Remove HABApp' 'Remove HABApp from this system' '2D | Install EVCC' 'Deploy Electric Vehicle Charge Controller' '   | Remove EVCC' 'Uninstall EVCC' '   | Setup EVCC' 'Setup EVCC from command line (German only)'
+ choice2='2A | Zigbee2MQTT'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ wait_for_apt_to_finish_update
+ local 'spin=-\|/'
+ local i
+ [[ -z 5311 ]]
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2023-03-27_20:36:03_CEST [openHABian] Updating Linux package information... '
2023-03-27_20:36:03_CEST [openHABian] Updating Linux package information... + kill -0 5311
+ echo OK
OK
+ case "$choice2" in
+ zigbee2mqtt_setup install
+ local zigbee2mqttBase
+ local 'z2mInstalledText=A configuration for Zigbee2MQTT is already existing.\n\nWould you like to update Zigbee2MQTT to the latest version with this configuration?'
+ local 'introText=A MQTT-server is required for Zigbee2mqtt. If you haven'\''t installed one yet, please select <cancel> and come back after installing one (e.g. Mosquitto).\n\nZigbee2MQTT will be installed from the official repository.\n\nDuration is about 4 minutes... '
+ local 'installText=Zigbee2MQTT is installed from the official repository.\n\nPlease wait about 4 minutes... '
+ local 'uninstallText=Zigbee2MQTT is completely removed from the system.'
+ local 'adapterText=Please select your zigbee adapter:'
+ local 'mqttUserText=\nPlease enter your MQTT-User (default = openhabian):'
+ local 'mqttPWText=\nIf your MQTT-server requires a password, please enter it here:'
+ local my_adapters
+ local mqttDefaultUser=openhabian
+ local mqttUser
+ local serverIP
+ local installSuccessText
+ local updateSuccessText
+ local loopSel=1
++ hostname -I
+ serverIP='192.168.2.22 2a02:a444:b52d:1:8e43:6b97:7fed:7b60 '
+ serverIP='192.168.2.22 2a02:a444:b52d:1:8e43:6b97:7fed:7b60'
+ installSuccessText='Setup was successful. Zigbee2MQTT is now up and running.\n\nFor further Zigbee-settings open frontend (in 2 minutes): \nhttp://192.168.2.22 2a02:a444:b52d:1:8e43:6b97:7fed:7b60:8081.\n\nDocumentation of ZigBee2MQTT:\nhttps://www.zigbee2mqtt.io/guide/configuration'
+ updateSuccessText='Update successful. \n\nFor further Zigbee-settings open frontend (in 2 minutes): \nhttp://192.168.2.22 2a02:a444:b52d:1:8e43:6b97:7fed:7b60:8081.\n\nDocumentation of Zigbee2MQTT:\nhttps://www.zigbee2mqtt.io/guide/configuration'
+ [[ install == \r\e\m\o\v\e ]]
+ [[ install != \i\n\s\t\a\l\l ]]
+ [[ -e /opt/zigbee2mqtt/data/configuration.yaml ]]
+ [[ -n 1 ]]
+ whiptail --title 'Zigbee2MQTT installation' --yes-button Continue --no-button Cancel --yesno 'A configuration for Zigbee2MQTT is already existing.\n\nWould you like to update Zigbee2MQTT to the latest version with this configuration?' 14 80
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2023-03-27_20:36:05_CEST [openHABian] Updating Zigbee2MQTT... '
2023-03-27_20:36:05_CEST [openHABian] Updating Zigbee2MQTT... + cond_redirect cd /opt/zigbee2mqtt
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ cd /opt/zigbee2mqtt \033[39;49;00m'

$ cd /opt/zigbee2mqtt
+ cd /opt/zigbee2mqtt
+ return 0
+ cond_redirect systemctl stop zigbee2mqtt
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl stop zigbee2mqtt \033[39;49;00m'

$ systemctl stop zigbee2mqtt
+ systemctl stop zigbee2mqtt
+ return 0
+ cond_redirect sudo -u openhabian cp -R data data-backup
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sudo -u openhabian cp -R data data-backup \033[39;49;00m'

$ sudo -u openhabian cp -R data data-backup
+ sudo -u openhabian cp -R data data-backup
+ return 0
+ cond_redirect sudo -u openhabian git pull
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ sudo -u openhabian git pull \033[39;49;00m'

$ sudo -u openhabian git pull
+ sudo -u openhabian git pull
Updating 9b2a9210..cdf62ea5
error: Your local changes to the following files would be overwritten by merge:
        npm-shrinkwrap.json
Please commit your changes or stash them before you merge.
Aborting
+ return 1
+ echo 'FAILED git'
FAILED git
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "20 | Optional Components"\n\nPlease 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.' 14 80
+ return 0
+ return 0
+ true
+ show_main_menu
+ local choice
+ local version
+++ get_git_revision
+++ local branch
+++ local commitDate
+++ local shorthash
++++ git -C /opt/openhabian rev-parse --abbrev-ref HEAD
+++ branch=openHAB3
++++ git -C /opt/openhabian log --pretty=format:%aI -n 1
+++ commitDate=2022-12-18T22:39:53+01:00
++++ git -C /opt/openhabian log --pretty=format:%h -n 1
+++ shorthash=2633096
+++ echo '[openHAB3]{2022-12-18T22:39:53+01:00}(2633096)'
++ whiptail --title 'openHABian Configuration Tool — [openHAB3]{2022-12-18T22:39:53+01:00}(2633096)' --menu 'Setup Options' 19 116 12 --cancel-button Exit --ok-button Execute '00 | About openHABian' 'Information about the openHABian project and this tool' '' '' '01 | Select Branch' 'Select the openHABian config tool version ("branch") to run' '02 | Upgrade System' 'Update all installed software packages (incl. openHAB) to their latest version' '03 | Install openHAB' 'Install or upgrade to openHAB 3' '04 | Import config' 'Import an openHAB 3 configuration from file or URL' '' '' '10 | Apply Improvements' 'Apply the latest improvements to the basic openHABian setup ►' '20 | Optional Components' 'Choose from a set of optional software components ►' '30 | System Settings' 'A range of system and hardware related configuration steps ►' '40 | openHAB Related' 'Switch the installed openHAB version or apply tweaks ►' '50 | Backup/Restore' 'Manage backups and restore your system ►'
+ choice=
+ choice=
+ RET=1
+ '[' 1 -eq 1 ']'
+ return 255
+ system_check_default_password
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ local algo
+ local defaultPassword
+ local defaultUser
+ local generatedPassword
+ local introText
+ local originalPassword
+ local salt
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ id -u pi
+ is_pi
+ is_pifour
+ [[ '' == \p\i\4 ]]
+ grep -q '^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]11[0-9a-fA-F]$' /proc/cpuinfo
+ return 0
+ return 0
+ defaultUser=openhabian
+ defaultPassword=openhabian
++ grep -w openhabian /etc/shadow
++ cut -d: -f2
+ originalPassword='$6$j9zqpvgSDunB8qYz$Dqndt.oxw29wPO94kjuWVi4X61lDok53VTmgafGGlqdfB5TzICBodbZ/ir/17QT9i/AnJTiuvGEXfqxucDX0q1'
++ echo '$6$j9zqpvgSDunB8qYz$Dqndt.oxw29wPO94kjuWVi4X61lDok53VTmgafGGlqdfB5TzICBodbZ/ir/17QT9i/AnJTiuvGEXfqxucDX0q1'
++ cut '-d$' -f2
+ algo=6
+ introText='The default password was detected on your system! That is a serious security concern. Bad guys or malicious programs in your subnet are able to gain root access!\n\nPlease set a strong password by typing the command '\''passwd openhabian'\''!'
++ echo '$6$j9zqpvgSDunB8qYz$Dqndt.oxw29wPO94kjuWVi4X61lDok53VTmgafGGlqdfB5TzICBodbZ/ir/17QT9i/AnJTiuvGEXfqxucDX0q1'
++ cut '-d$' -f3
+ salt=j9zqpvgSDunB8qYz
+ export algo defaultPassword salt
++ perl -le 'print crypt("$ENV{defaultPassword}","\$$ENV{algo}\$$ENV{salt}\$")'
+ generatedPassword='$6$j9zqpvgSDunB8qYz$jHV/rc14VK267hJ5BTaoll57Kh0tRY9vWGorABKAT8DyU0tRnhuNVW1qUseAvv2RTiv1Fb6wYLz4QLJYFcqn40'
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -n '2023-03-27_20:36:15_CEST [openHABian] Checking for default openHABian username:password combination... '
2023-03-27_20:36:15_CEST [openHABian] Checking for default openHABian username:password combination... ++ id -u openhabian
+ [[ -n 1000 ]]
+ [[ $6$j9zqpvgSDunB8qYz$jHV/rc14VK267hJ5BTaoll57Kh0tRY9vWGorABKAT8DyU0tRnhuNVW1qUseAvv2RTiv1Fb6wYLz4QLJYFcqn40 == \$\6\$\j\9\z\q\p\v\g\S\D\u\n\B\8\q\Y\z\$\D\q\n\d\t\.\o\x\w\2\9\w\P\O\9\4\k\j\u\W\V\i\4\X\6\1\l\D\o\k\5\3\V\T\m\g\a\f\G\G\l\q\d\f\B\5\T\z\I\C\B\o\d\b\Z\/\i\r\/\1\7\Q\T\9\i\/\A\n\J\T\i\u\v\G\E\X\f\q\x\u\c\D\X\0\q\1 ]]
+ echo OK
OK
++ timestamp
++ printf '%(%F_%T_%Z)T\n' -1
+ echo -e '2023-03-27_20:36:15_CEST [openHABian] We hope you got what you came for! See you again soon ;)'
2023-03-27_20:36:15_CEST [openHABian] We hope you got what you came for! See you again soon ;)
+ cd /etc

I got the same problem: zigbee2mqtt status is active but it is not working

openhabian@openhabian:~ $ sudo service zigbee2mqtt status
● zigbee2mqtt.service - Zigbee2MQTT
     Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-03-28 01:13:39 CEST; 4s ago
   Main PID: 27602 (npm start)
      Tasks: 19 (limit: 2176)
        CPU: 4.854s
     CGroup: /system.slice/zigbee2mqtt.service
             ├─27602 npm start
             ├─27619 sh -c -- node index.js
             └─27620 node index.js

Mar 28 01:13:39 openhabian systemd[1]: Started Zigbee2MQTT.
Mar 28 01:13:41 openhabian npm[27602]: > zigbee2mqtt@1.30.2 start
Mar 28 01:13:41 openhabian npm[27602]: > node index.js

Same for me. Z2M is starting over and over again, without success.
in Journalctl it says
“Zigbee2MQTT requires node version ^10 || ^12 || ^14 || ^15, you are running v16.20.0!”

Is it possible (and advisable) to downgrade node?

@radioactiveman @Marijn_Oudijk @corrado_dal_canton
sorry to hear that you are having trouble with zigbee2mqtt. I hope the problem is not the install-routine in openhabian-config. Did you install z2m via openhabian-config?
Anyway it seems that there are different things happening.
@corrado_dal_canton : Why do you think it’s not working? What is the problem? The server seems to be running fine.

Instead of downgrading node I would recommend to first upgrade z2m. The current version is 1.30.3. If you installed z2m with openhabian then you can do this under 20-optional components - 2A Zigbee2mqtt (Install or update…)

Even if the server status appears up, it stop working time to time. If I try to restart the service it does nothing. I restart NPM and here the errors is log directory out of space. I have to stop it and then start again

I had the same problems. My experience is that the log-level should normally only be warning or error. Otherwise the file-system will be switched to read-only after some time. Some people reported this issue but the root cause was not found yet

Not really the root cause is that your logs are larger than ZRAM capability.
The problem is we must not increase that on small boxes like 1GB Raspis.
You need to reduce the number and size of log files in log4j but the default happens in the openhab distro not in openHABian.
@Benjy do you think you could do anything about that?

I might add that in my case the main problem always seemed to be the zigbee2mqtt log (very talkative), not the openhab log. So I recommend switching zigbee2mqtt log level to warning or error during normal operation.
I just noticed that I used “info” as default in the openhabian install routine (sorry). I start a PR to get that corrected.

It ain’t about the level, that just affects the time it takes for the problem to surface.
It’s about number and size of logfiles. Limit those of zigbee2mqtt.

Yes and No: It’s rotating the log-file every 10mb untill about 3 files per day. It seems to keep 10 days. In the z2m-config you can only switch off log rotation, you cannot configure the file size. So at the moment I see no other way than to reduce log level in order to keep the overall amount acceptable.

since I didn’t have much configured in zigbee2mqtt I decided to completely remove it (via Openhabian) and re-install. That seems to be working now!

(just updating via Openhabian gave an error)

@Marijn_Oudijk But please set log-level to warn or error (in configuration.yaml or via UI). Otherwise you will probably run into trouble again. I asked the developer of zigbee2mqtt for an option to limit the log size but in the meantime it’s best to keep the level low.

Thanks for the warning. Done!

I send all my logging to another server and have no local logs for zigbee2mqtt.

homeassistant: false
permit_join: false
device_options:
  retain: true
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://192.168.1.164
  keepalive: 60
  reject_unauthorized: true
  version: 4
  include_device_information: false
serial:
  disable_led: true
  port: /dev/zigbeeusb
advanced:
  log_output:
    - syslog
  last_seen: ISO_8601_local
  log_level: info
  log_syslog:
    app_name: Zigbee2MQTT
    eol: /n
    host: 192.168.1.164
    localhost: zigbee2mqtt
    path: /dev/log
    pid: process.pid
    port: 514
    protocol: udp4
    type: '5424'
  channel: 11
  legacy_api: true
  legacy_availability_payload: true

This is how the logs look on the remote syslog server and you can control then size and rotation if you wanted to as well. Assuming you have another server to send the log s to.
-rw-r–r-- 1 root adm 1042406 May 2 09:03 zigbee2mqtt.log
-rw-r–r-- 1 root adm 102204 May 2 00:00 zigbee2mqtt.log.1.gz
-rw-r–r-- 1 root adm 118897 May 1 00:00 zigbee2mqtt.log.2.gz
-rw-r–r-- 1 root adm 100619 Apr 30 00:00 zigbee2mqtt.log.3.gz
-rw-r–r-- 1 root adm 102031 Apr 29 00:00 zigbee2mqtt.log.4.gz
-rw-r–r-- 1 root adm 93531 Apr 28 00:00 zigbee2mqtt.log.5.gz
-rw-r–r-- 1 root adm 104268 Apr 27 00:00 zigbee2mqtt.log.6.gz
-rw-r–r-- 1 root adm 99493 Apr 26 00:00 zigbee2mqtt.log.7.gz

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.