zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
920 stars 196 forks source link

[Domoticz] - need to force rediscovery after restart only for 1 device : Fibaro FGS211 #2372

Closed rezzalex closed 2 years ago

rezzalex commented 2 years ago

Version

Build/Run method:

[X ] Docker [ ] Git Clone + yarn install + yarn run build + yarn start [ ] Pkg

Zwavejs2Mqtt version: 6.7 Z-Wave JS version: 9.0.1

Describe the bug

I am using domoticz, mosquitto and Zwavejs2Mqtt as containers on my NAS. I am stopping my NAS (HOST) and restarting it every night. Probably since my latest ZwaveJstoMQTT upgrade, as well as Domoticz upgrade, I have always the same unique Zwave Device that is not working after the restart. Using the action button in Domoticz simply do nothing. It is working again after forcing the discovery in Zwavejs2Mqtt. This zwave Device is a Fibaro FGS211.

If you need logs, when should I "record" them ? before stopping the host and after the restart ?

robertsLando commented 2 years ago

So the problem is it is not discovered on startup or that the device isn't working at all? Did you try to send commands to it from ui?

rezzalex commented 2 years ago

@robertsLando , not discovered on start-up. Using the Zwavejs2mqtt UI is working for sending a command. What is weird is that all other z-wave devices are recognized directly...

robertsLando commented 2 years ago

Check if you disabled discovery of it, go to cotrol panel table, select the node, go to home assitant tab and check if skip discovery is enabled on entities

rezzalex commented 2 years ago

Discovery is marked as "enabled"

robertsLando commented 2 years ago

Ok so I need to see application logs (debug level) in order to see what's going on. BTW mind that mqtt discovery is actually unmaintained

rezzalex commented 2 years ago

zwavejs2mqtt-store.zip (1).xlsx

Attached the logs of the day (but I put all logs to "silly" 5 min before download info the logs).

This is before I reforce discovery manually.

I hope this is what you need.

robertsLando commented 2 years ago

@rezzalex I guess the node is the 46 right? By checking your logs everything seems correct, it is added and once ready the discovery is sent (see logs from line 42363). Try to check the discovery payload, maybe the error is there and the topic used are wrong for some reason

rezzalex commented 2 years ago

Right, node 46. I will try to compare the payload with the one sent while clicking manually on "rediscover,"

Or delete the device in domoticz...

robertsLando commented 2 years ago

LMK

rezzalex commented 2 years ago

Hello,

I have deleted the device in Domoticz and updated ZwaveJS2MQTT to the latest version. Right after this, all seems fine. But the day after, after my daily "host" shutdown and start, the node 46 did not work again, at least not before I re-force the (re)discovery in ZwaveJS2MQTT UI... then I restart my NAS and... it worked right away...

I will monitor tomorrow morning

rezzalex commented 2 years ago

Hello, same bad result this morning... restarting the zwavejs2mqtt container did the trick...

am I the only one to have this symptom? is the domoticz or HA, Mosquitto and Zwavejstomqtt required a specific order at boot ?

robertsLando commented 2 years ago

Dunno if domotics supports will topic, I know in hass will was used to prevent order problems, when hass mqtt client connects to the broker I get the will message and I send all discovery payloads