New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xiaomi Aqara D1 2-gang (no neutral wire) - model: QBKG22LM #4199
Comments
We are missing screenshots from all clusters. |
@esseki Looks good to me :) Thank you! |
It unfortunately doesn't since the attributes haven't been read. The required clusters are: power configuration and binary output from both endpoints. |
Hm, that's a mains powered device, right? Rubbish to expose the power configuration cluster then... I'm a bit puzzled about the other cluster, seems something's odd, but on the deconz side probaly. Regardless, that should suffice for now, thanks. |
Yeah, that's gonna be a slight challenge, but I already have an idea how to overcome that with comparable low effort. Dirty, but it should work. Now that we also got the Analog input cluster in the latest screenshot as well, that's of interest on top. I assume the values reflect the power currently consumed and change rapidly (when the lights are on)? |
From what I know these switches don't have power monitoring, so there will be nothing reported there. This is the request for the 1-gang version: #4198 I couldn't find anything to differentiate between the 1-gang and 2-gang versions apart from the "model identifier" |
I confirm this is a wired switch Here is a screenshot for the Analog Input (Basic) cluster for the 2-gang version. As @isorin said it looks pretty identical to the 1-gang version |
Sorry, I think my last post was a bit confusing as I mixed two different things together:
On the wired aspect, all "Aqara D1 wall switches" (apart from the "Aqara D1 wireless") are wired switches with the "no-neutral" version being an "end device" and the "neutral" version being a "router" device. |
This would be amazing Esseki! Thank you for raising this point as it would solve many of my problems if the D1 become compatible and I could decouple some buttons from the relay ... |
@neuroverflow : the good news is that the decoupling already works with the current state of Deconz. You can test it. There is nothing to add. Did just mention it in this thread to make sure it won't be removed or forgotten. Actually controlling the relays already works and decoupling the button too. The big missing part with those switch is the fact that no ZHAswitch resource is created when you add the switch to your network (you can have a look at the ticket that i opened #4316) making the decoupling pretty useless at this point. |
I noticed that, I guess ... I'm using HA (2021.2.0) with deconz plugin (6.6.4) and I cannot detect the D1 in Phoscon, I tried as a light or as a switch. But later on when I go in deConz I see new entities. By the way I'm talking about the D1 1-gang no neutral wire. |
Hi! Any news regarding this kind of devices integration? I see that this new product is getting more and more populate and is apparently supported by zigbee2mqtt. Thank you for your work! |
Can we please have an update of the request? How is it going? |
@SwoopX What do we need to make this happen? |
Would be great to get it properly integrated. Got 2 of these and for now unable to use with Homeseer (deConz--JowiHue--Homeseer). |
Hi, any update about the support for this switch @SwoopX ? |
So, what needs to be done now for the device? From the code, i'd assume everything's created as expected. |
Hi @SwoopX , I took my time to test carefully before replying. I have tested with the latest stable release : Deconz 2.10.04 / 14/03/2021 - Conbee II with firmware 26680700. Let me try to explain : when adding this switch into the Zigbee network, 2 new light resources are created in the API, they show as smart plug in Phoscon. These are the 2 relays from the switch as you can see in @isorin 's screenshot here : #4199 (comment) Everything is fine here. The problem is that on this same screenshot you can see 3 switches clusters (1 for the left button, 1 for the right button, the third one is for when the two buttons are clicked at the same time) but there is no corresponding sensor created for these 3 buttons. In the API when calling the GET /sensors/ I can not find the resource corresponding to those 3 buttons. Finally this switch support the decoupled mode as I explained here : #4199 (comment) So really the only issue is about the lack of ZHASwitch sensor resource in the API. Thank you in advance |
@esseki Ah, ok. That definitively helps, thanks. I'm busy the rest of the week but I can then follow up. Would you be able to compile an updated version of the plugin to test once ready? |
@SwoopX yes i have a testing setup. I never compiled a version myself but i should find a way how to do it. Tell me when you have something to test. Thank you again. |
Hi @SwoopX do you have any update that I can help with test ? |
@esseki The instructions how to compile are described in the readme of this repo. However, you'd need to compile my version, so step 1 for you would be
The code should now allow to have a switch created and enable us to get the relevant data from the button presses. I'd require a debug log from deconz (info + info_L2) where you push all buttons in all combinations once you have created the switch + the Xiaomi special attribute reporting. Something around 15 mins should collect everything necessary to continue. |
Thanks a lot will get this done soon and share the result. |
Hi @SwoopX here is the log file that you asked for. Here are some info about what is contained in this log file :
Let me know if you need anything else, I would be happy to help. Thank you again for your help |
Thanks. I've taken already a short glimpse and it looks like everything's in there. Will have a closer look later and make amendments as necessary. |
So, data looks a bit weird but sometimes that is related to Xiaomi's interesting interpretation of the standards. However, I guess we can already go into finetuning. You'd need to find the file
I'm not too sure if that's a 100% adequate, but you can amend the last 2 values as required to get it right. Verify that with line beginning with |
Thanks a lot for your quick response. |
Hi @SwoopX I'm done with my tests. Please find below the correct json to add to the file "button_maps.json". I had to update the version you suggested to adjust the mapping of the events to the correct clicks.
This switch indeed supports only :
Thanks a lot for your help and support with this. I'm glad that I could help the Deconz community to support one more device :) |
Thanks for having it checked and amended! There's actually one additional thing you could lend me a helping hand, which is confirmation on the Xiaomi special attribute reporting. Every 5-6 minutes, the device sends the following:
I'd assume both on/off attributes (64 and 65) represent the state of the left/right switch. If you could help me in finding out which endpoint belongs to which attribute by pressing a turning a side to on and wait for the corresponding report to come in, I could add that to the code as well. 👍 |
Hey no problem will have a look at it tonight. |
Hi @SwoopX , so I have tested tonight and I confirm that both on/off attributes (64 and 65) represent the state of the left/right switch :
Let me know if you need anything else. |
Great. Then I'd just need to know which light endpoint (02 or 03) is left/right. |
Ah, seems like this is not even required... So all required changes (as far as I can tell) are now in the branch. Feel free to give it another test. |
Device
Screenshots
Clusters of the node:
Basic cluster's attributes:
Node Info:
The text was updated successfully, but these errors were encountered: