deCONZ - Aqara Opple Wireless Scene Switch 2 Button - lumi.remote.b286opcn01 (WXCJKG11LM)

Fork from / based on deCONZ - Aqara Opple Wireless Scene Switch 4 Button - lumi.remote.b486opcn01 by @kenny.vanitterbeek

So now for usage with deCONZ there are blueprints for
- 6 button - link
- 4 button - option 1, option 2
- 2 button - this one

It´s my first blueprint and I only created it because I needed it for myself, adjustments were just minimal. Hope others can benefit from it too. Works for me, not sure if I can “support” it, we´ll see.

Button events supported:

  • Single press
  • Double press
  • Triple press
  • Hold in
  • Hold release

Blueprint screenshot (empty example)

Blueprint to import:

blueprint:
  name: deCONZ - Aqara Opple - Wireless Scene Switch 2 Button
  description: "Supported actions: single, double, triple, long and long release."
  domain: automation
  source_url: https://community.home-assistant.io/t/deconz-aqara-opple-wireless-scene-switch-2-button-lumi-remote-b286opcn01-wxcjkg11lm/272045
  # GUI elements
  input:
    remote:
      name: Remote
      description: Opple remote to use
      selector:
        device:
          integration: deconz
          manufacturer: LUMI
          model: lumi.remote.b286opcn01

    # --- BUTTON ONE ---------------------------------------------------------------
    button_one_single_press:
      name: Left button - Single press
      description: Action on single press button
      default: []
      selector:
        action: {}

    button_one_double_press:
      name: Left button - Double press
      description: Action on double press button
      default: []
      selector:
        action: {}

    button_one_triple_press:
      name: Left button - Triple press
      description: Action on triple press button
      default: []
      selector:
        action: {}

    button_one_hold_release:
      name: Left button - Long release
      description: Action on long release of button
      default: []
      selector:
        action: {}

    button_one_hold_in:
      name: Left button - Long in
      description: Action on long press button

      default: []
      selector:
        action: {}

    # --- BUTTON TWO ---------------------------------------------------------------
    button_two_single_press:
      name: Right button - Single press
      description: Action on single press button
      default: []
      selector:
        action: {}

    button_two_double_press:
      name: Right button - Double press
      description: Action on double press button
      default: []
      selector:
        action: {}

    button_two_triple_press:
      name: Right button - Triple press
      description: Action on triple press button
      default: []
      selector:
        action: {}

    button_two_hold_release:
      name: Right button - Long release
      description: Action on long release of button
      default: []
      selector:
        action: {}

    button_two_hold_in:
      name: Right button - Long in
      description: Action on long press button
      default: []
      selector:
        action: {}
# End GUI elements

# If press detected before end of action restart script
mode: restart
max_exceeded: silent

trigger:
  - platform: event
    event_type: deconz_event
    event_data:
      device_id: !input "remote"
action:
  - variables:
      event: "{{ trigger.event.data.event }}"
  - choose:
      # Automation

      # --- BUTTON ONE ---------------------------------------------------------------
      - conditions:
          - "{{ event == 1002 }}"
        sequence: !input "button_one_single_press"
      - conditions:
          - "{{ event == 1004 }}"
        sequence: !input "button_one_double_press"
      - conditions:
          - "{{ event == 1005 }}"
        sequence: !input "button_one_triple_press"
      - conditions:
          - "{{ event == 1003 }}"
        sequence: !input "button_one_hold_release"
      - conditions:
          - "{{ event == 1001 }}"
        sequence: !input "button_one_hold_in"

      # --- BUTTON TWO ---------------------------------------------------------------
      - conditions:
          - "{{ event == 2002 }}"
        sequence: !input "button_two_single_press"
      - conditions:
          - "{{ event == 2004 }}"
        sequence: !input "button_two_double_press"
      - conditions:
          - "{{ event == 2005 }}"
        sequence: !input "button_two_triple_press"
      - conditions:
          - "{{ event == 2003 }}"
        sequence: !input "button_two_hold_release"
      - conditions:
          - "{{ event == 2001 }}"
        sequence: !input "button_two_hold_in"

History:

  • 2021-01-23 20:04: First release
  • 2021-01-23 20:45: Blueprint content: fixed GUI (button names)
  • 2021-01-23 20:53: Blueprint content: updated blueprint name
  • 2021-01-23 20:55: Renamed links to other deCONZ Aqara Opple blueprints
  • 2021-01-23 22:23: Added blueprint screenshot (empty example)
  • 2021-01-30 15:55: Added tags for thread
2 Likes

Thanks for a blueprint. I’ve also created my own for a 2 button switch. But did not yet posted it to community. From now I will use yours :slight_smile: . But, I`ve noticed a problem: when I hold one of a buttons for a long time (more than 5 seconds) there is no unhold event from “conbee II” usb stick. Is everything working in your case and what zigbee coordinator do you use?

1 Like

Hi Andrew,

I‘m using a ConBee 2 with Phoscon/deCONZ too. Frankly speaking I don’t use all button states yet (single/double/triple are tested and working fine).

Can you monitor in the developer tools (events section) if the button event is detected correctly by HA? You need to start listening to „deconz_event“ and push the button.

For me it did not work, 5 seconds are a border value, you are absolutely right. So for dimming or manual shutter scenarios this might be an issue. But unfortunately that’s either Aqara Opple or deCONZ specific, the automation/blueprint can’t change this.

Maybe have a look at the deCONZ GitHub repository if there are any reports for this.

Update: nothing mentioned in the integration issue (https://github.com/dresden-elektronik/deconz-rest-plugin/issues/2061) which unfortunately is locked. You might create a new GitHub issue for the „very long press and release event“ missing.

Thanks for your help! I will try to open an issue. Previously I`ve wrote a scenario for dimming and found that it never stops, lights brightens up to the end or dims down to the 0, then I took a look at deconz events and found out that there are no unhold event in HA.

Great you put lights on that, I would’ve been really annoyed why things are not working when integrating more devices and especially bulbs :grinning:

Please post the link to the issue here so others can track the progress too. :+1:t3:

Is there any easy way to use this if I’m using the ZHA integration instead of deCONZ?

1 Like

I don´t think so, deCONZ, ZHA and ZigBee2MQTT have a different approach.

But as @Jarne_Roussard has blueprints for the 4 and 6 button version it should be very easy to cut them down to the 2 button version, have a look at:

Thanks for pointing me in the right direction, that was very helpful. Unfortunately the 2 button remote is sending some very different events than the 4 and 6 button versions, so I’ll have to map it out properly to get it integrated.

I use Zigbee2MQTT.
When using this blueprint I cannot select my 2 band switch: No matching devices found

When using another blueprint (for 3 bands) I can select it normally

Any help?

This blueprint is exclusively for deCONZ. It won´t work with ZigBee2MQTT. Instead have a look at the blueprints section, chances are good you´ll find a blueprint for this device with ZB2MQTT support.

Due to problems with the conbee / phoscon add-on, I also switched to the ZHA integration and can now not integrate the Aqara Opple Wireless Scene Switch 2 Button - lumi.remote.b286opcn01 into my programs because only the battery symbol appears but the switch does not appear per se.
I’m grateful for any help!

@zumheulen
This statement also applies to ZHA. To be more precise: this blueprint only works for deCONZ powered devices.

BUT: chances are good there are blueprints for ZHA too, just have a look. I’m really not familiar enough with ZHA and ZigBee2MQTT.

It looks like my aqara remote is nog pairing, it only shows me power.
I hold the pair button on the back and after 5 seconds its detected in ZHA

brave_GozTC929K9

This blueprint is for deCONZ ZigBee integration. Not for ZHA.