Upgrade to Z-Way v3.2.2

Discussions about Z-Way software and Z-Wave technology in general
N2641D
Posts: 21
Joined: 06 Feb 2019 13:34

Upgrade to Z-Way v3.2.2

Post by N2641D »

I thought to quickly upgrade my Z-Way server from 3.1.3 to v3.2.2, however, the server (z-way-server) seems not to be starting at all. Z-Way is running as a single application on a RASPI 4B+ using a RaZberry hardware module. I tried...

1. Upgrade from Z-Way's "Firmware update" function.
2. Remove old version (3.1.3) (sudo apt purge z-way* -y; sudo rm -rf /opt/z-way-server/ /etc/zbw/ /etc/z-way/ /etc/init.d/zbw_connect) and install new version 3.2.2 (wget -q -O - https://storage.z-wave.me/RaspbianInstall | sudo bash).
3. Install fresh Raspbian and install Z-Way (wget -q -O - https://storage.z-wave.me/RaspbianInstall | sudo bash)


The Z-Way installation does really not show anything spectacular. After shutdown and power-off-restart of my RASPI:
- RASPI is running 100% okay.
- No connection to Z-Way possible (http://my-static-ip-adr:8083/smarthome/#/dashboard) because:
- Port 8083 is closed
- process z-way-server (ps -A) not listed
- Z-Way server log file is empty

What can I do? Can anybody please help?
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Upgrade to Z-Way v3.2.2

Post by PoltoS »

If you have your IP on find.z-wave.me, we can help remotelly.

Please try to run Z-Way manually as listed here
https://z-wave.me/support/how-to-report-a-bug/

Show the terminal output
N2641D
Posts: 21
Joined: 06 Feb 2019 13:34

Re: Upgrade to Z-Way v3.2.2

Post by N2641D »

Thank you for your quick response!

I did run Z-Way manually. The previous Z-Way system (3.1.3) did never show any access/security problem. My I please remind you, that I also tried the installation from a fresh installed Debian version.

i@raspberrypi:/opt/z-way-server $ LD_LIBRARY_PATH=./libs ./z-way-server
Z-Way version v3.2.2 from 2021-11-29 15:40:21 +0300 (build 101045968be0f00797fdc4d1a70e2955271fe4e7)
Looking for modules in ./modules
Module modiconinstaller.so loaded
Module modinstaller.so loaded
Module modmqtt.so loaded
Module modskininstaller.so loaded
Module modcrypto.so loaded
Module modzbw.so loaded
Module modzwave.so loaded
Module moddhs.so loaded
Module modsockets.so loaded
Module modenocean.so loaded
Module modnotification2ext.so loaded
Module modhttp.so loaded
Module modhomekit.so loaded
Module modws.so loaded
Using default configuration file config.xml
Error: 'debug-port' number is out of range. Skipping it.
Failed to open log file: 13
[2021-12-08 18:04:07.908] [core] Executing script: /*** Z-Way Home Automation Engine main executable ***************************** ...
[2021-12-08 18:04:07.911] [core] Executing script: // Comon utilities and functions ...
[2021-12-08 18:04:07.917] [core] Executing script: // This script transforms old formats to new ...
[2021-12-08 18:04:07.943] [core] Error: can not write back config.json to storage: Error: Permission denied
[2021-12-08 18:04:07.943] [core] Adding module NotificationChannelEmail
[2021-12-08 18:04:07.944] [core] Adding module NotificationChannelEmail
[2021-12-08 18:04:07.950] [E] [core] result: Error: Error: Permission denied
at Error (native)
at automation/updateBackendConfig.js:600:4
at automation/updateBackendConfig.js:664:3
at automation/main.js:23:1
[2021-12-08 18:04:07.951] [E] [core] result: Error: Error: Uncaught Error: Permission denied
at Error (native)
at automation/main.js:23:1
seattleneil
Posts: 172
Joined: 02 Mar 2020 22:41

Re: Upgrade to Z-Way v3.2.2

Post by seattleneil »

Yikes! The commands you ran to do the upgrade blew away your existing Z-Way installation and is definitely not the correct procedures for an upgrade. if you haven't done a backup, then you'll likely need to re-build your entire Z-Wave network - not a fun task.

To upgrade to v3.2.2 on a Razberry from the command line (i.e., a Raspberry Pi with the Z-Wave.me daughter board), run the following command:
PKG=z-way-3.2.2_armhf.deb && wget -O /tmp/$PKG https://storage.z-wave.me/z-way-server/$PKG && sudo dpkg -i /tmp/$PKG

And if you get an error message related to missing libraries, run this command:
sudo apt --fix-broken install

Note that by setting the PKG variable to a different name, different Z-Way versions can be installed. You can see a list of versions by pointing your browser to: https://storage.z-wave.me/z-way-server

Assuming your step 3 (wget -q -O - https://storage.z-wave.me/RaspbianInstall | sudo bash) completed successfully, you should have a fresh/clean Z-Way installation. However, since the z-way-server process is not running, it's clear something is messed up. To troubleshoot the issue, from the command line run the following commands and reply with the output:
sudo systemctl status z-way-server
cat /opt/z-way-server/config.xml

I suggest trying to restart the z-way-server process with the following command:
sudo systemctl restart z-way-server

After the restart, check the status again with the following command:
sudo systemctl status z-way-server

With luck, you can probably fix the issue by running the upgrade command (PKG=z-way-3.2.2_armhf.deb && wget -O /tmp/$PKG https://storage.z-wave.me/z-way-server/$PKG && sudo dpkg -i /tmp/$PKG). Do not manually purge any packages or remove any files - the installer script contained in the .deb package will do that automatically for you.

Good luck.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Upgrade to Z-Way v3.2.2

Post by PoltoS »

@N2641D you need to prefix the command with a sudo
N2641D
Posts: 21
Joined: 06 Feb 2019 13:34

Re: Upgrade to Z-Way v3.2.2

Post by N2641D »

Thanks again to seattleneil and PoltoS!!!

Starting ZWay locally works fine (see below)! Port 8083 is open and the server answers requests via the network. Re-starting the Raspi does still not start the server process.

the command: "systemctl --all -t service" shows:

z-way-server.service loaded active exited LSB: RaZberry Z-Wave ser

Any advice?



pi@raspberrypi:~ $ cd /opt
pi@raspberrypi:/opt $ cd z-way-server
pi@raspberrypi:/opt/z-way-server $ sudo LD_LIBRARY_PATH=./libs ./z-way-server
Z-Way version v3.2.2 from 2021-11-29 15:40:21 +0300 (build 101045968be0f00797fdc4d1a70e2955271fe4e7)
Looking for modules in ./modules
Module modiconinstaller.so loaded
Module modinstaller.so loaded
Module modmqtt.so loaded
Module modskininstaller.so loaded
Module modcrypto.so loaded
Module modzbw.so loaded
Module modzwave.so loaded
Module moddhs.so loaded
Module modsockets.so loaded
Module modenocean.so loaded
Module modnotification2ext.so loaded
Module modhttp.so loaded
Module modhomekit.so loaded
Module modws.so loaded
Using default configuration file config.xml
Error: 'debug-port' number is out of range. Skipping it.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Upgrade to Z-Way v3.2.2

Post by PoltoS »

An interesting one.

Please try

Code: Select all

sudo /etc/init.d/z-way-server stop
sudo bash -x /etc/init.d/z-way-server start
and

Code: Select all

sudo /etc/init.d/z-way-server stop
sudo start-stop-daemon --start --pidfile /var/run/z-way-server.pid --make-pidfile --background --no-close --chdir /opt/z-way-server --exec z-way-server
Check the console output and the log on each run to catch suspicious lines.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Upgrade to Z-Way v3.2.2

Post by PoltoS »

Please also do:

Code: Select all

ls -l /etc/init.d/z-way-server
seattleneil
Posts: 172
Joined: 02 Mar 2020 22:41

Re: Upgrade to Z-Way v3.2.2

Post by seattleneil »

Just checking... is the problem that Z-Way fails to automatically start when you reboot the Raspberry Pi?

In other words, starting z-way-server manually from the command line is successful, and the z-way-server does not start automatically after a reboot.

If that's the problem, instead of running ls -l /etc/init.d/z-way-server, please run this command:

cd /etc; ls -l */*z-way-server

On my Raspberry Pi, the output shows:
-rwxrwxr-x 1 root root 1133 Sep 15 2020 init.d/z-way-server
-rw-r--r-- 1 root root 231 Sep 15 2020 logrotate.d/z-way-server
lrwxrwxrwx 1 root root 22 Nov 10 2020 rc0.d/K01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Nov 10 2020 rc1.d/K01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Nov 10 2020 rc2.d/S01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Nov 10 2020 rc3.d/S01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Nov 10 2020 rc4.d/S01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Nov 10 2020 rc5.d/S01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Nov 10 2020 rc6.d/K01z-way-server -> ../init.d/z-way-server
N2641D
Posts: 21
Joined: 06 Feb 2019 13:34

Re: Upgrade to Z-Way v3.2.2

Post by N2641D »

Thank you again for your help!

I have executed the proposed commands and have attached the result. The line:
Failed to load module modmqtt.so: /lib/arm-linux-gnueabihf/libmosquitto.so.1: version `MOSQ_1.6' not found (required by ./modules/modmqtt.so)
looks suspicious to me.



pi@raspberrypi:~ $ sudo /etc/init.d/z-way-server stop
Stopping z-way-server: start-stop-daemon: warning: failed to kill 372: No such process
done.
pi@raspberrypi:~ $ sudo bash -x /etc/init.d/z-way-server start
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
+ NAME=z-way-server
+ DAEMON_PATH=/opt/z-way-server
+ PIDFILE=/var/run/z-way-server.pid
+ case "$1" in
+ echo -n 'Starting z-way-server: '
Starting z-way-server: + start-stop-daemon --start --pidfile /var/run/z-way-server.pid --make-pidfile --background --no-close --chdir /opt/z-way-server --exec z-way-server
+ echo done.
done.
+ exit 0


-------------------------------------------------------------------------


pi@raspberrypi:~ $ sudo /etc/init.d/z-way-server stop
Stopping z-way-server: start-stop-daemon: warning: failed to kill 31160: No such process
done.
pi@raspberrypi:~ $ sudo start-stop-daemon --start --pidfile /var/run/z-way-server.pid --make-pidfile --background --no-close --chdir /opt/z-way-server --exec z-way-server
pi@raspberrypi:~ $ Z-Way version v3.2.2 from 2021-11-29 15:40:21 +0300 (build 101045968be0f00797fdc4d1a70e2955271fe4e7)
Looking for modules in ./modules
Module modiconinstaller.so loaded
Module modinstaller.so loaded
Failed to load module modmqtt.so: /lib/arm-linux-gnueabihf/libmosquitto.so.1: version `MOSQ_1.6' not found (required by ./modules/modmqtt.so)
Module modskininstaller.so loaded
Module modcrypto.so loaded
Module modzbw.so loaded
Module modzwave.so loaded
Module moddhs.so loaded

-------------------------------------------------------------------------

pi@raspberrypi:~ $ ls -l /etc/init.d/z-way-server
-rwxr-xr-x 1 root root 1133 Nov 30 00:31 /etc/init.d/z-way-server
pi@raspberrypi:~ $


-------------------------------------------------------------------------

pi@raspberrypi:~ $ cd /etc; ls -l */*z-way-server
-rwxr-xr-x 1 root root 1133 Nov 30 00:31 init.d/z-way-server
-rw-r--r-- 1 root root 231 Nov 30 00:31 logrotate.d/z-way-server
lrwxrwxrwx 1 root root 22 Dec 8 16:43 rc0.d/K01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Dec 8 16:43 rc1.d/K01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Dec 8 16:43 rc2.d/S01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Dec 8 16:43 rc3.d/S01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Dec 8 16:43 rc4.d/S01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Dec 8 16:43 rc5.d/S01z-way-server -> ../init.d/z-way-server
lrwxrwxrwx 1 root root 22 Dec 8 16:43 rc6.d/K01z-way-server -> ../init.d/z-way-server
pi@raspberrypi:/etc $
Post Reply