-
Notifications
You must be signed in to change notification settings - Fork 507
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
Aqara Wall switch QBKG04LM - How to enable decoupled mode (disconnect button from relay) #1816
Comments
All I clarified is that one particular model Aqara switch can work in decoupled mode. There’s no such thing as “Aqara switches”: every model works differently, and they seem to be using the same commercial model name for different technical models. |
Thank you for your reply. In fact this Aqara switch can work in decoupled mode when it is connected to Xiaomi Aqara Gateway. This option works fine. But I can't find out a way to do the same thing using Deconz and Conbee II gateway. |
Just a long shot: Did you try the attribute definition without a manufacturer code? |
I have the same problem. My switches ID is 0x1037 and I cannot find a way to enable decoupled mode... |
I have bought a CC2531 dongle to snif a network. Can I connect a switch do Xiaomi HUB and sniff what it sends when I enable a decoupled mode? |
I think you could. I would really appreciate if you would upload your sniffed data. |
I will post it as soon as I have the hardware. |
I have the same problem. I can confirm that this switch support decoupled mode by sending 0xFE to 0xFF22 and 0xFF23. I added support of this feature to zigbee2mqtt few months ago and it works fine: Koenkk/zigbee-herdsman-converters#287 |
After sniffing traffic and comparing with what zigbee2mqtt does I found that manufacturer code 0x115F should be used (it's part of request). Deconz detects it incorrectly and then uses it to match with extra attributes from general.xml |
zigbee2mqtt for example just has it hardcoded: https://github.com/KapJI/zigbee-shepherd-converters/blob/be0c869339da485842b2b56bf5cd370f22ba2b89/converters/toZigbee.js#L15 |
@am1ter @ArkadiuszNiemiec if you're still interested I created custom endpoint for rest plugin: https://github.com/KapJI/deconz-rest-plugin/tree/set-mfcode
Use |
@KapJI great job, thank you! I will be back in my flat in two weeks. I will update you here after I test it 👍 |
@KapJI Thank you very much for your solution! I would really appreciate if you could give me some additional details. I compiled plugin and replaced existing, but I am not sure that I did it correctly.
Is my id for POST request is "2" or "00:15:8d:00:02:4d:4f:cb-04-0006"?
I get an error:
So I suppose that I made a mistake while compiling plugin. |
|
@KapJI, Thank you very much for your solution. Everything works perfect. My mistake was moving copiled plugin to incorrect docker container. When I copied it in the correct I got an opportunity to write attributes. I updated first post with link to this solution. |
@am1ter Great to hear! |
Technically, a pull request. Not sure if it should be merged, though. I think it should be a PUT instead of a POST. Also, I don't like the hardcoded endpoint and mfcode. You should be able to write the attribute using the CLI plugin (https://github.com/ma-ca/deconz-cli-plugin). |
@ebaauw I think the proper fix will be using the correct mfcode for Xiaomi devices in deConz itself. But as sources are closed, I can't submit pull request there :( |
The deCONZ core programme is closed source, but the Cluster Info panel is configurable through
No. Per the ZigBee standard, the deCONZ core programme uses the Manufacturer Code from the Device Descriptor to determine which manufacturer-specific attributes (from The issue with this Xiaomi switch is that it uses a different codes in the descriptor vs the Basic cluster. Working around this mutilation of the standard seems way beyond the current design and function of the core programme. The values of the Basic cluster attributes are used only by the REST API plugin, not by the core programme. The "proper" fix would be for Xiaomi to release firmware that adheres to the standard. I don't think that's likely to happen, so, unfortunately, we're stuck with "improper" workarounds. Which, imho, is still preferable over not supporting devices that don't adhere to the standard. |
Yes, please! I have equipped my whole house with these switches with the intention to use some of them as wireless switches for smart lamps or bulbs. That's the reason why I have bought the ConBeeII and set up Deconz 😄 Ccan you suggest or help to develop the improper but acceptable workaround for this? I have found your PR with decoupled mode for another switch (#1444) and tried to follow it but it's still too hard for me to grasp. |
I don't see a workaround using the deCONZ GUI. For the more technical people: send the Write Attributes command using the deconz-cli-plugin (there you can specify mfcode yourself). For the non-technical people, proper support by the REST API (and by its clients, like Phoscon) would be needed. As you only set this once when commissioning the switch, I see no urge to do this. Also, without access to a switch, development and testing would be very hard. I suppose adding a |
I have prepared a docker with Is that right? What is wrong? Thank you in advance! |
I think you need to specify the payload in Big Endian? So |
You are right, it worked! I have a decoupled switch now. Thank you and thanks @KapJI |
Hello. I bought QBKG03LM switches and ran into the problem of adding. More precisely, a switch is added. At first it is added as 4 devices, but after restarting the gui, only two remain. But the sleepy problem is not that. How to implement a logic switch. One of the buttons should control the smart lamp. I tried to compile the plugin and set the parameter through it, succession reported, but at the same time, as the relay clicked, it continued to click. |
Guys, when Deconz start work fine with all the features of these switches? Why is it impossible to include the decoupled mode in the phoscon functionality? Why is it possible in s**t Z2M and not in Deconz? |
It works fine, check out the following post: #1420 (comment) |
It seems this issue is resolved or otherwise inactive. If it is not, please re-open! |
I have just paired few more switches (until now connected to to the Xiaomi Gateway). These are all no neutral switches, some 1 rocket and some 2 rockets, they are all 0x1037, but none of them has the disconnect options. Ideas? |
There is something bad, the manufacture code is checked and valided because we can see the title "Man,ufacture specific" and "Xiaomi Specific" but all is empty ?
What is your deconz version ? I m seing something strange, it's not the same manufacture code for the title (mfcode="0x1037") and the attribute (mfcode="0x115f") probably because the request need to use the second one, But why it's not working too for the "Manufacturer specific" line. |
I am on Deconz v.2.20.1. Is it possible that my local deconz database / configuration is compromised? These are devices that I paired years ago, when I was on a much older deconz version. Deconz at the time didn't work so well with these devices, so I had to remove them from deconz and repair to the Xiaomi hub. Few days ago I tried to pair them back to deconz and to my surprise the friendly name I gave them is still there. So it seems that the deconz config/database hasn't been properly cleaned when I removed them years ago. |
No I don't think this feature just work with deconz itself and the xml file (updated at every deconz update), nothing to see with the database. |
Is this logic hardcoded or in an xml file? If it is a file, could you give me the full path and filename so I check mine? |
it's an XML file, on classic OS it's /usr/share/deCONZ/zcl/general.xml |
I can see the same path under preferences, but unfortunately, I don't have access to it, as the installation is managed by Home Assistant in a docker container. Is there a way to re-pair the node and ensure that deCONZ doesn't reuse settings previously used? As I mentioned earlier, I think I might have brought older settings when I restored an old installation using the backup/restore feature in Phoscon. Something else to mention is that after pairing one of these switches, I see the same device listed as LUMI light under Lights and as Xiaomi transmitter under Switches (in Phoscon). Is this expected? |
Further update... I did a "Reset Node" (F5) on each one of these switches and now the Xiaomi Disconnect attributes are displayed under the Basic Cluster. I was able to read and set the values and I can confirm that the buttons are now in "disconnected" mode. In Home Assistant I can still control the relay but there is no event when the buttons are pressed. Following Home Assistant instructions, I tried to listen to "deconz_event" but nothing is captured there. When I press the button I see the following the deCONZ container log:
This is the right button of a double rocker no neutral switch. Any idea on how to capture the event? Should I see these disconnected buttons reported as sensors in Phoscon (I don't)? |
In disconnect mode, you need to have 2 devices, the "light" one and a "sensor" one the ZHASwitch. (If you can see it in HA, you have access to the API in phoscon/help/API Information/sensor/.. ) |
I don't see any sensor in Phoscon, under API information. The only sensors are the one from other devices, not these switches. For each two rockets Aqara switch, I still see two lights (LUMI) and one switch (Xiaomi), under the API. Is there any sort of re-pair/refresh I should do in deCONZ so Phoscon updates the way the devices are exposed? For the above device (00158D0001F4864F) I see:
For another switch (in coupled mode) with one rocket I see instead:
What makes things interesting is that the device above has clickmode: coupled under options, while the device I have put in decoupled mode doesn't show the same attribute. |
There is a DDF now for thoses device https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/xiaomi/xiaomi_qbkg04lm_switch.json One can have be included before the DDF was here, so with legacy code.
But they are not working buttonevent=none. |
I am not sure I follow. What should I do? |
Only on the problematic device. |
What is the best procedure to reinclude to ensure any trace of them is removed from deconz? |
New finding: the double rocker is xiaomi_qbkg03lm_switch.json while the single rocker is xiaomi_qbkg04lm_switch.json. Any idea how to add support for decoule mode to qbkg03lm? |
Just deleting it in phoscon is fine.
It have probably same zigbee request.
But ATM the problem is more having buttonevent when pressing a button if the device is decoupled ^^. |
Any idea how to get this event? I have removed and repaired the switch but still no luck. Buttonpress shows null. What can I do? |
Take a look in deconz log (deconz/help/debug view) with flag "info_l2", and press a button you will see an error message about button map. |
FYI, created an issue for this: #6758 |
Hello guys as the thread is quite long and some comments are older: currently what is the easiest way to set the Aqara Smart Wall Switch H1 into decoupled mode? (Home Assistant, deconz-addon). Thank you |
With "config/clickmode" ? But I m seeing an issue on it. |
Could you elaborate on what issue? |
I managed set the device in decoupled mode and I could see the messages in the log (see above), but the event was not reported by deconz to HA. In the other thread (link above) there are all the info on the what to do and what is the issue. Eventually there was no response / help and I just gave up. |
Did you buy a different devices or how did you solve your use case? Sad, because the device looks excellent... |
I stopped using deconz with the aqara switches. They are now connected to the aqara hub and integrated with Home Assistant directly. |
Just use the API to change the value in "config/clickmode", idk if HA permit that. (You have value decoupled/coupled). The issue > #6758 |
Please don't mind my asking because I never did that, how can I access the API? I stumbled upon this guide https://dresden-elektronik.github.io/deconz-rest-doc/about_rest/ but it left me rather clueless on how to get it going. |
Im locking this issue as we are offtopic. Please use the above issue. |
Hello everyone!
Could anybody please help me with disconnecting button from relay for switch Aqara QBKG04LM (1 line, no neutral)?
In other thread realted to 2 line switch Aqara QBKG12LM #1420 (comment) @ebaauw clarified that Aqara switches can work in decoupled mode and all you need to do is write new values (
0xFE
) in attributes0xFF22
and0xFF23
. Unfortunatelly, deconz don't show this parameters for my switch QBKG04LM with default general.xml, despite in this files there is relevant lines.From this topic #1487 (comment) I discovered that my switch QBKG04LM uses another manufacturing code -
0x1037
instead of0x115F
. When I changedmfcode
to0x137
in the file general.xml to correct value I discovered that disconnecting parameters appeared in deconz interface with a0x00
value. But when I try to read or write a new value, for example0xFE
, I get an error:I read as many topics realted to my case as I could, but didn't find anything what could help me. Moreover I use Conbee II so I can't use ZSHARK for sniffing my xiaomi zigbee gateway and can't look out a command that disconnect switch button from relay.
I would really appreciate if anyone can give me advice how I can try to fix my problem.
==========
== UPDATE ==
TEMPORARY SOLUTION by @KapJI: #1816 (comment)
The text was updated successfully, but these errors were encountered: