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
982 stars 202 forks source link

Missing status when Home Assistant restart then device are unavailable #3952

Closed Turbox35 closed 4 weeks ago

Turbox35 commented 4 weeks ago

Before submitting a bug please read: https://zwave-js.github.io/zwave-js-ui/#/troubleshooting/bug_report

If you are using the Home Assistant Z-Wave JS integration, please add a full dump:

Home Assistant --> settings --> Integrations --> Z-Wave JS --> Configure --> Create dump --> zip the json file and post it here.

Version

Build/Run method:

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

Z-Wave JS UI version: 9.23.0 Z-Wave JS version: 13.9.0

Describe the bug

My issue discussed here https://github.com/zwave-js/zwave-js-ui/issues/3642 is still present but I have investigate a little. The problem: each time Home Assistant restart, some devices comes unavailable until I change something into Zwave JS UI setting. Indeed if I check or uncheck the "notify new versions" as an exemple, my devices come available.

I have checked and when Home Assistant restart the message offline/online message is well published and the a rediscovery of all my device is well published on MQTT but the status informations of devices is not published.

I understand now why some devices have this issue and others not, it's because the working device don't have the "availability" configuration message into their discovery payload (probably old devices).

"Ignore status update" is well uncheck, so I don't understand why it's not published. Do you have an idea? What's could be wrong in my configuration (docker or Zwave JS UI)?

robertsLando commented 4 weeks ago

With "status" updates you refer to MQTT messages published on <node-prefix>/status ?

Turbox35 commented 4 weeks ago

Hello,

Exactly. Like this : image

robertsLando commented 4 weeks ago

The problem: each time Home Assistant restart, some devices comes unavailable until I change something into Zwave JS UI setting.

Yep because when you press save you restart the gateway so everything is published again.

but the status informations of devices is not published.

Do you have retain flag set to true on mqtt settings? Pay attention to don't confuse it with retained discovery, that's another setting that should be kept off.

Turbox35 commented 4 weeks ago

Oh no it's set to false. image I don't really understand, If I set it to True all MQTT message sent by Zwave JS UI will be retained (like temperature, power... value) including availability informations? If yes I understand why retain availability data but not why for the sensor data values.

robertsLando commented 4 weeks ago

I don't really understand, If I set it to True all MQTT message sent by Zwave JS UI will be retained (like temperature, power... value) including availability informations? If yes I understand why retain availability data but not why for the sensor data values.

Sensor values may change, the status changes only when node status changes. BTW that should fix your issue

Turbox35 commented 4 weeks ago

I confirm it works. Thanks a lot for your help. Regarding devices which don't have the availability option , should I rediscover node or rediscover each line?

image

robertsLando commented 3 weeks ago

@Turbox35 Do you have Persistent to true on those devices in table? Anyway try using rediscover node