Page 20 of 23

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 12:49
by ksacca
You should be able to fix it by installing libseccomp2 as explained on https://zwave-js.github.io/zwave-js-ui/ ... h-with-820

Code: Select all

sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
echo "deb http://httpredir.debian.org/debian buster-backports main contrib non-free" | sudo tee -a "/etc/apt/sources.list.d/debian-backports.list"
sudo apt update
sudo apt install libseccomp2 -t buster-backports
but I would honestly upgrade to bullseye as you are doing a new install anyway (unless you have a good reason to stay on buster)


Edit: I see you upgraded and it works. Glad to hear it. You're pretty fast to have upgraded and configured everything in 10 minutes (faster than I could post a reply) :lol:

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 12:57
by mgugu
ksacca wrote: Saturday 15 October 2022 12:37 I see you did a new install, but did you use buster or bullseye. There's currently an issue when running buster apparently.
Yep, update of libseccomp2 is needed for several new docker images in buster

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 13:53
by JuanUil

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 14:18
by JuanUil
But guys... bad news
In the setupgui I have changed the serialport to /dev/serial/by-id/usb-0658_0200-if00 but now the gui is giving the error:
Driver: Failed to open the serial port: Error: No such file or directory, cannot open /dev/serial/by-id/usb-0658_0200-if00 (ZW0100)
Next to it the gui says it is connected.

Any ideas?
Jan

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 14:37
by ksacca
You should not change this in the gui. A container is actually a sort of virtual device with its own OS.
In your docker compose you tell that /dev/serial/by-id/usb-0658_0200-if00 (the device on your host, which is your raspberry pi) should be used by your container at location /dev/zwave. So the container machine does not know about /dev/serial/by-id/usb-0658_0200-if00, so you should not set this in the gui. You should leave it to /dev/zwave.

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 14:38
by JuanUil
Oké thnx!

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 15:15
by JuanUil
Now the controller is exposed in the gui.
But there are no nodes appearing else.
I have set mqttdiscovery on in Home Assistant
and use the action re-intervieuw nodes.

edit:
In the debug file:

Code: Select all

2022-10-15 13:20:49.065 INFO MQTT: MQTT client reconnecting

Error: connect ECONNREFUSED 127.0.0.1:1883
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)
2022-10-15 13:20:49.075 INFO MQTT: MQTT client closed
2022-10-15 13:20:52.075 INFO MQTT: MQTT client reconnecting
2022-10-15 13:20:52.084 ERROR MQTT: Mqtt client error connect ECONNREFUSED 127.0.0.1:1883
Error: connect ECONNREFUSED 127.0.0.1:1883
my mosquitto is running so....?????

edit
this is gone now after a reboot but still no nodes.

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 15:32
by ksacca
You cannot use 127.0.0.1 as IP for your mqtt broker as this is the local host inside your container (it’s a virtual machine with it’s own network, remember). If the mqtt broker is on your Pi too, the IP should be 192.168.2.21. But anyway, even without mqtt configured you should see all your nodes in the zwavejs ui.

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 15:37
by JuanUil
changed that indeed to 192.168.2.21 but still no nodes

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 15:44
by ksacca
Were your devices included with security? Did you add your existing S0 security key to the zwave settings. Maybe you can enable zwave logging, so you can see errors in the debug window.

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 15:56
by JuanUil
No, devices were include normal. OZW is switched off, Stick is empty , S0 key from the stickinfo other S from random generator in gui.
log says:

Code: Select all

2022-10-15 13:55:39.444 DEBUG SOCKET: New connection dzvawzpbaVQyuZ9jAAAZ
2022-10-15 13:55:39.460 INFO APP: GET /static/favicons/favicon-32x32.png 304 3.018 ms - -
2022-10-15 13:55:39.465 DEBUG SOCKET: Event INITED emitted to dzvawzpbaVQyuZ9jAAAZ
2022-10-15 13:55:39.518 INFO APP: GET /api/settings 304 116.415 ms - -
2022-10-15 13:55:39.535 INFO APP: GET /api/auth-enabled 304 2.515 ms - -

Code: Select all

2022-10-15 13:59:38.567 DEBUG SOCKET: Event ZWAVE_API emitted to 3gL5kzjL_rRUjYtOAAAb
2022-10-15 13:59:38.570 INFO Z-WAVE: Calling api refreshInfo with args: [ 1, [length]: 1 ]
2022-10-15 13:59:38.572 INFO Z-WAVE: Success zwave api call refreshInfo undefined

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 16:01
by ksacca
If the stick is empty, did you try to include a new device?

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 16:08
by JuanUil
Just tried, no succes.

Code: Select all

14:06:29.670 CNTRLR The controller is now ready to add nodes
2022-10-15 14:06:29.671 INFO Z-WAVE: Controller status: Secure inclusion started
2022-10-15 14:06:29.672 INFO Z-WAVE: Success zwave api call startInclusion true
14:06:59.607 CNTRLR stopping inclusion process...
14:06:59.625 SERIAL » 0x0105004ac50673 (7 bytes)
14:06:59.628 DRIVER » [REQ] [AddNodeToNetwork]
action: Stop
high power: true
network wide: true
callback id: 6
14:06:59.633 SERIAL « [ACK] (0x06)
14:06:59.718 SERIAL « 0x0107004a06060000b2 (9 bytes)
14:06:59.720 SERIAL » [ACK] (0x06)
14:06:59.723 DRIVER « [REQ] [AddNodeToNetwork]
status: Done
callback id: 6
14:06:59.733 CNTRLR The inclusion process was stopped
2022-10-15 14:06:59.733 INFO Z-WAVE: Controller status: Inclusion stopped

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 16:36
by JuanUil
I have put in another stick with still nodes on it.
Those nodes appear but are constantly interviewd and get no info.
I then gave a factory reset to the stick in the actions menu with no result. The stick is not resetted.

edit:
Now he is resetted.
tried to include a new device, no succes
autodicover also no succes

Re: zwavejs2mqtt

Posted: Saturday 15 October 2022 17:49
by JuanUil
I give up now...
Been strugling for 3 days now with a lot of help from you but it is still not working properly.
Maybe somebody could mail me a working image and tell me what to change to get it working on my system.
For the weekend I am going to enjoy my grandchildren and start all over with a fresh new start (I have made good notes) monday.

greetings
Jan

Re: zwavejs2mqtt

Posted: Tuesday 18 October 2022 13:23
by JuanUil
Hi again,

So installed a new bullseye OS, installed mosquitto, docker and docker-compose.
Installed zwjs2mqtt and all is running.
in the gui the zwave stick is found and displayed.
No other devices appear.
Trying to add a node by hand also doesn't work.

This is what I have in docker-compose.yml

Code: Select all

pi@PI4Nieuw:~ $ sudo nano docker-compose.yml
  GNU nano 5.4                                                                     docker-compose.yml
      # Uncomment if you want logs time and dates to match your timezone instead of UTC
      # Available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      #- TZ=America/New_York
    networks:
      - zwave
    devices:
      # Do not use /dev/ttyUSBX serial devices, as those mappings can change over time.
      # Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick.
      - '/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave'
    volumes:
      - zwave-config:/usr/src/app/store
    ports:
      - '8091:8091' # port for web interface
      - '3000:3000' # port for Z-Wave JS websocket server
networks:
  zwave:
volumes:
  zwave-config:
    name: zwave-config

In domoticz I have set zwave to inactive
In setup general I have auth, Https and plugins disabled, log is enabled as debug and log to file is enabled
In setup zwave I have sserial port /dev/zwave priority dir as /usr/src/app/store/config
S0 legacy 0102030405060708090A0B0C0D0E0F10 as taken from my stick. the other keys are made with the refresh keys
all other options are left as original.
In setup mqtt I have set the host url to 192.168.2.21 port 1883 rest is original
In setup gateway I have changed nothing
In setup home assistant I only set mqtt discovery on.

Anybody any idea what is going wrong here?


edit. Manual inclusion works now. I took a complete new PIR

Jan

Re: zwavejs2mqtt

Posted: Tuesday 18 October 2022 15:24
by ksacca
If you have already paired some devices to your zwave stick, they should immediately appear in Zwavejs UI and the interview of your nodes should start. They should even have the same ID as in openzwave. Only battery devices should be woken up by pressing a button on the device itself. Did you use the existing stick or your new one (without any devices on it)?

Re: zwavejs2mqtt

Posted: Tuesday 18 October 2022 15:36
by JuanUil
I used the new stick with no devices on it

Re: zwavejs2mqtt

Posted: Tuesday 18 October 2022 16:09
by ksacca
OK, that might explain it. If your devices are already paired with the other stick, you will have to completely reset them before you can pair them again with your new stick (or you can exclude them with openzwave/domoticz with your old stick plugged in, which might be easier). Once they are excluded or reset, you should be able to include them in zwavejs UI.

Re: zwavejs2mqtt

Posted: Tuesday 18 October 2022 16:16
by JuanUil
Oké I thought that with autodiscovery the devices were put in the new stick

disappointing because now I have to manually include them again.