-
Notifications
You must be signed in to change notification settings - Fork 5
Support for Aqara Smart Vibration Sensor DJT11LM #119
Comments
Cool, could be interesting for the classic washing machine use case.. |
I've just ordered 3 of these, I also hope they will be supported in Deconz soon. :) |
I would expect these to be IAS devices, just as the Xiaomi leak sensor. In that case, adding support should be straightforward. Please post the usual deCONZ GUI screenshots:
Please also try to capture the Xiaomi special packet for this device from the dCONZ log. |
Door lock cluster ?! That doesn't make any sense to me, even for Xiaomi. Do any of the Door lock attributes change when the sensor detects vibration? I wonder if deCONZ read it correctly. Could you please reset the device (hold the reset button/hole for 10 seconds), remove it from deCONZ, power down all your lights (ZigBee routers), move it close to the RaspBee/ConBee and re-pair it, while shaking it (to keep it awake)? The leak sensor doesn't show an IAS Zone cluster either. I've copied the logic of that sensor to create a ZHAVibration sensor resource for the |
I can confirm. I've paired a brand new one, by standing next to the Conbee USB device. I have no lights on this network (totally separate from the Hue network I have, even the channel is different). The new device is still a door lock... how can I test your changes? Do I have to pull your branch and build? |
Thanks. I've seem some other strange, non-functional clusters reported by Xiaomi devices. Do you see any changes in the Door lock attributes when the sensor detects vibration?
Yes. Or wait for @manup to publish the next release. I see he just merged the open PRs. |
I'm tilting and shaking the sensor as the vibration detection might not be accurate (see https://community.home-assistant.io/t/new-aqara-vibration-shock-sensor/63211/8). The lock is in "not fully locked" and it does not change if I keep moving the sensor. Also, no changes in any of the other params. |
Latest PRs are now available in 2.05.37, however please make a backup and read the changelog before updating, the release has some larger changes under the hood, hopefully nothing will break. https://github.com/dresden-elektronik/deconz-rest-plugin/releases |
Also, check this for reference too: Koenkk/zigbee2mqtt#295 |
Interesting, you may also try command line parameters |
I've added some empty line before and after shaking the sensors (shaked first one sensor, added more empty lines, than the second one) |
That means it does send attribute reports for the Door lock cluster (0x01). Currently deCONZ uses this cluster only for According to the zigbee2mqtt thread, the sensor issues reports for attributes "85" (0x0055), "1283" (0x0503), and "1288" (0x0508) - that matches pl[0] of 55 and 8. I have no clue as to what these attributes mean, they're not defined for the Door lock cluster, but 0x0055 is Present value for many of the input and output clusters. |
That doesn't look good - too many The
|
Ah there was an |
new2.log |
I'll add the tag 0x0A. Next step is to figure out how these values change for the various actions: tilt, shake/vibrate, and drop. Looking at the reports for the Door lock cluster, it reports attributes 0x0055 and 0x0503, both u16. I'll add them to general.xml, so you should be able to monitor them in the deCONZ GUI. You need to copy this file to |
I think i've cracked the meaning of 0x0055: The value 0x0503 seems to be a number between 1 and 100 (but at some point I saw a value like 108, 169, 200 and 230). It doesn't seem to represent an angle. Might be the strength/intensity of the motion. The value of 0x0508 is usually quite a long number (sometimes 20 digits like 18446744073707061293 or 18446744073708372031 but also 1507201 and 65339396). The 0x0503 and 0x0508 might stay to the same value, even if the value of the 0x0055 changes. |
Cool! I couldn’t have been more wrong assuming it would be an IAS zone device. Maybe best to expose the sensor as a switch, re-using the Did you get the values from the deCONZ GUI or from the log? If from the log, could you post the asdu for the 0x0508? 20 digits is too long for a u48, more like a u64. In hex, the values are 0xFFFFFFFFFFDA002D and 0xFFFFFFFFFFEE003F. |
I think that is a good idea
From the UI. Is there a way to run deCONZ to log the output only of a single device? I usually get a stream of events and it's quite difficult to isolate the ones relating to the vibration sensor.
I'm really curious to find out what that number means :) |
Not really. I usually just |
Ok, will dump a larger set of logs on Wed once I'm back home. |
@paolotremadio, my latest commit (ebaauw/deconz-rest-plugin@bca9cf2) should support the
@manup, I kept the code for ZHAVibration and CLIPVibration, even though currently we don't support any IAS_Zone vibration sensors. I suppose it won't do any harm and it might come in handy later. |
I've been digging into GitHub and I've found this comment: Danielhiversen/PyXiaomiGateway#86 (comment) Also, here's a detail of the clusters (translated from French): https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Ffaire-ca-soi-meme.fr%2Fdomotique%2F2018%2F09%2F03%2Ftest-xiaomi-aqara-vibration-sensor%2F%23Compatibilite_ZiGate&edit-text=&act=url To recap0x0055 is clear: 0x0503 should be the bed activity:
0x0508 is still a mystery. According to the french article:
but according to the GitHub comment:
Implementation
Shall we go ahead and implement it as a switch with Screenshot from app |
Yes I guess sooner or later more these sensors will be available, so It's wise to keep the code :) |
That's precisely why I think it should be supported as a switch, rather than a sensor. Switches don't report that the button is pressed. Switches report events (button was pressed, button was released). Sensors, on the other hand, report a current state (door is open, door is closed, temperature is 21°C). Sensors are stateful, switches are stateless. You can query a sensor for its current state; you cannot query a switch for its current event. My point is that the vibration sensor sends events. For tilt and drop (sensor was tilted, sensor was dropped), this is very intuitive - you don't expect a state (sensor is falling), since the drop only takes a brief moment. For vibration (sensor was shaken) it is maybe less intuitive, as vibration sounds more like a state (sensor is vibrating), which lasts longer. Incidentally, we have the same confusion with motion sensors, which basically issue an event (motion was detected), but are implemented as ZHAPresence, suggesting a state (some-one is present). Only some motion sensors actually report that motion is no longer detected. For the others, deCONZ provides a timer, I don't think we can technically expose the vibration sensor as two different resources for tilt/drop (ZHASwitch) vs vibration (ZHAVibration). |
Sounds good to me, I will test it tomorrow. Just one question: let's say I have the vibration sensor connected to deCONZ and I connect deCONZ to homebridge-hue. Homebridge-hue will expose the switch. We also know that the vibration sensor reports motion from time to time (let's say every 30 seconds). With that setup, I shake the aqara sensor, the switch gets the event and I can connect an automation in Homekit. If I keep shaking the aqara sensor, will it trigger a new automation after 30 seconds, when deCONZ gets the status update from the sensor? |
Yes. |
It does not seem to be an issue with latency or timing. It just seems like it disregards smaller movements, whereas when connected to a Homey, it would register every little angular change. |
In that case it might be something deCONZ does. |
I think so. My guess would be that there is some sort of threshold for how much the sensor needs to be affected(sensitivity?), for it to send an updated value. Maybe to save battery in some use cases, it would make sense to disregarding little movements. I think the problem then is that it knows some sort of zero position in space, and then reacts by delta angles when moved. So if it disregards angles smaller than a set value, you can do a series of small movements and you will not see an update even though it has moved(Rotated in planes) considerably. Anyway, I got no idea how zigbee or programming works, so my guesses are just based off my mechanical knowledge - it could be an entirely other problem. Hopefully one of the coders can chip in on this? |
Pinging @manup, mind to chip in here |
@imbaimbaimba have you tried different value of sensitivity ? |
I have not. Unfortunately I am not all that good at figuring stuff like that out. So I honestly don’t know if that would solve it. |
Not so hard, you can just with curl: 1 is the more sensible, 21 the less. I haven't tried for rotation, so IDK if the setting work for it too, make a try. |
I tried, but could not figure out how to make it work :( I also noticed that the humidity sensors have the same issues. They respond promptly to radical changes, say if I open a window or breath on them, but If they slowly change, it is not reported. |
I just bought a DJT11LM firmware 20180130 I am using Domoticz to receive the data from deCONZ and there I see vibration value, On/Off. Can I expect angle as well in Domoticz/Phoscon or it is not possible at he moment? |
Same here, conbee 1 though. |
Is there a reason to not have the type of mouvement (touch, tilt or drop) in the API ? |
I'm primary looking for x/y/z axis support. Because of needed I sent the stick back. Maybe later it's possible, then I buy a new one. |
It seems this issue is resolved. If it is not, please re-open! |
I thing the Problem is still there. I have the Vibration Sensor DJT11LM and in the Poscon App I only get Battery and Temperature. is there a solution? |
Thias github is for the rest plugin not for the Phoscon GUI, not being open source. The rest plugin works fine, the Phoscon GUI does not show all data. |
Ok, thank you. So i can't use it with FHEM? |
You can use it with FHEM. FHEM uses the rest plugin and I have all needed readings in fhem like
|
That sounds good. Could you briefly explain to me how to set this up? Sorry, but i don't know my way around. |
Phoscon is closed source. I will forward this to their dev, she will move this issue to the Phoscon repo. |
Thank you to inform their dev to solve this problem. I would prefer this solution, because i dont know about this and so it is easier for me. Perhaps i can solve it with the rest plugin in the meantime? |
@Mimiix |
No, she will move this issue to that repository ;) I added the label, that will inform her. |
I have some issues to use this sensor on my system (rpi3+raspbee2) with latest firmware. After some time it appears like this: On the webgui: Node info: Cluster info "Basic" Cluster info "Identity" Cluster info "Door Lock" In the log I can see some "tilt", "shake" & "drop" events:
Any help to get it working ? |
Yep, broken since 86. Fix is already merged. Waiting on new release. |
I just figured it out :) Thank you. |
This seems to be a new item just released. Model: DJT11LM.
Any plans to get support for it in Deconz?
https://www.gearbest.com/smart-home-controls/pp_009661787808.html?wid=1433363
https://www.aliexpress.com/store/product/Xiaomi-Aqara-Smart-Motion-Sensor-International-Edition/329388_32912246474.html
https://www.youtube.com/watch?v=odnaG2I387U
The text was updated successfully, but these errors were encountered: