Aqara Opple – Learn with Peter

Aqara Opple

Anyone here old enough to remember the BBC show “Watch with Mother”? Well, I just acquired a pair of Aqara OPPLE wall switches from Banggood – 1 panel – 2 buttons – Zigbee (3.0) – no wires, Chinese-only instrucions – so why not “learn with Peter”!!

First things first, above on the left you see the boxed product – on the right, the magnetically attached switch with it’s self-adhesive back plate. These are PRETTY – a dual wall switch with adhesive pads on the back-plate which means you could cover over any old-fashioned switch or just pick a blank spot on the wall.

Aqara OPPLE switch

Strangely, I just happen to have a switch on the wall that hasn’t done anything in years – so already one of these switches has a job once I figure this all out.

“Clutching at straws ” for a few minutes I figured I’d do what I can without any manual (or course I could go to Banggood’s site at the link above – but manuals are for amateurs, don’t you know:-) The button pushes to the right or left and that top left dim blue light flickers – there’s a start.

Having satisfied myself that there was a working CR2032 battery in the top unit, I investigated the Opple packaging which showed part number WXCJKG11LM – working range -10c to +50c.

You probably can’t see it but on the front of that removeable magnetic front plate there are 2 rings to indicate the areas to touch – and on the back of that front plate is a little button to JOIN the button to the Zigbee network – you just have to hold it in for a few seconds.

Aqara OPPLE switch

OK I cheated and went to my Banggood link – which says these switches need the Aqara Home Gateway. Oh no they don’t!! Next I went to my Zigbee2MQTT gateway – see my blog entry on that and using Zigbee and the really good Electrolama ZZH gateway which hooks my Zigbee devices into my Raspberry Pi and hence into MQTT and Node-Red.

So, I made sure the ZZH was looking for devices, pressed one side of the new Aqara switch and…

I looked at the first message in debug in Node-Red (2.0.3 as of the time of writing this entry) and sure enough – a NEW device with obscenely long name was now joined to the system. I did what I always do at this point, renamed the device to something simple “aqara-opple-1”. All of that is described in the original Zigbee blog entry.

So when another device joins, all I have to do is look through the (rapidly growing) list for the one device with a long name.

Here’s the thing – the info packages that come out of this switch… let’s see… in all cases you get the battery state and voltage and link quality… but in the case of my double switch you can also get “button_2_single”, “button_1_single” and the “double” and “triple” variations.

What else I wonder? “button_x_hold”, “button_x_release” – WOW – I can do LOTS with one of these – and “button_x_hold” (for x, I mean 1 or 2) takes only half a second or so to show up.

That’s it – we’re done – EASY-PEASY. These are really neat. The adhesive is maybe a mm thick foam.

Why do Zigbee devices give out battery state? Well, don’t underestimate the maintenance of a house full of these things – best to have a nice log available on your phone or PC of battery states. Thankfully most battery-powered Zigbee devices including the Aqara use the cheap and readily available CR2032 battery.

I’m having a good morning – my new NEST-emulating thermostat looks great on the phone (not my design but my bodging to make it work on my setup) and my new 360 degrees camera has arrived. Things are going well today.

If these detachable wall switches interest you, check out the link at the top – Banggood do a range of these OPPLE units including single, double and triple options. Take my word for it, you really don’t need that manual.

How do you get to the battery? My thank to reader NICK for this video link. Seems awfully complicated just to replace a battery.

Potential Problems Update August 20, 2021: Somehow when I came back to using this switch three weeks after initially testing it- I discovered it was turning various Zigbee power units (Sonoff Zigbee DIY for example) on and off – something called “command mode” – this caused me all sorts of problems as I’d never heard of such a mode. Also the switch now seemed to have only one set of outputs i.e. button_1_single and button_2_single.

To cut a long stort, sending the following MQTT command to the switch (with a caviat) switches it back to “normal” mode.

That is – ( in the case of a device I gave a friendly name of aqara-opple-1 )

mqtt topic: zigbee2mqtt/aqara-opple-1/set
mqtt payload: {"operation_mode" : "event"}

The opposite of this would use “command” instead of “event”.

As the switch is battery-powered and usually sleeping – I had to reset the device FIRST by merely short-pressing the button on the back of the unit.

From there on, my output devices returned to normal operation, controlled by their own Zigbee buttons in my case.

Whew – That problem did NOT re-occur

See also my other article on the Aqara Opple Triple Wall-Switch. Also this is where I read about the command/event option after MAT at NotEnoughTech asked helpfully but briefly “binding mode?” before his Virgin broadband died…. half an hour later, all was well with my setup.

August 21, 2021 Update

Here’s the switch – magnetically mounted to the base – which is held on the plain wall with 2 adhesive pads.

Note the indicator top left and the two button-touch areas.

Also, below, my current Node-Red code which makes use of single-click to turn my living room lights on and off – and the other options for a range of useful colours. Easy once you know how.

Of course I could have lots of colours but for me… I only find some useful – white, red, green, blue, magenta, cyan, a couple of shades of orange, pink etc.. the lights are also controlled by my phone – this is the wife-friendly control.

global.set("living-room-colour",global.get("living-room-colour") || "#0000000000");

switch (msg.payload.action)
{
    case "button_1_single": global.set("living-room-colour", "#0000000000"); 
         msg.payload = "#0000000000"; break;
    case "button_2_single": msg.payload = "#ffffff"; break;
    case "button_1_double": msg.payload = "#ff00000000"; break;
    case "button_2_double": msg.payload = "#00ff000000"; break;
    case "button_1_triple": msg.payload = "#0000ff0000"; break;
    case "button_2_triple": msg.payload = "#ff00ff0000"; break;
 
 
    case "button_1_hold": 
        switch (global.get("living-room-colour"))
        {
            case "#0000000000": msg.payload = "#ff44440000"; break;
            case "#ff44440000": msg.payload = "#44ff440000"; break;
            case "#44ff440000": msg.payload = "#4444ff0000"; break;
            case "#4444ff0000": msg.payload = "#0000000000"; break;
            default : return null;
        }
        global.set("living-room-colour",msg.payload); break;

    case "button_2_hold":
        switch (global.get("living-room-colour")) {
            case "#0000000000": msg.payload = "#ff44000000"; break;
            case "#ff44000000": msg.payload = "#ff88000000"; break;
            case "#ff88000000": msg.payload = "#00ffff0000"; break;
            case "#00ffff0000": msg.payload = "#0000000000"; break;
            default: return null;
        }
        global.set("living-room-colour", msg.payload); break;


    default: return null;
}
return msg;

August 27, 2021 Update

I’ve changed the above – I ended up trying the RELEASE function of the switch to get continual colour changes – guess what – the RELEASE does not work reliably if you HOLD the button for several seconds while cycling through the colours – and at the end, if you try a quick single-click after releasing the button – you end up with a “button_1_double” response. All in, not the best plan. I finally ended up with: button 1 single – once=off, twice=reset colour to white. Button 2 – first time, simply turns on the current colour, repeated single clicks cycles through the colours. That works.

9 thoughts on “Aqara Opple – Learn with Peter

  1. I there any way to change operation_mode using zha? or the only to way to fix it is using zigbee2mqtt?

  2. Hi Pete,

    I’ve had a few of these “opples” for a while now – in use with Zigbee2MQTT including a 6 button one which, when you consider the multi-tap support, gives lots of functions within one single nice-looking (WAF certified*) package.

    *WAF = Wife Approval Factor – more important than a CE mark or FCC compliance – this is the gold standard that an IoT device has to meet or exceed for it to be allowed to be used in a live “production” (home) environment.

    1. I was going to give you a lecture about dumb CE stickers but I see you have it nailed – WAF is way more important 🙂 I kjust noted the 6-button one and I’m hoping o get my hansd on one soon. They really do look good.. of course – the proof – as they say… how long will the batteries last. I must get all my Zigbee stuff hooked into NR for battery checking purposes so I get a relevant email when a battery is low – preferably a month befoer it packs in.

      Of course I had that on my UK doorbell and didn’t I get stuck in Spain for as year with no access to the UK to recharge the batteries – which hopefully my wife is doing right now..

      1. Battery life with Zigbee devices is usually good. The devices that come with supplied batteries generally last much longer after you replace their cheap no-name/fake Chinese battery with one sourced from a more…err…’reputable’ supplier.

  3. These switches support short, long and double taps. I’ve been using them for more than a year now and have been rock solid. If you want, you can even direct-bind them to a light bulb or group of lightbulbs, so they keep working if zigbee2mqtt happens to be offline. Can highly recommend them!

    1. Not only double press – but TRIPLE-PRESS.

      Do go on – enlighten me as to how to direct-bind one to a light or group of lights – I could use that now…

      1. 3 Mqtt messages are needed, see below. Make sure to wake up the switch by pressing and releasing the little connect button on the back of the switch before sending your mqtt messages. More info to be found at https://www.zigbee2mqtt.io/devices/WXCJKG13LM.html

        ##Bind device to group##
        Topic: zigbee2mqtt/bridge/bind/”switch name”
        Message content: “device or groupname to bind to”

        ##Set switch to command mode##
        Topic: zigbee2mqtt/”switch name”/set
        Message content: {“operation_mode”: “command”}

        ##Unbind switch from coordinator##
        Topic: zigbee2mqtt/bridge/unbind/”switch name”
        Message content: Coordinator

Comments are closed.