Page 1 of 1

Zwave-JS-UI disconnects with ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)

Posted: Friday 27 October 2023 12:22
by Ctenberge
The previous post does not show my problem in the topic field and will be overlooked easyely. Hence this new post.
I have Zwave JS UI in a Docker comtainer and it was fully satisfactory for more then a year. Then I did a upgrade to “Z-wave JS 11.9.2”. in the summer this year. That version also did a great job, until a few days ago, then I got a message in the log stating
Error: ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)
Then it started again, but no messages and aftera bout 4 and a half minutes again that message Error: ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)
When I take a look with mqtt explorer, all the nodes are present.
Settings in ZwaveJS
Controller: Aeotec Z-Stick Gen5+
MQTT: name = Zwave_JS, host url= 192.168.1.217 (another RPI), port 1883, prefix= 1Zwave and only retain set to true
Gateway settings: topic type=named topic, payload type=JSON Time-value and only publish node details set to true.
Home assistant settings: only MQTT discovery set to true
Settings Domoticz MQTT Auto discovery Client Gateway with LAN: remote address=192.168.1.217, port 1883, Auto discovery prefix=Zwave, TLS-version=Tlsv1.2
Now, remember, this problem of disconnecting came “out of the blue”, there was no new node or whatsoever. So these settings worked and good.
I cleaned up retained messages with mqtt explorer, problem still exists, another Pi with a complete new installed Zwave JS but with the same controller, all devices present and the same issue, disconnecting.
When I use home assistant as auto discovery prefix, all devices are discovered, but no updates and after some minutes the disconnection takes place again.
I have ran out of options I can think of or where presented on the Internet, can anybody help me please?

Re: Zwave-JS-UI disconnects with ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)

Posted: Friday 27 October 2023 13:59
by waltervl
If you switch a switch in ZwaveJSUI do you see that message appear in MQTT explorer?
Disconnect could be related to Mosquitto configuration.

Re: Zwave-JS-UI disconnects with ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)

Posted: Friday 27 October 2023 20:52
by Ctenberge
I do not have any messages in mqtt topic Zwave, only when I use homeassistant as topic. Then I get the "discovered" messages of all my devices. But no reaction to any switch command. And after a while the disconnection and it starts all over again.

Re: Zwave-JS-UI disconnects with ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)

Posted: Friday 27 October 2023 21:01
by Ctenberge
a Correction on switch behaviour, the commands (topic homeassistant in the setting) take place. The switches react to the command, but in Domoticz the bulb stays On.

Re: Zwave-JS-UI disconnects with ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)

Posted: Friday 27 October 2023 22:25
by waltervl
Check this topic: viewtopic.php?p=298626

Seems to be a configuration mistake in Zwave-JS-UI with topic names.

Re: Zwave-JS-UI disconnects with ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)

Posted: Saturday 28 October 2023 12:42
by Ctenberge
One would think so, but I have allready seen that post. It's not the solution in my case. I followed her steps and did the same.
But Domoticz does not see the messages, only when I change the topic in section MQTT in "homeassistant" the discovery takes place, and no disconnections follows.
this is it on this moment:
MQTT: name zwave2mqtt, topic zwave
homeassistant: topic homeassistant
And with no discovery in Domoticz only "disconnection" every few minutes.
And in MQTT explorer all messages are seen, both topic zwave and topic homeassistant.

I'm in the position to compare with another Pi running Domoticz but both have the same behaviour.

Other solutions like erasing mqtt-explorers database or even installed on another node does not help either.

It's clear that messages are send through mqtt, why does Domoticz not see them with autodiscovery topic zwave and instead disconnect?

Re: Zwave-JS-UI disconnects with ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)

Posted: Saturday 28 October 2023 14:11
by Ctenberge
The debug log from ZwaveJS shows this:
2023-10-28 10:19:30.193 ERROR MQTT: Mqtt client error connect ECONNREFUSED 192.168.1.217:1883
Error: connect ECONNREFUSED 192.168.1.217:1883
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)
I have no idea what it means, but it must have something to do with the mqtt settings

Re: Zwave-JS-UI disconnects with ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)

Posted: Saturday 28 October 2023 14:20
by Ctenberge
The logging by mqtt-explorer shows this:
Socket error on client Domoticz-MQTT-AutoDiscover55c3b685-0702-4837-9171-d3afeafc95b612, disconnecting
Can this help?

Re: Zwave-JS-UI disconnects with ZwaveJSUI: disconnected, restarting (rc=19/Unknown error.)

Posted: Saturday 04 November 2023 20:00
by Ctenberge
Final.
I removed all devices, one by one at a time, and included them in another controller on another Raspberry Pi. A second mqqt-broker is neccesary to be able to use them. I have several Pi's working for me so that could be arranged
By removing from the first controller I checked the presence of the disconnection error afterwards. Still present.
At last, with removing the last device, the error disappeared. It was a build in switch, in the wallsocket. So that would allways be last one to handle because it brings a lot of work. That device was apparently defect. I could not excluded it and afterwards, on my workbench, it was dead.
Strangly enough, it did his job until the moment I would exclude it.
So, the error was caused by a device and not in the configuration of any involved software. No broker nor homeassistant or domoticz.
By now, after a full day, still no errors anymore.