Page 2 of 2

Re: Z-wave JS UI failed to open serial port

Posted: Saturday 06 January 2024 10:33
by Xrim
Before I continue I must present my alibi,I was happy on Synology for years and havent touched any updates since there where none to the Synology platform. However, I updated my NAS a few weeks ago and discovered that it no longer supported Domoticz. So I bought a raspberry pi and discovered that it would not accept the old Aeon stick. So I bought the new gen 7 stick who I discovered are not supported in OZW, I could not return the stick because I had damaged the package when i opened it. So I ordered the gen 5+ stick and got it yesterday. plugged it in and saw that we had and update and thougt why not start with the latest! So to my defence of why i'm a complete idiot. I'm new to this and trying very hard to learn so my wife dosen't have to turn on the light physically like a cavewoman.

So back to my issues, I ran the MTTQ instalation as you instructed and everything worked, until i reboot. Then I have the same problem.
And for some reason I can not get the right serial port address in the config file, I have tried EVERYTHING and like the proverbial monkey with a typewriter. I am very close to have written Shakespeare's collected works in that .yml file.


Help

Re: Z-wave JS UI failed to open serial port

Posted: Saturday 06 January 2024 12:16
by gizmocuz
I updated the wiki. It seems the option to restart the docker was not in the mosquitto configuration file.

Re: Z-wave JS UI failed to open serial port

Posted: Saturday 06 January 2024 15:06
by Xrim
I can vouch that the addition to make mosquitto run after a reboot is idiot proof, I have tested it. It works flawless now.
I'm still struggling with the serial port, I will get back as soon as I solve it since I suspect there are more idiot out here...

Re: Z-wave JS UI failed to open serial port

Posted: Saturday 06 January 2024 15:13
by remko2000
In accordance with advice from gizmocuz; I reinstalled Mosquitto but unfortunately the problem remains. After installation, Mosquitto works, the error disappears in Domoticz and receive devices in Zwave. But after a restart the problem is back. Very frustrating. It seems to be a problem where the settings are not properly saved after a reboot.

Re: Z-wave JS UI failed to open serial port

Posted: Saturday 06 January 2024 15:28
by remko2000
after making the adjustment in the wiki it works! Thanks! Very happy with it.

Re: Z-wave JS UI failed to open serial port

Posted: Saturday 06 January 2024 16:45
by remko2000
my zwave devices are automatically added to my switch page in domoticz. I do not want that. I would like to manually add devices to my account. Where do I set this up? Should I disable 'accept new devices'?

Re: Z-wave JS UI failed to open serial port

Posted: Saturday 06 January 2024 22:22
by Xrim
I solved it, in the UI under settings, Zwave ports i have tried to write /dev/serial/by-id/usb-0658_0200-if00 or any variants of it or anything else I thought would solve it. instead of just /dev/zwave since that is the name you give it in the line /dev/serial/by-id/usb-0658_0200-if00:/dev/zwave if you follow the tutorial.

Re: Z-wave JS UI failed to open serial port

Posted: Saturday 06 January 2024 23:44
by tjabas
Xrim wrote: Saturday 06 January 2024 22:22 I solved it, in the UI under settings, Zwave ports i have tried to write /dev/serial/by-id/usb-0658_0200-if00 or any variants of it or anything else I thought would solve it. instead of just /dev/zwave since that is the name you give it in the line /dev/serial/by-id/usb-0658_0200-if00:/dev/zwave if you follow the tutorial.

thanks for that , have been trying all possible combinations of the usb variants, another question i have is , where do i put the security key from the open z-wave config? i mean where in the JS UI configuration do i put it?

Re: Z-wave JS UI failed to open serial port

Posted: Sunday 07 January 2024 0:02
by bvdf0251
tjabas wrote: Saturday 06 January 2024 23:44
Xrim wrote: Saturday 06 January 2024 22:22 I solved it, in the UI under settings, Zwave ports i have tried to write /dev/serial/by-id/usb-0658_0200-if00 or any variants of it or anything else I thought would solve it. instead of just /dev/zwave since that is the name you give it in the line /dev/serial/by-id/usb-0658_0200-if00:/dev/zwave if you follow the tutorial.

thanks for that , have been trying all possible combinations of the usb variants, another question i have is , where do i put the security key from the open z-wave config? i mean where in the JS UI configuration do i put it?

On Zwave-JS-ui>settings>Zwave>S0 legacy key

Re: Z-wave JS UI failed to open serial port

Posted: Sunday 07 January 2024 0:43
by tjabas
Ok, thanks alot.

Re: Z-wave JS UI failed to open serial port

Posted: Thursday 11 January 2024 16:18
by benp
Hello,
Same problem for me:
Failed to open serial port
cannot open *dev/zwave(ZW0100)
Here is the zwave-js-ui screenshot:
Zwave-JS-UI.png
Zwave-JS-UI.png (9.46 KiB) Viewed 7744 times
I followed: https://www.domoticz.com/wiki/Zwave-JS-UI
I am on Synology DS420+ DSM 7.2
Debian Bullseye on virtual machine manager
zstick gen5 updated to EUV1.02

Here is my docker-compose.yaml:

Code: Select all

version: "3.7"
services:
  zwave-js-ui:
    container_name: zwave-js-ui
    image: zwavejs/zwave-js-ui:latest
    restart: unless-stopped
    tty: true
    stop_signal: SIGINT
    environment:
      - SESSION_SECRET=mySecretSession
      - TZ=Europe/Paris
    devices:
      - '/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave'
    volumes:
      - /volume1/docker/zwave-js-ui/store:/usr/src/app/store
    ports:
      - "8091:8091" # port for web interface
      - "3000:3000" # port for Z-Wave JS websocket server
I don't understand what solve remko2000's problem:
remko2000 wrote: Friday 05 January 2024 15:47 after many trial and error I tried again:
' docker compose up -d'
after recomposing zwave js ui, I see zwave devices in my control panel

Re: Z-wave JS UI failed to open serial port

Posted: Thursday 11 January 2024 18:02
by benp
I found a problem on my config:

Code: Select all

ben@domoticz-nas:/opt/zwavejs-ui$ ls /dev/serial/by-id/
ls: impossible d'accéder à '/dev/serial/by-id/': Aucun fichier ou dossier de ce type
This can be a bug on Debian 11 Bullseye:
https://klipper.discourse.group/t/debia ... ound/10711
So I upgraded to Debian 12 Bookworm:
https://www.malekal.com/mettre-a-jour-d ... debian-12/
After upgrade and reboot, I have /dev/serial/by-id/ but after zwave-js-ui restart, it is lost again.
Here is the trace:

Code: Select all

ben@domoticz-nas:~$ ls /dev/serial/by-id/
usb-0658_0200-if00
ben@domoticz-nas:~$ cd /opt/zwavejs-ui
ben@domoticz-nas:/opt/zwavejs-ui$ docker compose up -d
[+] Running 2/2
 ✔ Network zwavejs-ui_default  Created                                                                             0.3s
 ✔ Container zwave-js-ui       Started                                                                             0.3s
ben@domoticz-nas:/opt/zwavejs-ui$ ls /dev/serial/by-id/
ls: impossible d'accéder à '/dev/serial/by-id/': Aucun fichier ou dossier de ce type
The synology virtual machine reboot does not solve the problem but with synology DSM reboot ls /dev/serial/by-id/ exist again!

Re: Z-wave JS UI failed to open serial port

Posted: Thursday 11 January 2024 21:40
by skippy711
I migrated somewhere spring last year from a Pine64 to my QNAP NAS. Took me a lot of searching because the Z wave stick was not recognized at first and had to install an additional driver. After that a similar problem as you mentioned and I solved it (again: for a QNAP) by using "devices: /dev/TTYACM0:dev/zwave" in the .yml. I know it is not recommended because of the 'non-persistence' against restarts, but never experienced a single problem in all these months.
Maybe it is worth a try.

Re: Z-wave JS UI failed to open serial port

Posted: Saturday 13 January 2024 14:16
by benp
skippy711 wrote: Thursday 11 January 2024 21:40 I migrated somewhere spring last year from a Pine64 to my QNAP NAS. Took me a lot of searching because the Z wave stick was not recognized at first and had to install an additional driver. After that a similar problem as you mentioned and I solved it (again: for a QNAP) by using "devices: /dev/TTYACM0:dev/zwave" in the .yml. I know it is not recommended because of the 'non-persistence' against restarts, but never experienced a single problem in all these months.
Maybe it is worth a try.
I tried in the yaml:

Code: Select all

devices: /dev/TTYACM0:/dev/zwave" in the .yml
It still failed to open serial port

I tried another option: I installed debian12 from scratch with only qemu (tools for synology) and z-wave-js-ui (and no domoticz)
No luck:
  • z-wave-js-ui still fail to open serial port
  • ls /dev/serial/by-id/ lose serial after zwave-js-ui start and some time
  • I must umount + mount zstick in the synology virtual machine to get again usb-0658_0200-if00 from ls /dev/serial/by-id/
The serial driver should be ok because domoticz2023.2 with OZW (open zwave) is running properly in de virtual machine.
Is there something wrong with synology DSM7.2+Debian11-12+zwave-js-ui or something wrong in my zwave-js-ui install?

Re: Z-wave JS UI failed to open serial port

Posted: Thursday 18 January 2024 2:13
by blueberryPie
I am running a Domoticz system in a Proxmox LXC and was running Z-wave JS UI V8.24.0 with no issues with the Z-Stick Gen5+ however when I tied to upgrade to V9.6.2 it would fail to open the serial port. I finally noticed that it did seem to open the port the first time but began to fail to open the port subsequently. After running V9.6.2 the older version V8.24.0 would also no long run until the CT was restarted. I noticed the /dev/tty device would change from crw-rw---- 1 to c--------- 0 after V9.6.2 would try to start. It appears that the new version must open and close the port or access it in some way that causes the device to not get mounted back into the CT. I would suspect that maybe z-wave-js-ui is doing some kind of reset on the Z-Stick that is causing the Z-Stick to detach and reattach. I found that other people were creating a new node device for the tty device and mapping that to the CT See https://monach.us/automation/connecting ... under-lxc/. The new V9.6.2 is working after doing this. Maybe this will help someone with this same or similar issue.
Update: This might be related to the changes to the Soft Reset function in Z-wave-JS-UI V9.6.2

Re: Z-wave JS UI failed to open serial port

Posted: Wednesday 03 July 2024 1:02
by funmsa
Dear all, I had same problem on my Synology "ZWaveJS-UI" Docker . I could solve it just putting "Execute container using high privilege" on docker option. And after that driver could connect successfully on USB key and upload all zwave device detected.

But after that I have another problem, it's to link and receive device on my Domoticz docker. Cf https://www.domoticz.com/forum/viewtopi ... 66#p318166

If anybody have any idea...

Re: Z-wave JS UI failed to open serial port

Posted: Wednesday 03 July 2024 1:04
by funmsa
Dear all, I had same problem on my Synology "ZWaveJS-UI" Docker . I could solve it just putting "Execute container using high privilege" on docker option. And after that driver could connect successfully on USB key and upload all zwave device detected.

But after that I have another problem, it's to link and receive device on my Domoticz docker.
https://www.domoticz.com/forum/viewtopi ... 34#p318134

If anybody have any idea...

Re: Z-wave JS UI failed to open serial port

Posted: Friday 30 August 2024 13:45
by benp
benp wrote: Thursday 11 January 2024 16:18 Hello,
Same problem for me:
Failed to open serial port
cannot open *dev/zwave(ZW0100)
7 month later: I found the problem for myself.
In zwave-js-ui / settings/ zwave , I disable soft reset and it works.
Capture.PNG
Capture.PNG (8.07 KiB) Viewed 758 times
I used the snap method explained in the french forum:
https://easydomoticz.com/forum/viewtopic.php?t=13522
But both docker and snap produced the "failed to open serial port" so I suppose the disable soft reset solve both method.

I now have another problem:
Zwave devices not updating state after manual press
In domoticz, when I press a ON/OFF zwave switch, I does not update.
In zwave-js-ui, zwave switch update
In domoticz, blinds+stop switches works properly
This sound similar to:
https://community.home-assistant.io/t/z ... ress/84137
But I did understand their solution (maybe not relevant here).

Re: Z-wave JS UI failed to open serial port

Posted: Sunday 01 September 2024 18:26
by benp
benp wrote: Friday 30 August 2024 13:45 Zwave devices not updating state after manual press
Solved: 2 days later, it is possible to change the switches state with a manual press. Why? I don't know because I did nothing special!