Making z-way-server work on Trixie

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
vbertola
Posts: 9
Joined: 15 Sep 2016 18:26

Making z-way-server work on Trixie

Post by vbertola »

Hello,
I have been running my home heating for ~10 years with a Raspi 2, Z-Wave.me and a custom Perl script using API calls. Today I did something stupid - I updated my Raspi's OS to Trixie before discovering that Z-Wave.me is now a dead project and won't ever get a Trixie repo or version (correct?). So now everything is horribly broken.
Do I have alternatives to going back to my pre-update backup and never updating my Raspi again?
Thanks!
vbertola
Posts: 9
Joined: 15 Sep 2016 18:26

Re: Making z-way-server work on Trixie

Post by vbertola »

By the way: I did try installing the nightly build for Trixie that can be found on Github. However, it has a lot of dependencies that my Trixie Raspbian is not able to satisfy in any way.

Estrazione di z-way-server (5.0.2-291-g47ad5098~trixie-1) su (5.0.2-291-g47ad5098~trixie-1)...
dpkg: problemi con le dipendenze impediscono la configurazione di z-way-server:
z-way-server dipende da libarchive13t64; tuttavia:
Il pacchetto libarchive13t64 non è installato.
z-way-server dipende da libssl3t64; tuttavia:
Il pacchetto libssl3t64 non è installato.
z-way-server dipende da libcares2; tuttavia:
Il pacchetto libcares2 non è installato.
z-way-server dipende da libwebsockets19t64; tuttavia:
Il pacchetto libwebsockets19t64 non è installato.
z-way-server dipende da libmosquitto1; tuttavia:
Il pacchetto libmosquitto1 non è installato.
z-way-server dipende da libcurl4t64; tuttavia:
Il pacchetto libcurl4t64 non è installato.
z-way-server dipende da libglib2.0-0t64; tuttavia:
Il pacchetto libglib2.0-0t64 non è installato.
seattleneil
Posts: 245
Joined: 02 Mar 2020 22:41

Re: Making z-way-server work on Trixie

Post by seattleneil »

I can think of 2 approaches:

1. Safely back up /opt/z-way-server and any other files you want to preserve such as your custom perl script to a USB drive. Then do a fresh re-install of bookworm. Trying to roll back to bookworm from trixie is not productive. Once your Pi is running bookworm, you can then do a fresh install of z-way-server and replace the /opt/z-way-server with the USB drive backup copy.

2. Unlike apt, dpkg does not automatically resolve dependencies. As a result, you need to install each dependency manually. Something like: apt install libarchive libssl libcares2 libwebsockets libmosquitto1 libcurl libglib2.0. Then try to install the nightly trixie build of z-way-server with something like this: dpkg -i z-way-debian-trixie-armhf-5.0.2-291-g47ad5098~trixie-1_armhf.deb. If you're lucky, z-way-server will install successfully. If you get errors that are simply related to versions not being satisfied, you can try to install z-way-server by running this command: dpkg --force-depends -i z-way-debian-trixie-armhf-5.0.2-291-g47ad5098~trixie-1_armhf.deb. If you encounter problems, please post the output from the dpkg command so that other people can benefit from this experience.
vbertola
Posts: 9
Joined: 15 Sep 2016 18:26

Re: Making z-way-server work on Trixie

Post by vbertola »

Thanks. Today I had a little time and tried to install the dependencies independently:

apt install libarchive13 libssl3t64 libcares2 libwebsockets19t64 libmosquitto1 libcurl4t64 libglib2.0-0

Three packages fail as they cannot be found anywhere:

libcares2 libwebsockets19t64 libcurl4t64

Now, I just realized that this is an old Pi 2 so it's running a 32-bit Raspbian, and the packages t64 are meant for 64-bit OSes. Possibly the nightly build for Trixie requires 64 bits?
seattleneil
Posts: 245
Joined: 02 Mar 2020 22:41

Re: Making z-way-server work on Trixie

Post by seattleneil »

You are correct. Running trixie on 32-bit hardware such as the Pi 2 has limited support. Trixie is primarily a 64-bit kernel and typically uses 64-bit software with backward compatibility for 32-bit software. I don't know why the Raspberry Pi Foundation decided to support trixie on 32-bit hardware.

The armhf name in the Z-Way trixie package indicates it runs in 32-bit mode, so in theory, you may be able to get the trixie Z-Way package to run on your Pi 2. The backward compatibly mode of arm 64-bit hardware can be confusing. It's pretty common to have a Pi 3 or newer run a 64-bit kernel (i.e., arm64 architecture) with 32-bit software. In your shoes, I would consider getting a 64-bit Pi (Pi 3 or higher), as the Pi 2 has reached end of life.

If you don't want to get a newer Pi, a good option is revert back to running bookworm on your Pi 2.

If you're willing to to invest/waste some time and effort, you can try installing the missing packages needed by the Z-Way package using dpkg instead of apt. Here are links for manually downloading armhf versions of the 3 packages that are missing from the Pi's apt repository: After you download the .deb files, you can then run dpkg on the downloaded files. The challenge is these packages may have their own unmet dependencies which can lead to a torturous path of having to satisfy a cascading layer of dependencies, possibly breaking dependencies for other packages.

If you decide to upgrade to a newer Pi, I'm cautiously optimistic that the Z-Way trixie package would work as these newer Pi's can run trixie in 64-bit mode with support for 32-bit and 64-bit software. Presumably, apt knows about the 64-bit versions of the packages the Z-Way trixie package relies on.

Please keep the forum posted on what you decide and discover.
vbertola
Posts: 9
Joined: 15 Sep 2016 18:26

Re: Making z-way-server work on Trixie

Post by vbertola »

For the moment, I restored the backup that I did just before these updates (which was still Bullseye) and I am going to update to Bookworm and stop there. However, I have no idea of what could happen in a few years - should I be prepared to run an old, unsafe OS forever or else throw my entire heating control system into the junk?
seattleneil
Posts: 245
Joined: 02 Mar 2020 22:41

Re: Making z-way-server work on Trixie

Post by seattleneil »

should I be prepared to run an old, unsafe OS forever or else throw my entire heating control system into the junk?
If your setup is meeting your needs, relying on your existing legacy hardware and software seems like a perfectly reasonable approach. If you feel like spending some money and time to upgrade your setup, I would start by replacing your Pi 2 with 64-bit hardware. From my experience, the lightest weight Z-Way replacement involves running Z-Wave JS UI (see: https://zwave-js.github.io/zwave-js-ui). With this approach, you probably would want to update your perl script to use MQTT (via Net::MQTT::Simple) instead of Z-Way's HTTP interface. If you wanted to be a bit more modern, you may want to re-write your perl code in python or go with something like Node-RED. If you wanted a powerful home automation system, I suggest going with Home Assistant along with the Z-Wave JS UI add-on. I don't think there's a right or wrong answer - the decision is yours to make.
Post Reply