Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery Topic is solved

For Z-Wave related questions in Domoticz

Moderator: leecollings

Tuinfluiter
Posts: 28
Joined: Thursday 18 January 2024 21:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Netherlands
Contact:

Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by Tuinfluiter »

I'm running Domoticz 2023-1 on Raspberry Pi3B on Buster.
In the last days I performed the OZW to Zwavejs-ui migration, but now I really got stuck.
I have a ZW090 Z-Stick Gen5 EU stick with 3 zwave on/off switches.
In the rules file I have /dev/ttyUSB-ZStick-5G defined for the stick in OZW
I performed the procedures from the wiki: MQTT and Zwavejs-ui, both in docker containers.
The docker-compose yml (of zwavejs-ui) has the mapping:
'/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave'
I have the Zwavejs-ui Control panel working:
- I can see the stick and the three switches
- The logging in the log file looks OK (devices discovered; properties found; on/off)
- I entered the S0 key from OZW, and added 3 new S2 keys
- In the devices list I see 'no entry signs' (NL: verboden in te rijden borden) in the security column
- Nevertheless I can switch the switches on and off in the control panel.

So far so good.
Now in Domoticz:
Disable OZW
Enable the autodiscovery.
Nothing happens! The setup button like there is in OZW does not come up.

With full debug logging to file of domoticz I see only four lines:
Debug: : MQTT PublishSchema 0 (0), Retain 0
Status: MQTT: Connecting to localhost:1883
Status: MQTT: connected to: localhost:1883
Debug: MQTT: Topic: homeassistant/status, Message: online
In MQTT Explorer the topic homeassistant/status = online appear.

For the rest: nothing at all.
Any suggestions?
Leonardo
Attachments
Schermafdruk MQTT Explorer van 2024-01-18 20-41-47.png
Schermafdruk MQTT Explorer van 2024-01-18 20-41-47.png (44.48 KiB) Viewed 10891 times
Schermafdruk domoticz van 2024-01-18 20-40-13.png
Schermafdruk domoticz van 2024-01-18 20-40-13.png (162.98 KiB) Viewed 10891 times
Schermafdruk van Control panel van 2024-01-18 20-44-46.png
Schermafdruk van Control panel van 2024-01-18 20-44-46.png (65.61 KiB) Viewed 10891 times
Domoticz running on Pi4
RFXcom, Zwave2MQTT, Zigbee (Z4D), P1, OpenTherm Gateway
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by waltervl »

Zwave-JS-UI is not sending the config to MQTT (homeassistant folder in mqtt has no devices/sensors).
Check your Zwave-JS-UI configuration see wiki page https://www.domoticz.com/wiki/Zwave-JS- ... r_Domoticz

New devices will NOT show in the setup button but in the normal device list, menu Setup - Devices.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
bvdf0251
Posts: 24
Joined: Saturday 09 July 2022 14:38
Target OS: -
Domoticz version:
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by bvdf0251 »

In remote address on the hardware tab use the actual IP instead of localhost.

Also make sure to copy security key from ozw to S0 legacy in Zwave js ui, settings, Zwave.
Tuinfluiter
Posts: 28
Joined: Thursday 18 January 2024 21:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by Tuinfluiter »

waltervl wrote: Thursday 18 January 2024 23:00 Zwave-JS-UI is not sending the config to MQTT (homeassistant folder in mqtt has no devices/sensors).
Check your Zwave-JS-UI configuration see wiki page https://www.domoticz.com/wiki/Zwave-JS- ... r_Domoticz

New devices will NOT show in the setup button but in the normal device list, menu Setup - Devices.
I checked again, but I have the Zwave-JS-UI configuration exactly like in the wiki.
About a setup button: I think I saw a screenshot with such a button. But nevertheless, I checked the devices list; nothing new occurs there.
About: "homeassistant folder in mqtt has no devices/sensors": there is no such folder.
In ~/mqtt5, there are only config,data and log folders, plus the docker-compose file. In the config folder there is only mosquitto-conf and pwfile
Domoticz running on Pi4
RFXcom, Zwave2MQTT, Zigbee (Z4D), P1, OpenTherm Gateway
Tuinfluiter
Posts: 28
Joined: Thursday 18 January 2024 21:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by Tuinfluiter »

bvdf0251 wrote: Thursday 18 January 2024 23:29 In remote address on the hardware tab use the actual IP instead of localhost.

Also make sure to copy security key from ozw to S0 legacy in Zwave js ui, settings, Zwave.
Actual IP adress is one of the many things I tried; no success. But I will try again.
The S0 legacy key is filled in. At first I tried with only this S0 key; no success
Then I also created 3 new S2 keys; again no success.

What I don't understand is: are the 'no entry signs' supposed to be gone in the control panel when the key is correct?
Domoticz running on Pi4
RFXcom, Zwave2MQTT, Zigbee (Z4D), P1, OpenTherm Gateway
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by waltervl »

I mean in mqtt explorer screenshot there is a homeassistant folder.
In your case it shows only status but it should show much more when devices are being published by Zwave-JS-UI
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Tuinfluiter
Posts: 28
Joined: Thursday 18 January 2024 21:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by Tuinfluiter »

waltervl wrote: Friday 19 January 2024 16:09 I mean in mqtt explorer screenshot there is a homeassistant folder.
In your case it shows only status but it should show much more when devices are being published by Zwave-JS-UI
Oh yes, I understand that.
I saw screenshots of the type of info that needs be in there. But actually nothing more than this occurs.
In the mean time I found some more interesting logging; I'll post below.
Domoticz running on Pi4
RFXcom, Zwave2MQTT, Zigbee (Z4D), P1, OpenTherm Gateway
Tuinfluiter
Posts: 28
Joined: Thursday 18 January 2024 21:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by Tuinfluiter »

I looked back the logging I have.
Yesterday I looked in the logging of zwavejs-ui after using the control panel. Then after the autodiscovery in domoticz I looked in the domoticz log file, but I didn't look in the Zwavejs-ui logs anymore.
So I just did this and found some interesting info:
1. the z-ui_2024-01-18 log:
Over the whole day (24 hours), it contains these lines:
2024-01-18 20:14:36.402 INFO MQTT: MQTT client closed
2024-01-18 20:14:39.401 INFO MQTT: MQTT client reconnecting
2024-01-18 20:14:39.406 ERROR MQTT: Mqtt client error connect ECONNREFUSED 127.0.0.1:1883
Error: connect ECONNREFUSED 127.0.0.1:1883
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
28000 times! Ending up in a logfile of 9 MB! Fortunately it compresses very well :)
This doesn't sound OK.

2. the zwavejs_2024-01-18 log file:
As said, when running the control panel, I see extensive logging that discovers all elements. No problems.
But when I did the domoticz auto discovery, I see this:
2024-01-18T20:04:05.728Z DRIVER version 12.4.1
2024-01-18T20:04:05.729Z DRIVER
2024-01-18T20:04:05.730Z DRIVER starting driver...
2024-01-18T20:04:05.730Z DRIVER opening serial port /dev/zwave
2024-01-18T20:04:05.754Z DRIVER serial port opened
2024-01-18T20:04:05.756Z SERIAL » 0x15 (1 bytes)
2024-01-18T20:04:06.767Z DRIVER loading configuration...
2024-01-18T20:04:06.770Z CONFIG Using external configuration dir /usr/src/app/store/.config-db
2024-01-18T20:04:06.771Z CONFIG version 12.4.1
2024-01-18T20:04:09.270Z DRIVER beginning interview...
2024-01-18T20:04:09.271Z DRIVER added request handler for AddNodeToNetwork (0x4a)...
1 registered
2024-01-18T20:04:09.271Z DRIVER added request handler for RemoveNodeFromNetwork (0x4b)...
1 registered
2024-01-18T20:04:09.272Z DRIVER added request handler for ReplaceFailedNode (0x63)...
1 registered
2024-01-18T20:04:09.272Z DRIVER added request handler for SerialAPIStarted (0x0a)...
1 registered
2024-01-18T20:04:09.272Z CNTRLR querying Serial API capabilities...
2024-01-18T20:04:09.279Z SERIAL » 0x01030007fb (5 bytes)
2024-01-18T20:04:09.279Z DRIVER » [REQ] [GetSerialApiCapabilities]
2024-01-18T20:04:10.286Z CNTRLR Failed to execute controller command after 1/3 attempts. Scheduling next try i
n 100 ms.
2024-01-18T20:04:10.389Z DRIVER » [REQ] [GetSerialApiCapabilities]
2024-01-18T20:04:10.390Z SERIAL » 0x01030007fb (5 bytes)
2024-01-18T20:04:11.399Z CNTRLR Failed to execute controller command after 2/3 attempts. Scheduling next try i
n 1100 ms.
2024-01-18T20:04:12.503Z DRIVER » [REQ] [GetSerialApiCapabilities]
2024-01-18T20:04:12.504Z SERIAL » 0x01030007fb (5 bytes)
2024-01-18T20:04:13.516Z DRIVER Failed to initialize the driver: ZWaveError: Timeout while waiting for an ACK
from the controller (ZW0200)
at Driver.sendMessage (/usr/src/app/node_modules/zwave-js/src/lib/driver/D
river.ts:5256:23)
at ZWaveController.identify (/usr/src/app/node_modules/zwave-js/src/lib/co
ntroller/Controller.ts:897:37)
at Driver.initializeControllerAndNodes (/usr/src/app/node_modules/zwave-js
/src/lib/driver/Driver.ts:1432:26)
at Immediate.<anonymous> (/usr/src/app/node_modules/zwave-js/src/lib/drive
r/Driver.ts:1226:16)
2024-01-18T20:04:13.522Z DRIVER destroying driver instance...
2024-01-18T20:04:13.526Z DRIVER driver instance destroyed
Comparing this with the logging when the control panel is executed, picking up the logging at "beginning interview":
2024-01-18T18:49:51.230Z DRIVER beginning interview...
2024-01-18T18:49:51.240Z DRIVER added request handler for AddNodeToNetwork (0x4a)...
1 registered
2024-01-18T18:49:51.243Z DRIVER added request handler for RemoveNodeFromNetwork (0x4b)...
1 registered
2024-01-18T18:49:51.244Z DRIVER added request handler for ReplaceFailedNode (0x63)...
1 registered
2024-01-18T18:49:51.245Z DRIVER added request handler for SerialAPIStarted (0x0a)...
1 registered
2024-01-18T18:49:51.255Z CNTRLR querying Serial API capabilities...
2024-01-18T18:49:53.189Z SERIAL » 0x01030007fb (5 bytes)
2024-01-18T18:49:53.195Z DRIVER » [REQ] [GetSerialApiCapabilities]
2024-01-18T18:49:53.233Z SERIAL « [ACK] (0x06)
2024-01-18T18:49:53.243Z SERIAL « 0x012b0107010100860001005afe81ff884f1f0000fb9f7da067000080008086000 (45 bytes)
000e87300000e0000600000fa
2024-01-18T18:49:53.250Z SERIAL » [ACK] (0x06)
2024-01-18T18:49:53.260Z DRIVER « [RES] [GetSerialApiCapabilities]
payload: 0x010100860001005afe81ff884f1f0000fb9f7da067000080008086000000e8730
0000e0000600000
2024-01-18T18:49:53.283Z CNTRLR received API capabilities:
firmware version: 1.1
manufacturer ID: 0x86
product type: 0x01
product ID: 0x5a
supported functions:
· GetSerialApiInitData (0x02)
· SetApplicationNodeInformation (0x03)
· ApplicationCommand (0x04)
.....
and so on....

So in the Domoticz auto discovery, things run out of hand at: [GetSerialApiCapabilities]
Domoticz running on Pi4
RFXcom, Zwave2MQTT, Zigbee (Z4D), P1, OpenTherm Gateway
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by FireWizard »

Hi @Tuinfluiter,

Is your setting in ZWaveJS-UI correct?
See: Settings --> MQTT --> Home Assistant.

Screenshot_ZwaveJS_Homeassistant_Discovery.png
Screenshot_ZwaveJS_Homeassistant_Discovery.png (18.47 KiB) Viewed 10825 times

Regards
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by waltervl »

@Firewizard, the switch "MQTT Discovery" should be switched on isn't it?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by waltervl »

@Tuinfluiter in . the z-ui_2024-01-18 log there is reference of IP 127.0.0.1 (aka localhost)

This should be a real IP address as indicated on the wiki page.eg 192.168.1.25
So somewhere in your Zwave-JS-UI you have to change the IP address of MQTT server.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
FireWizard
Posts: 1887
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by FireWizard »

Hello @waltervl,

You asked:
the switch "MQTT Discovery" should be switched on isn't it?
Yes, I think so.

As I own only 2 Zwave devices (and a Aeotec Gen 5+ controller), I did not use "Autodiscovery.
So in my case, that setting is disabled.

But in this case, I would enable it and check in MQTT Explorer, if the config topics are present.

Regards
Tuinfluiter
Posts: 28
Joined: Thursday 18 January 2024 21:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by Tuinfluiter »

waltervl wrote: Friday 19 January 2024 18:53 @Tuinfluiter in . the z-ui_2024-01-18 log there is reference of IP 127.0.0.1 (aka localhost)

This should be a real IP address as indicated on the wiki page.eg 192.168.1.25
So somewhere in your Zwave-JS-UI you have to change the IP address of MQTT server.
That's it!
In the MQTT tab of Zwave-JS-UI is an input field: host url. There I had the value localhost (so not 127.0.0.1). I think that was the default value.
I went over the github page of Zwave-JS-UI and there it says in fact:
Host url: The url of the broker. Insert the protocol if present, example: tls://localhost.
So figured this should be correct. But apparently it isn't.
I can see in real time in the log output of z-ui_current.log that the error messages stop and discovery starts.
MQTT Explorer al of sudden shows homeassistant and zwave with all the topic, and, last but not least,
now I see the switches in Domoticz
Thanks for all the help!
Domoticz running on Pi4
RFXcom, Zwave2MQTT, Zigbee (Z4D), P1, OpenTherm Gateway
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by waltervl »

For a normal install of Zwave-JS-UI localhost would be fine but when Zwave-JS-UI is in a docker container localhost would mean that the mqtt broker should be in the same docker container. And that is not the case.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by waltervl »

I made a change request to Zwave-JS-UI documentation to use the real MQTT server IP when Zwave-JS-UI is running in a Docker.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Tuinfluiter
Posts: 28
Joined: Thursday 18 January 2024 21:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by Tuinfluiter »

waltervl wrote: Saturday 20 January 2024 18:15 For a normal install of Zwave-JS-UI localhost would be fine but when Zwave-JS-UI is in a docker container localhost would mean that the mqtt broker should be in the same docker container. And that is not the case.
OK, now I understand.
In fact this is the type of problems that I expected could occur, when I read over the instructions for the Zwave migration for the first time. If, as in my case, you don't have experience with either docker nor MQTT then you can easily step in a trap that may be obvious for experienced users.
Anyway, that good thing is: my experience has been impoved now. :)
I made a change request to Zwave-JS-UI documentation to use the real MQTT server IP when Zwave-JS-UI is running in a Docker.
Nice, that can prevent others from making the same mistake as I made.
Thanks a lot!
Domoticz running on Pi4
RFXcom, Zwave2MQTT, Zigbee (Z4D), P1, OpenTherm Gateway
pgas37
Posts: 99
Joined: Wednesday 06 December 2017 19:44
Target OS: -
Domoticz version:
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by pgas37 »

Hi,

Same problem for me, but not solved yet. I join this post because Gizmocuz did not let me open a new post with the subject.

situation:

Rapsberrypi version 4, on Bullseye, updated and upgraded.
domoticz version 2024.3(build 15878),
docker installed
mosquitto installed and running
zwavejs installed and running. (Visible in MQTT-explorer.)
Acceptance of new hardware is on
MQTT autodiscovery is set on internal ip xxx.143, poort 1883, prefix homeassistant.
Domoticz log reports that MQTT AD is listening on ip xxx.143, port 1883

Zwavejs is configured as described in the migration-manual, authorization key implemented, host-url (xxx.143), is the same as in MQTT autodiscover, prefix= zwave
All old devices are visible in zwavejs.

MQTT-explorer shows topic "zwave" with all nodes

Despite all this the devices does not show in domoticz. I'm probably overlooking something.


thanks for your help
Paul
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by waltervl »

Do you see a homeassistant folder in MQTT explorer with entries like switch, sensors, binary_sensors etc?
If not, you have not enabled MQTT Autodiscover in Zwave-JS-UI.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pgas37
Posts: 99
Joined: Wednesday 06 December 2017 19:44
Target OS: -
Domoticz version:
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by pgas37 »

The pi is on an other location so i can not use the mqtt-explorer at the moment, but i made a screenprint from the hardware setting.
MQTT AD is active. Yesterday i was on location and i remembered seeing that output.

Image

By the way: Do you know if there is a possibility to see mqtt output like in explorer via the console in putty. (My VNC-viewer gets a timeout from the server, although I restarted it via putty)

thanks
Attachments
MQTT AD ON (Klein).png
MQTT AD ON (Klein).png (28.68 KiB) Viewed 7195 times
User avatar
waltervl
Posts: 5846
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Zwavejs-UI working in Control panel, but NOT in Domoticz with auto discovery

Post by waltervl »

You can install MQTT Explorer on any system in your network. No need to install it on your Domoticz server.
Also check your logs for errors. To be sure: It is completely normal that the Settings button shows no devices as that has a different meaning with MQTT AD in contrary to OpenZwave (OZW)
So check your default device list (menu Setup - Devices ) for new discovered devices.,
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest