ControllerX. Bring full functionality to light and media player controllers

Hi @mjombly,

You are correct. ControllerX does not turn on the light when brighting up/down. There is no option to directly do that, but it is not a but idea. However, I am not saying is impossible to achieve, it is just verbose. The configuration for the left dimmer would be:

KD_dimmer_left:
  log_level: DEBUG
  module: controllerx
  class: AUA1ZBR2GWLightController
  controller: "00:0d:6f:ff:fe:c1:ad:b5"
  light: light.dining_room_sofa_lights
  integration: zha
  mapping:
    2_toggle: toggle
    2_step_up:
      - "on"
      - click_brightness_up
    2_step_down:
      - "on"
      - click_brightness_down
    2_step_color_temp_up:
      - "on"
      - click_colortemp_up
    2_step_color_temp_down:
      - "on"
      - click_colortemp_down

So, you just need to add ā€œonā€ to all actions. The actions is no needed anymore because mapping is used.

I would suggest using action_delta as well, but I would use something larger than 300 (the default), so it would send a request every X milliseconds, whatever you put in action_delta.

Regards,
Xavi M.

1 Like

Are there any plans to add the E2001 dimmer remote from IKEA? Couldnā€™t see it on your list of supported devices

Hi @Archaic_Warrior,

This remote is already supported, but the name is different ā€” W2049. Here is the documentation:

Regards,
Xavi M.

Hi Xavi,

Thanks for the update, and your HUGE work !
Can I check if the ā€˜double clickā€™ is seen, because now it looks like itā€™s not seen, double click is seen as single click :


first is single click, 2nd & 3th are double clicks.

Hi @erwin.fiten,

Not sure how fast you are double-clicking, but I see you are using the regular z2m integration. This listens to state changes, so there might be delays. There are 2 options for you to try:

  • Increment the multiple_click_delay variable to 800 or higher and do much slower double clicks.
  • Switch to MQTT listener for the z2m integration. This will allow ControllerX to listen to MQTT messages directly and not need to listen to state changes from HA. You can read more about this here.

Let me know if you have any questions.

Regards,
Xavi M.

I will try this later on, for now, itā€™s working 95% of the times, so OK for me.

I also have another question, I have also some spare ā€™ E1743 (IKEA)ā€™ switches.
I would like to use one as an ā€˜auto fade-in, fade-outā€™ button.
So, when I press the ON button, the light starts at 1% brightness and goes to 100% in 10 minutes.
Also, the other way around, when I press the OFF button, I would like the light to go from current brightness to off in about 10 minutes. Is this possible within ControllerX, or do I need to do this with automation or node-red ?

Erwin

Hey Xaviml

Hope all is well!

I can get the HUE Dimmer - Philips929002398602LightController into DeConz but it seems not to be supported in ControllerX with DeConz.

Is there any chance this will be supportet in the future ?

Apps log:

2022-02-26 17:40:50.675612 INFO AppDaemon: Initializing app dimmer_bryggers_X2 using class Philips929002398602LightController from module controllerx
2022-02-26 17:40:50.691410 INFO dimmer_bryggers_X2: šŸŽ® ControllerX v4.18.2
2022-02-26 17:40:50.708153 WARNING dimmer_bryggers_X2: ------------------------------------------------------------
2022-02-26 17:40:50.709279 WARNING dimmer_bryggers_X2: Unexpected error running initialize() for dimmer_bryggers_X2
2022-02-26 17:40:50.710329 WARNING dimmer_bryggers_X2: ------------------------------------------------------------
2022-02-26 17:40:50.711883 WARNING dimmer_bryggers_X2: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/appdaemon/app_management.py", line 163, in initialize_app
    await init()
  File "/config/appdaemon/apps/controllerx/cx_core/controller.py", line 108, in initialize
    await self.init()
  File "/config/appdaemon/apps/controllerx/cx_core/type/light_controller.py", line 147, in init
    await super().init()
  File "/config/appdaemon/apps/controllerx/cx_core/type_controller.py", line 63, in init
    await super().init()
  File "/config/appdaemon/apps/controllerx/cx_core/release_hold_controller.py", line 18, in init
    await super().init()
  File "/config/appdaemon/apps/controllerx/cx_core/controller.py", line 121, in init
    default_actions_mapping = self.get_default_actions_mapping(self.integration)
  File "/config/appdaemon/apps/controllerx/cx_core/controller.py", line 239, in get_default_actions_mapping
    raise ValueError(f"This controller does not support {integration.name}.")
ValueError: This controller does not support deconz.
2022-02-26 17:40:50.712964 WARNING dimmer_bryggers_X2: ------------------------------------------------------------

Had to try :wink:

Best Regards
Jan

Iā€™m having major difficulties getting this up and running. Iā€™ve installed the ControllerX through HACS. I couldnā€™t find it initially but it showed up under automations at some point. However I cannot for the life of me get it to work.

I have a config/appdaemon/apps/apps.yaml file that I put my configuration for the remote in, but thereā€™s no config/appdaemon/appdaemon.yaml, and I donā€™t know where thatā€™s supposed to come from.

You link to the hassio install instructions mentions the "AppDaemon 4" add-on in the Supervisor add-on store but it is not there. So far I have not been able to figure out how I am supposed to get this working. Any ideas?

Hi @erwin.fiten ,

Sorry for the late reply.

I have never tried this with ControllerX, and I never included this as a use case since the idea is that ControllerX allows you interact ā€œimmidiatelyā€ between controllers and devices. However, this is possible by tinkering some delays. For this, you can leverage the hold action and tweak delay and automatic_steps. You can read more about those parameters here: Controller types - ControllerX

This is a rough example of what you would like to achieve:

example_app:
  module: controllerx
  class: E1743Controller
  controller: sensor.livingroom_controller_action
  integration: z2m
  light: light.bedroom
  automatic_steps: 20 # This indicates how many times we change the
  delay: 30000 # 600000ms (10 minutes) divided by 20 (automatic_steps)
  merge_mapping:
    "on": # When "on" button is pressed ...
      - on_min_brightness # ... we first change brightness to minimum
      - hold_brightness_up # ... we start changing the brightness

When you press the ā€œonā€ button, it will change brightness to 1% and start changing the brightness towards 100% every 30 seconds (20 times, which is 10 minutes).

Regards,
Xavi M.

1 Like

Hi @Jano1959,

Controllers are supported when the default mapping is defined. In this case, I would need to know from someone with this controller the events of the controller. For this, you will need to fill in this ticket form.

Even if the controller is not added, you can use the standard LightController and define the mapping with the mapping attribute. You can read more about custom mapping here.

Regards,
Xavi M.

1 Like

Hi @Dutchess_Nicole,

ControllerX runs on AppDaemon, which can be executed with the AppDaemon addon from the addon store. They have recently renamed the addon from AppDaemon 4 to just AppDaemon.

Please follow this instructions: Installation | ControllerX

You can also read what is AppDaemon and why it is needed for ControllerX here.

TLTR; These are the steps:

  • Install ControllerX from HACS.
  • Install AppDaemon addon.
  • Run AppDaemon and check addon logs.
  • Add your configuration in /config/appdaemon/apps/apps.yaml file.

Regards,
Xavi M.

Hi @xaviml,
Iā€™ve tried to use the HueSmartButtonLightController with z2m but it didnā€™t work.
What can we do to make it compatible with z2m ?

Thanks in advance
Have a nice day.

Hi @bbcorp,

This controller does not have yet a default mapping for Z2M integration. This is because I do not have this controller, so I do not know what are the events that fired. However, adding support to it is quite strainght forward, but not possible if the mapping is not known. Could you please fill the ā€œNew Deviceā€ form when creating an issue in the GitHub repository? You will need to share in the the events that the device fires.

Cheers,
Xavi M.

Hey @xaviml ! Thanks for this awesome solution.
For several days i was trying to make the Hue Dimmer Controller working with Z2M.
Iā€™m using a seperate RPI which runs Z2M but it did not work at all.

I used the config from your github:

example_app:
  module: controllerx
  class: HueDimmerController
  controller: < controller_id >
  integration: < z2m, deconz, zha >
  light: < light entity >

Turns out i canā€™t use the class HueDimmerController but need to use
Philips929002398602LightController. Really strange because it is the same Controller as in the picture image.

Maybe itā€™s my config but i thought it was worth mentioning for other users encountering the same issue.

grtz Mountain

Hi @mountain ,

Note that there are 2 Hue Dimmer controllers which are very similar. If you have the one on that picture, it means that you should be using class: HueDimmerController. Could you please share your exact configuration and the AppDaemon logs when it initializes and when you interact with the controller?

Regards,
Xavi M.

Just so we are clear:
Is this one using HueDimmerController:
image

ā€¦ whereas this one (aka V2) using Philips929002398602LightController:
image

ā€¦?

Sidebar: Does anyone know the difference, other than the printed button face of the switch?

Yeah i thought so to.
I used the Deconz stick before and in that config i used HueDimmerController.

Below the Appdaemon log:

šŸ¤– Service: light.turn_off
  - entity_id: light.slaapkamer
2022-05-03 09:26:03.468732 INFO slaapkamer: šŸŽ® Button event triggered: `off_press_release`
2022-05-03 09:26:03.473258 INFO slaapkamer: šŸƒ Running `Predefined (off)` now
2022-05-03 09:26:03.476035 INFO slaapkamer: 
šŸ¤– Service: light.turn_off
  - entity_id: light.slaapkamer
2022-05-03 09:26:06.009753 INFO slaapkamer: šŸŽ® Button event triggered: `on_press_release`
2022-05-03 09:26:06.014016 INFO slaapkamer: šŸƒ Running `Predefined (on)` now
2022-05-03 09:26:06.016821 INFO slaapkamer: 
šŸ¤– Service: light.turn_on
  - entity_id: light.slaapkamer

And this is the config:

  module: controllerx
  class: Philips929002398602LightController
  controller: dimmer switch slaapkamer
  integration:
    name: z2m
    listen_to: mqtt
  light: light.slaapkamer

Regards,
Mountain

Hi @mountain,

Correct, you can see both controllers documentation in docs:

According to AppDaemon logs you shared, configuration is working as expected. Are there any problems you are facing?

Regards,
Xavi M.

There seems to be a new Ikea remote coming which replaces the ā€žStyrbarā€œ: https://www.ifun.de/ikea-neue-symfonisk-wandhalterung-und-fernbedienung-im-juli-188041/ (Sorry it is only in German).
I donā€˜t know if it has seven or five buttons, the text says five, but it looks like the vertical buttons have two possibilities to press.

1 Like

Thanks @carsten_h , it looks good! Looking forward to give support to it.