Deconz-rest-plugin: Aqara OPPLE switches support

Created on 11 Nov 2019  ·  500Comments  ·  Source: dresden-elektronik/deconz-rest-plugin

Are these switches supported presently, or on your radar for future support?

Aqara Opple switches

They seem very promising I think.

Device Request

Most helpful comment

Yes, the initial support will be included in the next release.

All 500 comments

Following, saw them on Ali (https://nl.aliexpress.com/item/4000322297550.html) for a nice price. Saw they are zigbee 3.0

+1 on those. I saw them yesterday and price is amazing compered to other wall switches on market, and much more potential compered to the normal Aqara wall switch. I will order and report back.

+1 on those please. Happy to see that this got the label "device integration". Crazy price of the switch. I've got already the other aquara switch and it works brilliant!

👍
Following as well.
Very interesting scene selectors.

Just got my 6 button version. Tried to add the device as a switch and it failed but I can see it in the deconz app. The first button switches on all my "Lights" and the second button switches them off.

Model: WXCJKG13LM
Model Identifier: lumi.remote.b686opcn01

What info do you guys need to get this device integrated?

@djashjones https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Request-Device-Support
Have you tried to listen for deconz_events in Home Assistant or Nodered?

IMG_0131
IMG_0132
IMG_0133

Sorry don't know how to listen to events in either HA, nor node-red (which I have both).

@djashjones
In HA -> Developer Tools -> Events
You write deconz_event in the lower box and press "Start listening".
After this you try press the Aqara Opple Switch and see if you get any responds. If sucessful you will see responds similar to the picture. The "event" number should change depening what button you press and if you press, long press or double press.
Please try it and report back :)

image

Just got my 6 button version.

How do you experience it, quality wise?

Same quality as the 2 battery powered 2 button rocker I have. I do like it a lot. It's like the Ikea remote and the base is magnetic.

I will see what events get fired tonight when I get home from work.

Nothing shows up when I listen to deconz_event in home assistant while pressing buttons. I can see it in deconz like the screenshots above but not in phoscon.

What's weird is that it turns on / turn off my trafri bulbs which are linked in phoscon...

Confirmed, Nothing in HA, event wise.

I have Ikea Tradfri bulbs (dimmable) and sockets.

Button 1, top Left, action = Switches off all my lights and sockets.
Button 2, top Right, action = Switches on all my lights and sockers.
Button 3, middle left, action = Decreases brightness on bulbs.
Button 4, middle Right, action = Increases bright on bulbs.

IMG_0134

Any news for Homey?

same issue here as djashjones said
did you find any solution yet?

+1, just received the 4-button switches and does as commented by @djashjones
I'm using pimatic that is using the REST API and it's not showing.
Calling the API on /api/ neither shows the MAC address on the list of all devices
What can we help to integrate the device?

Off topic: Just Receiver 6 Button version. There was no Instruktion in the Box. Could anyone Tell how top pair it? Reset Button seems to bei useless? Hold it up to 5 Seconds but nothing happens?

Do you have the new Xiaomi homekit hub?

On Thu, 5 Dec 2019, 22:36 heine79, notifications@github.com wrote:

Off topic: Just Receiver 6 Button version. There was no Instruktion in the
Box. Could anyone Tell how top pair it? Reset Button seems to bei useless?
Hold it up to 5 Seconds but nothing happens?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061?email_source=notifications&email_token=AHRBAT6EMS5NORT34L3VFT3QXF7ABA5CNFSM4JLW7MB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGCMOOA#issuecomment-562349880,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHRBAT3EVRCQ33MKCPF4WJLQXF7ABANCNFSM4JLW7MBQ
.

Do you have the new Xiaomi homekit hub?

On Thu, 5 Dec 2019, 22:36 heine79, @.*> wrote: Off topic: Just Receiver 6 Button version. There was no Instruktion in the Box. Could anyone Tell how top pair it? Reset Button seems to bei useless? Hold it up to 5 Seconds but nothing happens? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#2061?email_source=notifications&email_token=AHRBAT6EMS5NORT34L3VFT3QXF7ABA5CNFSM4JLW7MB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGCMOOA#issuecomment-562349880>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHRBAT3EVRCQ33MKCPF4WJLQXF7ABANCNFSM4JLW7MBQ .

No. I'm unsing conbee with hassio.

I think I paired it by holding the button down (top left, next the led) until it started flashing.

I am also eagerly awaiting the integration of these switches. I went ahead and already bought a 6 button one, if there is anything that can be done to speed up the integration let me know.

I also have the 6- and 4-button Versions waiting for Support :)
Nice Quality btw...

Found on zigbee2mqtt git that this switches should be able to support "release after hold".
If true this switches will support event 1234.
For you guys that have the normal Aqara single/double rocker you might have noticed that it is not possible to dim lights in a good way. This because its only send one event when hold. The new Aqara Opple switch seams to be able to send both x001 (hold) and x003 (release after hold) event.

This will be ideal for my bathroom when get supported. 1 for the on/off, 2 for dimming and the third row for the extractor fan manual on/off

Or WLED, one to change brightness, one colour and one effects!

On Mon, 9 Dec 2019, 17:42 djashjones, notifications@github.com wrote:

This will be ideal for my bathroom when get supported. 1 for the on/off, 2
for dimming and the third row for the extractor fan manual on/off


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061?email_source=notifications&email_token=AHRBAT3VMW4JPFEYH32PNMDQXZ7PDA5CNFSM4JLW7MB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGKAV4I#issuecomment-563350257,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHRBAT3TD3VBIR2KNW7JCVLQXZ7PDANCNFSM4JLW7MBQ
.

Just got mine :-) , 6 button variance
I concur it controls all the lights: 2 top buttons are on and off, the middle buttons are dim up or down and the 2 lower buttons are more yellow or less yellow color.
doesnt appear on domoticz at all or on phoscon :-(. is there any way to control what lights it controls?
is there a way to make it control only specific lights?
image
image

4-Button-Version:
image
image
image

So playing around a bit with deCONZ, and noticed there is a way to add xml file to extend the profiles, devices etc. is this something that can help here? or do we need to get some code support for these switches?

I tried looking at the user guide "extending the zcldb section, but not sure how to map things. it seems the mapping are correct (on/off , dimmer and color are all identified) but there are no events or configurations like there are with another xiaomi switch I have, and I couldnt yet find something obvious in the file that shows me how to link it to a specific type of device.

is there a way to make it control only specific lights?

Normally, I’d suggest to create a group, add a light to it and bind the switch’s client clusters to that group. Not sure if that’ll work for Xiaomi, though. Might be enough to bind only one cluster, but could also you need to bind all three (_On/Off_, _Level Control_, and _Color Control_).

I don’t understand the use for the 2nd endpoint on the 6-button switch.

hmmm - I tried, the binding files on timeout :-(

Make sure to press a button to wakeup the switch while issuing the bind.

Thank you very much - working now after some tries and presses. I had to bind each of the items separately, but now its working on one lamp - which is much better. Next steps is I need this to work with 3 lamps I have in my room. do I need 3 groups? one for on/off, dimming and color?
I will also try to bind to the second endpoint, see what happens...

Best create a single group, bind all three clusters to it, and add multiple lights to this group.

OK - managed to bind the second endpoint, but it didnt do anything, tried doing long presses, double presses etc. but nothing...
I"ll try the group next, but really need events now, as I want to link some of the actions to devices that are not zibgee

I would also be interested in support for this switches. Got myself the 2, 4 and 6 ones. Would be great to get them working with conbee...

well - its kinda working now, with lots of limitations. you can use it to control on/off, dimming and color as long as your lamps are also controlled by conbee - you can create a group of lamps in phoscon and connect the switches using the bind option in deCONZ (you can bind to a group or to a single light). but thats about it.
You cant get events to domoticz/HA/Homey etc. (which is the biggest problem), you cant use long press or double press and you cant change the button assignments (for example, you cant do toggle with one of the buttons).
I actually purchased it so that I can have a central controller in each room that can control the lights and the air conditioner (which is controlled from domoticz) - so eagerly waiting for support.

Another question for the experts out there - is there a way to create a "virtual" light in deCONZ? I mean that I can have a light object in deCONZ that is not really a real physical light bulb.
Because I do get light events to domoticz - and if I can create a virtual light in deCONZ that is controlled by the switch, I can use the events in domoticz to control other hardware.

Has anyone tried it with the Xiaomi Hub to see how well it works?

On Sat, 14 Dec 2019, 13:28 eserero, notifications@github.com wrote:

well - its kinda working now, with lots of limitations. you can use it to
control on/off, dimming and color as long as your lamps are also controlled
by conbee - you can create a group of lamps in phoscon and connect the
switches using the bind option in deCONZ. but thats about it.
You cant get events to domoticz/HA/Homey etc. (which is the biggest
problem), you cant use long press or double press and you cant change the
button assignments (for example, you cant do toggle with one of the
buttons).
I actually purchased it so that I can have a central controller in each
room that can control the lights and the air conditioner (which is
controlled from domoticz) - so eagerly waiting for support.

Another question for the experts out there - is there a way to create a
"virtual" light in deCONZ? I mean that I can have a light object in deCONZ
that is not really a real physical light bulb.
Because I do get light events to domoticz - and if I can create a virtual
light in deCONZ that is controlled by the switch, I can use the events in
domoticz to control other hardware.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061?email_source=notifications&email_token=AHRBAT7XWEUYIXCITRDJBKDQYTNOVA5CNFSM4JLW7MB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEG4CTEY#issuecomment-565717395,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHRBATZMPO6E6WTQ7OR3DJTQYTNOVANCNFSM4JLW7MBQ
.

haven't tried it. its only supported in the new hub (the one with the siri support). I guess they will add support for the regular hub in the future, no real reason not to.

I'm starting to get the impression that the powers that be have no interest in integrating new devices or is it me?

I'm starting to get the impression that the powers that be have no interest in integrating new devices or is it me?

I don't think history merits that kind of cynicism, most (or all?) previous Xiaomi devices have been integrated as far as I know. I'm more inclined to think that it's this season that is busy for all that makes progress slow. That said, I too would appreciate a word or two letting us know that these devices have not been forgotten, even if no progress have been made as of yet.

Don't get me wrong, I love my Conbee II stick it's been rock solid for a year

Just ordered some Samsung Smartthings Zigbee plugs 2019 version and reading back about the previous version that had interest but was never integrated.

I just got mine. Curiously when you connect it to Phoscon (you get no feedback that it has found), it immediately controls all lights. I don't even have a group for all lights, so I'm not sure how to turn this off. I can't see the Switch in Phoscon or via the REST API. Nothing is sent to Home Assistant.

On a hardware note, I can see from the manual that it has a CR2032 battery but there are no instructions for how to eventually replace it. Has anyone endeavored to find out if it is possible?

Found the explanation to the strange behavior and also how to access the battery. https://community.hubitat.com/t/xiaomi-opple-6-button-remote/27921/9

Just about to post that link but you beat me to it!

@manup Is there any information we can provide you with that would help you in integrating this device more fully?

It controls all lights that are on phoscon?

On Wed, 18 Dec 2019, 12:41 PremiumUsername, notifications@github.com
wrote:

I just got mine. Curiously when you connect it to Phoscon (you get no
feedback that it has found), it immediately controls all lights. I don't
even have a group for all lights, so I'm not sure how to turn this off. I
can't see the Switch in Phoscon or via the REST API. Nothing is sent to
Home Assistant.

On a hardware note, I can see from the manual that it has a CR2032 battery
but there are no instructions for how to eventually replace it. Has anyone
endeavored to find out if it is possible?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061?email_source=notifications&email_token=AHRBAT72KTKADT3G2HH5XADQZID5PA5CNFSM4JLW7MB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHF3C2A#issuecomment-566997352,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHRBAT4WD65QRWPGJHEYYQLQZID5PANCNFSM4JLW7MBQ
.

yes

Guys, if you look at my post above - I managed to configure it to work with a specific light or specific group using the bind option in deCONZ. if you need further help on this let me know and I"ll post more exact explanation.

if you need further help on this let me know

That's a nice offer, but I need the integration with Home Assistant for my purposes.

I"ll post more exact explanation.

Please do.

if you need further help on this let me know

That's a nice offer, but I need the integration with Home Assistant for my purposes.

me too. its has more options than the IKEA 5 button I'm currently using.

I"ll post more exact explanation.

Please do.

agree with everyone we need to get events to home automation systems, otherwise its a crippled solution. using Domoticz myself.

anyway - here is what I did to get it working to my living room lights only.

  1. create a group in phoscon (say lights, or whatever switches)
  2. if you run phoscon on chrome, right click on the page and select "inspect".
  3. go to the network tab - you should see something like the below (I dont know how to get the group number from deconz...)

image

  1. click on one of the lines with "group " in them - on the right side you can see the group numbers. if you expand them you can see the group names you defined in phoscon. find the group that you want and remember the number
  2. go to deconz, and select the "bind panel" from the panel dropdown
  3. image

  4. open the cluster menu from the xiaomi switch and drag the "on/off" line to the "source" button in the bind box. it should be 006. on the destination part select "group" and type in the group number with the preceeding 0x00 as you can see in the screenshot.

  5. now press on the "bind" button. - note that it took me a few tries and repeatedly clicking on one of the buttons of the switch in order to wake him up.
  6. repeat the operation for "level control" 0008 and "color control" 0300.

Can the method provided by eserero in any way be used to provide controll of none zigbee devices in Home Assistant? E.g. is it possible to create a light group in Phoscon with no lights and somehow integrate that group in Home Asssitant and use the state of that group to control automations?

deCONZ version 2.05.71
I have try as well.
Have done same as @eserero (Add switch to grop id) but is not working.
And have check deconz event listener when I push the button..
But nothing, quiet..

To see button events, you need proper support in the REST API plugin. The binding is only for controlling lights directly (and prevent the switch from controlling all lights in your network).

@ebaauw is there an easy way to get proper support in the REST API plugin while waiting for an official integration? Obviously there is communication from the Opple switch to deconz.

Can the method provided by eserero in any way be used to provide controll of none zigbee devices in Home Assistant? E.g. is it possible to create a light group in Phoscon with no lights and somehow integrate that group in Home Asssitant and use the state of that group to control automations?

That's a very roundabout way of doing it, but if it is possible to create an empty light groups you could use that in HA to control an automation (given that it's possible to turn off and on such an group in phoscon). Unless you are in a huge rush, it's better to wait for proper button events with true deconz integration, instead of using that stopgap-solution in my opinion.

I have dc_eventlog running.
I see other sensor and buttonevent but not from Aqara OPPLE...

I will try to be patient :-)

Obviously there is communication from the Opple switch to deconz.

Technically, no, the switch does _not_ communicate with the gateway; it sends broadcast (groupcast) messages, which are also picked up by the gateway. The gateway eavesdrops on the messages from the switch to the group.

Note that these OPPLE switches work very differently from the other Xiaomi switches, which indeed send reports straight to the coordinator, and cannot control lights directly.

is there an easy way to get proper support in the REST API plugin while waiting for an official integration?

Wouldn't call this easy. You need to:

It's not too difficult, if you take a similarly behaving switch that's already supported as example and search the code for references whitelisting that switch. But it's a bit of trial and error. That's why I no longer create PRs for switches I don't have access to.

@ebaauw
I was following your steps + some additional whitelist where i added the switch and i am able to pair it through the sensor section in the phoscon app and it appears in the rest api. Unfortunately something is not correct. There are no buton events send... I am not sure what am i doing wrong? Probably some conflicts?

I try with the Aqara Opple 2 button switch.

opple

Should the On/Off and Level cluster have a blue color?

opple2

At least it doesn't turn on/off all the lights anymore like some other people reported :)

There are no buton events send... I am not sure what am i doing wrong? Probably some conflicts?

Did you link it to a button map? What does the deCONZ log say?

Should the On/Off and Level cluster have a blue color?

No. Clusters come in pairs: the (blue) server cluster is the actuator, keeping state; the (grey) client cluster controls the actuator. Commands are sent from client to server; reports (and responses) are sent from server to client. It’s actually quite normal for controllers to have client clusters; it’s the other Xiaomi wireless switches that mutilate the standard beyond recognition by sending reports instead of commands.

At least it doesn't turn on/off all the lights anymore like some other people reported :)

Then the bindings are probably configured OK. Note also config.group.

@ebaauw ok, i got the button events to work. My button map was wrong...
Since I am doing this for the first time, there are still some things which i don't understand. Maybe you can help me understand that more so i can implement the support properly...

  1. About the group. None of my other switches has a groupin the config. Why does this one has a group and is it ok like that?

  2. I got the button events to work but only single and double press work. The switch should also support long press but that doesn't seems to work. I noticed the single press comes from the OnOff cluster and the double press comes from the Level cluster. Does that mean that the long press should come from the color cluster? Do you have to somehow add the color cluster explicitly to the switch?

  3. The battery information always shows null. Is that ok?

  4. I can only add the switch in the phoscon app when i search for Sensors, not Switches. Why is that? Can this be changed that it find it when i search for Switches?

  1. About the group. None of my other switches has a group in the config. Why does this one has a group and is it ok like that?

What other switches do you have? Only switches that send commands to (a group of) lights have config.group. As I said above, the other Xiaomi switches are the exception in that they behave like a stateful sensor instead of a stateless wireless switch.

  1. I got the button events to work but only single and double press work. The switch should also support long press but that doesn't seems to work. I noticed the single press comes from the OnOff cluster and the double press comes from the Level cluster. Does that mean that the long press should come from the color cluster? Do you have to somehow add the color cluster explicitly to the switch?

You need to figure out what command the switch sends on long press. Typically it’s _Move_ on hold and _Stop_ on long release. deCONZ should log these commands (when started with the right amount of debug logging). What command does it send on double press? _Move to Level_? I doubt that it would send commands from the _Color Control_ cluster, unless long press is used to cycle through colours or colour temperatures.

  1. The battery information always shows null. Is that ok?

No. Does it get populated when you read the attributes from the _Power Configuration_ cluster? If so, you need to create a binding from this (server!) cluster to the coordinator (endpoint 0x01) and configure attribute reporting for _Battery Percentage Remaining_. This should report the value in 0.5 %, but not all vendors adhere to that (notably IKEA).

  1. I can only add the switch in the phoscon app when i search for Sensors, not Switches. Why is that? Can this be changed that it find it when i search for Switches?

Sorry, I have no experience with Phoscon. It’s not open source, so only dresden elektronik can change it.

  1. Yes, i have some other xiaomi switches. But i also have Philips Hue Dimmer switches and i just noticed they also have a group. So this i clear now for :)

  2. So i figured out that my button map was wrong after looking in the deCONZ log, that is how i got the single and double press to work. But for the long press there is nothing in log appearing. For the double press i get now button 1004 Double press or button 2004 Double press in the console. Button map looks like that:

static const Sensor::ButtonMap aqaraOpple2Map[] = {
//    mode                          ep    cluster cmd   param button                                       name
    // First button Off
    { Sensor::ModeScenes,           0x01, 0x0006, 0x00, 0,    S_BUTTON_1 + S_BUTTON_ACTION_INITIAL_PRESS, "Normal press" },
    { Sensor::ModeScenes,           0x01, 0x0008, 0x02, 1,    S_BUTTON_1 + S_BUTTON_ACTION_DOUBLE_PRESS, "Double press" },
    // First button On
    { Sensor::ModeScenes,           0x01, 0x0006, 0x01, 0,    S_BUTTON_2 + S_BUTTON_ACTION_INITIAL_PRESS, "Normal press" },
    { Sensor::ModeScenes,           0x01, 0x0008, 0x02, 0,    S_BUTTON_2 + S_BUTTON_ACTION_DOUBLE_PRESS, "Double press" },

    // end
    { Sensor::ModeNone,             0x00, 0x0000, 0x00, 0,    0,                                           nullptr }
};

Not sure if this is 100% correct.

Is there any place where i can debug with some log the long press? Or how would i need to proceed now to find out why long press is not appearing?

  1. Here is how the Power Configuration looks like after i read it.
    opple3

  2. Got it.

Thanks for the support.

Button map looks like that

So the switch sends a _Step_ command (cluster 0x0008, command 0x02) on double press.

Is there any place where i can debug with some log the long press?

Run deCONZ with --dbg-info=2 --dbg-aps=2 --dbg-error=1 and the tail -f the output. You should see messages like:

Dec 23 19:52:14 pi5 deCONZ[13715]: 19:52:11:389 APS-DATA.indication srcAddr: 0x7ce3, srcEp: 0x01 dstAddrMode: 1, profile: 0x0104, cluster: 0x0006, lqi: 255, rssi: -46
Dec 23 19:52:14 pi5 deCONZ[13715]: 19:52:11:389     asdu: 011601
Dec 23 19:52:14 pi5 deCONZ[13715]: 19:52:11:389 APS-DATA.indication from child 0x7CE3
Dec 23 19:52:14 pi5 deCONZ[13715]: 19:52:11:389 verify 0x000d6ffffea46abf is child node after 778788 s
Dec 23 19:52:14 pi5 deCONZ[13715]: 19:52:11:389 button 1002 On
...
Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:55:635 APS-DATA.indication srcAddr: 0x7ce3, srcEp: 0x01 dstAddrMode: 1, profile: 0x0104, cluster: 0x0008, lqi: 255, rssi: -48
Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:55:635     asdu: 0117050053
Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:55:635 APS-DATA.indication from child 0x7CE3
Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:55:636 button 1001 Move up (with on/off)
...
Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:58:306 APS-DATA.indication srcAddr: 0x7ce3, srcEp: 0x01 dstAddrMode: 1, profile: 0x0104, cluster: 0x0008, lqi: 255, rssi: -48
Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:58:306     asdu: 011807
Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:58:306 APS-DATA.indication from child 0x7CE3
Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:58:308 button 1003 Stop (with on/off)

This is press, hold, and long release for a Trådfri On/Off controller. The first message in each sequence is the APS-DATA.indication, showing the NWK address (0x7ce3 in my case) of the source. Check the _Node Info_ panel in the deCONZ GUI, to find the NWK address for your switch. Next you see the source endpoint (0x01), the profile (0x0104 for ZHA), and the cluster (0x0006 for _On/Off_ or 0x0008 for _Level Control_). In the asdu you see the ZCL payload. The first byte is some status bitmap, the second byte is the sequence number, the third byte is the command (01 for _On_; 05 for _Move with (On/Off)_; and 07 for _Stop_). See the ZigBee Cluster Library Specification. The bytes after that are the command parameters (00 for direction: _Up_ and 53 for the move rate). Note that the text after button 100x is from the button map.
deCONZ should log a warning when no matching command is found in the button map, but I don't have an example at hand.

  1. Here is how the Power Configuration looks like after i read it.

Of course, Xiaomi doesn't report _Battery Percentage Remaining_, even though they now have some "normal" switches. You need to whitelist the switch here:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/bb47cdbc19c257e3000fdb8475aa456830e6df94/de_web_plugin.cpp#L5736
What type of battery does the OPPLE have? CR2032? The code to convert the voltage to percentage should probably work equally badly for any 3V Lithium button cell. You still might need the binding and the attribute reporting, but it's also possible that the switch is hardcoded to report this periodically to the coordinator (NWK address 0x0000).

1.

So the switch sends a Step command (cluster 0x0008, command 0x02) on double press.

Is that ok or a problem?

2.
Ok so i also got kind of the long press (hold) to work. This is how the Button Map looks like now:

static const Sensor::ButtonMap aqaraOpple2Map[] = {
//    mode                          ep    cluster cmd   param button                                       name
    // First button Off
    { Sensor::ModeScenes,           0x01, 0x0006, 0x00, 0,    S_BUTTON_1 + S_BUTTON_ACTION_INITIAL_PRESS, "Normal press" },
    { Sensor::ModeScenes,           0x01, 0x0008, 0x02, 1,    S_BUTTON_1 + S_BUTTON_ACTION_DOUBLE_PRESS, "Double press" },
    { Sensor::ModeScenes,           0x01, 0x0300, 0x4c, 1,    S_BUTTON_1 + S_BUTTON_ACTION_HOLD, "Hold off" },

    // First button On
    { Sensor::ModeScenes,           0x01, 0x0006, 0x01, 0,    S_BUTTON_2 + S_BUTTON_ACTION_INITIAL_PRESS, "Normal press" },
    { Sensor::ModeScenes,           0x01, 0x0008, 0x02, 0,    S_BUTTON_2 + S_BUTTON_ACTION_DOUBLE_PRESS, "Double press" },
    { Sensor::ModeScenes,           0x01, 0x0300, 0x4c, 3,    S_BUTTON_2 + S_BUTTON_ACTION_HOLD, "Hold On" },

    // end
    { Sensor::ModeNone,             0x00, 0x0000, 0x00, 0,    0,                                           nullptr }
};

But unfortunately no matter if i hold the left or right button on the switch it always fires just the Hold off event (the left button). What am i doing wrong here? The parameter is different and i have it in the button map but still doesn't work...

Here is the debug:

20:56:43:000 APS-DATA.indication srcAddr: 0xf9d4, srcEp: 0x01 dstAddrMode: 1, profile: 0x0104, cluster: 0x0300, lqi: 255, rssi: -49
20:56:44:000    asdu: 11224c0345000700000000000000
20:56:44:001 button 1001 Hold off

20:56:59:307 APS-DATA.indication srcAddr: 0xf9d4, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0300, lqi: 255, rssi: -49
20:56:59:307    asdu: 11234c0145000700000000000000
20:56:59:307 button 1001 Hold off

3.
Yes, it has a CR2032 battery. After i whitelisted the switch in the specified place it shows the battery percentage but only when i manually read the Power Configuration cluster with the gui... Why is that?

Is that ok or a problem?

Ok

What am i doing wrong here? The parameter is different and i have it in the button map but still doesn't work...

You need to handle the 0x4c command (_Step Color Temperature_), after the _Move Color Temperature_:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/bb47cdbc19c257e3000fdb8475aa456830e6df94/de_web_plugin.cpp#L3418-L3419
The logic is probably the same as for _Step_:

https://github.com/dresden-elektronik/deconz-rest-plugin/blob/bb47cdbc19c257e3000fdb8475aa456830e6df94/de_web_plugin.cpp#L3384

You shouldn’t issue a x001 without corresponding x003. If the switch doesn’t send anything on long release, you should map these commands to to x003.

but only when i manually read the Power Configuration cluster with the gui... Why is that?

As I said, you might need to setup attribute reporting.

Ok, i got the the hold button event also to work correctly. I think that the events are now sent correctly...

As I said, you might need to setup attribute reporting.

I am not sure how to do that. Could you help with me with that?

So, well the switch kind of works now. There are still some issues which need to be fixed but i am not sure how to proceed now. I am also not sure if that which i coded there is the correct he way to handle the switch...

As I said, you might need to setup attribute reporting.

I am not sure how to do that. Could you help with me with that?

i am not sure how to proceed now. I am also not sure if that which i coded there is the correct he way to handle the switch...

Best create a pull request, so the code can be reviewed.

I have all set like that but it still doesn't work. What is interesting that after i add a switch after a few minutes i am not able to even read the attributes manually through deconz gui anymore. The manual read always runs into a timeout. But the button events work from the switch...

I got all 3 switches to work (2, 4 and 6 buttons) at least partially. There are still multiply issues which i have and i am not sure if I can fix them at this point.

  1. The switches share the same vendor group with VENDOR_115F. I suspect this might be causing some of the issues.

  2. Adding a switch does not always work for some reason. Sometimes it works on first try but sometimes i have to try multiply times. I have no idea why.

  3. I can only add a switch when i search for sensors. I can also search for switches but that never succeeds, even that the switch still gets paired but is behaving strange. Also no idea why...

  4. When i add a switch then always a new group is created for every switch. I have already like 50 groups right now (because of multiply times removing and re-adding the switches). Can this be somehow done that for the Aqara Opple switches always just one group is created?

  5. Sometimes in the config temperatures come up in the rest api. Even i blacklisted it in the database.cpp...

  6. The 4 button switch does not have a hold button event. No matter which button i hold, there always comes just a single press one.

  7. The 6 button switch doe snot have a double press event. Here no matter where i double press always a single press comes.

  8. Also the 6 button switch for holding sends a hold event when i hold the button and a release event when i release it. No matter if i hold the left or right button, on release always the same event comes, there is no difference between left or right release. Is that ok like that? Also the hold and release for the 5th and 6th button does not work, even that the map is correct. My map looks like that:

static const Sensor::ButtonMap aqaraOpple6Map[] = {
//    mode                          ep    cluster cmd   param button                                       name
    // First button Off
    { Sensor::ModeScenes,           0x01, 0x0006, 0x00, 0,    S_BUTTON_1 + S_BUTTON_ACTION_INITIAL_PRESS, "Off top press" },
    // First button On
    { Sensor::ModeScenes,           0x01, 0x0006, 0x01, 0,    S_BUTTON_2 + S_BUTTON_ACTION_INITIAL_PRESS, "On top press" },
    // Third button Off
    { Sensor::ModeScenes,           0x01, 0x0008, 0x02, 1,    S_BUTTON_3 + S_BUTTON_ACTION_INITIAL_PRESS, "Off middle press" },
    { Sensor::ModeScenes,           0x01, 0x0008, 0x01, 1,    S_BUTTON_3 + S_BUTTON_ACTION_HOLD, "Off middle hold" },
    { Sensor::ModeScenes,           0x01, 0x0008, 0x03, 0,    S_BUTTON_3 + S_BUTTON_ACTION_LONG_RELEASED, "Off middle hold stop" },
    // Fourth button On
    { Sensor::ModeScenes,           0x01, 0x0008, 0x02, 0,    S_BUTTON_4 + S_BUTTON_ACTION_INITIAL_PRESS, "On middle press" },
    { Sensor::ModeScenes,           0x01, 0x0008, 0x01, 0,    S_BUTTON_4 + S_BUTTON_ACTION_HOLD, "On middle hold" },
    { Sensor::ModeScenes,           0x01, 0x0008, 0x03, 0,    S_BUTTON_4 + S_BUTTON_ACTION_LONG_RELEASED, "On middle hold stop" },
    // Fifth button Off
    { Sensor::ModeScenes,           0x01, 0x0300, 0x4c, 1,    S_BUTTON_5 + S_BUTTON_ACTION_DOUBLE_PRESS, "Off bottom press" },
    { Sensor::ModeScenes,           0x01, 0x0300, 0x4b, 1,    S_BUTTON_5 + S_BUTTON_ACTION_HOLD, "Off bottom hold" },
    { Sensor::ModeScenes,           0x01, 0x0300, 0x4b, 0,    S_BUTTON_5 + S_BUTTON_ACTION_LONG_RELEASED, "Off bottom hold stop" },
    // Sixt button On
    { Sensor::ModeScenes,           0x01, 0x0300, 0x4c, 3,    S_BUTTON_6 + S_BUTTON_ACTION_DOUBLE_PRESS, "On bottom press" },
    { Sensor::ModeScenes,           0x01, 0x0300, 0x4b, 3,    S_BUTTON_6 + S_BUTTON_ACTION_HOLD, "On bottom hold" },
    { Sensor::ModeScenes,           0x01, 0x0300, 0x4b, 0,    S_BUTTON_6 + S_BUTTON_ACTION_LONG_RELEASED, "On bottom hold stop" },

    // end
    { Sensor::ModeNone,             0x00, 0x0000, 0x00, 0,    0,                                           nullptr }
};

I will create a pull request from the code which i have and maybe somebody can help me to fix the issues which are still present. At least i think this goes in the right direction and the switches are already slowly usable.

Once again thanks @ebaauw I would not come that far without your help 👍

  1. The switches share the same vendor group with VENDOR_115F. I suspect this might be causing some of the issues.

I don't think so. It's just one of the attributes to identify the device.

  1. Sometimes in the config temperatures come up in the rest api. Even i blacklisted it in the database.cpp...

Does the switch send a Xiaomi special attribute report (attribute 0xff01 or 0xff02) in the _Basic_ cluster)? In that case, it reports its internal temperature, probably together with the battery voltage. You should see a message "extract Xiaomi special attribute" in the deCONZ log.

  1. The 4 button switch does not have a hold button event. No matter which button i hold, there always comes just a single press one.

It really depends on what ZigBee commands the switch sends. Only a _Move_ comes with a corresponding _Stop_; a _Step_ or _Move to Level_ doesn't.

  1. Also the 6 button switch for holding sends a hold event when i hold the button and a release event when i release it. No matter if i hold the left or right button, on release always the same event comes, there is no difference between left or right release.

Looks like the wrong param in the button map. Note that the switch sends the same _Stop_ command when long releasing _Off_ or _On_. The REST API plugin remembers the direction from the previous _Move_ in sensor->previousDirection to know which x003 event to send.

  1. Also the 6 button switch for holding sends a hold event when i hold the button and a release event when i release it. No matter if i hold the left or right button, on release always the same event comes, there is no difference between left or right release. Is that ok like that? Also the hold and release for the 5th and 6th button does not work, even that the map is correct.

I don't understand the code to handle param for _Move Color Temperature_ command. It's there for the dresden elektronik Lighting switch. For the sunricherCCTMap I put in some debug statements to see what the value of param would be, and put those values in the button map. It seems to work, even though I'm not sure why. See my remark in https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1509#issuecomment-530545504.

  1. The 4 button switch does not have a hold button event. No matter which button i hold, there always comes just a single press one.
  2. The 6 button switch doe snot have a double press event. Here no matter where i double press always a single press comes.

I hade both 4 button and 6 button and when i tried them to an Aqara hub both singel, double and hold work on all buttons within Aqara app and in HomeKit. So i guess they should work that way in Deconz aswell.

Were you able to sniff what commands they send?

I don't think so. It's just one of the attributes to identify the device.

Yes, but there are some checks in the code for that group id VENDOR_115F which do some additional stuff which i do not understand.

Does the switch send a Xiaomi special attribute report (attribute 0xff01 or 0xff02) in the Basic cluster)? In that case, it reports its internal temperature, probably together with the battery voltage. You should see a message "extract Xiaomi special attribute" in the deCONZ log.

I did not see such message in the console. The temperature value always stays nullwhen it shows up in the config.

It really depends on what ZigBee commands the switch sends. Only a Move comes with a corresponding Stop; a Step or Move to Level doesn't.

The commands which are send i mapped in the button map, nothing else comes up in the the debug log.

Looks like the wrong param in the button map. Note that the switch sends the same Stop command when long releasing Off or On. The REST API plugin remembers the direction from the previous Move in sensor->previousDirection to know which x003 event to send.

So how should i map this in the button map? Like you said the same _Stop_ command comes from the switch no matter which button i release so i always get _On middle hold stop_ in the debug log.

I don't understand the code to handle param for Move Color Temperature command. It's there for the dresden elektronik Lighting switch. For the sunricherCCTMap I put in some debug statements to see what the value of param would be, and put those values in the button map. It seems to work, even though I'm not sure why. See my remark in #1509 (comment).

Me neither :) So there needs to be a special handling for that in the case of the Aqara Opple?

You can by the way have a look at the pull request and see if there is something which you notice might be wrong...

When will Aqara OPPLE switches supported in deconz?
Next release?

The initial support is included in #2239
I already have a custom build of that code running on my machine and they are working fine with some minor issues. We just need to wait till @manup merges my pull request...

Thank you very much to everybody who did make this integration happen so quick. I'm ready to press the order button to receive some of them switches!!

I already have a custom build of that code running on my machine and they are working fine with some minor issues.

Nicely done! What are the remaining minor issues?

It might happen sometimes that they do not pair on the first try(but that maybe is just related to my development environment).
Also the 4 button switch for some reason does not have a hold event and the 6 button one is missing the double press event.
Besides that they are working fine and i use them daily without any other issues.

It might happen sometimes that they do not pair on the first try(but that maybe is just related to my development environment).
Also the 4 button switch for some reason does not have a hold event and the 6 button one is missing the double press event.
Besides that they are working fine and i use them daily without any other issues.

on zigbee2mqtt 6 button version also have only one click event, so maybe it's made by Xiaomi intentionally?

Someone mentioned here that with the Aqara hub all the events are on all 3 switches, so i am not sure about that.

button one is missing the double press event.

According to this review: https://homekitnews.com/2019/12/04/aqara-opple-smart-switch-review/

It appears that double clicks should be available for the 6 button version, at least if used with an xiaomi hub. Is it possible that the switch senses what coordinator is used and limits functionality if a xiaomi hub is not used?

Someone mentioned here that with the Aqara hub all the events are on all 3 switches, so i am not sure about that.

Yes i have tested 4 button + 6 button version with the Aqara hub and single press, hold press and double press works on all buttons. Can both be configured in Xiaomi/Aqara Home app or in HomeKit. Maybe a zigbee sniffer can solve this question?

Yes, someone would need to sniff the zigbee communication of those switches with the Aqara hub. As far as i saw there are even no packets arriving to deconz indicating that there was a double click on the 6 button switch.
So someone with an Aqara hub and those switches would need to sniff the traffic...

I'm no expert on zigbee.
But to change code for Deconz to add a devices is 1980.

It been great if is possible to import a file into Deconz that contains support and explain/info for new devices that deconz supports.

That is true, i think for this reason they want to work on a REST API v2, which should make it easier to add new devices.

Yes, someone would need to sniff the zigbee communication of those switches with the Aqara hub. As far as i saw there are even no packets arriving to deconz indicating that there was a double click on the 6 button switch.
So someone with an Aqara hub and those switches would need to sniff the traffic...

Great that you have added this device merdok! :)
I saw manup have approved the pull request now. Great news :)
Since I am no coder my self but I have both the Aqara hub and the Opple switches. I can buy a sniffer and post the logs if you or someone else is willing to try make some use of it?

I mean if you already have a conbee stick then you can use that to sniff the traffic.

I mean if you already have a conbee stick then you can use that to sniff the traffic.

I have a Conbee II and as far i have understod it have no support for Wireshark yet. I fully understand that the sniffer logs can turn out nothing useful. Still, i will order a sniffer today and report back here with logs. Since i have these Opple switches in a box waiting to be installed and integrated in my whole house I can not stand out not knowing why all the buttons events works in Aqara but not in deconz. :)

True, the support for Conbee 2 should come this year...
But that would be great if you could sniff the traffic, would definitely help with the missing stuff.

True, the support for Conbee 2 should come this year...
But that would be great if you could sniff the traffic, would definitely help with the missing stuff.

I did order a CC2531 with debugger/programmer yesterday. I will report the logs here once it arrives.

Perfekt 👍

hi All - amazing progress on this so far :-) .
can someone post here a compiled rest API for ubuntu with the opple support? I tried compiling with the instructions in the main page and cant get the first command (sudo apt install deconz-dev) - cant find deconz-dev....

I think you should be patient a little bit more, i am sure @manup will publish a new release soon :)

:sob: but I want it now :grin:
I want to update the domoticz python plugin to create and support it, but I"ll be patient.

So i have sniffed the traffic between the Aqara hub and the 6 buttons + 4 buttons Opple switches.
The differences i have noticed is that:
Single click:
"Uint16: 1 (0x0001)"
Double click:
"Uint16: 2 (0x0002)"
Hold:
"Uint16: 0 (0x0000)"
Release hold:
"Uint16: 255 (0x00ff)"

I do not think you will need logs for all the buttons since the only value that change is "Source endpoint" only tell if it is button 1, 2, 3, 4, 5 or 6.
The following logs will be for button 1.

6 button single click:

Frame 1072: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface \\.\pipe\zboss_sniffer, id 0
ZBOSS dump, IN, page 0, channel 11
IEEE 802.15.4 Data, Dst: 0x0000, Src: 0xa6cd
ZigBee Network Layer Data, Dst: 0x0000, Src: 0xa6cd
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 1
    Frame Control Field: Data (0x00)
        .... ..00 = Frame Type: Data (0x0)
        .... 00.. = Delivery Mode: Unicast (0x0)
        ..0. .... = Security: False
        .0.. .... = Acknowledgement Request: False
        0... .... = Extended Header: False
    Destination Endpoint: 1
    Cluster: Multistate Input (Basic) (0x0012)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 158
ZigBee Cluster Library Frame, Command: Report Attributes, Seq: 137
    Frame Control Field: Profile-wide (0x18)
    Sequence Number: 137
    Command: Report Attributes (0x0a)
    Attribute Field, Uint16: 1
        Attribute: Present Value (0x0055)
        Data Type: 16-Bit Unsigned Integer (0x21)
        Uint16: 1 (0x0001)

6 button double click:

Frame 1083: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface \\.\pipe\zboss_sniffer, id 0
ZBOSS dump, IN, page 0, channel 11
IEEE 802.15.4 Data, Dst: 0x0000, Src: 0xa6cd
ZigBee Network Layer Data, Dst: 0x0000, Src: 0xa6cd
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 1
    Frame Control Field: Data (0x00)
        .... ..00 = Frame Type: Data (0x0)
        .... 00.. = Delivery Mode: Unicast (0x0)
        ..0. .... = Security: False
        .0.. .... = Acknowledgement Request: False
        0... .... = Extended Header: False
    Destination Endpoint: 1
    Cluster: Multistate Input (Basic) (0x0012)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 160
ZigBee Cluster Library Frame, Command: Report Attributes, Seq: 139
    Frame Control Field: Profile-wide (0x18)
    Sequence Number: 139
    Command: Report Attributes (0x0a)
    Attribute Field, Uint16: 2
        Attribute: Present Value (0x0055)
        Data Type: 16-Bit Unsigned Integer (0x21)
        Uint16: 2 (0x0002)

6 button hold:

Frame 1086: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface \\.\pipe\zboss_sniffer, id 0
ZBOSS dump, IN, page 0, channel 11
IEEE 802.15.4 Data, Dst: 0x0000, Src: 0xa6cd
ZigBee Network Layer Data, Dst: 0x0000, Src: 0xa6cd
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 1
    Frame Control Field: Data (0x00)
        .... ..00 = Frame Type: Data (0x0)
        .... 00.. = Delivery Mode: Unicast (0x0)
        ..0. .... = Security: False
        .0.. .... = Acknowledgement Request: False
        0... .... = Extended Header: False
    Destination Endpoint: 1
    Cluster: Multistate Input (Basic) (0x0012)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 161
ZigBee Cluster Library Frame, Command: Report Attributes, Seq: 140
    Frame Control Field: Profile-wide (0x18)
    Sequence Number: 140
    Command: Report Attributes (0x0a)
    Attribute Field, Uint16: 0
        Attribute: Present Value (0x0055)
        Data Type: 16-Bit Unsigned Integer (0x21)
        Uint16: 0 (0x0000)

6 button release hold:

Frame 1088: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface \\.\pipe\zboss_sniffer, id 0
ZBOSS dump, IN, page 0, channel 11
IEEE 802.15.4 Data, Dst: 0x0000, Src: 0xa6cd
ZigBee Network Layer Data, Dst: 0x0000, Src: 0xa6cd
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 1
    Frame Control Field: Data (0x00)
        .... ..00 = Frame Type: Data (0x0)
        .... 00.. = Delivery Mode: Unicast (0x0)
        ..0. .... = Security: False
        .0.. .... = Acknowledgement Request: False
        0... .... = Extended Header: False
    Destination Endpoint: 1
    Cluster: Multistate Input (Basic) (0x0012)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 162
ZigBee Cluster Library Frame, Command: Report Attributes, Seq: 141
    Frame Control Field: Profile-wide (0x18)
    Sequence Number: 141
    Command: Report Attributes (0x0a)
    Attribute Field, Uint16: 255
        Attribute: Present Value (0x0055)
        Data Type: 16-Bit Unsigned Integer (0x21)
        Uint16: 255 (0x00ff)

So the 4 button looks very similar, also all the logs on the first button.
4 button single click:

Frame 1097: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface \\.\pipe\zboss_sniffer, id 0
ZBOSS dump, IN, page 0, channel 11
IEEE 802.15.4 Data, Dst: 0x0000, Src: 0x19bb
ZigBee Network Layer Data, Dst: 0x0000, Src: 0x19bb
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 1
    Frame Control Field: Data (0x00)
        .... ..00 = Frame Type: Data (0x0)
        .... 00.. = Delivery Mode: Unicast (0x0)
        ..0. .... = Security: False
        .0.. .... = Acknowledgement Request: False
        0... .... = Extended Header: False
    Destination Endpoint: 1
    Cluster: Multistate Input (Basic) (0x0012)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 44
ZigBee Cluster Library Frame, Command: Report Attributes, Seq: 33
    Frame Control Field: Profile-wide (0x18)
    Sequence Number: 33
    Command: Report Attributes (0x0a)
    Attribute Field, Uint16: 1
        Attribute: Present Value (0x0055)
        Data Type: 16-Bit Unsigned Integer (0x21)
        Uint16: 1 (0x0001)

4 button double click:

Frame 1099: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface \\.\pipe\zboss_sniffer, id 0
ZBOSS dump, IN, page 0, channel 11
IEEE 802.15.4 Data, Dst: 0x0000, Src: 0x19bb
ZigBee Network Layer Data, Dst: 0x0000, Src: 0x19bb
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 1
    Frame Control Field: Data (0x00)
        .... ..00 = Frame Type: Data (0x0)
        .... 00.. = Delivery Mode: Unicast (0x0)
        ..0. .... = Security: False
        .0.. .... = Acknowledgement Request: False
        0... .... = Extended Header: False
    Destination Endpoint: 1
    Cluster: Multistate Input (Basic) (0x0012)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 45
ZigBee Cluster Library Frame, Command: Report Attributes, Seq: 34
    Frame Control Field: Profile-wide (0x18)
    Sequence Number: 34
    Command: Report Attributes (0x0a)
    Attribute Field, Uint16: 2
        Attribute: Present Value (0x0055)
        Data Type: 16-Bit Unsigned Integer (0x21)
        Uint16: 2 (0x0002)

4 button hold:

Frame 1110: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface \\.\pipe\zboss_sniffer, id 0
ZBOSS dump, IN, page 0, channel 11
IEEE 802.15.4 Data, Dst: 0x0000, Src: 0x19bb
ZigBee Network Layer Data, Dst: 0x0000, Src: 0x19bb
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 1
    Frame Control Field: Data (0x00)
        .... ..00 = Frame Type: Data (0x0)
        .... 00.. = Delivery Mode: Unicast (0x0)
        ..0. .... = Security: False
        .0.. .... = Acknowledgement Request: False
        0... .... = Extended Header: False
    Destination Endpoint: 1
    Cluster: Multistate Input (Basic) (0x0012)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 47
ZigBee Cluster Library Frame, Command: Report Attributes, Seq: 36
    Frame Control Field: Profile-wide (0x18)
    Sequence Number: 36
    Command: Report Attributes (0x0a)
    Attribute Field, Uint16: 0
        Attribute: Present Value (0x0055)
        Data Type: 16-Bit Unsigned Integer (0x21)
        Uint16: 0 (0x0000)

4 button release hold:

Frame 1112: 64 bytes on wire (512 bits), 64 bytes captured (512 bits) on interface \\.\pipe\zboss_sniffer, id 0
ZBOSS dump, IN, page 0, channel 11
IEEE 802.15.4 Data, Dst: 0x0000, Src: 0x19bb
ZigBee Network Layer Data, Dst: 0x0000, Src: 0x19bb
ZigBee Application Support Layer Data, Dst Endpt: 1, Src Endpt: 1
    Frame Control Field: Data (0x00)
        .... ..00 = Frame Type: Data (0x0)
        .... 00.. = Delivery Mode: Unicast (0x0)
        ..0. .... = Security: False
        .0.. .... = Acknowledgement Request: False
        0... .... = Extended Header: False
    Destination Endpoint: 1
    Cluster: Multistate Input (Basic) (0x0012)
    Profile: Home Automation (0x0104)
    Source Endpoint: 1
    Counter: 48
ZigBee Cluster Library Frame, Command: Report Attributes, Seq: 37
    Frame Control Field: Profile-wide (0x18)
    Sequence Number: 37
    Command: Report Attributes (0x0a)
    Attribute Field, Uint16: 255
        Attribute: Present Value (0x0055)
        Data Type: 16-Bit Unsigned Integer (0x21)
        Uint16: 255 (0x00ff)

There is some more tree in the logs, but i do not think that is needed? How ever, if any more logs are needed i will be happy to provide.

Any luck with a sniffer, @addellll? I've got a 6-button version, and think it's acting pretty oddly. I'm not convinced the button map is correct. It's difficult to believe things would be fundamentally different between the Aqara hub and deCONZ. (Edit: Ah, I see your new post just above... timely!)

Good stuff, @addellll

I would seem the Opple is a hybrid, just like the Hue dimmer switch: in sends both commands to control the lights directly as well as reports to inform the coordinator. The use of _Multistate Input_ and _Present Value_ is typical for Xioami, but usually they would advertise the clusters (and endpoints) in the descriptors.

I’m kinda worries that these reports didn’t show up in the deCONZ log. It would be atypical for Xiaomi, but maybe the Aqara hub does some configuration when the switch is paired?

@merdok, best change the buttonmap to look for these reports instead of for the commands, cf the buttonmap for the Hue dimmer switch.

@addellll thanks for that! With this knowledge we can improve the support :)

@ebaauw but i do not see the multistate cluster in the deconz gui on those switches? Will this be a problem?

I don’t think so, but I’m not sure. Maybe that’s why you didn’t see these reports in the log?

I know there’s other devices that don’t advertise all supported clusters. For those, the REST API plugin simply pushes back the missing cluster to the fingerprint, after which the GUI will show them. I suppose a similar approach could be taken for the missing endpoints, but I don’t think I’ve seen that before.

https://github.com/dresden-elektronik/deconz-rest-plugin/blob/10810836905fbcd1e7c9fafcaf386702c9fed41f/de_web_plugin.cpp#L3749

So I just tried to add .push_back(MULTISTATE_INPUT_CLUSTER_ID); in multiply places to the switches but that did not help... The multistate cluster still does not appear in the deconz gui and no events/reports from that cluster appear in the log. Not sure where the issue is.

Me neither, I’m afraid. There’s also the possibility that the sensor needs a special setting before it sends the _Multistate Input_ reports. We would need a sniffer log when pairing the sensor to the Aqara hub to confirm or dismiss that.

Oh, you would add the cluster to the fpSwitch.inClusters while processing the _Basic_ cluster, checking based on the modelId and manufacturercode of the Opple. That should at least be enough for the reports from the first endpoint.

I will provide the pairing logs tonight or tomorrow.

This is a full dump from the second before putting the Aqara hub in pairing mode untill the pairing with the switch was sucessful. Aswell last action is just a single press on the first button.
https://anonfile.com/d9K910P9n4/OppleAqaraPairing_pcapng
Just open it in Wireshark.

Thanks. I see nothing being configured on the Opple. However, the Opple requests the _Node Descriptor_ from the coordinator. I haven't seen devices do that before. Is it trying to figure out (from the _Manufacturer Code_ 0x115F) whether it's joined a network by a Xioami hub? Or is it just to confirm that it can send attribute reports to the coordinator?

@addellll did you already try and pair the Opple with deCONZ, sniffing whether it sends the _Multistate Input (Basic)_ attribute reports to the gateway as well?

Interestingly, the Aqara hub doesn't check the Opple's _Node Descriptor_ nor _Simple Descriptors_. That would suggest that it has hardcoded the fingerprint of each device, based on the _Model Identifier_ and probably the _Application Version_ (as it only queries these _Basic_ attributes). The Oppla sends an attribute report for these two attributes as well.

I do see an attribute report for 0xfcc0/0x00f7 (with manufacturer code 0x115f), which looks suspiciously like the Xiaomi special attribute report, but now encoded as an octec string (type 0x41). The payload seems to decode just fine, though:

  battery    temp         ?   RSSI dB             LQI         ?         ?       ?     on?
--------- ------- --------- --------- --------------- --------- --------- ------- -------
0121 e30b 0328 19 0421 a801 0521 1200 0624 0300000000 0821 1101 0a21 0000 0c20 01 6410 00
   3.043V    25°C  u16  424  u16   18  u40          3  u16  273  u16    0   u8  1   false

I don't think we've seen the 0c tag before. 64 is used for open/closed on the door sensor, for leak on the water sensor, and for on/off for the lumi.ctrl_ln2. 04, 08, and 0a are quite common, but we haven't been able to figure out what they mean.
In summary: we should be able to support config.battery and config.temperature for the Opple.

Can you tell me where the Basic cluster processing is happening? I found something at:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/10810836905fbcd1e7c9fafcaf386702c9fed41f/de_web_plugin.cpp#L3706
but that actually never gets called for any of my devices...

I think we should focus on the Multistate cluster right now and get that to work, after that we can get the temperature and battery from the special attribute

EDIT:
Ok figured out that this is just getting called when pairing the device. So it did get called and i added the multistate cluster into fpSwitch.inClusters but still no luck. No change in the gui and no events/reports arriving...

Full dump running Aqara switch in my deconz with some different button presses. But i am not running the latest source code here with the merged pull. Source ID is 0x4177. I do not know if this is any help...
https://anonfile.com/Z34b69Pdne/OppleDeconz_pcapng

Using deCONZ 2.05.66 with a Conbee (I). I do realize the Opple switches are not supported yet, but I'm wondering why all my zigbee lights (Hue and Tradfri) are switched on/off when pressing a button after pairing the Opple 6 switch. Some sort of breadcast command is being send?

Using deCONZ 2.05.66 with a Conbee (I). I do realize the Opple switches are not supported yet, but I'm wondering why all my zigbee lights (Hue and Tradfri) are switched on/off when pressing a button after pairing the Opple 6 switch. Some sort of breadcast command is being send?

There is no build for this update yet, you need to compile the source code to get it working today, otherwise you need to wait untill @manup make a new build. I am sure it will come soon.

Using deCONZ 2.05.66 with a Conbee (I). I do realize the Opple switches are not supported yet, but I'm wondering why all my zigbee lights (Hue and Tradfri) are switched on/off when pressing a button after pairing the Opple 6 switch. Some sort of breadcast command is being send?

There is no build for this update yet, you need to compile the source code to get it working today, otherwise you need to wait untill @manup make a new build. I am sure it will come soon.

I know :) Just wondering why al my zigbee lights are turned on/off with the current deCONZ release. Is it sending broadcast commands or something?

Yes, the switch sends a broadcast which affects are lights in your zigbee network. This will be fixed as soon as the new version is released.

Yes, the switch sends a broadcast which affects are lights in your zigbee network. This will be fixed as soon as the new version is released.

@merdok - I have written Xiaomi / Aqara device drivers for a different HA system, Hubitat, and I'm wondering how you got around the issue of these switches sending groupcast messages to the _all devices_ group.

Does your deCONZ modification keep the binding to the coordinator but change the assigned group to an empty group on the coordinator?

There is no binding to the coordinator. Xiaomi devices send their reports to the coordinator (NWK address 0x0000) by default.

There are no groups on the coordinator. A ZigBee group is like a multicast address, to which devices subscribe. See the _Cluster Info_ panel in the deCONZ GUI for the (blue) server _Groups_ cluster for details.

In factory new state, the Opple sends broadcast messages to control the lights directly (without interference from deCONZ). When binding the (grey) client _On/Off_ and _Level Control_ clusters to a group, it sends groupcast messages instead. deCONZ eavesdrops on the broadcast/groupcast messages to reverse engineer the button events. When it sees a groupcast, it sets config.group in the sensor resource.

There is no binding to the coordinator. Xiaomi devices send their reports to the coordinator (NWK address 0x0000) by default.

There are no groups on the coordinator. A ZigBee group is like a multicast address, to which devices subscribe. See the _Cluster Info_ panel in the deCONZ GUI for the (blue) server _Groups_ cluster for details.

I am not very well versed in ZigBee networking, but aren't the binding tables stored on and managed by the coordinator?

And which device(s) manages ZigBee groups - the coordinator, routers, end devices, or all three?

In factory new state, the Opple sends broadcast messages to control the lights directly (without interference from deCONZ). When binding the (grey) client _On/Off_ and _Level Control_ clusters to a group, it sends groupcast messages instead. deCONZ eavesdrops on the broadcast/groupcast messages to reverse engineer the button events. When it sees a groupcast, it sets config.group in the sensor resource.

In factory new state, I understood that the Aqara-Opple buttons broadcast messages all nodes (endpoint 0xFFFF), so clusters are bound to that endpoint, right?

If I understand your explanation correctly, the only way the Aqara-Opple buttons can be used is to bind the relevant clusters to a group, and not to the coordinator - so unicast is not possible. And the Aqara-Opple switches must always be configured to control at least one end device directly (as part of a group).

So I wonder how the Aqara hub manages configuration of the Aqara-Opple buttons so that they do not control all lights/switches on the mesh by default after pairing?

but aren't the binding tables stored on and managed by the coordinator?

No, each ZigBee device has its own binding table, that configures per endpoint and cluster where to send messages to. See the section on the _Binding Dropox_ in the GUI user manual, from the help menu.

And which device(s) manages ZigBee groups

A ZigBee group is just a number, not an object to be managed. Each device manages its own membership, that is has its own membership table of groups it listens for. As I said before, this table is managed through the _Groups_ cluster.

endpoint 0xFFFF

That’s the NWK broadcast address, not an endpoint.

so clusters are bound to that endpoint destination, right?

No, as I said it’s hard-coded in case there’s no entry in the binding table.

the only way the Aqara-Opple buttons can be used

No, I never said that. To stop the Opple from sending broadcasts, you need to create bindings from the _On/Off_ and _Level Control_ clusters. Best practice is to a group. The switch doesn’t know nor care wether any lights listen to that group.

to control at least one end device directly

Typically switches control routers; end devices tend to sleep and cannot be controlled, because their radio is powered down (to save the battery).

So I wonder how the Aqara hub manages configuration of the Aqara-Opple buttons so that they do not control all lights/switches on the mesh by default after pairing?

It creates the bindings on the device. And so will the REST API plugin once the switch will be fully supported.

Thanks for your patience, @ebaauw! I understand everything, but I have one more question:

To stop the Opple from sending broadcasts, you need to create bindings from the _On/Off_ and _Level Control_ clusters. Best practice is to a group. The switch doesn’t know nor care wether any lights listen to that group.

Can the bindings be created from those clusters to something besides a group?

The reason I am asking is that I do not use DeCONZ, I use a different HA solution, and am trying to work out the method to get the Aqara-Opple button devices working similar to how the Aqara / Xiaomi button devices work - only sending reports to the coordinator.

See the conversation above. The Opple work differently from all other Xiaomi devices, by controlling the lights directly. In addition to that, it sends reports from the server _Multistate Input_ clusters to the coordinator, again without a binding. Somehow deCONZ doesn’t receive or process these, we’re still figuring out why (probably related to the fact that the Opple doesn’t advertise the _Multistate Input_ clusters nor the other endpoints). You still need to create bindings for the client clusters to stop the Opple from broadcasting the commands.

Note that creating bindings isn’t exposed by the REST API. This is internal to the REST API plugin.

Out of the thread, I am not sure: Is the support for Aqara OPPLE to be expected in the next release?
I do not see any reference "OPPLE" in the commits.

Yes, the initial support will be included in the next release.

Is it already included in the http://deconz.dresden-elektronik.de/raspbian/beta/deconz-latest-beta.deb which was updated on the 14th?

I have test deconz-2.05.73 with Aqara OPPLE switches *4 adn *6 button.
And is possibility to add switches.

Singel press is ok.
But *2 click and Long press is randomize .
Is working on some button.

But I can´t see the switches in phoscon.

The 2 click and long press are different between those switches. This is because we are still struggling to make the correct endpoint available in deconz. We know that there is a Multistate cluster present on the switch but it is not visible in deconz...

Hello, with lasted beta, i've try with success to include 4 buttons and 6 buttons into Phoscon, but not show like you say ostgardh.

4 buttons switch : 1 click ok on 4 buttons, double clicks ok on button 3 and 4, no long clicks
6 buttons switch : 1 click ok on 6 buttons, double clicks not ok, and long click ok on button 3, 4, 5, but on the 6 button the long click return on 5 button release (6001 -> 5003)

I've a question : how to open the switch to change battery ?

Just updated to 2.05.73 - how do i pair the opple switch? Pressing the C button on the back does no do anything, the LED blinks 3 times but deconz does not recognize the switch.

deconz does not recognize the switch

You can't see it in the deconz GUI after it has been paired, and It will not report that it has paired anything when you try to pair it. If you use Home assistant you can vnc into deconz to see if the switch is in the device map.

@mrgreenfr

I've a question : how to open the switch to change battery ?

Maby is help you.
https://homekitnews.com/2019/12/04/aqara-opple-smart-switch-review/
Scroll down to THE SUBJECT OF BATTERY REPLACEMEN

If anyone is interested, I added basic support for Domoticz for the 6 button variant - it works with single pres and double press for the middle buttons. This is pretty great :-)

https://github.com/Smanar/Domoticz-deCONZ/issues/46

Hello, with lasted beta, i've try with success to include 4 buttons and 6 buttons into Phoscon, but not show like you say ostgardh.

4 buttons switch : 1 click ok on 4 buttons, double clicks ok on button 3 and 4, no long clicks
6 buttons switch : 1 click ok on 6 buttons, double clicks not ok, and long click ok on button 3, 4, 5, but on the 6 button the long click return on 5 button release (6001 -> 5003)

I've a question : how to open the switch to change battery ?

Got same issue with 6 button release after long click. Remote return 5003 event instead of 6003.
@merdok Do you a chance to look on issue with sixth button? Thank you in advance.

Is look that zigbee2mqtt has support of Aqara Opple switch
https://www.zigbee2mqtt.io/devices/WXCJKG13LM.html
I try to dig in to zigbee2mqtt code and find how they have solve support of opple..

@bastshoes i know about that issue, will try to solve it when i have some free time
@ostgardh last time i checked their implementation it was pretty close to this one, so i guess they will have the same issues which we have with double click and long press on the 4 and 6 button versions.

I see in the code that the Opple switches don't report the right buttonevent values, so I cannot add support to homebridge-hue.

The x000 (press), x001 (hold), x002 (release), and x003 (release after hold) come from the Hue dimmer switch. When pressing/releasing a button, it sends x000, x002. When pressing, holding, releasing a button, it sends x000, x001, x001, ..., x001, x003.
The Hue bridge doesn't support push notifications, so API clients (like homebridge-hue) need to poll the bridge. The best the bridge is able to handle is once every 2 seconds. This means that API clients are likely to miss the x000 event, and some of the x001 events. Consequently, their logic is based on seeing x002 and x003.

So please make sure every press-(hold)-release sequence of button actions ends with x002 or x003. Do _not_ issue x000 without a corresponding x002 or x003, and do _not_ issue a x001 without a corresponding x003. If a switch only sends a command on press, it needs to be mapped to x002; only if it sends a command on press and one on release, the press is mapped to x000 and the release to x002.

Not sure what exactly you mean by that, i am no expert for the events and just did my development based on the events for other buttons. Did not have any issues since i implemented this (using HomeAssistant). Can you maybe point me to what and where needs to be adjusted exactly?

Also we are still not seeing the Multistate cluster in deconz which i guess is required to add proper Opple support. There are currently events missing which the switches send but do not arrive in deconz because of the not available cluster.

Can you maybe point me to what and where needs to be adjusted exactly?

You want to issue:

  • For Single Press: x002 (S_BUTTON_ACTION_SHORT_RELEASED);
  • For Long Press: x003 (S_BUTTON_ACTION_LONG_RELEASED);
  • For Double Press: 0x004 (S_BUTTON_ACTION_DOUBLE_PRESS).

Only issue a x000 (S_BUTTON_ACTION_INITIAL_PRESS) if it will be followed by a x002 or x003; only issue a x001 (S_BUTTON_ACTION_HOLD) if it will be followed by a x003. That is, if the switch sends different messages for press/hold vs release.

Also we are still not seeing the Multistate cluster in deconz which i guess is required to add proper Opple support

Right after here:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/84cd1b0bdf4e66b5f244cf733c263166129fca62/de_web_plugin.cpp#L3848-L3852
you want to add the following:

else if (node->nodeDescriptor().manufacturerCode() == VENDOR_XIAOMI &&
         modelId.contains(QLatin1String("86opcn01"))) // Aqara Opple switches
{
    fpSwitch.inClusters.push_back(MULTISTATE_INPUT_CLUSTER_ID);
}

That should show the cluster in the GUI and allow for the messages to be logged. I don't know if the switch requires a binding. Typically Xiaomi devices send reporting to the coordinator (NWK address 0x0000) out of the box, but these switches are unlike any other Xioami switches.

To handle the _Multistate Input_ reports, you would need to change
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/84cd1b0bdf4e66b5f244cf733c263166129fca62/de_web_plugin.cpp#L3407
to

else if ((ind.clusterId() == DOOR_LOCK_CLUSTER_ID && sensor->manufacturer() == QLatin1String("LUMI")) ||
         (ind.clusterId() == MULTISTATE_INPUT_CLUSTER_ID && sensor->modelId().contains(QLatin1String("86opcn01"))))

You can do with a single buttonMap for all three switches:

  • ep matches the button (0x01, ... 0x06 for S_BUTTON_1 to S_BUTTON_6; the 2- and 4-button switches simply won't send messages from the higher endpoints);
  • cluster is 0x0012 (_Multistate Input_);
  • cmd is 0x0a (_Report attributes_);
  • param is:

    • 0 for S_BUTTON_ACTION_HOLD;

    • 1 for S_BUTTON_ACTION_SHORT_RELEASED;

    • 2 for S_BUTTON_ACTION_DOUBLE_PRESS;

    • 255 for S_BUTTON_ACTION_LONG_RELEASED.

Thanks! Will check that out over the weekend and see if i can get it to work!

@ebaauw
Tried to add the multistate cluster as per your suggestion but that did not work. The code gets called, since i also added a log there and i see it in the console, but the multistate cluster did still not appear in the gui.
Any other ideas?

Currently i cannot adjust the button map as per your request since the button only sends a S_BUTTON_ACTION_INITIAL_PRESS and that's it. Nothing comes after that. No S_BUTTON_ACTION_SHORT_RELEASED comes.
On some buttons a S_BUTTON_ACTION_LONG_RELEASED comes back. But here also when i hold to long and release then nothing comes again.

I think without making the multistate cluster to work we cannot get proper support for those switches...

Right, I double-checked my lumi.sensor_wleak: indeed the added _IAS Zone_ cluster doesn't show in the GUI, but the messages from that cluster are made available to the REST API plugin.

I do not see any new events or messages after i added the cluster with your code. Nothing really changed.

Did you re-pair the switch?

Yes, i did repair. And as i said i saw the code getting called because i added a log output there and it appeared in the console.

What the uniqueid of the /sensors resource? Does it end with -01-0012?

Unfortunately no:

{
"config": {
"battery": 100,
"group": "7",
"on": true,
"reachable": true
},
"ep": 1,
"etag": "3cecbb01c9daea3e7cdd67424fd87bc5",
"manufacturername": "LUMI",
"mode": 1,
"modelid": "lumi.remote.b686opcn01",
"name": "lumi.remote.b686opcn01",
"state": {
"buttonevent": 2000,
"lastupdated": "2020-03-01T21:01:58"
},
"swversion": "20190730",
"type": "ZHASwitch",
"uniqueid": "04:cf:8c:df:3c:75:b8:b9-01-0006"
}

Hm, that's probably because the _On/Off_ client (out) cluster takes precedence over here:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/69946322ade31ba98f2d0827f3dc7a8fc07a71b5/de_web_plugin.cpp#L4764

Maybe prevent the adding of the client clusters by listing the switches here:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/69946322ade31ba98f2d0827f3dc7a8fc07a71b5/de_web_plugin.cpp#L4290-L4293
After that and re-pairing, it should end in -01-0012.

i saw the code getting called because i added a log output there and it appeared in the console.

Just to double-check, that would be this line?

    fpSwitch.inClusters.push_back(MULTISTATE_INPUT_CLUSTER_ID);

Currently i cannot adjust the button map as per your request since the button only sends a S_BUTTON_ACTION_INITIAL_PRESS and that's it.

The button doesn't send S_BUTTON_ACTION_INITIAL_PRESS. It sends a command on press, which is currently mapped to S_BUTTON_ACTION_INITIAL_PRESS. This command should have been mapped to S_BUTTON_ACTION_SHORT_RELEASED instead, because the button doesn't send another command on release.

Maybe prevent the adding of the client clusters by listing the switches here:

Ok, now the uniqueid ends with -01-0012 but i do not see any new messages or events in the console. The switch works as before, nothing really except the uniqueid changed.

Just to double-check, that would be this line?

Yes, that line.

The button doesn't send S_BUTTON_ACTION_INITIAL_PRESS. It sends a command on press, which is currently mapped to S_BUTTON_ACTION_INITIAL_PRESS. This command should have been mapped to S_BUTTON_ACTION_SHORT_RELEASED instead, because the button doesn't send another command on release.

Oh, so i have to change in the button map from S_BUTTON_ACTION_INITIAL_PRESSto S_BUTTON_ACTION_SHORT_RELEASED ?

Ok, now the uniqueid ends with -01-0012

That's good.

but i do not see any new messages or events in the console.

That's not good. Looking at zigbee2mqtt, it does do some magic to setup the Opple:
https://github.com/Koenkk/zigbee-herdsman-converters/blob/29f6a72d56e6c93e19261e93d2de76fa7da70362/devices.js#L890

The cluster is defined here:
https://github.com/Koenkk/zigbee-herdsman/blob/e7050455cedc7dc8115dc1260989a666515923ed/src/zcl/definition/cluster.ts#L3651

So it writes u8 value 1 to cluster 0xFFC0 0xFCC0, attribute 0x0009, using manufacturer code 0x115f. I bet the Opple needs to hear this magic word to start sending _Multistate Input_ messages.

We do something similar for the Hue dimmer in delayedFastEnddeviceProbe(), somewhere around:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/69946322ade31ba98f2d0827f3dc7a8fc07a71b5/de_web_plugin.cpp#L14171
I'm afraid the file is too large to list on GitHub. I wonder if that's a hint? ;-)

Oh, so i have to change in the button map from S_BUTTON_ACTION_INITIAL_PRESS to S_BUTTON_ACTION_SHORT_RELEASED ?

Yes, please.

So it writes u8 value 1 to cluster 0xFFC0, attribute 0x0009, using manufacturer code 0x115f. I bet the Opple needs to hear this magic word to start sending Multistate Input messages.

That makes sense. But i have completely no idea how to write it to the endpoint with deconz. Could you tell me how and where i have to do it?

We do something similar for the Hue dimmer in delayedFastEnddeviceProbe(), somewhere around:

I cannot find the method delayedFastEnddeviceProbe() implementation in de_web_plugin.cpp, i just see it there getting called twice. Are you sure it is in that file?

Yes, please.

I can do this change, but does it make sense to still adjust it now, since we are getting closer to get the multistate cluster to work?

BTW: do you know how to add proper Home Assistant support? Currently i have to listen for the events from the switch and under Device for the Opple there is just battery listed. Other switches have there all the events listed...

I cannot find the method delayedFastEnddeviceProbe() implementation in de_web_plugin.cpp, i just see it there getting called twice. Are you sure it is in that file?

I’ll need to double-check when I’ll be back at home. As I mentioned, the file is too big for GitHub to display in its entirety. The last couple of 1000s (!) of lines are missing.

I can do this change, but does it make sense to still adjust it now

I agree, let’s focus on getting the _Multistate Input_ working.

BTW: do you know how to add proper Home Assistant support?

Sorry, I neither use nor know HA.

I’ll need to double-check when I’ll be back at home. As I mentioned, the file is too big for GitHub to display in its entirety. The last couple of 1000s (!) of lines are missing.

Oh, right now. I see the method now in my local dev environment.

Ok, so based on zigbee2mqtt we now know what needs to be done to make the multistate cluster work, now we must just find the right location to write the data to the endpoint (on startup i guess).

The right place is in delayedFastEnddeviceProbe(), next to where the Hue dimmer attribute is written. It’s been a couple of years since I wrote that, but afaik it still works. See https://github.com/dresden-elektronik/deconz-rest-plugin/commit/82cdb3b521e3704d2c75b17eb360b334893f7bf5.

So i have added this:

if (sensor->modelId().contains(QLatin1String("86opcn01")))  // Aqara Opple
{
    DBG_Printf(DBG_INFO, "WRITE TO OPPLE \n");
    deCONZ::ZclAttribute attr(0x0009, deCONZ::Zcl16BitBitMap, "mode", deCONZ::ZclReadWrite, false);
    attr.setBitmap((quint64) 0x000b);
    writeAttribute(sensor, sensor->fingerPrint().endpoint, 0xFFC0, attr, VENDOR_XIAOMI);
}

Code gets called when pairing (i see the DBG_Printf in the console), but multistate cluster still not visible in the gui also no new events or messages. What did i do wrong?

Here is some log output:

write manufacturer specific attribute of 0x04CF8CDF3C75B8B9 ep: 0x01 cluster: 0xFFC0: 0x0009
21:11:59:078 add task 248 type 20 to 0x04CF8CDF3C75B8B9 cluster 0xFFC0 req.id 95
21:11:59:079 0x04CF8CDF3C75B8B9 (lumi.remote.b686opcn01) create binding for attribute reporting of cluster 0x0001 on endpoint 0x01
21:11:59:079 discard double entry in binding queue (size: 4) for for 0x04CF8CDF3C75B8B9, cluster 0x0001
21:11:59:079 APS-DATA.request id: 96, addrmode: 0x03, addr: 0x04cf8cdf3c75b8b9, profile: 0x0000, cluster: 0x0021, ep: 0x00 -> 0x00 queue: 1 len: 15 tx.options 0x04
21:11:59:106 APS-DATA.request id: 95, addrmode: 0x03, addr: 0x04cf8cdf3c75b8b9, profile: 0x0104, cluster: 0xFFC0, ep: 0x01 -> 0x01 queue: 2 len: 10 tx.options 0x04

Also searched the whole console for the multistate cluster id references (0x0012) but there is no single entry for that...

The Opple attribute is type u8, so the second argument to the ZclAttribute constructor should be deCONZ::Zcl8BitUint. You need to set it to the u8 value of 1 through attr.setValue((quint64) 1);.

The deCONZ:: classes are from the C++ API that the deCONZ core programme offers to plugins. See the #include files from the deconz-dev package, installed into /usr/include/deconz. The website documenting this C++ API has gone missing...

if (sensor->modelId().contains(QLatin1String("86opcn01")))  // Aqara Opple
{
    DBG_Printf(DBG_INFO, "WRITE TO OPPLE \n");
    deCONZ::ZclAttribute attr(0x0009, deCONZ::Zcl8BitUint, "mode", deCONZ::ZclReadWrite, false);
    attr.setBitmap((quint64) 0x000b);
    attr.setValue((quint64) 1);
    writeAttribute(sensor, sensor->fingerPrint().endpoint, 0xFFC0, attr, VENDOR_XIAOMI);
}

Still nothing. Do I need to leave the hacks from yesterday or do i need to remove them?

Remove the call to setBitMap, just to be sure.

Still nothing...

Double-checked, and triple-checked the zigbee2mqtt sources. It took me a fourth check to see that the cluster is 0xFCC0. My bad.

Heh, i copied that from your comment but even after that i compared it multiply times to the source but did also not notice the mistake...

Ok, so now finally i can see something new.

Multistate cluster and 2 new endpoints appeared in the gui:
Anmerkung 2020-03-02 224625

My old button map does not work anymore.
New events are coming from the cluster 0x0012 (multistate):

APS-DATA.indication srcAddr: 0x4586, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0012, lqi: 255, rssi: -47
22:45:20:520    asdu: 18b00a5500210100
22:45:20:520 Node data 0x04cf8cdf3c75b8b9 profileId: 0x0104, clusterId: 0x0012
22:45:20:524 Force binding of attribute reporting for sensor lumi.remote.b686opcn01
22:45:20:525 no button handler for: lumi.remote.b686opcn01 ep: 0x01 cl: 0x0012 cmd: 0x0A pl[0]: 0x55

Some new stuff like ZCL attribute report:

22:50:10:693 APS-DATA.indication srcAddr: 0x4586, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0012, lqi: 255, rssi: -47
22:50:10:693    asdu: 18b70a5500210200
22:50:10:693 Node data 0x04cf8cdf3c75b8b9 profileId: 0x0104, clusterId: 0x0012
22:50:10:695 Force binding of attribute reporting for sensor lumi.remote.b686opcn01
22:50:10:695 no button handler for: lumi.remote.b686opcn01 ep: 0x01 cl: 0x0012 cmd: 0x0A pl[0]: 0x55
22:50:10:695 ZCL attribute report 0x04CF8CDF3C75B8B9 for cluster: 0x0012, ep: 0x01, frame control: 0x18, mfcode: 0x0000
22:50:10:695    payload: 5500210200

Some of them from endpoint 4 ????

22:54:04:230 Node data 0x04cf8cdf3c75b8b9 profileId: 0x0104, clusterId: 0x0012
22:54:04:233 ZCL attribute report 0x04CF8CDF3C75B8B9 for cluster: 0x0012, ep: 0x04, frame control: 0x18, mfcode: 0x0000

Not sure how to handle those...

Edit now i got 6 new endpoints in the gui, for each button on the remote a endpoint is created. They only appear in the gui when i first time press a button on the remote.

Anmerkung 2020-03-02 225659

The no button handler for: message in the console only appears for the first endpoint, for all the rest i only see ZCL attribute report in the console.

uniqueid in rest api still ends with -01-0006

So I guess now i just need to configure a new button map and it should work. So how do i create a proper button map now with this new data?

Multistate cluster and 2 new endpoints appeared in the gui:
They only appear in the gui when i first time press a button on the remote.

Ah that's true (of course, now I remember); the GUI displays the clusters (not reported in the _Detailed descriptors_) when it sees a message from the device originating from that cluster.

My old button map does not work anymore.

You might want to double-check that the bindings for the client clusters have been created.

However, most likely the switch uses either the client clusters or the _Multistate Input_ server cluster. Maybe writing another value to the magic attribute would change put it in "dual" mode, but I think we should count our blessings and not try to fix what's not broken.

You should however refrain from creating a group for these switches, exposing config.group and setup any client cluster bindings.

Not sure how to handle those...

In the buttonMap.

The no button handler for: message in the console only appears for the first endpoint

Best create new button map first.

for all the rest i only see ZCL attribute report in the console.

And that's what we want to see!

uniqueid in rest api still ends with -01-0006

Make sure not to add the client clusters to the fpSwitch fingerprint, see https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061#issuecomment-593149167.

So how do i create a proper button map now with this new data?

See above, https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061#issuecomment-592617874. I read that the switch also supports triple press with value 3.

You should however refrain from creating a group for these switches, exposing config.group and setup any client cluster bindings.

Sorry, i do not understand that. Could you be more specific?

Make sure not to add the client clusters to the fpSwitch fingerprint, see #2061 (comment).

Doing that i also need to push back the multistate cluster (fpSwitch.inClusters.push_back(MULTISTATE_INPUT_CLUSTER_ID);) or else the switch won't pair, is that ok?

Started a new button map as per your suggestion in an earlier comment:

static const Sensor::ButtonMap aqaraOpple6MapNew[] = {
//    mode                          ep    cluster cmd   param button                                       name
    // First button Off
    { Sensor::ModeScenes,           0x01, 0x0012 , 0x0a , 0,    S_BUTTON_1 + S_BUTTON_ACTION_HOLD, "Off top hold" },
    { Sensor::ModeScenes,           0x01, 0x0012 , 0x0a , 1,    S_BUTTON_1 + S_BUTTON_ACTION_SHORT_RELEASED, "Off top press" },
    { Sensor::ModeScenes,           0x01, 0x0012 , 0x0a , 2,    S_BUTTON_1 + S_BUTTON_ACTION_DOUBLE_PRESS, "Off top double press" },
    { Sensor::ModeScenes,           0x01, 0x0012 , 0x0a , 255,    S_BUTTON_1 + S_BUTTON_ACTION_LONG_RELEASED, "Off top long released" },
    // end
    { Sensor::ModeNone,             0x00, 0x0000, 0x00, 0,    0,                                           nullptr }
};

and that results always with button 1001 Off top hold being triggered no matter if i do single press, double press, triple press, hold or release.

Pressing the other buttons still does not result in no button handler for: appearing the console...

Below are the messages for each event.

Single press:

23:50:12:401 APS-DATA.indication srcAddr: 0xc394, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0012, lqi: 255, rssi: -49
23:50:12:401    asdu: 180d0a5500210100

Double press:

23:50:14:214 APS-DATA.indication srcAddr: 0xc394, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0012, lqi: 255, rssi: -49
23:50:14:214    asdu: 180e0a5500210200

Triple press:

23:50:15:696 APS-DATA.indication srcAddr: 0xc394, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0012, lqi: 255, rssi: -49
23:50:15:696    asdu: 180f0a5500210300

Hold:

23:52:53:785 APS-DATA.indication srcAddr: 0xc394, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0012, lqi: 255, rssi: -50
23:52:53:785    asdu: 18100a5500210000

Release:

23:52:54:568 APS-DATA.indication srcAddr: 0xc394, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0012, lqi: 255, rssi: -50
23:52:54:568    asdu: 18110a550021ff00

The only change between those messages is the last payload part, and seems to be exactly like you said but still always only button 1001 Off top hold appears in the console.
For the other buttons only the APS-DATA indication appears on the console and button xxxx even that i adjusted the button map.

Sorry, i do not understand that. Could you be more specific?

Do not call checkSensorGroup() nor checkSensorBindingsForClientClusters() nor sensor->addItem(DataTypeString, RConfigGroup);

Doing that i also need to push back the multistate cluster

Yes, that needs to stay.

and that results always with button 1001 Off top hold being triggered no matter if i do single press, double press, triple press, hold or release.

Can you list the code you changed here:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/84cd1b0bdf4e66b5f244cf733c263166129fca62/de_web_plugin.cpp#L3407

Pressing the other buttons still does not result in no button handler for: appearing the console...

Did you add the entries for the other endpoints to the buttonMap?

Do not call checkSensorGroup() nor checkSensorBindingsForClientClusters() nor sensor->addItem(DataTypeString, RConfigGroup);

got it! I removed my calls tocheckSensorGroup() and checkSensorBindingsForClientClusters(). This sensor->addItem(DataTypeString, RConfigGroup); i never added. The switch still works but the config.group is still present in the rest api.

I have also removed checkClientCluster = true; Is that ok?

Can you list the code you changed here:

Did not change anything there.

Did you add the entries for the other endpoints to the buttonMap?

Yes, i did. What is interesting, for the other buttons not even the method checkSensorButtonEvent() is called. I just placed a log output there and it prints in the console for the button with the endpoint 1 but for all other it does not print my log so it is never called...

What is interesting, for the other buttons not even the method checkSensorButtonEvent() is called.

There’s always one more place to whitelist... You need to whitelist the switches here, to search for them using endpoint 01.
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/c69b8323051a90dd78035025ffe174df7370f440/de_web_plugin.cpp#L715-L718

Did not change anything there.

You should have, see https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061#issuecomment-592617874 above, just before the buttonmap.

Note that you can use the same buttonmap for all three switches.

I have also removed checkClientCluster = true; Is that ok?

Think so.

There’s always one more place to whitelist... You need to whitelist the switches here, to search for them using endpoint 01.

So basically something like that if i understand you correctly?

else if (sensorNode->modelId().contains(QLatin1String("86opcn01")))
{
    sensorNode = getSensorNodeForAddressAndEndpoint(ind.srcAddress(), 0x01);
}

You should have, see #2061 (comment) above, just before the buttonmap.

Oh sorry, somehow i missed that.

Will add the missing code today at the evening and try it out.

Think so.

I guess since we now got the multistate cluster to work some of the previous code that i added is not required anymore so i want to try to keep it as clean as possible...
Is it ok that the config.group still appears in the rest api? Does the switch still need to be in a group now that the multistate cluster is active or is that not required anymore?

So basically something like that if i understand you correctly?

Yep.

Oh sorry, somehow i missed that.

As I said, there’s always one more place...

Is it ok that the config.group still appears in the rest api?

No, it’s not ok, since the switch now doesn’t send any commands to control lights in that group. You might want to delete the resource and re-pair the switch, to double-check if config.group is still created. It’s probably a leftover from before writing the special attribute.

Ok, now all the button presses go inside the checkSensorButtonEvent() so that would be solved.

But now after adding inside the checkSensorButtonEvent() method:

else if ((ind.clusterId() == DOOR_LOCK_CLUSTER_ID && sensor->manufacturer() == QLatin1String("LUMI")) ||
         (ind.clusterId() == MULTISTATE_INPUT_CLUSTER_ID && sensor->modelId().contains(QLatin1String("86opcn01"))))

all button presses display no button handler for: even that the button is correct and adjusted per your suggestion.

Did you check with a debug print that the then-block for that if gets executed?

Yes, it gets called. It even gets called 5 times per one button press.

EDIT: Sorry, i just noticed that i am at the wrong if block...

Ok, the switch works perfect now 👍 All the events arrive and are properly handled. I think we got it!
config.group is also not present anymore in the rest api!
Let me check the 4 and 2 button variants and i think it's done.
I would prepare a pull request afterwards. It would be good if you could have a quick look it and check if everything is fine, especially regarding the homebridge plugin update.

I think we got it!

Cool!

Let me check the 4 and 2 button variants and i think it's done.

Just use the same buttonMap; they simply won't send reports from the higher endpoints.

One more small thing which i have just noticed regarding the config.group in the rest api. So when i initially pair the switch then config.group appears in the rest api and then after i restart deconz it is gone. Do you know why is it like that and how i can prevent that?

So you've got single, double, long (and triple?) clicks working on all the buttons now, @merdok?

Does config.group show with value null? Do you see a websocket notification that config.group's value is changed?

Are you sure you're not doing an addItem(DataTypeString, RConfigGroup) for the sensor node?

@ebaauw No, there is a group number and this group is actually created.
The interesting is that under the /groups endpoint i see that new group and the switch is a member of that group.
After i pair the switch and restart deconz, the switch does not have the config.group property anymore, but the group under the /groups endpoint still exists and the switch is still a member of that group there.

No, I do not call and never called (even in my first implementation) this addItem(DataTypeString, RConfigGroup)

I think maybe it runs into another if block where this is called... but where?

@jdberry correct, all events work! Single, Double, Triple, Hold, Long Release

@ebaauw
Ok, never mind. Found the place where the group was created. It was in bindings.cpp

There is also currently this code block in bindings.cpp:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/c69b8323051a90dd78035025ffe174df7370f440/bindings.cpp#L2482-L2489

Should i also add the MULTISTATE cluster there now that it works?

It was in bindings.cpp
Should i also add the MULTISTATE cluster there now that it works?

Most Xiaomi devices (if not all) send reports to the coordinator out-of-the box. No need to create any binding for these devices. You introduced them for the Opple because it controls lights directly through these client clusters by default. Now that we have the _Multistate Input_ cluster working, all references to the Opple need to be removed from bindings.cpp (assuming it will report the battery to the coordinator out-of-the box as well). Also, make sure none of the methods from bindings.cpp are called for the Opple. See https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061#issuecomment-593671487.

When do i know that it reports the battery to the coordinator? I removed all references to the Opple switches in bindings.cpp and everything still works except the battery in the rest api now shows null, i need to manually press the read button on the power configuration cluster in the deconz gui for it to update to 100.

EDIT: I currently left the battery voltage binding in the bindings.cpp file for the switch, without this i get the value nullfor battery in the rest api.

EDIT: I currently left the battery voltage binding in the bindings.cpp file for the switch, without this i get the value null for battery in the rest api.

I might not be needed, but it wouldn't do any harm, I suppose. config.battery typically shows null until the first report arrives. I wouldn't be surprised if setting up the reporting triggers a first report.

I've ordered a six-button Opple; some kind folk here donated some money to me. Once I can sniff it's traffic, it'll be easier to check wether the configuration is needed. It will be a couple of weeks before it arrives, though...

Ok cool 👍
I submitted the pull request with the improved support. Everything seems to work fine! If you have time just quickly look over it and check if I missed something.

Amazing work @merdok and @ebaauw!!

Amazing work @merdok and @ebaauw!!

Agreed! Thanks, both of you, for putting the work into figuring this out!

I just set up my first 6 button opple switch, and I'm wondering if I'm the only one with this problem, but I haven't seen it anywhere else in my searches.

Looking at the events, I get events 1000, 2000,3000,4000,5000,and 6000 for a single press of the corresponding buttons, which is great. Holding buttons 1 or 2 give me the same corresponding events (1000 and 2000) however buttons 3-6 give me a hold code of (button 3 example)3001, and 3003(on release). double press on any of the 6 buttons just gives me the single press event, and triple press does no events on all 6 buttons.

Is this known behavior/logged somewhere already, or am I the only one with this behavior? I also threw a debug node on the deconz component in node red searching for events but there are no changes there either, same results as above with Home Assistant.

Thanks in advance

You need to compile REST API plugin yourself (see README) or wait for the next release with these changes.

@jsnyde30 this is the old implementation. For the new improved support use deconz v2.05.75 beta or wait for the next official release.

thanks merdok! Sorry if I missed that in the notes.

You need to compile REST API plugin yourself (see README) or wait for the next release with these changes.
@ebaauw
Readme is quite short for installing the dev enironment:
sudo apt install deconz-dev

Where is the package repository located? Tried on my raspi, does not find the package deconz-dev.
The best hint I got by searching was :
wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-latest.deb
which does not resolve.
Are further instructions on contribution for this project?

Just upgraded to 2.05.75 and now my opple remote do not send button events. I've deleted switch and paired it again. It didn't help. Still no events. I've lost group the is created for remote.

Just upgraded to 2.05.75 and now my opple remote do not send button events. I've deleted switch and paired it again. It didn't help. Still no events. I've lost group the is created for remote.

Did you remove, then re-associate, the switch to your network?

Did you remove, then re-associate, the switch to your network?

Yes. I've removed remote and than walked throgh pairing process.

Same here. in 2.04.74 i did manage to get button events (single press) but with the 2.04.75 the switch does nothing. Already re-paired it, it is now showing up in the gui but does not send any states.

@raddi
Same for me.
Update to 2.04.75, have remove device. But is not sending any states..

FYI..
If I press other devices button I can see blue button flash in GUI.
But not for the Aqara OPPLE I have add...

Will check this out today at the evening. Maybe something went wrong with the merge...

Ok, i see a place where something went wrong while @manup was merging the commits.
I will need to submit a new pull request to fix that.

Stopped working here too after the update

Submitted a fix: #2561

Just to confirm, got the latest source with my fix, compiled, tested and everything works fine. The switches appear in the UI and all events work!

@merdok I just compiled the PR and tested here with a brand new 6-button Opple. To pair, I went to the old webUI and used "open network". I then held the button on the back until the LED blinked. I then pressed each button once.

It seems the top button now is an "all on"/"all off" control, as all my lights switch on or off when pressing it. I've checked the REST API, but I can't seem to find it there at all (but I might be using the REST API wrong...)?

I currently don't have access to the deCONZ UI (desktop)...

Any ideas? Might as well be a PEBCAK, for sure...! :P

Never tried pairing with the old webUI. I would recommend that you try with the Phoscon app.

Ok, so I went into the desktop app and deleted it from there, but my lights still react to it...
Tried to add it again by going to "add sensor" in Phoscon, but the "ready"-button doesn't become clickable. Same when going to "add switch". Am I doing it wrong?

Delete the switch before pairing it again.

I did. Went into the deCONZ desktop app, selected the node and pressed "delete". The node then disapeared.

EDIT:
Seems it got re-added now, I'll check to see if it's working better now. :)

"39": {
"config": {
"battery": 100,
"on": true,
"reachable": true
},
"ep": 1,
"etag": "190c1c15c8c64eea05ce4a20bad3a8b6",
"manufacturername": "LUMI",
"mode": 1,
"modelid": "lumi.remote.b686opcn01",
"name": "Transmitter 3-gang",
"state": {
"buttonevent": 2002,
"lastupdated": "2020-03-09T21:43:23"
},
"swversion": "20190730",
"type": "ZHASwitch",
"uniqueid": "04:cf:8c:df:3c:77:b5:89-01-0012"
}

Compiled the new commits and it works perfect now. Visible in the Phoscon GUI, works with the Homebridge-Hue Plugin and with the Node-RED Plugin. Thank you very much for your effort and time!

Hello @merdok !

As I understand according to your code changes there will be no group created for opple switch.
It was ussefull to create direct bindings to control lights even if coordinator is down. Any change to keep it?

The group was necessary in the first implementation to be able to control only specific lights, without the group the switch would just control all lights in your zigbee network. As right now the switch is properly supported so the group is not needed anymore. I mean you can still create groups by yourself using the REST API and put the switch in it if this is something that you desire.

I mean you can still create groups by yourself using the REST API and put the switch in it

That won't do any good. We changed the operating mode of the Opple, so that it sends reports to the coordinator, instead of commands to the associated group. This was needed to support the rich button events (press, hold, release, long release, double press, triple press).

Hi Guys

So I undated to 205.75. I have the same problem with no events. Does this mean I need to wait for the next release to get this switch working?

Did you delete the /sensors resource and re-pair the switch?

Thanks for the quick response.
I didn't delete the sensors resource. Will this be in the Phoscon?

but I did re pair, twice

Yeah, I think if you delete the switch in Phoscon, it will delete the resource. If you delete the node in the GUI, however, the resources are left untouched.

I mean you can still create groups by yourself using the REST API and put the switch in it

That won't do any good. We changed the operating mode of the Opple, so that it sends reports to the coordinator, instead of commands to the associated group. This was needed to support the rich button events (press, hold, release, long release, double press, triple press).

OK, got it.

How to I get lates support for Aqara OPPLE?
I only find 2.05.75
http://deconz.dresden-elektronik.de/ubuntu/beta/?C=M;O=D

Wait for next release, or compile deconz yourself from the sources.

thanks will do :)

I still only get the battery level when I link the switch. It also resets all my other lights on connection. When I check the changelog this should not happen. What am I doing wrong? Is 2.05.75 not the version that will give support to the opple switches? Home Assistent is showing the switch as

followed: lumi.remote.b286opcn01
by LUMI

For Home Assistant the deconz integration needs to be updated with Opple support. Till that happens you can listen for events from the Opple switch.

Wait for next release, or compile deconz yourself from the sources.

When the next release is planning?

I do not know that. @manup is doing the releases.

For Home Assistant the deCONZ integration needs to be updated with Opple support. Till that happens you can listen for events from the Opple switch.

That doesn't seem to work here. I used to be able to receive events from the switch with deconz 2.05.74 but since the update to .75 that doesn't work any more:

grafik
Pressing any button on the switch does not yield any event in Home Assistant.


grafik
It seems to be connected in the Phoscon web app...


grafik
... as well as in the GUI.


I already tried to remove the switch in the web interface as well as in the deCONZ GUI but to no avail. Is there anything else I could try?

It was already state here multiple times that 2.05.75 is buggy and you need to wait for the next release or build deconz by yourself from the sources.

Hey guys! Tell me, approximate update dates please? I already got my two 6-button switches, but damn it :)

In my case I compiled from latest master and the switches don't get added. Phoscon is currently showing .75 version. On the GUI they are like this:
image
And on the rest api they are not showing.

@mat1990dj I have the same on .75.
And the switch binds to all Zigbee lights and switches. So pressing the on/off buttons makes all of them go on/off.

Am I maybe compiling wrong? or pairing wrong?
I compiled using:

sudo apt install deconz-dev
git clone https://github.com/dresden-elektronik/deconz-rest-plugin.git
cd deconz-rest-plugin
qmake && make -j2
sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/plugins
and then launched deCONZ as usual.

I deleted both old sensors from rest api, also from GUI with Delete selected Node
I paired doing:
5s press back button
Scan devices / scan switches
Nothing happened

I also compiled it too, and nothing happened for me and for my one homie. So the guys we have to wait until there will be a closer integration of the guys from DE with Mark, or at least if there are dev versions of assemblies. To avoid such situations like with opple...

I don't know how to properly delete the devices, they keep reconnecting automatically :(
image

You need to use the rest api to delete the device and then restart deconz before you try to pair it again. That is how I do it.

I already did that once, but I have three devices that keep coming back and I don't know how to delete them as they no longer appear on the API
image

Try putting it in pairing mode then delete it.

I already did that, they keep pairing like this :(

Hey @mat1990dj I think u got something like this issue, can u confirm it? Ova here: https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2605

Please try it, I think it's not my local issue, or your, something happened after some of updates...

It seems something similar, but I didn't rename the devices. It really seems the old ghost bugs

Try putting it in pairing mode then delete it.

That worked for me!
I have pushed the "c" button (approx. 5s) on the rear and then deleted it. After that the device is no longer displayed.

Thx

Okay, but can u repeat my question with renaming too? Just rename some device via phoscon, then reboot deconz, just interesting about it. Will u have the same problem or not... Thanks in advance.

Try putting it in pairing mode then delete it.

That worked for me!
I have pushed the "c" button (approx. 5s) on the rear and then deleted it. After that the device is no longer displayed.

Thx

Just to be clear,
5s C button, and then delete from deCONZ GUI?
No pairing from phoscon?

This doesn't work for me, they keep coming, they stay without the link line and then I can't pair them correctly again.
image
I don't know how to go from here to paired and use them
I even removed them from zll.db and try to pair them again but they will always come like this

The situation looks as if you just need to reset the stick - but that's not normal. Personally, my opinion this is a consequence of updates, such behavior has not been before. You safely remove, pair again, etc.

I also have a two ghosts at my raspbee...

I have multiple images on my raspberry pi. One for 24/7 running and one for development. So the devices which i bind in development also appear in the deconz gui on my daily running image. But that should not cause any trouble and i never had problems with that.
So why do you want to completely get rid of them?

I don't know how but I got to this situation:
image
One of the switches is paired (although doesn't report any status)
The other one is paired but without descriptor, how to get them? god knows...

Okay, but can u repeat my question with renaming too? Just rename some device via phoscon, then reboot deconz, just interesting about it. Will u have the same problem or not... Thanks in advance.

I have now tried to reproduce your problem.
I am using the ConBee II stick with the version 2.05.75 / 8.3.2020 in Hassio.
I have now renamed a light, a switch and a sensor:
All devices were also renamed directly in Hassio. After that I restarted the deCONZ container. All devices have kept their names. Even after restarting Hassio, I cannot reproduce the problem described.

Try putting it in pairing mode then delete it.

That worked for me!
I have pushed the "c" button (approx. 5s) on the rear and then deleted it. After that the device is no longer displayed.
Thx

Just to be clear,
5s C button, and then delete from deCONZ GUI?
No pairing from phoscon?

This doesn't work for me, they keep coming, they stay without the link line and then I can't pair them correctly again.
image
I don't know how to go from here to paired and use them
I even removed them from zll.db and try to pair them again but they will always come like this

the opple switch was only displayed to me in deCONZ, not in the phoscon GUI.
I had deleted it several times in deCONZ but it kept coming back.
Only after pressing the "C" button for 5 seconds. and then (after approx. 5 minutes) deleting the device in deCONZ, the device has really disappeared permanently.

Just a short pingback - as those buttons are not working on my system and I'm using Docker (due to a really big enviroment with SQL, FHEM, Homebridge etc...) I'd like to ask wehn the next fixed release will be published? Anyone an idee - as I check Github daily ATM...

DE guys is not share any release dates.

Okidoki, thanks. Was just wondering as around a month has passed and lots of issues have been marked as solved - lead me to the hope a release may be near ;)

Yes. as I told before, i never expected an update like now.

Today I received my 6-botton Opple (WXCJKG13LM).
I needed 3xreset before phoscon configured the switch.
After the first reset, the switch was not recognized by phoscon, though wen clicking some of random light were going on and of on button 2.
after the second reset phoscon picked it up and configured the switch as:
image
My enthusiasm went down after I realized that the switch does not generate any channel event in openhab. I am using the openhab deCONZ binding which works fine for the existing.

Before the test a created a new docker container based on today's http://deconz.dresden-elektronik.de/raspbian/beta/deconz-latest-beta.deb

@lukicsl i think this has to be implemented for the openhab deconz integration.
I need to do something similar for home assistant. I already have a commit for the home assistant deconz integration prepared and just waiting for the next official deonz release.

@merdok I just debugged the deconz binding and it seems that no events are generated on the registered websocket

Sorry, i do not know anything about openhab...

@merdok deconz is exposing a websocket where you register for all sorts of events.
Regarding this switch, no events are generated, it seems at least.
https://dresden-elektronik.github.io/deconz-rest-doc/websocket/

Interested to know if we can get this to work with deconz and Homeassistant

I configured in node red a websocket listener:
image
When pressing the buttons on Opple no events are generated!

here nodered definition, change the app-key when using:

flows.json.txt

How should NodeRed get any events if deconz isn't generating them... Problem - deconz is not generating events for those Opple ATM - this is why we're all waing for the next release...

I have used the latest-beta.deb. I thought that this has all the git commits.
If not I have the latest version compiled by myself. I will try this one.

I was able to compile latest version which generated the libde_rest_plugin.so. I copied the libde_rest_plugin.so to /usr/share/deCONZ/plugins.
Unfortunately, this resulted that I was not able to login to Phoscon.
strange was that the VNC server was running so I witnessed that the network was building up.
I stepped back to .75 and waiting for official release.

@lukicsl I have the same result with latest compiled by myself plugin. So.. just wait for the new release.

+1 for integration. Didn't check if they were supported before and was happy, when my switches arrived today.
Too early...

+1 for integration. Didn't check if they were supported before and was happy, when my switches arrived today.
Too early...

Same here.... Hope for an integration very soon... Got 2 of those 6 Button pieces...

Wow, I can't believe it's been 5 months already.

...there are no updates on the horizon. :|

...there are no updates on the horizon. :|

Damn.. Any Idea why there are no Updates coming? Is it such a big problem to integrate those switches? Even My Osram 4 Button isnt working... :-(

I think the updates come slower now due to corona.

Got an information about an upcomining update next days.

I think the updates come slower now due to corona.

Well they should stop drinking 🤣 sorry for that one 🧥

It's a shame. :( @merdok maybe we will try some a develop container? Maybe u need some help with this? :( Damn, I'm already so tired of waiting, just tin.

Got an information about an upcomining update next days.

June... august? :D

Well, feel free to compile on your own ;)

I was not shy and compiled it... u can read the result above. :)

The compiled version should work(I am using it all the time without any issues, all events work), just make sure to re-pair your switches.

When you pair your switches with deconz 2.05.75 and then install any other version without re-pairing the switches then the events will still not work.

@merdok do I have to repair every device or just the opple switches?

I'm trying to compile myself on a raspi 4, but I always get an error:

{standard input}: Assembler messages:
{standard input}:10900: Warning: end of file not at end of a line; newline inserted
{standard input}:11309: Error: unknown pseudo-op: .l' {standard input}:11276: Error: invalid operands (*UND* and .ARM.extab.text._ZN5QListIN6deCONZ16SimpleDescriptorEE13detach_helperEi sections) for-'
{standard input}:11279: Error: invalid operands (UND and .ARM.extab.text._ZN5QListIN6deCONZ16SimpleDescriptorEE13detach_helperEi sections) for `-'
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[1]: * [Makefile.Release:520: release/bindings.o] Error 1
make[1]:
Waiting for unfinished jobs....
make[1]: Leaving directory '/home/pi/deconz-rest-plugin'
make: *
* [Makefile:40: release] Error 2

Just Opple switches.

Here's a thought. Aqara, Opple, Lumi, Xiaomi or what ever they call themselves. One thing I have noticed is although they are zigbee based, the company is not following the standard procedure. With each version they are making it more difficult to integrate their products with using their hub and hence forcing you using their cloud service and collect data about you?

@merdok Marcin could u share please your compiled plugin?

@SAOPP not sure I am allowed to do that...

I'm running hass.io all-in installer, is it correct that I'm not able to compile with this version?

No, Hass uses pre-compiled add-ons, which takes a x days/weeks/months after a new version is re-leased.

@SAOPP not sure I am allowed to do that...

oh, i.e. compiled plugin can't be distributed? :(

Not sure, but it is pretty easy to compile it by itself. It literally take just 5 minutes.

Not sure, but it is pretty easy to compile it by itself. It literally take just 5 minutes.

Did you compile it on raspbian?
I'm getting an error and can't compile

Yes, i did compile it on raspbian, just follow the guide, there is nothing you can make wrong.

I compiled it myself but it totally does not work, see comments above. I am not able to login in phoscon and to REST.

Yes, i did compile it on raspbian, just follow the guide, there is nothing you can make wrong

I did everything exactly like described. But I always get an error:

{standard input}: Assembler messages:
{standard input}:38943: Warning: end of file not at end of a line; newline inserted
{standard input}:39934: Warning: zero assumed for missing expression
{standard input}:39904: Error: invalid operands (UND and .ARM.extab sections) for `-'
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[1]: * [Makefile.Release:577: release/database.o] Error 1
make[1]:
Waiting for unfinished jobs....
make[1]: Leaving directory '/home/pi/deconz-rest-plugin'
make: *
* [Makefile:40: release] Error 2

EDIT: I managed to get it to compile on a new deconz image. switches get recognized as I hoped.

Yes, i did compile it on raspbian, just follow the guide, there is nothing you can make wrong.

I would like to wait for the regular new release. Is there a planned release date for v2.05.76?

There is for sure, but when exactly it gets released only @manup knows!

It's been so long since I bought the switches that I don't even know where I've put them anymore....

I succesfully compiled the plugin without any issue. I could successfully integrate the switch. In Phoscon there is no possibility to link with a light, but events are fired in api (tried with node-red, home assistant and also with the android app hue essentials). I can now link all buttons (short press, long press, multiple press) with groups, lights, etc. in Hue Essentials.

I compiled it too. Everything is working so far with iobroker.

Now i can say that Those oppel Switches are worth every Cent. 😁

So, what is my best solution? I have one switch ready in the babyroom. The day is set on 12th of may. I'm running the easy install hass.io on a raspberry pi 4. Wait and use a Ikea switch till the updates comes? Or reinstall raspbian with home assistent, compile latest build en hope for my knowledge to be enough?

Use stuff that already works, either the ikea or try the phillips hue dimmer. Both are available in most countries and cheap.

Use stuff that already works, either the ikea or try the phillips hue dimmer. Both are available in most countries and cheap.

True but in the Netherlands the Hue dimmer won't fit over the normal rocker. This switch van be placed on the same location where the old rocker was located. That's the beauty :). The plan is to use this switch in every room eventually.

I thought Phillips did a cover to fit over the face plate? They do for the UK.

EDIT: I managed to get it to compile on a new deconz image. switches get recognized as I hoped.

I am able to compile, but the plugin does not get loaded...

20:22:30:985 HTTP Server listen on address 0.0.0.0, port: 80, root: /usr/share/deCONZ/webapp/
20:22:31:008 CTRL. 3.16.220:22:31:340 dev /dev/ttyAMA0
20:22:31:340 ZCLDB init file /root/.local/share/dresden-elektronik/deCONZ/zcldb.txt
20:22:31:436 found node plugin: libde_signal_plugin.so - Signal Monitor Plugin
20:22:31:453 found node plugin: libstd_otau_plugin.so - STD OTAU Plugin
20:22:31:727 dev /dev/ttyAMA0

(There is not line like 20:26:58:519 found node plugin: libde_rest_plugin.so - REST API Plugin, which is there when I use the docker container without modification)

I am using the official docker image, anything that I am missing here?

Edit: Seems I am not the only only with the problem: https://github.com/marthoc/docker-deconz/issues/114

Thanks dev team for the work you're putting into this. Can't wait for this to get tagged and part of the next release. Haven't been able to find another device I like that's close to this 6-gang option.

I was a little disappointed to find out this isn't working yet (purchased it based on the compatibility list in the wiki).

I'm not opposed to running off of the repo, but I'm not sure how (or if) that works with a HassOS/HassIO setup with supervisor.

Guess I'll need to figure that out or wait patiently for a release.

@luke3butler It won't work with the supervisor solution. I'm in the same boat, trying to figure out if I want to reinstall RaspPI with Rasbian and then install Home Assistant.

Same story here: looks like the only device that suits my needs (except than for the ZWAVE aeotec wallmote quad).
But running HAssOS in VM, so nogo for me (and not fond of changing that soon, since the whole house is now running on it)

@annetimdegraaf @bramv101
I think it actually is possible with a little work. Fork the existing supervisor plugin, modify it to build a release off of master, then simply create a new repository on Github here for it and call it "deCONZ-dev" or something.

Once that's in place, anybody could potentially just add the custom repository and migrate to using that if they want to use the unstable channel. Could even allow for manually setting the checkout command to clone and build from.

Edit: I was going to wait and be patient for a release, but when someone says it isn't possible I just have to find a solution 😄
Not sure if I'll follow through with this, but it's definitely possible.

Just ordered a raspbee as I want to my zigbee radio away from my HASS PC.

Is there any howtos on how to compile the latest software, now I have a spare conbee stick. I need to try something out on the opple switch?

@luke3butler

I just released all devices, installed and compiled actual state. But unfortunately none of my opple switches ran stable. As compiling did not generate error messages, I guess there seem to be (at the point I compiled) changes in code which affect stability. Thus, If somebody was able to compile a stable dev version - I agree, it would be nice to exchange her or the data files itself on a share hoster or whereelse...

I got a strange issue. I had two 6x switches connected and shown in the deconz add-on. Pressing buttons etc didn't show any activity in the VNC diagram, so I removed both from within the add-on. Then wanted to add them again as switch. The app didn't find them, and doesn't show them as switches, but it worked somehow:

image

Of course these switches are not presented to HA as switches, rendering them useless.
Any idea what i can do?

EDIT: Reading all posts back it seems I'm neither the first nore the only one. So I guess I have to wait for the next deconz release.

In home assistant, using the deconz integration, all single press-, double press- and hold-events work, but no event for release after hold

In home assistant, using the deconz integration, all single press-, double press- and hold-events work, but no event for release after hold

With the release version at the moment? Version 2.05.75 FW 264A0700 ?
Not working here ... Opple switches are not recognized as switches at all.

Sorry, I meant that the events are recognized if you listen for them in home assistant using "deconz_event" in the developer tools section, which means that you can do automations based on them, but you are correct, no switch entities available yet.

Sorry, I meant that the events are recognized if you listen for them in home assistant using "deconz_event" in the developer tools section, which means that you can do automations based on them, but you are correct, no switch entities available yet.

Did you setup/install anything special for that? I have Deconz supervisor plugin, linked my 6 button device in Deconz, the swich shows up in devices with battery percentage, but I see nothing in the deconz_event log when pressing the buttons :(

First of all you can see all events that is getting triggered by the deconz plugin by going to developer tools -> events (in home assistant), and at the bottom of the page you have a section called 'listen to events'. enter deconz_event in the field 'event to subscribe to' and press start listening.
Now when you press a key on your remote, at the bottom of the screen you will see the events that is getting triggered by the deconz plugin.
For example, a single click of button one gives you an event with id 1002. This is the id you can use as a trigger for turning on a light for example.
You can create these automations by adding an automation as you can see in an entry on this page: https://community.home-assistant.io/t/deconz-switch-configuration/93346/2

An alternative to automations in yaml is to use the node-red plugin for home assistant which is where I have all my automations in home assistant. Node-red is great in so many ways and you can take a look how it works on youtube if you don't know already, for example here https://www.youtube.com/results?search_query=home+assistant+event+trigger+node-red

Which version of Phoscon are you using @joggs ? With the latest version you will not receive any events with the Opple switch in Home Assistant. Hence, many people are now waiting for an update as it will fix the problem.

2.05.75. Isn't that the latest?

That's the latest version, strange. I have a 6-way switch myself and I do not receive any events in Home Assistant.

2.05.75. Isn't that the latest?

Running the same version too but listening for deconz_event events doesn't give any events. Not when pressing the buttons, but also not when triggering motion sensors or toggling lights. Maybe there's a setting that causes these events? @joggs did you add the button to a group in phoscon?

Just fyi, i got to build the new plugin in the docker image. It seems to work. https://github.com/marthoc/docker-deconz/issues/114

I finally managed to do the compilation the right way, before I was doing a mess with having Pi(armhf) and getting the dev package for amd64. The library is now picked up by the container. My detailed instructions are at: docker-deconz/issues/114.

I started the container and was able to login to Phoscon, the REST was also ok. I checked in the running container which library is present. Everything ok as expected.

I removed the switch and tried to add it again. Adding as a switch was not working at all, adding as a sensor worked at first try.

Though I still do not get any event on the REST interface, nada, nothing, nichts.
Pressing any of the buttons I do not see any activity on the LED either:
image

Finally, Finally I have it working.
I deleted multiple times the switch from Phoscon and resetting the switch, no positive result. I was was not renaming the switch in Phoscon. The last try I renamed it, and it picked up working.
I am totally not sure what made it wkn.

2.05.75. Isn't that the latest?

Running the same version too but listening for deconz_event events doesn't give any events. Not when pressing the buttons, but also not when triggering motion sensors or toggling lights. Maybe there's a setting that causes these events? @joggs did you add the button to a group in phoscon?

I just added the opple to deconz and still use the default name for it (Transmitter 3-gang). Not added to any group in phoscon.
In the deconz integration in home assistant I have 'allow deconz light groups' enabled, but that should not matter in this case.
Maybe you can try to reinstall the deconz integration in home assistant

Hi there!

I've noticed an unusual behavior of my opple switches an i have no idea how to resolve it...

Everytime i restart the Raspbery Pi with the Conbee Software installed or the Deconz Adapter in my iobroker the Opple seems to hit the 4 following orders:

1x "Button 1: Release after press = true"
1x "Button 4: Release after press = true"
2x "Button 4: Release after tripple press = true"

The "True" state is not visible for me in the Objects view of iobroker. They stay "false".

That is very big problem because the button "1" turns on my TV, what ist not very nice thing if the raspberry restarts in the middle of the night....

Has anyone similar problems or maybe a clue how to resolve this?

THX!

Finally received the 6-button Opple I ordered March 2nd. It paired without any issues and I see x002, x004, x005, and x001/x003 button events for press, double press, triple press, and hold/release for all 6 buttons. The descriptors are a bit of a mess, but the switch functions nonetheless. Will do some experimenting coming weekend, to see if the switch can be seduced into dual mode, reporting the button events through the _Multistate Input_ clusters and, at the same time, controlling lights through the _On/Off_ clusters.

Has some-one already figured if the battery can be replaced?

Apparently Aqara did not want that the users can easily replace the battery of the Opple switches but nevertheless it is possible to replace the battery with some work.

Thanks, @merdok. Do you need to break open the rockers for that? They seem rather fragile when trying to pry them open.

Yes, you need to take them apart. Did not do it by myself yet but I have seen a guide online.

Got a spare conbee stick now. How do I get this pre-release version? This will be my test platform for future deconz devices on my network.

Do you need to break open the rockers for that? They seem rather fragile when trying to pry them open.

I was curious when I first received the six button switch, @ebaauw, and did find the online directions for how to expose the battery. As I recall it wasn't difficult once I figured out what to do, and I wouldn't hesitate to do it again. I don't remember the procedure exactly, and don't have the switch in front of me. Yes, I did need to pry off the buttons, as I recall, and though I thought I was going to break it in doing so, they ended up coming off fairly easily and smoothly for me. Once that was done, it was trivial to access the battery.

@manup Hi manuel, many of us are waiting for the next release. It seems not possible to manually compile for the supervisor/hassio/home assistant solution. I've been looking at the release dates of previous versions, and this time it seems to take longer. Can you shine some light on the release date of v2.05.76?

Maybe someone who did compile it for Raspberry could you share the files, and we manually copy them to the appropriate locations? Or wouldn't that work.
I personally wouldn't like to put pressure on the devs ... but would like to play with the switches nether the less ;)

Maybe someone who did compile it for Raspberry could you share the files, and we manually copy them to the appropriate locations?

libde_rest_plugin.so (armhf)
for raspi

Thanks, but where is that file located?

/usr/share/deCONZ/plugins/libde_rest_plugin.so

So I tried @lukicsl's file here. It gets picked up and loaded in the container but the behaviour doesn't seem to differ.

I am unable to remove the switch from the list, it reappears immediately when I refresh. It still shuts down all my lights and switches. Trying to pair it doesn't work either. There are no events from the switch in home assistant.

/usr/share/deCONZ/plugins/libde_rest_plugin.so

Thanks but that's not accessible under HASSIO

Of course. You can just extend the official addon:

  1. Download https://github.com/home-assistant/hassio-addons/tree/master/deconz
  2. Copy the deconz folder to your home assistant addons directory (using SMB or SCP)
  3. Modify config.yml and change the name to e.g. deconz-master
  4. Copy libde_rest_plugin.so into the deconz directory.
  5. Change the Dockerfile to
FROM homeassistant/armhf-addon-deconz:5.3.2
COPY libde_rest_plugin.so /usr/share/deCONZ/plugins/
  1. Install your local addon, stop the official deconz and start the new one.

But as I said, it still doesn't seem to work properly.

just arrived an Opple 6 buttons, connected to deconz through the app as a switch, connects but does not return any event to Home Assistant, version 2.05.75

Opple
Opple2
Opple3

@Luke95vl this is a known bug. Wait till next release for the fix

Anyone personally know @manup ?

I hope he's ok, ya know with everything going on. I can't find any activity from him since April 5th, I fear we might be on our own to compile. I use the docker image and can't figure out how to compile and get it working. Anyone successfully do this?

I think there are major changes coming, they just want to make sure the update is stable. There are far too many issues with deconz of late and it's becoming a tad unstable

@djashjones ahh that makes sense.

@djashjones it they are making major changes, it’s a bit odd to not commit any code for 4 weeks. With major changes it’s usually wise to make commits often...

Deconz is not completely open source. The back end code is closed and owned by dresden elektronik. The rest api is open source and maintained by non company coders i.e. volunteers.

If you want the latest and greatest zigbee devices supported in your smart home setup, then zigbee2mqtt is the way to go.

@djashjones I'm 99% sure that @manup works for Dresden.

@svenove If that is the case, WTF is going on!!!!! 🤣

also have this problem with a 2 way switch aqara opple. is there a way to solve it?

Aqara Opple 2-gang doesn't work
Aqara smart wireless switch WXKG11LM 2016 works flawlessly

zigbee2mqtt would work but is more dyi?

I have the 2-gang version of this aqara opple switch(WXCJKG12LM) and I tried pairing it with phoscon and it failed, BUT, when listening for deconz_events in Home Assistant, it shows! It shows as :

{
"event_type": "deconz_event",
"data": {
"id": "lumi_remote_b486opcn01_30",
"unique_id": "04:cf:8c:df:3c:75:c2:25",
"event": 3000
},
"origin": "LOCAL",
"time_fired": "2020-05-08T10:34:52.733044+00:00",
"context": {
"id": "2213df60b1a24be09c93bec99e1b1276",
"parent_id": null,
"user_id": null
}
}

However the switch is nowhere to be seen in the phoscon web app...

two buttons with the same event?

two buttons with the same event?

No, all buttons have different event ids, just wasn’t going to post them all here!

Please, Dresden Elektronik, integrate the Aqara OPPLE devices! We are all eagerly waiting for it!
Is there a feature request area where we can vote?

two buttons with the same event?

No, all buttons have different event ids, just wasn’t going to post them all here!

Different, u mean every time different event from the same button? Or?

two buttons with the same event?

No, all buttons have different event ids, just wasn’t going to post them all here!

Different, u mean every time different event from the same button? Or?

I don't understand you question. The switch works perfectly normally in Home Assistant. I have it switching some lights now. Each button on the switch creates an event in Home Assistant as you would expect: 1000 for button one, 2000 for button two, 3000 for button three and so on. There are also event IDs for holding the buttons too. Just as you would expect. So I am able to make full use of the Opple switch with deconz and Home Assistant. The switch just does not actually appear in the Phoscon web app, so I can't rename it or anything, but that's not big deal.

Exactly. You also have double-click-events. I handle all events from node-red in homeassistant and it works perfectly. I also see the switch in the phoscon app after pairing it as normal from the phosconapp
Capture

I have the 2-gang version of this aqara opple switch(WXCJKG12LM) and I tried pairing it with phoscon and it failed, BUT, when listening for deconz_events in Home Assistant, it shows! It shows as :

{
"event_type": "deconz_event",
"data": {
"id": "lumi_remote_b486opcn01_30",
"unique_id": "04:cf:8c:df:3c:75:c2:25",
"event": 3000
},
"origin": "LOCAL",
"time_fired": "2020-05-08T10:34:52.733044+00:00",
"context": {
"id": "2213df60b1a24be09c93bec99e1b1276",
"parent_id": null,
"user_id": null
}
}

However the switch is nowhere to be seen in the phoscon web app...

I relied on this post. Okay, maybe I wrong understand u. 'kay all works fine.

The README states these switches also support triple press events and 6 different event types in total. Could someone please confirm this?

Yes, in my iobroker setup i can Hit a tripple press Event for each Button.

I am very interested about the new version. I have the WXCJKG11LM and have the same issue as almost everyone else in here. It shows in deconz (by mistake as Dimmer) but not in Phoscon. I saw on deconz log that once it assigned the correct event (button 1000 pushed and so on) and it even showed in Eve both buttons with single/ double and long click. But no events arrived. After deleting the device and rejoining, it says button not mapped. and per default it turns all my lights on and off. in NodeRed I only see the last (buffered) event, but no new events arrive. If any input is required, let me know.

I personally will not experiment any more before a known stable version is out. The problem i have: My 3D printer is behind a zigbee power switch and i forgot it was running when testing the opple switch. And yes of course it turned OFF mid-print ;)
This shall never happen again. I waited so long now (i guess i was among the first ones that received on when i was using zigbee2mqtt at that time), so i can wait another month or two.
If someone want me to debug something I'm happy to help, but until then I leave them as is ...

Okay now I have the four button switch and its in the drawer :(
its shown in phoscon and that's it. no buttonevents shown.

{"config":{"battery":100,"on":true,"reachable":true},"ep":1,"etag":"7e15482cb98d58da8f76543da706a5d9","manufacturername":"LUMI","mode":1,"modelid":"lumi.remote.b486opcn01","name":"Paradies","state":{"buttonevent":null,"lastupdated":"none"},"swversion":"20190730","type":"ZHASwitch","uniqueid":"04:cf:8c:df:3c:77:bb:42-01-0012"}

why its in the list of supported devices?
https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Supported-Devices#supported-wireless-switches

I have experienced the same with the euronics thermostat. it works but its just half supported and the pairing is nothing for everyone.

I can wait, but for some it can be very annoying.

PLEASE STOP ADDING DEVICES TO THE LIST OF SUPPORTED DEVICECES WHICH ARE NOT FULLY SUPPORTED! OR ADD A COLUMN "in development/ under construction/beta /alpha".
The column "issues" is not applicable in this case in my opinion

Hi Lex

Is yours in the supported list? I recently bought one and it has the type code: WXCJKG11LM, which is, as you can see in the supported items, NOT listed.

So what code is on your switch?

From: lex notifications@github.com
Sent: 15 May 2020 09:37
To: dresden-elektronik/deconz-rest-plugin deconz-rest-plugin@noreply.github.com
Cc: mhin76 mail@hinz.ch; Comment comment@noreply.github.com
Subject: Re: [dresden-elektronik/deconz-rest-plugin] Aqara OPPLE switches support (#2061)

Okay now I have the four button switch and its in the drawer :(
its shown in phoscon and that's it. no buttonevents shown.

{"config":{"battery":100,"on":true,"reachable":true},"ep":1,"etag":"7e15482cb98d58da8f76543da706a5d9","manufacturername":"LUMI","mode":1,"modelid":"lumi.remote.b486opcn01","name":"Paradies","state":{"buttonevent":null,"lastupdated":"none"},"swversion":"20190730","type":"ZHASwitch","uniqueid":"04:cf:8c:df:3c:77:bb:42-01-0012"}

why its in the list of supported devices?
https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Supported-Devices#supported-wireless-switches

I have experienced the same with the euronics thermostat. it works but its just half supported and the pairing is nothing for everyone.

PLEASE STOP ADDING DEVICES TO THE LIST OF SUPPORTED DEVICECES WHICH ARE NOT FULLY SUPPORTED!


You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061#issuecomment-629081857 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ALXOFW2O7YLCUNZZL2CBIW3RRTWKPANCNFSM4JLW7MBQ . https://github.com/notifications/beacon/ALXOFW2BBQXYWOQUSLY4KJTRRTWKPA5CNFSM4JLW7MB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEV7QOAI.gif

DAMN! mine is WXCJKG12LM. i learned something about buying zigbee stuff.
sorry for my rant!

what to do next? waiting or selling?

I have the 6 button version since nov last year. Was kinda working before the last update (single press only) then .75 update broke everything. I have various IKEA 5 button remotes and now the hue dimmers. Both worth really well. I have no reason to purchase further opple switches even thou they will be supported. I can purchase Ikea & Philips locally with quick delivery!

I have two switches added and one works (left) and another one has the strange behaviour described that turns on/off everything.
The events are passed to homeassistant on the left one, but the right one not.
(There is no multistate on the right one)
image

@mat1990dj try to reset and repair the switch with the issue.

@mat1990dj try to reset and repair the switch with the issue.

I tried that several times, it keeps coming back without the multistate cluster

Reset the switch, remove it from deconz, restart deconz and then pair again.

Reset the switch, remove it from deconz, restart deconz and then pair again.

It keeps coming without that descriptor, it's really strange, I'm also having issues pairing a 5 button IKEA switch although the dimmer worked perfectly.

@mat1990dj the first time I paired my unsupported switch WXCJKG11LM (after resetting several times because phoscon did not show any success) I suddently saw the switch on my homekit (and Eve) app, with both buttons and actions to be applied for first, second and long click. But no events arrived. After searching the internet I read something about the device name should not have a space in the name. So I renamed it via REST API (bc via deconz renaming does not work and the switch still does not show on phoscon). But renaming did not solve the issue. So I deleted the node via deconz and even deleted any entries in the deconz DB (via SQLIGHT client). After pairing again I noticed that the new name appeared. And from then onwards the switch never again appeared in my homekit (well in meantime I upgraded deconz to 2.05.75 version).
Longstory short: even when you delete a node in deconz incl. DB somehow in the Zigbee Stick (ConBee II) or somewhere else an entry stays. I will wait until this swtich is supported. I saw in the source code of 2.05.75 that few areas are already prepared for this version. Fingers crossed it will be finished soon. :)

Yes, lets hope :)
Thank you

Well, now I am confused. I just read by chance in the release note of 2.05.75 that this switch is supported. But does not work for me. So buggy code? Release note in German:
F1C9700B-15A3-42E1-95FB-B4371EF0F11A

Was working kinda prior to .75 but only a single button press event. Since .75 nothing! So been waiting over 2 months now for a fix.

Why do people not read carefully that 2.05.75 is a beta and should not be used...
I mean if someone installs a beta then of course there will be issues...
2.05.74 has basic support for the Opple switches, full support will arrive with the next release so just be patient.

The problem is (in case of Home Assistant) that most people are running the add-on, which include the 2.05.75 version. Perhaps it is better to indicate clearly with every release that it's a beta or stable release, In Github you can indicate that. (more info)

@klaasnicolaas they do that already. Those without “_stable” is considered beta, I guess. https://github.com/dresden-elektronik/deconz-rest-plugin/tags

Even then there is room for improvement 😉

76 is there! Who's trying first?

Also available for deconz/HomeAssistant. Bumped 19 minutes ago!

Mind you: it seems to be a "beta version" !

@gysman Wooohoo thanks for the info!
Now just waiting for the new docker-image to test it :)

Fyi docker image should be up soon!
https://github.com/marthoc/docker-deconz/pull/225

I just upgraded to the new version. But my Opple 3-gang switch is still not working. Am I dooing something wrong? I have succesfully paired the switch in Phoscon. I can see it as a unit in Home Assistant. But if I lisent for deconz_event it gives me nothing. It was working in one of the previous versions of Deconz - I think it vas 5.3.1

My 6 button switch was successfully paired with Deconz and shows up in the Phoscon app. When I listen to the deconz_event in Home Assistant I see the events of the button presses without any issues.

Not working for me. 6 button version.

{"buttonevent":null,"lastupdated":"none"} complete payload from node-red

update: no events in HA either.

My 6 button switch was successfully paired with Deconz and shows up in the Phoscon app. When I listen to the deconz_event in Home Assistant I see the events of the button presses without any issues.

Are you using Home Assistant?

Yes I do, I mentioned it in my previous post :)

My 6 button switch was successfully paired with Deconz and shows up in the Phoscon app. When I listen to the deconz_event in Home Assistant I see the events of the button presses without any issues.

Do you have any sugestions on what I could be dooing wrong?

My 6 button switch was successfully paired with Deconz and shows up in the Phoscon app. When I listen to the deconz_event in Home Assistant I see the events of the button presses without any issues.

Do you have any sugestions on what I could be dooing wrong?

Not really, but last time when I added a Philips Hue dimmer switch I had to restart my Pi before I saw events in deconz_event

You can also check the GUI through VNC to see if it is added correctly

Also want to mention that I never tried to pair my Opple till 2.05.76, I knew there were problems so I just waited for the working version

When you upgrade to 2.05.76 from 2.05.75 then you need to first completely remove the switches from deconz then restart deconz and then re-pair them with the new version. Without this steps the switches will still not work since you will have the broken pairing in your database from 2.05.75

Try to pair the switch again

reboot and a re-pair works. My device was not added until .76

When you upgrade to 2.05.76 from 2.05.75 then you need to first completely remove the switches from deconz then restart deconz and then re-pair them with the new version. Without this steps the switches will still not work since you will have the broken pairing in your database from 2.05.75

That worked. Thanks a lot :-) I have been waiting for this for so long

I don't see release after hold (x003)
I see it in deconz cluster info (255) but not in HA event.
I have reset switch, removed and rebooted then included the switch again.

I don't see release after hold (x003)
I see it in deconz cluster info (255) but not in HA event.
I have reset switch, removed and rebooted then included the switch again.

No problems here with the 6 buttons.

Event 1 fired 5:27 PM:
{
"event_type": "deconz_event",
"data": {
"id": "lumi_remote_b686opcn01_22",
"unique_id": "xxxxxxxxxxxxxxxxxxxxxx",
"event": 3003
},
"origin": "LOCAL",
"time_fired": "2020-05-23T15:27:08.018072+00:00",
"context": {
"id": "xxxxxxxxxxxxxxxxxxxxxxx",
"parent_id": null,
"user_id": null
}
}

Strange, i also have the 6 button.
Everything else is working 1 2 3 clicks and hold, but not release after hold.
Alright i have to try some more.
Thanks for confirming that it should work.

@mickeman i have the same problem.
In log i see this:

no button handler for: lumi.remote.b686opcn01 ep: 0x06 cl: 0x0012 cmd: 0x0A pl[0]: 0x55

@L3H0
Ok, i have been trying exactly like below once more but it doesn´t help
I´m running deconz in ubuntu under WMware.
I have updated the conbee II to firmware 0x26580700

When you upgrade to 2.05.76 from 2.05.75 then you need to first completely remove the switches from deconz then restart deconz and then re-pair them with the new version. Without this steps the switches will still not work since you will have the broken pairing in your database from 2.05.75

I have added switch 2 times, restart docker with deconz but still the same :/
I don`t upgrade the FW of conbee II, i still have 264A0700

@L3H0
Ok, so it´s not the firmware.
Maybe @merdok could help?

I would but I don‘t see any deb package for installation nor a make file for own compiling. I am not too familiar with github but I used “$ wget http://deconz.dresden-elektronik.de/raspbian/beta/deconz-latest-beta.deb“ to get latest available beta release but that just brings me back 2.05.75
Can you give me a hint?

Am 23.05.2020 um 14:45 schrieb Adrian notifications@github.com:


Fyi docker image should be up soon!
marthoc/docker-deconz#225


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Ok, got newest version installed and repaired my Opple successfully. Now it shows on phoscon and deconz correctly but no event seen on node red on that device unfortunately.

Am 23.05.2020 um 20:52 schrieb Martin Hinz martin@hinz.ch:


I would but I don‘t see any deb package for installation nor a make file for own compiling. I am not too familiar with github but I used “$ wget http://deconz.dresden-elektronik.de/raspbian/beta/deconz-latest-beta.deb“ to get latest available beta release but that just brings me back 2.05.75
Can you give me a hint?

Am 23.05.2020 um 14:45 schrieb Adrian notifications@github.com:


Fyi docker image should be up soon!
marthoc/docker-deconz#225


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

Works, but no long click mapping in Phoscon?
image

@Kroeliemonster: Which firmware ? I have the same problem like mikeman no release information in HA: (I don't see release after hold (x003)), How long did you hold?

@Kroeliemonster: Which firmware ? I have the same problem like mikeman no release information in HA: (I don't see release after hold (x003)), How long did you hold?
Firmware: 26490700
I can hold for a short or longer time and it still gives event x003

I installed Firmware 26490700 for Conbee II and update deConz to 2.05.76 but i still cant see my 4 button switch. In Domoticz i see the same thing. When i delete it from domoticz it will return after restarting my pi.
Capture
I think i have to remove the switch from deConz but how can i do that with deConz in headless mode?

I had 264a0700 and no x003 event and updated to 26580700 and no x003 event in HA.

@Havym: via API? you don't have a web interface? how did you add them?

I get in HA deconz addon log following:

13:22:48:598 no button handler for: lumi.remote.b686opcn01 ep: 0x01 cl: 0x0012 cmd: 0x0A pl[0]: 0x55

HA 0.110.1 deconz .76 CB II 26580700

@Havym: via API? you don't have a web interface? how did you add them?
The first time I added them trough the phoscon app like so many users. The switch wasnt supported then and turned all lights on and off. But the switch is still not visible in phoscon app.
But without deConz Gui i cant delete the switch.

Try in phoscon app -> switch -> add new switch -> other -> press c on opple until it blinks three times -> wait for 30 sec.
If the switch is now in phoscon app, delete it, reboot deconz, and add them again.

Funny thing is.... i tried your way and it showed up in phoscon and i deleted the switch again and restarted deconz. Now i cant connect the switch anymore.
Capture

EDIT: I tried again and it shows up in deconz and in domoticz! Thank you.

I can confirm that after installing the plugin's update and restarting HA I now could add both 6x switches and they all give proper results for 1,2,3x click and release state. GREAT WORK. Thank you.

Now I think I need to find out what the best method is to fill all these possible switches (18 for each hardware switch) with proper actions. What would be the best way to do it? I guess you need to write 18 automations for every event, correct?

Do you have 5 states for each switch? 1 (x002), 2(x004), 3(x005)x click, long press (x001) and release (x003) ? In automation there are five for every state, but the x003 release after long press don't come from deconz.

Hmmm. Strange, I thought x003 was there as well, but can't make it show up now. All others are working fine.

Through node-red I get 1,2,3,4,5. Shame it took 6 months to get this far and it's Beta

I tried HA and node red components but still not receiving the x003 (release) events. I removed the node and I removed the switch from the web interface and re-added it a few times but same results. I'll keep playing with it until someone posts a solution. So far everything else works perfectly though, which is great considering it was a paper weight on my wall for a few months😁

Can you double-check in the GUI if the _Present Value_ attribute (0x0055) of the _Multistate Input_ cluster (0x0012), on the endpoint corresponding to the button, reflects the button actions? It should be 0 for hold, 255 for long release and 1, 2, 3 for single, double, triple press.

@ebaauw

Can you double-check in the GUI if the _Present Value_ attribute (0x0055) of the _Multistate Input_ cluster (0x0012), on the endpoint corresponding to the button, reflects the button actions? It should be 0 for hold, 255 for long release and 1, 2, 3 for single, double, triple press.

In my case i can see all button actions in the GUI like you state above.
But in Home assistant i can only see x001 x002 x004 x005.
I´m running deCONZ in ubuntu and i have updated the Conbee II firmware to 26580700.

@ebaauw

Can you double-check in the GUI if the _Present Value_ attribute (0x0055) of the _Multistate Input_ cluster (0x0012), on the endpoint corresponding to the button, reflects the button actions? It should be 0 for hold, 255 for long release and 1, 2, 3 for single, double, triple press.

In my case i can see all button actions in the GUI like you state above.
But in Home assistant i can only see x001 x002 x004 x005.
I´m running deCONZ in ubuntu and i have updated the Conbee II firmware to 26580700.

Yes, i can confirm. All is visible in VNC GUI.

The only events I'm getting in HA are x001, x002, x004, and x005.
I can use my switch now, which is fantastic! A few missing events is better than no events :-)

Thanks devs, your work is much appreciated.

In my case i can see all button actions in the GUI like you state above.
Yes, i can confirm. All is visible in VNC GUI.

In that case, the x003 button event would have to be issued by the REST API plugin. I don't see how it cannot.

I would start to suspect HA, but since there's also a report about Node-red:

  • Could you please double-check in the API, after hold/long release that state.buttonevent is indeed x003?
  • Could you please double-check with dc_eventlog (included in Homebridge Hue) or with another web socket client that the x003 event is issued on the web socket?

I tried make rule with Hue Essentials (android app) directly with deconz API and that doesn't work with 1003.
1002 for example works like it should.
Screenshot_20200525-001517

@ebaauw Present Value (0x0055) is reporting "255" for long hold release.
It looks like it's reporting "1" for single press (release?), "0" for hold, "2" for double press, "3" for triple press, and "255" for long hold release.

This might be irrelevant, but it also reports 255 after long releasing on the final click of a double or triple press (it still reports 2 or 3 for those events prior to the long release)

Edit: including screenshot
Screen Shot 2020-05-24 at 7 09 21 PM

This might be irrelevant, but it also reports 255 after long releasing on the final click of a double or triple press (it still reports 2 or 3 for those events prior to the long release)

It’s kinda unusual to see a x003 without a preceding x001, but API clients should be able to handle this (when polling the Hue bridge, the x001 even could have been missed). I don’t think it’s relevant for the case of missing/unhandled events.

We really need to determine where the issue lies. As far as we can tell, the switch reports the events alright, reporting 255 for _Present Value_. Next step is to double-check that the API updates state.buttonevent and issues a web socket notification.

Again, I don’t understand how it could for the other values, but not for 255. I would hate to play the “it works for me” card and blindly blame the API clients, so please check this.

In HA AddOn deconz log after pressing button 1 on Opple 6 button (WXCJKG13LM )for 4 sec:

07:51:35:742 button 1001 Off hold
07:51:35:742 ZCL attribute report 0x04CF8CDF3Cxxxxxx for cluster: 0x0012, ep: 0x01, frame control: 0x18, mfcode: 0x0000
07:51:39:719 no button handler for: lumi.remote.b686opcn01 ep: 0x01 cl: 0x0012 cmd: 0x0A pl[0]: 0x55
07:51:39:719 ZCL attribute report 0x04CF8CDF3Cxxxxxx for cluster: 0x0012, ep: 0x01, frame control: 0x18, mfcode: 0x0000

It seems there is no button handler in deconz .76 for x003

Could you run deconz with --dbg-info=2 and capture the asdu payload as well? I think 0x55 might refer to the lsb of the _Present Value_ attribute id (0x0055). The switch sends the same attribute report (command 0x0A) for all actions, only the value in the payload differs.

In my case i followed the steps to add remove, restart and re add, and one of my switches worked perfectly, but the other one still gets added without the multistate input, and does the wierd thing controlling all the lights in the network.

Hope catched all relevant, if you need more let me know...

08:13:16:503 APS-DATA.indication from child 0x3B01
08:13:16:504 verify 0x04cf8cdf3cxxxxxx is child node after 94 s
08:13:16:504 Node data 0x04cf8cdf3cxxxxxx profileId: 0x0104, clusterId: 0x0012
08:13:16:505 0x04CF8CDF3Cxxxxxx: update ZCL value 0x01/0x0012/0x0055 after 0 s
08:13:16:507 button 1001 Off hold
08:13:16:508 Force binding of attribute reporting for sensor OPPLE Schalter 3-fach
08:13:16:508 ZCL attribute report 0x04CF8CDF3Cxxxxxx for cluster: 0x0012, ep: 0x01, frame control: 0x18, mfcode: 0x0000
08:13:16:510 payload: 5500210000
08:13:16:515 Websocket 172.30.32.1:34146 send message: {"e":"changed","id":"66","r":"sensors","state":{"buttonevent":1001,"lastupdated":"2020-05-25T06:13:16.507"},"t":"event","uniqueid":"04:cf:8c:df:3c:xx:xx:xx-01-0012"} (ret = 165)
08:13:16:516 Websocket 172.30.32.1:34172 send message: {"e":"changed","id":"66","r":"sensors","state":{"buttonevent":1001,"lastupdated":"2020-05-25T06:13:16.507"},"t":"event","uniqueid":"04:cf:8c:df:3c:xx:xx:xx-01-0012"} (ret = 165)
08:13:16:517 Websocket 172.30.32.1:34182 send message: {"e":"changed","id":"66","r":"sensors","state":{"buttonevent":1001,"lastupdated":"2020-05-25T06:13:16.507"},"t":"event","uniqueid":"04:cf:8c:df:3c:xx:xx:xx-01-0012"} (ret = 165)
08:13:16:518 Websocket 192.168.76.92:43698 send message: {"e":"changed","id":"66","r":"sensors","state":{"buttonevent":1001,"lastupdated":"2020-05-25T06:13:16.507"},"t":"event","uniqueid":"04:cf:8c:df:3c:xx:xx:xx-01-0012"} (ret = 165)
08:13:16:521 verify neighbor status: APP_SUCCESS (0x00)
08:13:16:521 discard sensor state push for 66: state/lastupdated (already pushed)
08:13:16:544 APS-DATA.indication from child 0x3B01
08:13:16:544 Node data 0x04cf8cdf3cxxxxxx profileId: 0x0104, clusterId: 0x0012
08:13:16:545 0x04CF8CDF3Cxxxxxx: update ZCL value 0x01/0x0012/0x0055 after 0 s
08:13:16:546 Force binding of attribute reporting for sensor OPPLE Schalter 3-fach
08:13:16:546 no button handler for: lumi.remote.b686opcn01 ep: 0x01 cl: 0x0012 cmd: 0x0A pl[0]: 0x55
08:13:16:546 ZCL attribute report 0x04CF8CDF3Cxxxxxx for cluster: 0x0012, ep: 0x01, frame control: 0x18, mfcode: 0x0000
08:13:16:546 payload: 550021ff00

I'm fully lost. There is no code to handle the different values in the payload differently. It works for me:

May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:443 APS-DATA.indication srcAddr: 0xee72, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0012, lqi: 255, rssi: -38
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:443     asdu: 18cb0a550021ff00
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:444 Node data 0x04cf8cdf3c79744f profileId: 0x0104, clusterId: 0x0012
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:444 0x04CF8CDF3C79744F: update ZCL value 0x01/0x0012/0x0055 after 0 s
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:446 button 1003 Off long released
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:446 don't create binding for attribute reporting of sensor Opple
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:446 Force binding of attribute reporting for sensor Opple
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:446 ZCL attribute report 0x04CF8CDF3C79744F for cluster: 0x0012, ep: 0x01, frame control: 0x18, mfcode: 0x0000
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:446     payload: 550021ff00
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:448 Websocket 127.0.0.1:52216 send message: {"e":"changed","id":"7","r":"sensors","state":{"buttonevent":1003,"lastupdated":"2020-05-25T20:17:08.445"},"t":"event","uniqueid":"04:cf:8c:df:3c:79:74:4f-01-0012"} (ret = -1092095048)
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:449 Websocket 127.0.0.1:52260 send message: {"e":"changed","id":"7","r":"sensors","state":{"buttonevent":1003,"lastupdated":"2020-05-25T20:17:08.445"},"t":"event","uniqueid":"04:cf:8c:df:3c:79:74:4f-01-0012"} (ret = -1092095048)
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:451 discard sensor state push for 7: state/lastupdated (already pushed)

I reset and re-paired the Opple, just to be sure. I tried both a Pi 4B under Raspbian buster with ConBee II on v2.05.76 and a Pi 3B+ under Raspbian stretch with RaspBee on v2.05.77.

What platform are you running on? The only explanation I can think of would be a compiler bug.

Just tried v2.05.77 with the 2/4/6 buttons switches and everything seems to work as expected.

The only thing that i am not sure is that when i hold a button for a pretty long time (longer then 6 seconds) then the release event does not come anymore. @ebaauw do you know if it should be like that?

Whether it should be like that I cannot answer, but I experience the same. By the looks of it, the switch no longer sends the release message when you hold it for too long. Not related to the "no button handler" issue.

Ok, thought so too.
About the "no button handler" issue, it is wondering me also why some users get a 0x55 payload instead of 0x255

It's 255 (decimal) or 0xFF.

See the logs above: the payload is for the _Report_ Attributes command 550021xx00, or: 0x0055 - _Present Value_ attribute; 0x21 - data type uint16; 0x00xx the value. The log shows payload[0], which is the first byte, or 0x55; the button handler looks at payload[3], which is the fourth byte, or xx.
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/2a26b78f4139a179968e61aa0e0caf3fd1917162/de_web_plugin.cpp#L3581-L3591

Oh, right. Sorry, already too late... Now i see it. So why does it look at the first byte for some users?

I experienced the same if you hold the button to long, after 6 sec there will be no more message, but the x001 after 1 sec for long press, as shown above.
I use a NUC with virtual box and Home Assistant 0.110.2 (or latest) with AddOn deconz .76 ConBee II 26580700.
The message seems to be send since there is only for long press or verry long press ;-):

08:13:16:546 no button handler for: lumi.remote.b686opcn01 ep: 0x01 cl: 0x0012 cmd: 0x0A pl[0]: 0x55
08:13:16:546 ZCL attribute report 0x04CF8CDF3Cxxxxxx for cluster: 0x0012, ep: 0x01, frame control: 0x18, mfcode: 0x0000
08:13:16:546 payload: 550021ff00

Do you need something else? Let me know.

Thanks a lot for the help!

how to caputre the adsu data ? If I activate --dbg-info=2 I havn't something like this in log:
May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:443 asdu: 18cb0a550021ff00
So which parameter activates this output to log?

Probably --dbg-aps=2. Need to collect and document all of these sometime...

Thank you very much for all your hard work.
I have such a switch for six month now and been reading a lot here.
Just added the switch to homeassistant. Now I have 16 new events to handle...
Thank you very much

But why, one of the best event is not working. It's so sad. ;(

U mean release after hold?

U mean release after hold?

Yes

Release after hold is working... apparently that the switch does not send the release event after more then 6 seconds is an issue with the switch itself.

Release after hold is working... apparently that the switch does not send the release event after more then 6 seconds is an issue with the switch itself.

Nope, it isn't working in HA. Yes the event is available in GUI but this isn't a working solution. You say that is the switch itself working bad but I don't see any issue on zigbee2mqtt with this switch.

It is working in HA. Been using it since i implemented it in March with HA...
Why for some people it isn't working, needs to be investigated.

@merdok: Even the switch is sending this within 6 sec, the release after hold is NOT working in deconz, not in HA, not in NodeRED.

Deconz is NOT sending event x003 for release after hold within 6sec.

I tried this today with three new opple 6 gang buttons and a clean new installion of deconz (.77) with ConBee II 264A0700 and 26580700.

17:45:50:322 APS-DATA.indication srcAddr: 0x0494, srcEp: 0x03 dstAddrMode: 2, profile: 0x0104, cluster: 0x0012, lqi: 255, rssi: -42
17:45:50:322 asdu: 18040a550021ff00
17:45:50:322 APS-DATA.indication from child 0x0494
17:45:50:322 Node data 0x04cf8cdf3c797497 profileId: 0x0104, clusterId: 0x0012
17:45:50:322 Force binding of attribute reporting for sensor OPPLE Schalter 3-fach
17:45:50:322 no button handler for: lumi.remote.b686opcn01 ep: 0x03 cl: 0x0012 cmd: 0x0A pl[0]: 0x55
17:45:50:322 ZCL attribute report 0x04CF8CDF3C797497 for cluster: 0x0012, ep: 0x03, frame control: 0x18, mfcode: 0x0000
17:45:50:322 payload: 550021ff00

The long-press-release issue might be a compiler bug.
I could be wrong, and this theory would have to tested, but it appears to be working on Raspberry Pi (ARM), and not working on x86.

I'm running HA/deconz on a headless PC, and I noticed someone above having this issue is using a NUC. People having success seem to be all using a Raspberry Pi.

Anyone have feedback on what you're running and your success in getting these events?

Edit: I'm not sure how, or if, the code differs for different types of switches, but I do get release events for other switches, just not this Opple (lumi.remote) switch.

could be an explanation, I use an NUC with Win10, VB.
Will try on my rpi3b...

@luke3butler good point. That can be. I also use Raspberry Pi (ARM) and it works.

I have, Deconz in docker on Synology.

For me the x003 event works on a rpi3-something

x003 is NOT working in my setup.
Running on Intel i5 with WMware (ESXI) and Ubuntu Desktop 18.04

RPi3 here with HA and although I only use the release after hold events before the 6secs are done, I have to confirm that after 6 secs the x003 event doesnt find its way to Deconz.

On my RPi3B it work, with the same Opple 6-gang, and same ConBee II 264A0700 and ConBee II 26580700
On my NUC i7 win10 VB HA 0.110.3 AddOn Deconz .77 it don't.

@Kroeliemonster this is a different issue, probably related to the switch itself.
You have to please differentiate that, because this just confuses people here!

Based on the feedback so far, it's looking like a compiler bug or at least something relating to the CPU architecture.

Based on the feedback so far, it's looking like a compiler bug or at least something relating to the CPU architecture.

That appears to be the most plausible explanation, as I remarked earlier.

The only explanation I can think of would be a compiler bug.

The erratic expression seems to be:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/2a26b78f4139a179968e61aa0e0caf3fd1917162/de_web_plugin.cpp#L3586

zclParam0 is a quint16; zclFrame.payload() returns a QByteArray. QByteArray::at() returns a char. So we're comparing an unsigned 16-bit integer value of 255 with an, I assume, 8-bit, possibly signed, char value. I suppose that _is_ asking for trouble.

The only other place in the button maps where we use a zclParam0 value of 255 is for the 1002 (sharp right turn) of the IKEA dimmer. Care to guess what we see there? Hint: #2787. Maybe we were a bit premature calling out the dimmer to be cursed?

@manup, what's your take on this?

@ebaauw do you think that maybe using 0xFF in the button map for the param could fix that?

Most uses of "payload().at(" in that file are cast or assigned to unsigned temporaries. It sure looks to me like all uses that are compared to an unsigned value should be treated the same way, for consistency, even if they don't seem strictly to have red flags all over them as this usage instance does where the 255 may be treated as the signed value -1.

do you think that maybe using 0xFF in the button map for the param could fix that?

No. The compiler would translate 255 and 0xFF to exactly the same value. Changing the zclParam0 value to 65535 (0xFFFF) might for x86, but will break on ARM.

Changing the comparison to buttonMap->zclParam0 == zclFrame.payload().at(3) & 0xFF might do the trick on both architectures. Using a more decent way to decode the payload would be the best solution imho.

char is signed on x86 and unsigned on ARM, see:
https://www.linuxtopia.org/online_books/an_introduction_to_gcc/gccintro_71.html

So on x86, the 8-bit value -1 (0xFF) is probably converted to the 16-bit unsigned value 65535 (0xFFFF), which would be -1 as a signed 16-bit value. On ARM, the 8-bit unsigned value 255 (0xFF) is would be converted to the 16-bit unsigned value 255 (0x00FF).

Maybe buttonMap->zclParam0 == static_cast<quint8>(zclFrame.payload().at(3)) ?

Might also work. I cannot compile on x86 to check.

There's some more places with a zclParam0 > 127: the 1010 (many presses) on the lumi.sensor_switch and the 7002, 8002, 9002 (_4_, _5_, _6_) on the inner remote RC110. Guess what: https://github.com/dresden-elektronik/deconz-rest-plugin/issues/635#issuecomment-534519677).

Might also work. I cannot compile on x86 to check.

I can't either. I would be most apt to use a cast to an unsigned 8 bit int of some variety, so the static_cast to quint8 or uint8_t would be good. If you use the bit manipulation approach, I'd feel safer to AND with 0x0ff rather than 0xff, just because I can't say that the later will necessarily produce an unsigned result, though I guess it probably does.

Would try it out, but i unfortunately cannot also compile for x86.

@ebaauw out here potentially solving the issue behind a batch of bugs.
Your work is very appreciated. 🥇

If nobody is able to do x86 testing, I'll take the time to set up a dedicated testing environment. I'm using the HA integration (supervised), but can spin up another VM.

I cloud even help out, but need help how to...

Looks like this problem has been found (and addressed) before, for the 1010 (many presses) of the lumi.sensor_switch:
https://github.com/dresden-elektronik/deconz-rest-plugin/blob/720a324f33dcb31efc086f2f052b35eba3948794/de_web_plugin.cpp#L3546
With a respectable amount of brute-force, I might add.

I just assigned the payload().at(_n_) to a quint8 for the Lutron Aurora, but I don't know if any-one tested it on x86 (or another platform with signed char).

Could you please test my above commit on x86?

For the record: it isn't a compiler bug after all, just bad, unportable code.

Kudos for all the hard work ongoing, for the time being it seems i cant get it to send events to my HassOS through deconz.
Is there any other 6 gang switch out there for this price/quality?

Testing the latest "beta", all works good. For my we can close the issue after final release.

Can we _Finally_ close this 😄 ?

I could not test it, since the beta is not available for HA AddOns and I have right now no possibility to test it on x86 or x86 VM.

@ebaauw, @Mimiix Thanks a lot for the hard work.

I will test it, asap the release in HA is available.

@thecem I didn't do much, @ebaauw is the one to praise here ;)
If the HA addon is out and updated, just reach out here if there is any issues :)

_Mimiix likes to get rid of old long running issues 😄_

Is there any special couple procedure? I installed the latest deconz version, but cannot couple the 6 button switch. It works, because it switches lights directly, but it is not connected to deconz.

I've tested the x003 and it works in NUC WIN10 HA 0.110.4 Addon Deconz 2.05.08:

grafik

@ebaauw: Thanks for the tremendous work!

Is there any special couple procedure? I installed the latest deconz version, but cannot couple the 6 button switch. It works, because it switches lights directly, but it is not connected to deconz.

I had the same problem in the beginning. So i played around with the C-button (hold for 5 seconds, wait, press for 1 second, wait, repeat everything) and at some point it connected to deconz. Very unsatisfactory try-and-error. _Also, it doesn't trigger a deconz_event, so it's useless for me at this time._

Edit: I have updated deconz and now I get the events. :-)

You need at least version 2.05.77, if you connected prior, repair it with latest.
In deconz:

  • connect new switch
  • press c-button (short // 1sec, if you prior reset it by pressing it for 15sec, if not press it for 15sec)
  • wait

I have 2.05.78 / 22.05.2020 - the latest version yesterday, but today it disappeared from https://phoscon.de/en/changelog/ for some reason?

I pressed c for 15 seconds. every ~ 5 seconds, the LED blinks.
I pressed Add Switch in Phoscon Web App
I pressed C for 1 (Tried 5 as well) ... the LED blinks again, but no pairing :(

As this Issue is going to end up in people needing help on small matters and the opple switches are supported, i am closing this issue.

For small questions, Discord is the place to be! you can find the URL in the readme.md

Guys, today I trying to paire opple 6 buttons with my raspbee with 26350500 firmware, and faced with interesting behaviour. Clicking on add switch, I started to tap C paired button, and nothing happens, but, I clicked on one button on switch, and switch started to control my three E27 aqara bulbs, on/off, color temp, and brightness. After this, I repear several time pairing mode, and finally switch has been added to the phoscon, but in HA I didn't recieved any events from it.

So, the question is, does raspbee work with opple switches?

Button 1, top Left, action = Switches off all my lights and sockets.
Button 2, top Right, action = Switches on all my lights and sockers.
Button 3, middle left, action = Decreases brightness on bulbs.
Button 4, middle Right, action = Increases bright on bulbs.

Got my opple 6-way today and have exactly the same behavior.

I'm on 2.5.79 with Firmware 26350500 on a ConBee 1

All I can advise u is to try adding again. As I wrote earlier in another topic, I was able to add without pressing buttons during the pairing process, just started the pairing process, and put the device in pairing mode. So to say try your luck. ;)

I repaired the switch multiple times.
Deleted the switch in Phoscon.
Starting discovery in Phoscon.
Hold C button on the switch for ~13sec until the LED flashes the second time.
......
......
Switch is discovered without pressing any of the 6 buttons.
All lights and plugs are turned on automatically.

image

Well...okay. Again and again and again. Now it works. Don't know why

Well, I also cannot give a detailed answer on this matter. I'm glad u did it in the end.

Today I have received this switch and from my experience, it helps if you still pressing C button after LED flashed. When I start to do that I was able to pair it.

Have the same version as @saxn-paule and almost same in Phoscon - only small diff I have version in detail.

image

It is necessary to collect information and as much as possible to describe the pairing process as detailed as possible for users in deconz support page at git...

Dear all
I received the same switch and was able to include it in Phoscon. Now, I am trying to create some actions for this six buttons, unfortunately only the two top boutons are identified through automations. How to generate automations for the middle and down buttons ?

Hi
which version of deconz are you running. There were some problems at the beginning. If you are on 2.5.82 then I would suggest to delete the switch again and join again by pressing the back button for more than 15 seconds. After it joined and you get the message that it was successfully joined press the top left button. That's how it did work for me and all 6 buttons show events now.

Hi
I have done again this process, but when I go through the configuration (Hassio), I have only one entity (battery) and no buttons entities ?

image

Ok but this is maybe not an deconz problem. You might post a request in hassio support forum?

I'm using ioBroker and there it is working fine.

Thats I was able to generate all necessary automations
thks

Hi
I have done again this process, but when I go through the configuration (Hassio), I have only one entity (battery) and no buttons entities ?

You most probably found it already, but for sure. In Home Assistant you have to work with events (type deconz_event) - buttons are not added as switch entity.

If you have all devices that you want to control by this switch in deCONZ Zigbee for me most convenient is to use Phoscon actions.
image

Hello,

how can I actually update Phoscon running on raspberry? It says version 2.05.71 is up2date without possibility update to 2.05.77 to get he Opple running.

thx
Jakub

@elpaso666 Depending on your install method. If you just have a native install, use the linux way of updating. Info here: https://www.cyberciti.biz/faq/ubuntu-upgrade-update-single-package-using-apt-get/

Works just the same if you run Raspbian.

To all users here having generic questions: The device is implemented correctly and is functional.

For questions: Use Discord, or open a own issue (with the user question template!)

@Mimiix I have run sudo atp-get update/upgrade... it went tho, last line are like:
Setting up deconz (2.05.81-raspbian-buster-stable) ...
how ever in phoscon I see 2.05.71 / 9/14/2020 - old version, but new date :)

@Mimiix I have run sudo atp-get update/upgrade... it went tho, last line are like:
Setting up deconz (2.05.81-raspbian-buster-stable) ...
how ever in phoscon I see 2.05.71 / 9/14/2020 - old version, but new date :)

Exactly the same here.....I upgraded to latest version but phoscon app still shows 2.05.71 with a newer
date like elpaso666 mentioned.
I checked again via shell to update but now it says I am on the latest version.

Hi,
try rebooting the RPI. after reboot I had latest version in Phoscon gui with available button to upgrade the FW, which I did and now I am on latest phoscon and latest FW where Aquara Opple button confirms it is updated as it works.

Jakub

Hi,
try rebooting the RPI. after reboot I had latest version in Phoscon gui with available button to upgrade the FW, which I did and now I am on latest phoscon and latest FW where Aquara Opple button confirms it is updated as it works.

Jakub

Thanks Jakub....that was the solution!! Aqara Opple works now.

Button 1, top Left, action = Switches off all my lights and sockets.
Button 2, top Right, action = Switches on all my lights and sockers.
Button 3, middle left, action = Decreases brightness on bulbs.
Button 4, middle Right, action = Increases bright on bulbs.

Got my opple 6-way today and have exactly the same behavior.

I'm on 2.5.79 with Firmware 26350500 on a ConBee 1

hi, I have same issue, how did you fix it?
I am on 2.05.88 with FW 26660700 (latest firmware), Conbee 2

Button 1, top Left, action = Switches off all my lights and sockets.
Button 2, top Right, action = Switches on all my lights and sockers.
Button 3, middle left, action = Decreases brightness on bulbs.
Button 4, middle Right, action = Increases bright on bulbs.

Got my opple 6-way today and have exactly the same behavior.
I'm on 2.5.79 with Firmware 26350500 on a ConBee 1

hi, I have same issue, how did you fix it?
I am on 2.05.88 with FW 26660700 (latest firmware), Conbee 2

Same for me. Pairing with Phoscon is working nicely but it always activates all Zigbee Devices without any scene being configured in ioBroker. It just does what it wants so I guess this switch is worthless...

Switch works fine here, but I have to admit I’m not assigning actions through the Phoscon interface. I’m handling the button presses via node-red (and the corresponding deconz addon).

Hmm then I wonder if this is related to ioBroker, which i use with deconz. Though I did not set up any commands to activate everything on a trigger.... kind of weird

Hi
I've several aqara opple switches and they work fine. Also at the beginning I had problems with pairing them. I followed these steps.

  1. Delete switch in phoscon app if it is already in there
  2. Start pairing mode
  3. press reset button for at least 13 seconds on the opple switch and release
  4. Wait!!! until it is paired completely and you can see that manufactorer and switch name have changed in Phoscon
  5. Close the process
  6. press the top left button 1x
    With this process it did always work.

Hope this helps.

Kind regards
Beat

@easybeat thx for your post. Are you able to receive any events via websockets from the opple switch? In my case pairing works, but no events in websocket. (Conbee 2: 2.06.00 Firmware 26660700)

Hi

yes I'm using them in ioBroker without any problems with the latest deconz Adapter 2.06.

Does that help?

Thanks
Beat

@easybeat thx for your post. Are you able to receive any events via websockets from the opple switch? In my case pairing works, but no events in websocket. (Conbee 2: 2.06.00 Firmware 26660700)

Have you tried a restart of deconz adapter instance? And an ioBroker restart? That was the solving step in my case with the Opple switch.

@easybeat thx for your post. Are you able to receive any events via websockets from the opple switch? In my case pairing works, but no events in websocket. (Conbee 2: 2.06.00 Firmware 26660700)

Sorry did not see that you mentioned that you are already on deconz 2.06 version. I'm not, I'm on 2.5.86 with previous Firmware.

Have you tried a restart of deconz adapter instance? And an ioBroker restart? That was the solving step in my case with the Opple switch.

Yes, I restarted deconz. There is no ioBroker involved on my side. I was just checking WebSocket.

I did some research on versions:

  • When pairing in 2.06.00 --> No Events
  • When pairing in 2.05.88 --> No Events
  • When pairing in 2.05.85 --> Events are working

    • Upgrade to 2.06.00: Events still working (no new pairing)

It's looking like, that pairing is broken >= 2.05.88 (pairing works, but no events)

@easybeat Thx, your hint about your version pointed me in the right direction.

I did some research on versions:

  • When pairing in 2.06.00 --> No Events
  • When pairing in 2.05.88 --> No Events
  • When pairing in 2.05.85 --> Events are working

    • Upgrade to 2.06.00: Events still working (no new pairing)

It's looking like, that pairing is broken >= 2.05.88 (pairing works, but no events)

@easybeat Thx, your hint about your version pointed me in the right direction.

OK. very interesting. Please create a bug report and good you got them working. I think these are the best switches at the moment compatible with deconz.

Thanks
Beat

I usually use the phoscon and deconz gui and do the following when pairing the oppleswitch:

  1. Click 'Add new switch'
  2. Press the oppleswitch button C located on the back for 6s
  3. Go to deconz, click basic cluster and read attributes
  4. Phoscon should show 'compound has been prepared', do not close it yet.
  5. If your device shows on deconz like this, it's successful and not paired to all zigbee devices
    image
  6. If not, click on the oppleswitch device on deconz gui and hit F5 (Reset node) until you get above clusters. Repeat until successful, I usually do it 2-3 times.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

horchi picture horchi  ·  5Comments

jan666 picture jan666  ·  4Comments

philko123 picture philko123  ·  3Comments

ScharV picture ScharV  ·  5Comments

joggs picture joggs  ·  3Comments