Z-Wave - Gladys v4 - Windows WSL

Ahahah, personally, I’m more motivated when I’m confronted with this kind of problem, the reward when the bug is fixed is even greater.

Here’s for the weather:


And here’s for ZWAVE:


And for the DB, here’s what is inserted… I don’t think there’s a problem yet when I delete this line the server can start normally otherwise I always have the error « failed to start process »

PS: I saw somewhere on the web that you need to add this in the package…:
"dev": "nodemon --exec \"ts-node --cache-directory .tscache\" ./src/www.ts" or "dev": "nodemon src/index.ts"
instead of:
"dev": "nodemon --exec 'ts-node --cache-directory .tscache' ./src/www.ts"

Is your user part of the dialout group? It’s necessary to use serial ports with your user account.

I think so… but I didn’t find anything in the documentation that talks about it, but I must have done it by trying things from the internet ^^

crwxrwxrwx 1 root dialout 166, 0 May 8 10:47 /dev/ttyACM0

sudo adduser tagcash dialout

Good try but

The user « tagcash » is already in the group « dialout ».

What model of Z-Wave dongle do you have?

The one recommended in the Doc: Aeotec Z-Stick GEN5

But I didn’t have any issues when I used Gladys on the Raspberry Pi, it’s really just in dev mode and it has worked on Windows, so it’s probably not related to the dongle unless it’s different on Linux…

I have this dongle too, no problem.

In the documentation, nothing is recommended, in the list of compatible hardware, there is everything that has been physically tested by the community.

I lean more towards a USB device lock issue. Access to the dongle must be exclusive, I was bothered because of that.

Connect your Z-Wave USB key to your Raspberry Pi#

Gladys Assistant has been tested with the Aeotec Z-Stick GEN5 key and the Z-Wave.me key.

For me, it’s a recommendation :innocent: even if it’s not said textually, you are recommended to take this dongle.

Ok.. but how to explain that it worked on Windows and seems impossible on Linux..?

Cool, so what is the miracle solution? Or how to make the access to the dongle exclusive, do you have an idea? Because I’m stuck.

Tomorrow or Monday I will try on Mac I have a few Macs at work but I can’t count on them for life :joy:

I noticed you made a change on Git… Maybe that’s where it comes from?

Yes, it seems to be one of my latest fixes that breaks the weather, someone also noticed the issue on the forum (Nouvelle image Docker dev avec fix + nouvelle fonctionnalités - #2 par Jean34), my bad :slight_smile:

It’s not in production after that, our GitHub flow is a « master » which is the branch where all branches are merged, we regularly publish Docker images tagged « dev » that point to the latest commit of master.

And regularly, after testing, we make a Git tag that will trigger a Docker build at a given commit on master.

I confirm the weather feature works on the new version :slight_smile:

Hello, Do you happen to have any idea what might be causing my error? :
POST http://localhost:1443/api/v1/service/zwave/connect{"status":404,"code":"NOT_FOUND","message":"Route /v1/service/zwave/connect not found"}

It looks good to me, but if your Z-Wave service isn’t started, I don’t think it will work

Is everything okay with Z-Wave or was it still broken?

After that, I’m still surprised by your story, on Linux OpenZwave should work normally, even if it’s not always very stable it’s supposed to work.

If you look at Gladys’ Dockerfile:

There aren’t many steps to set up open-zwave either

How did you install Gladys on your Linux?

Installation of node js 14: (v14.16.1)
sudo apt update
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
sudo apt -y install nodejs

Installation of sqllite3:
sudo apt install sqlite3

Installation of openSSL:

sudo apt-get install libssl-dev
sudo apt install build-essential checkinstall zlib1g-dev -y

Installation of openzwave:

sudo apt install openzwave

Then I downloaded libopenzwave1.5-dev from: Ubuntu – Error and I added a line to the /etc/apt/sources.list file:

deb http://*cz.archive.ubuntu.com/ubuntu* focal main multiverse

Then I followed the doc :slightly_smiling_face:

git clone https://github.com/GladysAssistant/Gladys gladys && cd gladys
cd server
npm install
npm run db-migrate:dev
npm start

Opening a new tab in the terminal
cd front
npm install
npm start

Then I encountered the problem when I added the key, the server crashed, and I was able to resolve it by following the procedure found in a README-ubuntu.md

There’s no recent Deb for OpenZWave. We’re on 1.6

I just installed libopenzwave1.6_1.6.1545+ds-2_amd64.deb, it doesn’t work any better :man_shrugging:

git clone https://github.com/OpenZWave/open-zwave.git
cd open-zwave
git checkout 5d18bbfb21d8cdc61ee6baae6f478c963297dfc5
make
sudo make install
sudo sh -c "echo '/usr/local/lib64' > /etc/ld.so.conf.d/openzwave.conf"
sudo ldconfig
cd && rm -rf open-zwave

Next, make sure the npm packages are correctly installed and that Gladys starts without errors.

Then configure the zwave service in Gladys because the error, in my opinion, is not related to your dongle but to Gladys. I don’t see why you would have a 404 on this route.

Which file are you talking about?