ControllerX. Bring full functionality to light and media player controllers

Hi’ @Soni

Welcome ! :smiley:

You’ve set your E1743 controller as a switch controller.
So ControllerX expects to control a switch entity and not a light entity.

You can check E1743 documentation here:

Try and revise your app config to:

chambre:
  module: controllerx
  class: E1743Controller
  controller: zigbee2mqtt/0x842e14fffe17b5f9/action
  integration: z2m
  light: light.ampoule_chambre

Ciao !

Thanks, still not working, can’t understand why…

E1743 is ok in Z2M

Zigbee2MQTT:info  2020-09-05 22:30:49: MQTT publish: topic 'zigbee2mqtt/0x842e14fffe17b5f9', payload '{"action":"","battery":87,"linkquality":23,"update_available":false}'
Zigbee2MQTT:info  2020-09-05 22:30:49: MQTT publish: topic 'zigbee2mqtt/0x842e14fffe17b5f9', payload '{"battery":87,"click":"","linkquality":23,"update_available":false}'
Zigbee2MQTT:info  2020-09-05 22:30:49: MQTT publish: topic 'zigbee2mqtt/0x842e14fffe17b5f9/action', payload 'on'
Zigbee2MQTT:info  2020-09-05 22:30:49: MQTT publish: topic 'zigbee2mqtt/0x842e14fffe17b5f9/click', payload 'on'

but nothing happens to the light :confused:

Replying to myself I had to put sensor.ikea_tradfri_action instead of zigbee2mqtt/xxx/action

Thanks for help :slight_smile:

Do you have some example for 1743 to up and down brightness by holding ?

Tried this, not working

chambre:
  module: controllerx
  class: E1743Controller
  controller: sensor.ikea_tradfri_action
  integration: z2m
  light: light.ampoule_chambre
  mapping: 
    brightness_up_hold: hold_brightness_up
    brightness_down_hold: hold_brightness_down

Sorry @Soni

My mistake - wasn’t fully awake (more coffee needed apparently)
Didn’t notice that you had a mqtt controller and a z2m integration in config.
That won’t work as you’ve found out :slight_smile:

Is sensor.ikea_tradfri_action the correct entity id as presented in HA ?
It could very well be ok and correct, if you’ve applied a friendly name in z2m devices config ?

My E1743 is like this in HA:

Other issue: z2m currently have issues with some deprecated click payload keys not working on some versions. But your log seems to have both the click (legacy) and action key. So should be ok i believe.

Can you control your yeelight as expected from HA via service calls with light.ampoule_chambre as entity id ?

You don’t need special mapping for controlling brightness.
It’s default behaviour for E1743 light controller :smiley:

And your appdaemon.yaml has both HASS and MQTT plugins included hopefully ?

secrets: /config/secrets.yaml
appdaemon:
  latitude: 55.XXXXXX
  longitude: 10.XXXXXX
  elevation: 24
  time_zone: Europe/Copenhagen
  plugins:
    HASS:
      type: hass
    MQTT:
      type: mqtt
      namespace: mqtt # This is important
      client_host: XXX.XXX.XX.XX
      client_user: mqtt broker user
      client_password: mqtt broker password
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:

Everything is fine, I changed sensor.ikea_tradfri_action to sensor.ikea_tradfri_click :wink:

Thanks for help :slight_smile:

I’ll use those 1743 to control shelly dimmer :wink:

Hi’ @Soni

Glad you got it to work :+1:

Just be aware that the z2m click payload key is now deprecated and will disappear from z2m at some point in the future.

As mentioned earlier, you can use the MQTT controller as well in ControllerX if you have the MQTT plugin installed.
Also you can ‘play’ with the many different specific light controller parameters eg. transition, delay, automatic_steps, smooth_power_on, in order to ‘tweak’ settings to your liking.

chambre:
  module: controllerx
  class: E1743Controller #Ikea on/off remote
  controller: 'zigbee2mqtt/0x842e14fffe17b5f9/action' # Has to be z2m friendly name !! 
  integration: mqtt
  #transition: 500
  #automatic_steps: 8
  #delay: 400
  #add_transition_turn_toggle: false
  #smooth_power_on: true
  light: light.ampoule_chambre

Ciao !

Im using this remote, and tried with z2m and mqtt set up,

If I use _action in either config it is just an on/off switch.
It Will only dim if click is used.

Hi guys, I have a question.

I have the 4 button hue remote, and got some frustration from the wifey of some lost functionality, when I remove the Hue hub, and went to ZHA and ControllerX.

Is it possible to mimic the Hue functionality where it switches between scenes, when I keep pressing the turn on button? So it just cycles through maybe 3 scenes that I specify?

Right now an example of a configuration looks like this:

hall_controller:
  module: controllerx
  class: HueDimmerController
  controller: 00:17:88:01:04:e5:33:4a
  integration: zha
  light: light.hall_lights
1 Like

Hi’ @Danzal

Zigbee2mqtt has changed default payload keys,
Since v1.14.3 click payload has been announced deprecated (still working though)
So depending on what z2m version you’re currently on you will experience different behaviour.
Check my remarks in this issue

Ciao !

1 Like

Thanks

Got it running ok for now under mqtt.

Can the e1743 have double click function? If so what’s the config format for it

Hi’ Dan.

Nope. E1743 only support single click, hold and release commands.
You can check Xavi’s documentation for this controller here

Ciao !

1 Like

I would love double click support as well, any news on that?

Or, maybe even cooler, a sequence of actions: e.g.:
First press on: turn on light X
Second press on: Also turn on light Y
Third press on: Increase brightness of both X & Y to 100%
First press off:Turn off only light Y
2nd press off, also turn off light X

I have this now running with node-red, but coming more out of the box with ControllerX would be really cool.

1 Like

You can add this functionality very easy with node red I can send you the flow if you like.

How smooth is the dimming? Is it one continuous dim up and down or does it sort of pulse?

If I have hue bulbs and hue dimmer connected via ZHA does the dim up and down whilst held button work smoothly.

If yes how? Never been able to get this to work with the service calls and parameters before.

1 Like

Hi @Blair_Pollard,

You can check the Videos section in the documentation to see how smooth it works. In my experience, it depends on the integration (z2m, mqtt, deconz, zha…) and how the controller and the light are connected in the network.

Regarding the “how”: what ControllerX does with Python code (through AppDaemon) is to periodically (default 350ms) call HA call services to change the brightness (or any other attribute). Then for each call, there is an added transition that makes the light change quite smoothly.

Let me know if this answered your questions.

Regards,
Xavi M.

Hi @spudje,

As you pointed out in the message you replies, it is something I have been meaning to add. I know is possible, but some changes to the core functionality will need to be made to implement this feature.

I will create a ticket in GitHub to indicate the progress on this as well as the proposed implementation.

1 Like

Hi @bjorn.sivertsen,

ControllerX is stateless when it comes to know the times a button was click and run different actions for them. To achieve this, you will need to create an input_select to indicate which action to run from ControllerX and then write 3 different configs, on for each scene. In my opinion is a little bit cumbersome and you will achieve this with a much clear solution with HA automations. However, you could use ControllerX for the rest of the button and use “excluded_actions” to exclude the turn on button.

Let me know if this helped you and if you need help with implementation.

Cheers,
Xavi M.

1 Like

I’m not able to put my setup working.
Controller: E1744
Media Player: Sonos

appdaemon.yaml

secrets: /config/secrets.yaml
appdaemon:
  latitude: 
  longitude: 
  elevation: 
  time_zone: Europe/Chelas
  plugins:
    HASS:
      type: hass
  MQTT:
    type: mqtt
    namespace: mqtt # This is important
    client_host: x.x.x.x
    client_user: xxxxxxxxxxxx
    client_password: xxxxxxx
http:
  url: http://127.0.0.1:5050
hadashboard:
admin:
api:
apps.yaml

sonos_cozinha:
  module: controllerx
  class: E1744MediaPlayerController
  controller: sensor.0x14b457fffe79c9b9_action
  integration: z2m
  media_player: media_player.cozinha_2
  delay: 200

Any tip?
Thanks!

Same problem here, cant figure it out, not errors and i can see actions in mqtt explorer, in home assistant, in appdaemon :frowning: tryied everything and giving up now

Hi. I’m fairly new to Home Assistant. Bought the ConBee II and IKEA WS 1000lm bulb + E1810 remote set to try it out in HA. Setting up the remote in deCONZ was a mess so I’m glad I discovered ControllerX. Thank you, @xaviml!
For the light, I added the Circadian Lighting custom component to HA. Now I want to create an automation where if I push the brightness or color temp buttons on the remote, the Circadian Lighting switch will be turned off. Could you please provide guidance on how I can do this?

Found the solution. I dont know if the “action” values chaned with the software update of symfonisk controller but here is what i did:

in * /config/appdaemon/apps/controllerx/cx_device/ikea.py I edited action mapping to this:

def get_z2m_actions_mapping(self) -> TypeActionsMapping:
    return {
        "rotate_left": MediaPlayer.HOLD_VOLUME_DOWN,
        "rotate_right": MediaPlayer.HOLD_VOLUME_UP,
        "rotate_stop": MediaPlayer.RELEASE,
        "play_pause": MediaPlayer.PLAY_PAUSE,
        "skip_forward": MediaPlayer.NEXT_TRACK,
        "skip_backward": MediaPlayer.PREVIOUS_TRACK,
    } 

works now :slight_smile: