ControllerX. Bring full functionality to light and media player controllers

any idea why this works in dev tools:

service: select.select_option
target:
  entity_id: select.basement_leds_preset
data:
  option: "One"

and this doesnt?

basement_rgb_controller:
  module: controllerx
  class: ZB3009LightController
  controller: RGBWallPanel_Basement
  integration:
    name: z2m
    listen_to: mqtt
  light:
    name: light.basement_leds
    color_mode: xy_color
  automatic_steps: 5
  manual_steps: 5
  delay: 50
  merge_mapping:
    "recall_1":
      - service: select.select_option
        target:
          entity_id: select.basement_leds_preset
        data:
          option: "One"
    "recall_2":
      - service: select.select_option
        target:
          entity_id: select.basement_leds_preset
        data:
          option: "Two"
    "recall_3":
      - service: select.select_option
        target:
          entity_id: select.basement_leds_preset
        data:
          option: "Three"
    "hue_move": 
      - service: script.random_basement_effect
    "color_temperature_move": click_white_value_up
    "color_temperature_move_up": on_min_white_value
    "color_temperature_move_down": on_min_white_value

Hi, I am trying to configure a Ikea Styrbar remote (E2002) with ControllerX. I can’t get the double click ā€œonā€ to work. I guess there is something wrong with the quoting, but I really don’t know… Any help, please?
Here is my app:

Sonos controller:
    module: controllerx
    class: E2002MediaPlayerController
    integration: zha
    controller: 28:76:81:ff:fe:fb:ca:3a
    media_player: media_player.living_room
    volume_steps: 50
    merge_mapping:
      "on": click_volume_up
      '"on"$2': play_pause

Hi @FachKraft42 ,

It should be "on$2", not '"on"$2'.

Regards,
Xavi M.

Thank you, you saved a noob!

Hi, I’m currently trying to setup a Hue dimmer remote to control one of my lights, but I don’t know why it is not triggering. I use Z2M installed on an extra host for Zigbee connectivity and the light is a Tuya bulb. MQTT is also configured and working.

apps.yaml

Light_Stefan_Deckenlicht:
  log_level: DEBUG
  module: controllerx
  class: HueDimmerController
  integration:
    name: z2m
    listen_to: mqtt
  controller: Switch_Deckenlicht_Stefan
  light: light.deckenlicht

Hi there,
I have been using your script from the time you have posted it. All this time, I have been trying to figure out this little annoyance of mine. That is the light will not turn back on from the off state physically if the light was dimmed to the lowest brightness using a controller (for me are the ikea controllers. E1743, E1524). Although HA shows it is on just the light itself is not lighting up. Toggling from the controller does nothing from the on state. However, if I toggle from HA gui, it works.

To test this further if it is not only the controllers experience this, I use HA gui to turn on/off and toggle between brightness. This seems to work.

My lights are from Ikea (gu10) and E26. Just wondering if you have any inputs.

Hi! I’ve started using ControllerX and it’s pretty great! However, I am having trouble getting double presses to work with an Ikea E1812 button. The single press works perfectly, but the double never does anything. I can’t follow the docs exactly as using toggle doesn’t trigger, only "on" does.

cupboard_led_shortcut_button:
  module: controllerx
  class: E1812LightController
  integration: zha
  controller: <My ID here>
  light: light.wled
  multiple_click_delay: 500
  mapping:
    "on":
      - service: select.select_next
        entity_id: select.wled_preset
        data:
          cycle: true
      - service: notify.persistent_notification
        metadata: {}
        data:
          message: Shortcut button 2 pressed
    "on$2":
      - service: select_previous
        entity_id: select.wled_preset
        data:
          cycle: true
      - service: notify.persistent_notification
        metadata: {}
        data:
          message: Shortcut button 2 DOUBLE pressed

Also, I have an Ikea E2123 media controller, I don’t see it in the list of supported controllers. Should I just Set it up via the event integration?

In case anyone ever ends up here with a similar issue, I figured it out! There was 2 issues with my config.

  1. The Ikea E1812 button fires an ā€œoffā€ ZHA event when double pressed for some reason, not ā€œonā€ twice.
  2. I had a typo in my service call, should have been ā€œselect.select_previousā€. When in doubt, check the AppDaemon logs!

Template exemple for Ikea Somrig
@xaviml native support ?

ikea_somrig_template:
  module: controllerx
  class: Controller
  controller: "28:76:81:ff:fe:3d:5a:9d"
  light: light.my_light
  integration:
    name: event
    event_type: zha_event
    controller_key: device_ieee
    action_template: "source_{device_ieee}_{command}_{endpoint_id}"
  mapping:
    source_28:76:81:ff:fe:3d:5a:9d_short_release_1:
      - service: notify.slack_hass_canaletto
        data:
          message: "{{now().strftime('%d/%m/%Y, %H:%M:%S')}} > 1 short" 
    source_28:76:81:ff:fe:3d:5a:9d_multi_press_complete_1:
      - service: notify.slack_hass_canaletto
        data:
          message: "{{now().strftime('%d/%m/%Y, %H:%M:%S')}} > 1 double" 
    source_28:76:81:ff:fe:3d:5a:9d_long_press_1:
      - service: notify.slack_hass_canaletto
        data:
          message: "{{now().strftime('%d/%m/%Y, %H:%M:%S')}} > 1 long" 
    source_28:76:81:ff:fe:3d:5a:9d_long_release_1:
      - service: notify.slack_hass_canaletto
        data:
          message: "{{now().strftime('%d/%m/%Y, %H:%M:%S')}} > 1 long release" 

    source_28:76:81:ff:fe:3d:5a:9d_short_release_2:
      - service: notify.slack_hass_canaletto
        data:
          message: "{{now().strftime('%d/%m/%Y, %H:%M:%S')}} > 2 short" 
    source_28:76:81:ff:fe:3d:5a:9d_multi_press_complete_2:
      - service: notify.slack_hass_canaletto
        data:
          message: "{{now().strftime('%d/%m/%Y, %H:%M:%S')}} > 2 double" 
    source_28:76:81:ff:fe:3d:5a:9d_long_press_2:
      - service: notify.slack_hass_canaletto
        data:
          message: "{{now().strftime('%d/%m/%Y, %H:%M:%S')}} > 2 long" 
    source_28:76:81:ff:fe:3d:5a:9d_long_release_2:
      - service: notify.slack_hass_canaletto
        data:
          message: "{{now().strftime('%d/%m/%Y, %H:%M:%S')}} > 2 long release" 

I installed appdaemon, how do I get controllerX into it?

Explain very slow because I know nothing about this.

Back story.

Installed Haos on a HP elitebook 1 week ago because I wanted more control.

I must say, it’s been hell. The convenience in finished products is something you easy forget.

Well I have lots of ikea products and I thought it would be nice to control them via HAos my self. But I’m leaning towards connecting the ikea controller again and let the Ikea add on do it’s thing so I can control my light like I’ve always have been doing with the trĆ„dfri controllers.

How come it’s so anti easy.

Hey @xaviml I see Shelly 1 is not listed as a controller, but I was wondering since the devices probably use the same syntax as the supported Shelly controllers, would it be possible to dim a bulb in deConz with a Shelly 1 mini Gen3 (or similar) via Controller X?

Hi my controllerX is not working, I installed AppDeamon and also ControllerX
but everything I tried is not working.

Hi, I’m hoping someone out there can help me.

I’ve recently had problems with switches controlling the wrong lights, that and me having a clean up led me to wipe the controllx & Deconz and start fresh… now I have my lights and switches in Deconz and I can see the switched in events when I press them, however when I try to link them to a light via Controllerx apps.yaml I get nothing, the light doesn’t change…

Oh I’ve also re-installed Appdeamon and restarted it, as well as rebooted the HA system numerous times.

here is my apps.yaml

Robins_bedside:
  module: controllerx
  class: E1743Controller
  integration: deconz
  controller: robins_bedside
  light: light.bedside2

the data from events is this

event_type: deconz_event
data:
  id: robins_bedside
  unique_id: cc:cc:cc:ff:fe:4f:1e:96
  event: 1002
  device_id: 5f61575488a04da5a82d288e989d3ae8
origin: LOCAL
time_fired: "2024-10-04T14:16:51.596384+00:00"
context:
  id: 01J9BY7YMCGWND48X2Z63KXMTG
  parent_id: null
  user_id: null

I have the Ikea E1743 controller

I’ve checked my log and I see the following

2024-10-05 17:19:17.710692 INFO AppDaemon: Calling initialize() for elsbeths_controller
2024-10-05 17:19:17.826032 INFO elsbeths_controller: šŸŽ® ControllerX v4.26.2
2024-10-05 17:19:17.918112 INFO AppDaemon: Calling initialize() for robins_controller
2024-10-05 17:19:17.923509 INFO robins_controller: šŸŽ® ControllerX v4.26.2
2024-10-05 17:19:17.986324 INFO AppDaemon: Calling initialize() for sonos_controller
2024-10-05 17:19:17.991956 INFO sonos_controller: šŸŽ® ControllerX v4.26.2
2024-10-05 17:19:18.083572 INFO AppDaemon: Calling initialize() for guest_light_controller
2024-10-05 17:19:18.088940 INFO guest_light_controller: šŸŽ® ControllerX v4.26.2
2024-10-05 17:19:18.152237 INFO AppDaemon: Calling initialize() for guestroom_switch_controller
2024-10-05 17:19:18.157659 INFO guestroom_switch_controller: šŸŽ® ControllerX v4.26.2
2024-10-05 17:19:18.188450 INFO AppDaemon: Calling initialize() for lounge_light_controller
2024-10-05 17:19:18.193854 INFO lounge_light_controller: šŸŽ® ControllerX v4.26.2
2024-10-05 17:19:18.253950 INFO AppDaemon: Calling initialize() for lounge_switch_controller
2024-10-05 17:19:18.259874 INFO lounge_switch_controller: šŸŽ® ControllerX v4.26.2
2024-10-05 17:19:18.291379 INFO AppDaemon: Calling initialize() for end_light_switch_controller
2024-10-05 17:19:18.297000 INFO end_light_switch_controller: šŸŽ® ControllerX v4.26.2
2024-10-05 17:19:18.327973 INFO AppDaemon: App initialization complete

however my Apps.yaml has only whats shown above. is there any way to find where is is getting those remotes from?

thank you for your help and time

kind regards

Robin

Hi all,
apologies if this has been already asked but I couldn’t find anything about it.

How can I control multiple speakers (meadia_players) with the same switch?
It works great with one speaker. However if I try to group speakers together and link the configuration to the group it doesn’t work.

Here is my setup:

      module: controllerx
      class: E1744MediaPlayerController
      integration: deconz
      controller: symfonisk_controller
      volume_steps: 25
      media_player: media_player.sonos_move #media_player.sonos_speaker_group

The commented entity are the grouped speakers.
Thank you!

Hello. My curtains stopped working at some point. Trying to figure out why. The log shows this warning. I am running controllerx version v4.28.0

2024-12-08 10:58:29.638839 WARNING computer_room_curtains: computer_room_curtains: Entity sensor.cr_curtains_action not found in namespace default

This is my setup.

living_room_curtains:
  module: controllerx
  class: E1743CoverController
  controller: sensor.lr_curtains_action
  integration: z2m
  cover: cover.lr_curtain_lt_curtain

The E1743 is still paired. I can see the action toggle on, off when I press the button.

lr_curtains = {"action":"off","battery":75,"linkquality":76,"update":{"installed_version":604241926,"latest_version":604241926,"state":"idle"},"update_available":false}
action = off

Update: Just saw this github post after posting here. Possibly related. It seems to affect controller ending with _action.

controller: sensor.lr_curtains_action

However, the below still works.

shion_dimmer:
  module: controllerx
  class: E1743Z2MLightController
  controller: shion_dimmer
  integration:
    name: z2m
    listen_to: mqtt
  light:
    name: shion
    mode: mqtt

Hi @duceduc ,

It seems that there are breaking changes in Zigbee2MQTT. They removed the sensors from Home Assistant, and recommend using events.

My recommendation is to use the second configuration you shared, which uses mqtt directly and works faster and more efficiently.

I will need to remove the sensor configuration from ControllerX at some point too if Z2M removed it.

Regards,
Xavi M.

Hey. Thanks for reply. I have tried a few combination using these examples and it didn’t work. I tried again after you suggest to used the above and it works. Possibly a typo on my end. This below is working for me. Thanks.

Working:

cr_curtains:
  module: controllerx
  class: E1743CoverController
  integration:
    name: z2m
    listen_to: mqtt
  controller: cr_curtains
  cover: cover.cr_curtain_lt_curtain

It’s a shame the sensor has bee removed. I have revert back to using the phillps hue bridge for all my lights since using z2m acts weirdly. The light would not turn on if it is turned off below 10% dimmed. If I pair it with phillp hue bridge, it turns back on just fine. I am using all ikea lights.

Hi @xaviml

I just posted over in the github issue relating to the problem of mqtt now using events instead of actions. Just posting here to give a heads up there is an option (at least for now) to continue to use what they call ā€œlegacy action sensorsā€. Here it is in case anyone has not seen it:

I have just found an option within zigbee2mqtt that allows for the old action entities to continue to work. You just have to enable it.

Go to zigbee2mqtt, and select settings - home assistant integration and then select the option ā€œHome Assistant legacy action sensorsā€. This will then allow your setup to continue to work. How much longer for I have no idea as this might go in the future but I hope it doesn’t. I have multiple actions set for my remotes and reverting to z2m controls means I somehow have to get the devices to work with mqtt which at this moment in time I have no idea about, or somehow work out how to call an event rather than an action and I have no idea if this would even work with controllerx.

Hopefully this helps someone out there… Ive been pulling what hair I have left out until I found this in a reddit forum!

Cheers

Phill

5 Likes

For the time being, this is the solution I’ve ended up finding too, as I haven’t been able to get the direct mqtt mode to work.

I hope @xaviml will have time to adapt ControlerX to this Z2M evolution!