in order to integrate an MQTT cover drive by Zwave2Mqtt, I need to set different topic for opening and closing (I can’t use the command_topic because there is 2 different topics, one for open and one for close). Is there a way to do that?
For open the cover, I need to send true in xxx/38/1/1/set.
For close the cover, I need to send true in xxx/38/1/2/set.
And for stop the cover, I need to send false in xxx/38/1/1/set or xxx/38/1/2/set.
Is there a way to use mqtt directly for the position_template instead of use a sensor?
For the sensor, is there a way to calculate directly the correct value between 0 and 100 (the value publish in zwave2mqtt/14/38/1/0 goes from 0 to 99). In my example, I do the calculation in the position_template but it should be better if I could do it directly in the sensor if I want to reuse the value for other purpose. I’ve try with the value_template but can’t make it works.
for the “set_cover_position configuration”, the example I provide doesn’t works it always fully open the cover not depending on the position I select on the slider. The slider allow to set the value between 0 and 100, and my goal is to convert this value to the range 0 -> 99 and publish it to the topic zwave2mqtt/14/37/1/0/set
for the open (and same for close or stop), I should publish true to ‘zwave2mqtt/14/37/1/1/set’. If i do that with for example MQTT explorer, it works, but with Home Assistant and the configuration above it doesn’t works.
Thanks @foxy82,
I’ve seen your solution on issu resolution of Zwave2MQTT github and I works mostly as expected.
But in order to have a fully working solution and for me to better understand how it works, could someone help me to better understant how should I configure the cover template in my situation?
Should I post a feature request to get different topic parameter for the mqtt cover device (instead of only on command topic)?
first I need to create on sensor by cover because I can’t use directly the position topic in the cover (when I say I can’t, I mean I think it’s possible but can’t made it works).
second, read the position works correctly but I can’t set the position (I should try again but I remeber that the last time I play with it, when change the position in the HA interface completely open the roller when I set the position to any value).
So for now I stay with this configuration because I prefer to made open / close / stop button instead of position but I think that adding capability in the MQTT Cover configuration to define open topic / close topic and stop topics with for each topic payload should be the best solution (and As I say I think after that we could integrate automatically the zwave2mqtt cover through the home assistant discover process)
@DavZero Your template works great for my blinds. Thanks. I added payload: "{{ position }}" to your set_cover_position: data_template: to make the slider work. My blinds are Somfy made by Springs Window Fashions (Graber).
I`m trying to use this example for a Zwave.Me motor controller but it looks like some of the MQTT topics are different the unit is detected as dimmer and switch
Switch
2020-09-05 12:27:58 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on homeassistant/nodeID_23/37/1/0/set: True
2020-09-05 12:27:58 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/nodeID_23/37/1/0/set: b'True'
Dimmer
2020-09-05 12:29:40 DEBUG (MainThread) [homeassistant.components.mqtt] Transmitting message on homeassistant/nodeID_23/38/1/0/set: 84
2020-09-05 12:29:40 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on homeassistant/nodeID_23/38/1/0/set: b'84'
The sensor for example is not working but this might be due to the fact that the module is not realy sending status updates