Hi there,
I use HA since November last year and found it quite easy to add sensors and switches from Xiaomi and Osram via zigbee2mqtt.
I have now integrated several Merten Wiser roller-shutter controllers into my house. With the help of KoenK I managed to pair them with zigbee2mqtt on my RPi and can send commands like “open”, “close”, “stop” and any positition between 0 and 100% via MQTT (MQTT.fx or Developer tab in HA). So far so good.
They even get auto discovered by HA, but I only get to see the auto discovery of the buttons on the controller. They get discovered via the MQTT message:
topic: homeassistant/device_automation/0x588e81fffe127538/action_close_21/config
payload: '{"automation_type":"trigger","type":"action","subtype":"close_21","payload":"close_21","topic":"zigbee2mqtt/0x588e81fffe127538/action","device":{"identifiers":["zigbee2mqtt_0x588e81fffe127538"],"name":"0x588e81fffe127538","sw_version":"Zigbee2MQTT 1.14.3","model":"Merten PlusLink Shutter insert with Merten Wiser System M Push Button (MEG5113-0300/MEG5165-0000)","manufacturer":"Schneider Electric"}}'
Under devices I can see the controller, but it has no entities connected and if I try to send further messages via MQTT to auto discover more functions, I get no response.
I tried e.g.:
topic: homeassistant/cover/0x588e81fffe1399d8/config
payload: "{\"device_class\":\"shutter\",\"command_topic\":\"zigbee2mqtt/0x588e81fffe1399d8/set/state\",\"position_topic\":\"zigbee2mqtt/0x588e81fffe1399d8\",\"value_template\":'{{ value_json.position }}'}"
No effect there.
I can however add an entity to configuration.yaml and then I get a working entity, that can control the shutter (up, down, stop and position via slider) - however, this is not connected with the device in the GUI (no link) and the slider is also not updated with the position that is published over MQTT.
I googled like crazy, but can’t seem to figure out what is wrong.
This is what I add in configuration.yaml:
#configure Rolladensteuerung
cover:
- platform: mqtt
name: "Rolladen Treppe"
unique_id: "0x588e81fffe1399d8"
command_topic: "zigbee2mqtt/0x588e81fffe1399d8/set/state"
position_topic: "zigbee2mqtt/0x588e81fffe1399d8"
set_position_topic: "zigbee2mqtt/0x588e81fffe1399d8/set/position"
qos: 0
retain: true
payload_open: "OPEN"
payload_close: "CLOSE"
payload_stop: "STOP"
position_open: 100
position_closed: 0
optimistic: false
value_template: '{{ value.position}}'
And here is the position message from the zigbee2mqtt debug log:
info 2020-08-28 21:44:35: MQTT publish: topic 'zigbee2mqtt/0x588e81fffe1399d8', payload '{"linkquality":5,"position":98}'
I’m already close, but need some hints how to put it together… thanks for any ideas!
Best regards,
Tom