šŸŽ® ZHA, deCONZ, Zigbee2MQTT - IKEA E2001/E2002 STYRBAR Remote control Universal blueprint - all actions + double click events - control lights, media players and more with Hooks

Turns out Iā€™ve been grouping bulbs all wrong! I should have grouped bulbs using a helper, I had been doing it inside z2m.

That was going to be my next advice after I saw your comment no. 201.

I had put two and two together this morning.

Has using a HASS group helped at all?

It has for now, no more errors! I plan on spending a bit of time looking later as I canā€™t get the bulbs to go the full range of brightness on a single long press. Likely my experimenting has led me to mess some config up somewhere :wink: At least Iā€™ve learned how to flash new firmware, force OTA updates to IKEA switches and most importantly how to group bulbs in Hassio :yum:

1 Like

@LewisSpring I thought Iā€™d share what Iā€™ve learned/experienced using this blueprint so far. I know Iā€™ve still got a lot to learn but may be you or someone can help with my observations.

My main problem is around dimming groups of bulbs using z2m.

It appears that groups created using the helper interface donā€™t appear as devices in the blueprint. Iā€™ve seen it mentioned as a known issue in post #118. Is this still an issue/what is the suggested way of using groups?

Groups that are set up as zigbee groups (through z2m interface) as suggested in comment #55 lead to the buffer_full issue I first came across in post #202. Not sure where to go with this one!

The work around for groups (know idea if this is best) was to create a group through the helper interface and use the add action ā€œcall a serviceā€ ā€œlight.turn_onā€ or ā€œlight.turn_offā€ in the blueprint.

Iā€™m not sure how long press events for things like increasing brightness using ā€œcall a serviceā€ is handled. The brightness delta available in ā€œlight.turn_onā€ doesnā€™t seem to actually do anything when using the blueprint. Does the brightness delta come from the switch itself? I can see it set in the zigbee2mqtt interface under the device on the tab ā€œSettings (specific)ā€. Adjusting it doesnā€™t seem to do much either.

Why was I trying to increase the brightness delta? This is the second part of the problem Iā€™ve not quite sussed. It seems I canā€™t press and hold and get the full range of brightness. I have to do two long presses to go from min to max (or vice versa). This is why I was trying to increase the step so I could get the full range within one press. I can see in the z2m logs the button being held down for the duration, but during that duration the command to adjust the bulb brightness just stops whilst the the button is still sending.

The button presses look like this with brightness going from 255 to 0:

MQTT publish: topic 'zigbee2mqtt/bedroom ikea switch', payload '{"action":null,"action_brightness_delta":-75,"battery":100,"brightness":0,"linkquality":76,"update":{"installed_version":33816581,"latest_version":581,"state":"idle"},"update_available":null} 

The bulb sends look like this and there lots of duplicates. looking at the logs, starting at a brightness of 204 (duplicated 12 times) to
179 (duplicated 6 times) to
154 (duplicated 30 times):
3 brightness levels before stopping. The brightness steps are 25 which doesnā€™t match anything I have configured.

MQTT publish: topic 'zigbee2mqtt/Bedroom light 1', payload '{"brightness":154,"color_mode":"xy","linkquality":76,"power_on_behavior":"previous","state":"ON","update":{"installed_version":16786696,"latest_version":16786696,"state":"idle"},"update_available":null}'
MQTT publish: topic 'zigbee2mqtt/Bedroom light 2', payload '{"brightness":154,"color_mode":"xy","linkquality":80,"power_on_behavior":"previous","state":"ON","update":{"installed_version":16786696,"latest_version":16786696,"state":"idle"},"update_available":null}'

Any suggestions on how to best to use groups and what else may improve long presses are most welcome!

My config

alias: Bedroom ikea switch
description: ""
use_blueprint:
  path: lsismeiro/ikea_e2001_e2002.yaml
  input:
    integration: Zigbee2MQTT
    controller_entity: sensor.bedroom_ikea_switch_action
    helper_last_controller_event: input_text.last_controller_event
    action_button_up_short:
      - service: light.turn_on
        target:
          entity_id: light.bedroom_lights_2
        data: {}
    action_button_up_long:
      - service: light.turn_on
        data:
          brightness_step: 50
        target:
          entity_id: light.bedroom_lights_2
    button_up_long_loop: true
    helper_debounce_delay: 0
    action_button_down_long:
      - service: light.turn_on
        data:
          brightness_step: -50
        target:
          entity_id: light.bedroom_lights_2
    action_button_down_short:
      - service: light.turn_off
        target:
          entity_id: light.bedroom_lights_2
        data: {}
    button_down_long_loop: true
    button_down_long_max_loop_repeats: 25
    button_up_long_max_loop_repeats: 25

I personally think the HASS Groups are the best way of going about this.
I can select a group via the blueprint interface, not sure why you are having issues?
image

The blueprint does not use the brightness delta that the controller exposes.

alias: Controller - A Remote
description: ""
use_blueprint:
  path: lsismeiro/ikea_e2001_e2002.yaml
  input:
    integration: Zigbee2MQTT
    helper_last_controller_event: input_text.controller_A_remote
    action_button_up_long:
      - service: light.turn_on
        data:
          brightness_step_pct: 20
        target:
          entity_id: light.light
      - delay:
          hours: 0
          minutes: 0
          seconds: 0
          milliseconds: 500
    button_up_long_loop: true
    button_down_long_loop: true
    action_button_down_long:
      - service: light.turn_on
        data:
          brightness_step_pct: -20
        target:
          entity_id: light.light
      - delay:
          hours: 0
          minutes: 0
          seconds: 0
          milliseconds: 500
    button_up_long_max_loop_repeats: 6
    button_down_long_max_loop_repeats: 6
    helper_debounce_delay: 100

This is what I have done for a single light in a Controller automation, It should work for a light.group too.

This is a job better suited for the Light - Hook though.

I seem to have a problem getting the double press to work. No matter what I set the double press delay to, the automation patiently waits for it to pass, but still only registers it as a single press no matter what. Even if I try to use a single automation, with just one buttonā€™s double press enabled to do anything, it still only reads it as a single pressā€¦any clue to what might be the problem?

Using Zigbee2MQTT.

Messing with debounce delay doesnā€™t fix it either.

Hello, welcome.

Which blueprint are you using?
Have you enabled ā€œ(Optional) Expose ā€¦ button double press eventā€?

anyone able to get the left and right clicks working again on Z2MQTT?

Hiya

Iā€™m using Z2MQTT and left/right clicks are working fine, which blueprint are you using and could you send a copy of it?

sorry for the very late reply.
Iā€™m using the blueprint on this thread and it was working until a couple of weeks ago, something changed and apparently any left/right click doesnā€™t get recorded, I canā€™t even see it getting logged into Z2M.

Iā€™m having this same issue. Enabled the double click event with a very long window, but it just registers as two single clicks. Did you resolve this?

Hi, just done some tests.

With the latest version of the new blueprint and HA 2024.2.1, the double press is working.

Everything is as default and the helper_debounce_delay is set to 100.

Make sure your blueprint is up to date, and let me know if youā€™re still having issues

PS, Welcome, Ash.

Thanks you are my hero! Why isnā€™t your fix not in the official repo?

Unfortunately original author appears to have stepped away from the project, so @lsismeiro and I have forked to give a new central place for the fixes that the community have made.

Make sure youā€™re using the fork at GitHub - lsismeiro/awesome-ha-blueprints: A curated collection of automation blueprints for Home Assistant. for your blueprints

3 Likes

The double press actions seems to fail event if its activated. Is this a known issue?

I just updated my reply :laughing:
Make sure youā€™re using the fork above, this issue should be fixed.

If it doesnā€™t work, please post here or make an issue and we can look at it

1 Like

Double press still fails:


Version:

@LewisSpring
the double press is executing the action from the single press (yes I am pressing fast enough)
update:
looks like I was pressing too fast. (it worked with rodret but styrbar seems to be slow)

The timing is very specific. Itā€™s a lot slower than Iā€™d expect.

Can you try adding the debounce, but I did confirm it was working last week. Have not tried on latest HA updates, mind

Iā€™ve tried this blueprint today (the updated fork version on the lsismeiro fork) and Iā€™ve found 2 pretty weird bugs and 1 lack of customization that would be nice.

  1. Holding down to dim doesnā€™t stop once I release the button, so it dims down up to shutting the lights off. If during the dimming down I single press the dim-up button and release it does stop though.
  2. Holding left and right to change color warmth takes quite a while to start changing the colors, something like 3s or so whilst pressing the button does so immediately. Also, holding to dim up and down doesnā€™t have this delay.
  3. Is there a way to customize the step for the left and right buttons? It seems they move too fast for the bulbs I have.

Iā€™m using ZHA with ConBee II, the StyrBar default mapping and have configured the device with the lights hook where I tried many changes from default and nothing actually changed this loop behaviour. I havenā€™t enabled any of the double clicks.

i picked this remote up in the bargain area (Fundgrube), the white plastic variant (styrbar weiss)
but i am not able to get it to work.
my zha controller finds it as ā€œremote control n2ā€, but with ā€œunk_model
von unk_manufacturerā€.
but when it create an automation with this blueprint it never gets triggered at all.
using zha; EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis von ZHA
any advice?