deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (2024)

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (1)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (2)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (3) lubbertkramer on 11 Nov 2019

+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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (4) addellll on 11 Nov 2019

+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!

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (5) easybeat on 12 Nov 2019

πŸ‘1

πŸ‘
Following as well.
Very interesting scene selectors.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (6) geurti64 on 20 Nov 2019

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (7) djashjones on 25 Nov 2019

@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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (8) addellll on 26 Nov 2019

πŸ‘1

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (9)
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (10)
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (11)

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (12) djashjones on 26 Nov 2019

@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 :)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (13)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (14) addellll on 27 Nov 2019

Just got my 6 button version.

How do you experience it, quality wise?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (15) PremiumUsername on 27 Nov 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (16) djashjones on 27 Nov 2019

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (17) Xylomid on 27 Nov 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (18)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (19) djashjones on 27 Nov 2019

Any news for Homey?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (20) geurti64 on 2 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (21) mikekoumas on 2 Dec 2019

+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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (22) mat1990dj on 2 Dec 2019

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (23) heine79 on 5 Dec 2019

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
.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (24) fleshinachair on 6 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (25) heine79 on 6 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (26) djashjones on 6 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (27) Kroeliemonster on 6 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (28) tuffelh on 8 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (29) addellll on 9 Dec 2019

πŸ‘2

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (30) djashjones on 9 Dec 2019

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
.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (31) fleshinachair on 9 Dec 2019

πŸ‘1

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?
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (32)
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (33)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (34) eserero on 11 Dec 2019

4-Button-Version:
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (35)
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (36)
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (37)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (38) MarcProe on 11 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (39) eserero on 11 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (40) ebaauw on 11 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (41) eserero on 12 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (42) ebaauw on 13 Dec 2019

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (43) eserero on 13 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (44) ebaauw on 13 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (45) eserero on 13 Dec 2019

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (46) merdok on 13 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (47) eserero on 14 Dec 2019

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
.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (48) fleshinachair on 14 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (49) eserero on 16 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (50) djashjones on 17 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (51) PremiumUsername on 17 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (52) djashjones on 17 Dec 2019

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (53) PremiumUsername on 18 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (54) PremiumUsername on 18 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (55) djashjones on 18 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (56) PremiumUsername on 18 Dec 2019

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
.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (57) fleshinachair on 18 Dec 2019

yes

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (58) djashjones on 18 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (59) eserero on 18 Dec 2019

πŸ‘1

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (60) PremiumUsername on 19 Dec 2019

I"ll post more exact explanation.

Please do.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (61) MarcProe on 19 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (62) djashjones on 19 Dec 2019

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...)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (63)

  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. deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (64)

  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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (65) eserero on 19 Dec 2019

❀3

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-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (66) AndreasEge on 21 Dec 2019

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..

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (67) ostgardh on 21 Dec 2019

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).

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (68) ebaauw on 21 Dec 2019

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (69) AndreasEge on 21 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (70) PremiumUsername on 21 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (71) ostgardh on 21 Dec 2019

I will try to be patient :-)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (72) AndreasEge on 21 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (73) ebaauw on 21 Dec 2019

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (74)

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (75)

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (76) merdok on 23 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (77) ebaauw on 23 Dec 2019

@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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (78) merdok on 23 Dec 2019

  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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (79) ebaauw on 23 Dec 2019

  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.
    deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (80)

  2. Got it.

Thanks for the support.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (81) merdok on 23 Dec 2019

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: -46Dec 23 19:52:14 pi5 deCONZ[13715]: 19:52:11:389 asdu: 011601Dec 23 19:52:14 pi5 deCONZ[13715]: 19:52:11:389 APS-DATA.indication from child 0x7CE3Dec 23 19:52:14 pi5 deCONZ[13715]: 19:52:11:389 verify 0x000d6ffffea46abf is child node after 778788 sDec 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: -48Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:55:635 asdu: 0117050053Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:55:635 APS-DATA.indication from child 0x7CE3Dec 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: -48Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:58:306 asdu: 011807Dec 23 19:56:04 pi5 deCONZ[13715]: 19:55:58:306 APS-DATA.indication from child 0x7CE3Dec 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).

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (82) ebaauw on 23 Dec 2019

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: -4920:56:44:000 asdu: 11224c034500070000000000000020:56:44:001 button 1001 Hold off20:56:59:307 APS-DATA.indication srcAddr: 0xf9d4, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0300, lqi: 255, rssi: -4920:56:59:307 asdu: 11234c014500070000000000000020: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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (83) merdok on 23 Dec 2019

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (84) ebaauw on 23 Dec 2019

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (85) merdok on 23 Dec 2019

πŸ‘1

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (86) ebaauw on 24 Dec 2019

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 πŸ‘

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (87) merdok on 24 Dec 2019

πŸ‘1

  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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (88) ebaauw on 24 Dec 2019

  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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (89) addellll on 24 Dec 2019

Were you able to sniff what commands they send?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (90) ebaauw on 24 Dec 2019

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (91) merdok on 24 Dec 2019

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (92) ostgardh on 9 Jan 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (93) merdok on 9 Jan 2020

πŸ‘5

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!!

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (94) easybeat on 9 Jan 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (95) PremiumUsername on 10 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (96) merdok on 10 Jan 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (97) airens on 11 Jan 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (98) merdok on 11 Jan 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (99) PremiumUsername on 11 Jan 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (100) addellll on 11 Jan 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (101) merdok on 11 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (102) ostgardh on 11 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (103) merdok on 11 Jan 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (104) addellll on 12 Jan 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (105) merdok on 12 Jan 2020

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. :)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (106) addellll on 12 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (107) merdok on 12 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (108) addellll on 13 Jan 2020

Perfekt πŸ‘

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (109) merdok on 13 Jan 2020

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....

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (110) eserero on 19 Jan 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (111) merdok on 19 Jan 2020

πŸ‘1

: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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (112) eserero on 19 Jan 2020

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 0ZBOSS dump, IN, page 0, channel 11IEEE 802.15.4 Data, Dst: 0x0000, Src: 0xa6cdZigBee Network Layer Data, Dst: 0x0000, Src: 0xa6cdZigBee 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: 158ZigBee 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 0ZBOSS dump, IN, page 0, channel 11IEEE 802.15.4 Data, Dst: 0x0000, Src: 0xa6cdZigBee Network Layer Data, Dst: 0x0000, Src: 0xa6cdZigBee 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: 160ZigBee 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 0ZBOSS dump, IN, page 0, channel 11IEEE 802.15.4 Data, Dst: 0x0000, Src: 0xa6cdZigBee Network Layer Data, Dst: 0x0000, Src: 0xa6cdZigBee 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: 161ZigBee 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 0ZBOSS dump, IN, page 0, channel 11IEEE 802.15.4 Data, Dst: 0x0000, Src: 0xa6cdZigBee Network Layer Data, Dst: 0x0000, Src: 0xa6cdZigBee 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: 162ZigBee 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 0ZBOSS dump, IN, page 0, channel 11IEEE 802.15.4 Data, Dst: 0x0000, Src: 0x19bbZigBee Network Layer Data, Dst: 0x0000, Src: 0x19bbZigBee 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: 44ZigBee 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 0ZBOSS dump, IN, page 0, channel 11IEEE 802.15.4 Data, Dst: 0x0000, Src: 0x19bbZigBee Network Layer Data, Dst: 0x0000, Src: 0x19bbZigBee 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: 45ZigBee 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 0ZBOSS dump, IN, page 0, channel 11IEEE 802.15.4 Data, Dst: 0x0000, Src: 0x19bbZigBee Network Layer Data, Dst: 0x0000, Src: 0x19bbZigBee 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: 47ZigBee 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 0ZBOSS dump, IN, page 0, channel 11IEEE 802.15.4 Data, Dst: 0x0000, Src: 0x19bbZigBee Network Layer Data, Dst: 0x0000, Src: 0x19bbZigBee 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: 48ZigBee 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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (113) addellll on 22 Jan 2020

πŸ‘1

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!)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (114) jdberry on 22 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (115) ebaauw on 22 Jan 2020

@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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (116) merdok on 22 Jan 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (117) ebaauw on 22 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (118) merdok on 22 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (119) ebaauw on 23 Jan 2020

I will provide the pairing logs tonight or tomorrow.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (120) addellll on 23 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (121) addellll on 23 Jan 2020

❀1

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (122) ebaauw on 23 Jan 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (123) merdok on 23 Jan 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (124) addellll on 24 Jan 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (125) JBS5 on 26 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (126) addellll on 26 Jan 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (127) JBS5 on 26 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (128) merdok on 26 Jan 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (129) veeceeoh on 27 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (130) ebaauw on 27 Jan 2020

❀1

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (131) veeceeoh on 29 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (132) ebaauw on 29 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (133) veeceeoh on 29 Jan 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (135) lukicsl on 8 Feb 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (136) merdok on 8 Feb 2020

πŸŽ‰8πŸ‘8

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (137) raddi on 17 Feb 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (138) ostgardh on 17 Feb 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (139) merdok on 17 Feb 2020

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 ?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (140) mrgreenfr on 17 Feb 2020

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-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (141) raddi on 17 Feb 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (142) PremiumUsername on 18 Feb 2020

πŸ‘1

@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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (143) ostgardh on 18 Feb 2020

πŸ‘1

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (144) eserero on 18 Feb 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (145) bastshoes on 19 Feb 2020

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..

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (146) ostgardh on 19 Feb 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (147) merdok on 19 Feb 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (148) ebaauw on 27 Feb 2020

πŸ‘1

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (149) merdok on 28 Feb 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (150) ebaauw on 28 Feb 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (151) merdok on 28 Feb 2020

@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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (152) merdok on 1 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (153) ebaauw on 1 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (154) merdok on 1 Mar 2020

Did you re-pair the switch?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (155) ebaauw on 1 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (156) merdok on 1 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (157) ebaauw on 1 Mar 2020

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"}

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (158) merdok on 1 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (159) ebaauw on 1 Mar 2020

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 ?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (160) merdok on 1 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (161) ebaauw on 2 Mar 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (162) merdok on 2 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (163) ebaauw on 2 Mar 2020

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).

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (164) merdok on 2 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (165) ebaauw on 2 Mar 2020

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: 0x000921:11:59:078 add task 248 type 20 to 0x04CF8CDF3C75B8B9 cluster 0xFFC0 req.id 9521:11:59:079 0x04CF8CDF3C75B8B9 (lumi.remote.b686opcn01) create binding for attribute reporting of cluster 0x0001 on endpoint 0x0121:11:59:079 discard double entry in binding queue (size: 4) for for 0x04CF8CDF3C75B8B9, cluster 0x000121: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 0x0421: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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (166) merdok on 2 Mar 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (167) ebaauw on 2 Mar 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (168) merdok on 2 Mar 2020

Remove the call to setBitMap, just to be sure.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (169) ebaauw on 2 Mar 2020

Still nothing...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (170) merdok on 2 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (171) ebaauw on 2 Mar 2020

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:
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (172)

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: -4722:45:20:520 asdu: 18b00a550021010022:45:20:520 Node data 0x04cf8cdf3c75b8b9 profileId: 0x0104, clusterId: 0x001222:45:20:524 Force binding of attribute reporting for sensor lumi.remote.b686opcn0122: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: -4722:50:10:693 asdu: 18b70a550021020022:50:10:693 Node data 0x04cf8cdf3c75b8b9 profileId: 0x0104, clusterId: 0x001222:50:10:695 Force binding of attribute reporting for sensor lumi.remote.b686opcn0122:50:10:695 no button handler for: lumi.remote.b686opcn01 ep: 0x01 cl: 0x0012 cmd: 0x0A pl[0]: 0x5522:50:10:695 ZCL attribute report 0x04CF8CDF3C75B8B9 for cluster: 0x0012, ep: 0x01, frame control: 0x18, mfcode: 0x000022:50:10:695 payload: 5500210200

Some of them from endpoint 4 ????

22:54:04:230 Node data 0x04cf8cdf3c75b8b9 profileId: 0x0104, clusterId: 0x001222: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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (173)

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (174) merdok on 2 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (175) ebaauw on 2 Mar 2020

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: -4923: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: -4923: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: -4923: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: -5023: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: -5023: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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (176) merdok on 2 Mar 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (177) ebaauw on 3 Mar 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (178) merdok on 3 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (179) ebaauw on 3 Mar 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (180) merdok on 3 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (181) ebaauw on 3 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (182) merdok on 3 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (183) ebaauw on 3 Mar 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (184) merdok on 3 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (185) merdok on 3 Mar 2020

❀4πŸ‘1

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (186) ebaauw on 3 Mar 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (187) merdok on 3 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (188) jdberry on 3 Mar 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (189) ebaauw on 3 Mar 2020

@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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (190) merdok on 3 Mar 2020

@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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (191) merdok on 3 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (192) ebaauw on 3 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (193) merdok on 3 Mar 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (194) ebaauw on 3 Mar 2020

πŸ‘2

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (195) merdok on 3 Mar 2020

❀3

Amazing work @merdok and @ebaauw!!

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (196) addellll on 4 Mar 2020

πŸ‘4

Amazing work @merdok and @ebaauw!!

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (197) jdberry on 5 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (198) jsnyde30 on 8 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (199) ebaauw on 8 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (200) merdok on 8 Mar 2020

πŸ‘2

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (201) jsnyde30 on 8 Mar 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (202) lukicsl on 9 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (203) bastshoes on 9 Mar 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (204) jdberry on 9 Mar 2020

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

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (205) bastshoes on 9 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (206) raddi on 9 Mar 2020

πŸ‘1

@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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (207) ostgardh on 9 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (208) merdok on 9 Mar 2020

πŸ‘2

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (209) merdok on 9 Mar 2020

Stopped working here too after the update

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (210) djashjones on 9 Mar 2020

Submitted a fix: #2561

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (211) merdok on 9 Mar 2020

❀1πŸ‘1

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!

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (212) merdok on 9 Mar 2020

@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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (213) svenove on 9 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (214) merdok on 9 Mar 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (215) svenove on 9 Mar 2020

Delete the switch before pairing it again.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (216) merdok on 9 Mar 2020

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"
}

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (217) svenove on 9 Mar 2020

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!

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (218) raddi on 11 Mar 2020

πŸ‘2

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (219) bastshoes on 13 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (220) merdok on 13 Mar 2020

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).

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (221) ebaauw on 13 Mar 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (222) bdb12 on 14 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (223) ebaauw on 14 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (224) bdb12 on 14 Mar 2020

but I did re pair, twice

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (225) bdb12 on 14 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (226) ebaauw on 14 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (227) bastshoes on 14 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (228) ostgardh on 14 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (229) merdok on 14 Mar 2020

thanks will do :)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (230) bdb12 on 15 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (231) annetimdegraaf on 15 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (232) merdok on 15 Mar 2020

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

When the next release is planning?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (233) L3H0 on 20 Mar 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (234) merdok on 20 Mar 2020

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:

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (235)
Pressing any button on the switch does not yield any event in Home Assistant.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (236)
It seems to be connected in the Phoscon web app...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (237)
... 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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (238) bauerj on 21 Mar 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (239) merdok on 21 Mar 2020

πŸ‘7

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (240) SAOPP on 26 Mar 2020

πŸ‘7πŸ‘Ž1

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:
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (241)
And on the rest api they are not showing.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (242) mat1990dj on 3 Apr 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (243) gerard33 on 3 Apr 2020

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

sudo apt install deconz-devgit clone https://github.com/dresden-elektronik/deconz-rest-plugin.gitcd deconz-rest-pluginqmake && make -j2sudo cp ../libde_rest_plugin.so /usr/share/deCONZ/pluginsand 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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (244) mat1990dj on 3 Apr 2020

πŸ‘1

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (245) SAOPP on 4 Apr 2020

I don't know how to properly delete the devices, they keep reconnecting automatically :(
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (246)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (247) mat1990dj on 7 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (248) merdok on 7 Apr 2020

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
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (249)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (250) mat1990dj on 7 Apr 2020

Try putting it in pairing mode then delete it.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (251) djashjones on 7 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (252) mat1990dj on 7 Apr 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (253) SAOPP on 7 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (254) mat1990dj on 7 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (255) w0vka on 7 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (256) SAOPP on 7 Apr 2020

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.
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (257)
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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (258) mat1990dj on 7 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (259) SAOPP on 7 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (260) SAOPP on 7 Apr 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (261) merdok on 7 Apr 2020

I don't know how but I got to this situation:
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (262)
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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (263) mat1990dj on 7 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (264) w0vka on 7 Apr 2020

πŸ‘1

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.
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (265)
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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (266) w0vka on 7 Apr 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (267) Tedious01 on 8 Apr 2020

DE guys is not share any release dates.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (268) SAOPP on 8 Apr 2020

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 ;)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (269) Tedious01 on 8 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (270) SAOPP on 8 Apr 2020

πŸ‘1

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:
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (271)
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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (272) lukicsl on 9 Apr 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (273) merdok on 9 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (274) lukicsl on 9 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (275) merdok on 9 Apr 2020

@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/

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (276) lukicsl on 9 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (277) nthewara on 10 Apr 2020

I configured in node red a websocket listener:
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (278)
When pressing the buttons on Opple no events are generated!

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

flows.json.txt

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (279) lukicsl on 10 Apr 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (280) Tedious01 on 10 Apr 2020

πŸ‘2

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (281) lukicsl on 10 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (282) lukicsl on 11 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (283) SAOPP on 11 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (284) michi1g on 14 Apr 2020

+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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (285) hoelkmen on 14 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (286) djashjones on 14 Apr 2020

πŸ‘€2πŸ˜•2πŸ‘2

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (287) SAOPP on 15 Apr 2020

...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... :-(

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (288) hoelkmen on 15 Apr 2020

I think the updates come slower now due to corona.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (289) merdok on 15 Apr 2020

Got an information about an upcomining update next days.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (290) Tedious01 on 15 Apr 2020

πŸŽ‰1

I think the updates come slower now due to corona.

Well they should stop drinking 🀣 sorry for that one πŸ§₯

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (291) djashjones on 15 Apr 2020

πŸ‘2

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (292) SAOPP on 15 Apr 2020

Got an information about an upcomining update next days.

June... august? :D

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (293) SAOPP on 15 Apr 2020

Well, feel free to compile on your own ;)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (294) Tedious01 on 15 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (295) SAOPP on 15 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (296) merdok on 15 Apr 2020

@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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (297) michi1g on 15 Apr 2020

Just Opple switches.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (298) merdok on 15 Apr 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (299) djashjones on 15 Apr 2020

@merdok Marcin could u share please your compiled plugin?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (300) SAOPP on 15 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (301) merdok on 15 Apr 2020

πŸ˜•1

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (302) annetimdegraaf on 15 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (303) djashjones on 15 Apr 2020

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

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (304) SAOPP on 15 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (305) merdok on 15 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (306) michi1g on 15 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (307) merdok on 15 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (308) lukicsl on 15 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (309) michi1g on 15 Apr 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (310) gysman on 16 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (311) merdok on 16 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (312) gysman on 19 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (313) mattiri on 19 Apr 2020

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

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (314) hoelkmen on 19 Apr 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (315) annetimdegraaf on 19 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (316) djashjones on 19 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (317) annetimdegraaf on 19 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (318) djashjones on 19 Apr 2020

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/ttyAMA020:22:31:340 ZCLDB init file /root/.local/share/dresden-elektronik/deCONZ/zcldb.txt20:22:31:436 found node plugin: libde_signal_plugin.so - Signal Monitor Plugin20:22:31:453 found node plugin: libstd_otau_plugin.so - STD OTAU Plugin20: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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (319) MarcProe on 19 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (320) luke3butler on 21 Apr 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (321) annetimdegraaf on 22 Apr 2020

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)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (322) bramv101 on 22 Apr 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (323) luke3butler on 23 Apr 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (324) djashjones on 23 Apr 2020

@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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (325) Tedious01 on 24 Apr 2020

πŸ‘1

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:

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (326)

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (327) iz3man on 24 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (328) joggs on 25 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (329) iz3man on 25 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (330) joggs on 25 Apr 2020

πŸ‘1

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 :(

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (331) Guus-H on 25 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (332) joggs on 25 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (333) klaasnicolaas on 25 Apr 2020

2.05.75. Isn't that the latest?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (334) joggs on 25 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (335) klaasnicolaas on 25 Apr 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (336) Guus-H on 25 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (337) Rick-Jongbloed on 26 Apr 2020

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:
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (338)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (339) lukicsl on 26 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (340) lukicsl on 26 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (341) joggs on 26 Apr 2020

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!

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (342) hoelkmen on 28 Apr 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (343) ebaauw on 28 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (344) merdok on 28 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (345) ebaauw on 28 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (346) merdok on 28 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (347) djashjones on 28 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (348) jdberry on 28 Apr 2020

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (349) JackPoint on 28 Apr 2020

πŸ‘1

@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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (350) gysman on 29 Apr 2020

πŸ‘5

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 ;)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (351) iz3man on 29 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (352) lukicsl on 29 Apr 2020

πŸ‘1

Thanks, but where is that file located?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (353) iz3man on 29 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (354) bauerj on 29 Apr 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (355) bauerj on 29 Apr 2020

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

Thanks but that's not accessible under HASSIO

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (356) iz3man on 29 Apr 2020

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.2COPY 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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (357) bauerj on 29 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (358)
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (359)
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (360)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (361) Luke95vl on 29 Apr 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (362) JackPoint on 29 Apr 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (363) jsnyde30 on 3 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (364) djashjones on 3 May 2020

@djashjones ahh that makes sense.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (365) jsnyde30 on 3 May 2020

@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-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (366) svenove on 3 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (367) djashjones on 3 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (368) svenove on 3 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (369) djashjones on 3 May 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (370) starschild86 on 3 May 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (371) redlegoman on 8 May 2020

two buttons with the same event?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (372) SAOPP on 8 May 2020

two buttons with the same event?

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (373) redlegoman on 8 May 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (374) Linus62 on 10 May 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (375) SAOPP on 10 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (376) redlegoman on 10 May 2020

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
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (377)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (378) joggs on 11 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (379) SAOPP on 11 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (380) EmteZogaf on 13 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (381) hoelkmen on 13 May 2020

πŸŽ‰1

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (382) mhin76 on 14 May 2020

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 ...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (383) iz3man on 14 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (384) 00lex on 15 May 2020

πŸ‘6

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (385) mhin76 on 15 May 2020

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

what to do next? waiting or selling?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (386) 00lex on 17 May 2020

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!

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (387) djashjones on 17 May 2020

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)
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (388)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (389) mat1990dj on 18 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (390) merdok on 18 May 2020

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

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (391) mat1990dj on 18 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (392) merdok on 18 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (393) mat1990dj on 19 May 2020

@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. :)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (394) mhin76 on 20 May 2020

Yes, lets hope :)
Thank you

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (395) mat1990dj on 20 May 2020

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:
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (396)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (397) mhin76 on 21 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (398) djashjones on 21 May 2020

πŸ‘1

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (399) merdok on 21 May 2020

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)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (400) klaasnicolaas on 21 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (401) svenove on 21 May 2020

Even then there is room for improvement πŸ˜‰

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (402) klaasnicolaas on 21 May 2020

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" !

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (403) gysman on 23 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (404) adrha on 23 May 2020

πŸ‘1

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (405) adrha on 23 May 2020

πŸŽ‰1

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (406) AndreasEge on 23 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (407) Kroeliemonster on 23 May 2020

Not working for me. 6 button version.

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

update: no events in HA either.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (408) djashjones on 23 May 2020

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 :)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (409) Kroeliemonster on 23 May 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (410) AndreasEge on 23 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (411) Kroeliemonster on 23 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (412) merdok on 23 May 2020

πŸ‘1

Try to pair the switch again

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (413) hskollo on 23 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (414) djashjones on 23 May 2020

πŸ‘1

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (415) AndreasEge on 23 May 2020

πŸ‘2

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (416) mickeman on 23 May 2020

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
}
}

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (417) Kroeliemonster on 23 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (418) mickeman on 23 May 2020

@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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (419) L3H0 on 23 May 2020

@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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (420) mickeman on 23 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (421) L3H0 on 23 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (422) mickeman on 23 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (423) mhin76 on 23 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (424) mhin76 on 23 May 2020

Works, but no long click mapping in Phoscon?
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (425)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (426) MarcProe on 24 May 2020

@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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (427) thecem on 24 May 2020

@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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (428) Kroeliemonster on 24 May 2020

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.
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (429)
I think i have to remove the switch from deConz but how can i do that with deConz in headless mode?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (430) Havym on 24 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (431) thecem on 24 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (432) thecem on 24 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (433) thecem on 24 May 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (434) Havym on 24 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (435) thecem on 24 May 2020

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.
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (436)

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (437) Havym on 24 May 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (438) iz3man on 24 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (439) thecem on 24 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (440) iz3man on 24 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (441) djashjones on 24 May 2020

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😁

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (442) jsnyde30 on 24 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (443) ebaauw on 24 May 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (444) mickeman on 24 May 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (445) L3H0 on 24 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (446) luke3butler on 24 May 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (447) ebaauw on 24 May 2020

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.
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (448)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (449) mickeman on 25 May 2020

@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
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (450)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (451) luke3butler on 25 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (452) ebaauw on 25 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (453) thecem on 25 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (454) ebaauw on 25 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (455) mat1990dj on 25 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (456) thecem on 25 May 2020

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: -38May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:443 asdu: 18cb0a550021ff00May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:444 Node data 0x04cf8cdf3c79744f profileId: 0x0104, clusterId: 0x0012May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:444 0x04CF8CDF3C79744F: update ZCL value 0x01/0x0012/0x0055 after 0 sMay 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:446 button 1003 Off long releasedMay 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:446 don't create binding for attribute reporting of sensor OppleMay 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:446 Force binding of attribute reporting for sensor OppleMay 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:446 ZCL attribute report 0x04CF8CDF3C79744F for cluster: 0x0012, ep: 0x01, frame control: 0x18, mfcode: 0x0000May 25 22:17:10 pi5 deCONZ[28578]: 22:17:08:446 payload: 550021ff00May 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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (457) ebaauw on 25 May 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (458) merdok on 25 May 2020

πŸ‘1

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (459) ebaauw on 25 May 2020

πŸ‘1

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (460) merdok on 25 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (461) ebaauw on 25 May 2020

Oh, right. Sorry, already too late... Now i see it. So why does it look at the first byte for some users?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (462) merdok on 25 May 2020

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!

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (463) thecem on 26 May 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (464) thecem on 26 May 2020

Probably --dbg-aps=2. Need to collect and document all of these sometime...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (465) ebaauw on 26 May 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (466) phil-schneider on 26 May 2020

πŸŽ‰1

But why, one of the best event is not working. It's so sad. ;(

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (467) L3H0 on 26 May 2020

U mean release after hold?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (468) SAOPP on 27 May 2020

U mean release after hold?

Yes

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (469) L3H0 on 27 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (470) merdok on 27 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (471) L3H0 on 27 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (472) merdok on 27 May 2020

@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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (473) thecem on 27 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (474) luke3butler on 27 May 2020

could be an explanation, I use an NUC with Win10, VB.
Will try on my rpi3b...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (475) thecem on 27 May 2020

@luke3butler good point. That can be. I also use Raspberry Pi (ARM) and it works.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (476) merdok on 27 May 2020

I have, Deconz in docker on Synology.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (477) L3H0 on 27 May 2020

For me the x003 event works on a rpi3-something

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (478) JackPoint on 27 May 2020

x003 is NOT working in my setup.
Running on Intel i5 with WMware (ESXI) and Ubuntu Desktop 18.04

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (479) mickeman on 27 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (480) Kroeliemonster on 27 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (481) thecem on 27 May 2020

@Kroeliemonster this is a different issue, probably related to the switch itself.
You have to please differentiate that, because this just confuses people here!

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (482) merdok on 27 May 2020

πŸ‘1

Based on the feedback so far, it's looking like a compiler bug or at least something relating to the CPU architecture.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (483) luke3butler on 27 May 2020

πŸ‘1

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (484) ebaauw on 27 May 2020

πŸš€1

@ebaauw do you think that maybe using 0xFF in the button map for the param could fix that?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (485) merdok on 27 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (486) jdberry on 27 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (487) ebaauw on 27 May 2020

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).

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (488) ebaauw on 27 May 2020

Maybe buttonMap->zclParam0 == static_cast<quint8>(zclFrame.payload().at(3)) ?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (489) jdberry on 27 May 2020

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).

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (490) ebaauw on 27 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (491) jdberry on 27 May 2020

Would try it out, but i unfortunately cannot also compile for x86.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (492) merdok on 27 May 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (493) luke3butler on 27 May 2020

I cloud even help out, but need help how to...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (494) thecem on 28 May 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (495) ebaauw on 29 May 2020

πŸ‘3

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (496) bramv101 on 5 Jun 2020

Testing the latest "beta", all works good. For my we can close the issue after final release.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (497) L3H0 on 25 Jun 2020

πŸ‘1

Can we _Finally_ close this πŸ˜„ ?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (498) Mimiix on 25 Jun 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (499) thecem on 25 Jun 2020

@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 πŸ˜„_

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (500) Mimiix on 25 Jun 2020

πŸ˜„1

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (501) Coalado on 1 Jul 2020

I've tested the x003 and it works in NUC WIN10 HA 0.110.4 Addon Deconz 2.05.08:

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (502)

@ebaauw: Thanks for the tremendous work!

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (503) thecem on 1 Jul 2020

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. :-)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (504) flonair on 1 Jul 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (505) thecem on 1 Jul 2020

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 :(

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (506) Coalado on 2 Jul 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (507) Mimiix on 2 Jul 2020

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?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (508) SAOPP on 24 Jul 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (509) saxn-paule on 3 Sep 2020

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. ;)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (510) SAOPP on 3 Sep 2020

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (511) SAOPP on 3 Sep 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (512)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (513) saxn-paule on 3 Sep 2020

Well...okay. Again and again and again. Now it works. Don't know why

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (514) saxn-paule on 3 Sep 2020

πŸ‘1

Well, I also cannot give a detailed answer on this matter. I'm glad u did it in the end.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (515) SAOPP on 3 Sep 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (516)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (517) jvyoralek on 25 Sep 2020

πŸ‘1

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (518) SAOPP on 25 Sep 2020

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 ?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (519) Larnak23 on 27 Sep 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (520) easybeat on 27 Sep 2020

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 ?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (521) Larnak23 on 27 Sep 2020

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (522)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (523) Larnak23 on 27 Sep 2020

Ok but this is maybe not an deconz problem. You might post a request in hassio support forum?

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (524) easybeat on 27 Sep 2020

I'm using ioBroker and there it is working fine.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (525) easybeat on 27 Sep 2020

Thats I was able to generate all necessary automations
thks

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (526) Larnak23 on 27 Sep 2020

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.
deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (527)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (528) jvyoralek on 27 Sep 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (529) elpaso666 on 28 Sep 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (530) Mimiix on 28 Sep 2020

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!)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (531) Mimiix on 28 Sep 2020

@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 :)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (532) elpaso666 on 29 Sep 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (533) SmartHomie1 on 7 Oct 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (534) elpaso666 on 7 Oct 2020

πŸ‘1

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (535) SmartHomie1 on 7 Oct 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (536) zray3dvn on 16 Nov 2020

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...

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (537) MegaMatze on 17 Nov 2020

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).

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (538) kooskaspers on 17 Nov 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (539) MegaMatze on 17 Nov 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (540) easybeat on 17 Nov 2020

@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)

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (541) kremer-io on 17 Nov 2020

Hi

yes I'm using them in ioBroker without any problems with the latest deconz Adapter 2.06.

Does that help?

Thanks
Beat

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (542) easybeat on 17 Nov 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (543) SmartHomie1 on 17 Nov 2020

@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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (544) easybeat on 17 Nov 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (545) kremer-io on 17 Nov 2020

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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (546) kremer-io on 17 Nov 2020

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

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (547) easybeat on 17 Nov 2020

πŸ‘1

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
    deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (548)
  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.

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (549) accelle17 on 21 Nov 2020

Was this page helpful?

0 / 5 - 0 ratings

deconz-rest-plugin πŸš€ - Aqara OPPLE switches support | bleepcoder.com (2024)
Top Articles
Latest Posts
Article information

Author: Maia Crooks Jr

Last Updated:

Views: 5391

Rating: 4.2 / 5 (43 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Maia Crooks Jr

Birthday: 1997-09-21

Address: 93119 Joseph Street, Peggyfurt, NC 11582

Phone: +2983088926881

Job: Principal Design Liaison

Hobby: Web surfing, Skiing, role-playing games, Sketching, Polo, Sewing, Genealogy

Introduction: My name is Maia Crooks Jr, I am a homely, joyous, shiny, successful, hilarious, thoughtful, joyous person who loves writing and wants to share my knowledge and understanding with you.