Hi,
I recently move from zigbee2mqtt to ZHA - works very well.
I have a question though, why ZHA doesn’t make available all the x, y, z, tilt/vibration/drop data that this sensor is able to provide (and which is available under zigbee2mqtt)… ?
Is there any way to get them, or any chance to have ZHA improved in order to get all data available by every supported zigbee devices ?
I’m using this sensors as part of an intruder alert and I found it works correclty under ZHA platform but only with tilt and/or drop event … still missing the vibration event.
yep did it!
I switched to zigbee2mqtt + conbee2 cofig instead of ZHA integration / deCONZ integration and now I can manage tilt, drop and vibration, it’s also much more easier to set and read the sensitivity. …but most of all, I’ve had nolonger random triggering
Thanks a lot for your reply.
Before the switch to ZHA i have zigbee2mqtt but i have many problmes (device disconnection, slow network, ecc)
Also ZHA is more simple because you don’t need to search everytime for the MQTT command
UPDATE!!
I have fixed this issue by removing this string:
before
elif attrid == RECENT_ACTIVITY_LEVEL_ATTR:
# these seem to be sent every minute when vibration is active
self.endpoint.device.motion_bus.listener_event(MOTION_EVENT)
In this file:
/usr/local/lib/python3.8/site-packages/zhaquirks/xiaomi/aqara/vibration_aq1.py
Remeber to access at this file via portainer using homeassistant docker console!!!
@woodmoose or @Bartleby, did either of you ever find a solution to the original question of the missing attributes? I seems like this got off topic and the original issue never figured out.
I recently made a pull request for adding this functionality to ZHA where you can use an event to read the current orientation. I tested this using the garage of my dad where he’s using it to detect if the garage door is open or not. It works great for him.
Should hopefully be added to the next HA release.
When using ZHA, here are all the sensors that can be created based on anything issued on the zha_event topic, which seems to be the only way to create sensors for orientation, tilt, drop, and vibration strength when you don’t use the zigbee2mqtt integration:
First, thank you very much for this. It was very helpful.
Let me start by stating the obvious: I am not yet very proficient at independently changing files. I have primarily used the GUI. However, I can proficiently read and follow instructions.
I used the template to read the sensors (X, Y, Z, etc) as listed in your post. I substituted the Device ID and name, which worked like a charm.
When I tried to add a second sensor, adding the same block with a different device_id and name, it seemed that HA substituted the first entry with the new one and stopped working. Even after removing the second sensor, its name remained for the first sensor.
It was a pain to revert the changes, I think it was cached. Maybe because the new sensor has the same unique_id.
I also unsuccessfully tried to change the unique_id by adding “_2”.
Could you or someone please advise me on what additional changes I would need to make to add additional Aqara DJT11LM? What else do I need to change on top of device_id and name?
It depends how you have home assistant configured. If you are new, you likely haven’t customized where to put various configuration files, and therefore everything is located in your configuration.yaml file in your config directory. See this page in the docs for further information.