ZigBee2MQTT and Aqara DoorWindow Sensor

Hello,

since the ZigBee Binding has some problems with Aqara devices, i switched to ZigBee2MQTT and i am fairly new.

I am adding the Things via UI and the .items via textfile. I managed to add a rollermotor from Aqara with ZigBee2MQTT. It works flawless. So both MQTT and ZigBee2MQTT are set up correctly.

Now i tried adding the Aqara Window Sensor. The ZigBee2MQTT log shows the change immediately in the commandline. But i am not able to get the state into an item.

According to ZigBee2MQTT’s docs, i am not able to /get or /set the contact state. In my understanding that means: Everytime the sensors value changes it publishes the state of “contact”. I am not able to retreive the state with an /get command.

But how do i set up now my channel for the device? I tried “zigbee2mqtt/Z2M_Fenster_Links_Badezimmer/get/contact”, “zigbee2mqtt/Z2M_Fenster_Links_Badezimmer/contact” and
“zigbee2mqtt/Z2M_Fenster_Links_Badezimmer” in both state topic AND command topic. But my corresponding item is not changing at all.

ZigBee2MQTT LOG:

Client (null) received PUBLISH (d0, q0, r0, m0, 'zigbee2mqtt/bridge/logging', ... (226 bytes))
{"level":"info","message":"MQTT publish: topic 'zigbee2mqtt/Z2M_Fenster_Links_Badezimmer', payload '{\"battery\":100,\"contact\":true,\"device_temperature\":33,\"linkquality\":66,\"power_outage_count\":554,\"voltage\":3195}'"}

  1. Remove MQTT Command Topic.
  2. Remove /contact from MQTT State Topic.
  3. Check ‘Show advanced’.
  4. Set ‘Incoming Value Transformations’ to JSONPATH:$.contact
  5. Optional: Set Custom Off/On/Open/Closed Values to your needs (use false and true)

Further reading:

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.