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
950 stars 205 forks source link

Fibaro 4 roller shutter not discovered correctly with mqtt #3734

Open radhoo2k10 opened 4 months ago

radhoo2k10 commented 4 months ago

Build/Run method:

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

Z-Wave JS UI version: 9.13.1.b613753 Z-Wave JS version: 12.9.1

Added Fibaro roller shutter 4 with zwave-js ui. Can controll the cover via zwave-js ui, but not in Home assistant. The controllers are not present in Home Assistant. Using mqtt to controll zwave-js ui. image image

Quote from @AlCalzone "The new shutter uses the Window Covering CC, which might not have the corresponding discovery support yet.

This might be an issue for Z-Wave JS UI then (which includes the MQTT discovery)."

Talked to developer for mqtt Home Assistant. https://github.com/home-assistant/core/issues/118503 image image

robertsLando commented 4 months ago

@radhoo2k10 If you remove command_topic: null from discovery payload in the ui and re-discover manually from UI does that works?

radhoo2k10 commented 4 months ago

@robertsLando Hi. Need some guidance. How do I do that?

robertsLando commented 4 months ago

From the UI, go to control panel, expand the row that matches the device, go to home assistant tab, from here you can select the discovered entities from the table, select the entity that matches the window covering cc so it will be opened on the right, now edit manually it and click on "rediscover"

radhoo2k10 commented 4 months ago

These are the entities it has discovered: image image image I don't find the zwave2mqtt/Kjokkenvinduet_screen/106 topic in any of these when i open them.

AlCalzone commented 4 months ago

@robertsLando AFAIK the issue is that no entity for Window Covering CC is discovered.

robertsLando commented 4 months ago

Talked to developer for mqtt Home Assistant.

From the Home assistant screenshot it also seems a discovery issue as the command was null and it was expecting it to not be set at all, anyway setting it to null should result in removing it when it's encoded to JSON string so 🤷🏼‍♂️

About the window covering CC discovery support I have no way to test it. Dunno if @ccutrer could take a look at that

It requires to add a new case to this switch to handle the window covering cc and create the correct discovery payload, I can draft something but I have nothing to try it

radhoo2k10 commented 4 months ago

@robertsLando If you give me clear instructions on what to do, then I can test things.

ccutrer commented 4 months ago

I'm happy to work on window covering discovery support (I'm pretty familiar with the schema, having implemented it on the openHAB end). Is there a way I can mock up a ZWave device that has the window covering CC so I can test with it?

AlCalzone commented 4 months ago

Is there a way I can mock up a ZWave device that has the window covering CC so I can test with it?

Yes. I can give you some instructions on Monday

robertsLando commented 4 months ago

@ccutrer using npm run fake-stick a mock stick is spawned wit config defined in https://github.com/zwave-js/zwave-js-ui/blob/93e4ecfa0bb53a33605da94077090b852b4b53e4/server_config.js

It's just a matter of adding a ccCaps entry there. Once you start the stcik copy paste the url to the settings and you are done (there is already a window covering CC mock there)

AlCalzone commented 4 months ago

To add to this - you don't need lines 18-32: https://github.com/zwave-js/zwave-js-ui/blob/93e4ecfa0bb53a33605da94077090b852b4b53e4/server_config.js#L18-L32

Line 16 should be modified: https://github.com/zwave-js/zwave-js-ui/blob/93e4ecfa0bb53a33605da94077090b852b4b53e4/server_config.js#L16

How depends on your blinds:

robertsLando commented 4 months ago

To add to this - you don't need lines 18-32:

Yes but please don't remove them :)

radhoo2k10 commented 1 month ago

I'm happy to work on window covering discovery support (I'm pretty familiar with the schema, having implemented it on the openHAB end). Is there a way I can mock up a ZWave device that has the window covering CC so I can test with it?

Hi @ccutrer. Did you have time to look at this?