I have an Aqara vibration sensor (DJT11LM) that in HA shows up with the entities action, battery, lq, sensitivity and strength. But the sensor also reports angles. x and y angles are reported both relative and absolute, and there is also an “angle” and angle_z which I am not sure what is. Neither of these shows up in HA. Zigbee2mqtt publishes these data points on the same mqtt topic as the other mentioned values.
It would be very nice to have the info about the x and y axis. Both relative and absolute. For instance you could use it to determine if windows are open or closed, without a separate window/door magnetic sensor. It could work both as a glass break snesor and an open/close sensor.
Example of how the mqtt entry looks:
info 2020-04-18 16:29:35: MQTT publish: topic 'zigbee2mqtt/XiaomiVibration', payload '{"angle":149,"linkquality":113,"angle_x":1,"angle_y":-1,"angle_z":89,"angle_x_absolute":89,"angle_y_absolute":91,"strength":52,"battery":100,"voltage":3035,"action":"vibration"}'
I have them installed using the aqara hub, and Home Assistant creates four entities for each vibration sensor:
[binary_sensor.vibration_dining_room]
[sensor.bed_activity_158d000319a3e3] 25.0
[sensor.coordination_158d000319a3e3] -33,1000,202
[sensor.tilt_angle_158d000319a3e3]
I haven’t made any automations using any of the sensors.
Strange that it differ so much from mine, and that you would have only one tilt angle. I thought this would be HAs device handler causing this, I’m not sure where else this could happen.
They do not differ, it is the integration (Xiaomi Aqara vs zigbee2mqtt) that provides different information.
With the Xiaomi one, you can detect whether a garage door is opening or closing or if a wallbed is open or closed (to enable/disable early roller shutter opening for example).
I have not found yet how to do so with the zigbee2mqtt integration which for now does not provide me with the necessary information (xyz coordinates).