ControllerX. Bring full functionality to light and media player controllers

Hi @MrTopKat,

Unfortunately, you cannot do this in a single config app, you will need to use 2. One for when the light is on, and another when is off with the callback constraint (AppDaemon feature):

kitchen_panel_controller_on:
  module: controllerx
  class: E1810Controller
  controller: rc_kitchen
  integration: deconz
  light: light.kitchen_lights
  action_delay:
    1002: 10
  constrain_input_select: light.kitchen_lights,on

kitchen_panel_controller_off:
  module: controllerx
  class: E1810Controller
  controller: rc_kitchen
  integration: deconz
  light: light.kitchen_lights
  constrain_input_select: light.kitchen_lights,off

Regards,
Xavi M.

Hi @xaviml
Thanks, this is working.

Keep up to good work.

Regards,
Guido

1 Like

Ive been using Symfonisk remote directly linked to the lights it been controlling, but now linked the symfonisk controller with ControllerX and its very nice and smooth, but the amount of steps when turning it is alot less now, meaning i have to rotate it 2-3 times to get the same result i just had to spin one time befor… ive seen i can adjust steps / clicks for other controller, but havent found how i do that with the Symfonisk controller? anyone can help?

Hi @joachi,

You can use automatic_steps (default: 10) and delay (default: 500ms). I recommend you lower them down until it works to your like and the network allows it.

Read more about those attributes here.

Regards,
Xavi M.

1 Like

Great! worked like charm! thank you!

1 Like

Hi all,

:warning: ControllerX is affected by the breaking changes of AppDaemon 4.2.0

I use the AppDaemon addon which is still in 4.1.0, but I imagine it will be released with the new AppDaemon version soon.

My recommendation is not to yet upgrade your AppDaemon addon or version until I review and fix the changes. I will do this once the addon is released with the new AppDaemon version.

Breaking changes only apply for people using the templete render from what I understand from the post, but I will make sure everything is still working as expected.

I will keep you all posted.

Regards,
Xavi M.

1 Like

?-) I have installed here AppDaemon 4 Addon which has a version number 0.7.2.
I can not find this version number 4.2.0 anywhere on the page of AppDaemon: https://github.com/hassio-addons/addon-appdaemon.

Hi @carsten_h,

One thing is the AppDaemon addon, and the other thing is the AppDaemon project. The AppDaemon addon is a Home Assistant addon that boots AppDaemon for you, so you do not need to install AppDaemon in your machine.

AppDaemon addon last version as of now is 0.7.2 and uses AppDaemon 4.1.0. However, AppDaemon is now releasing 4.2.0 (with the breaking changes beforementioned), so the AppDaemon addon will need to bump the AppDaemon version from 4.1.0 to 4.2.0, and it will probably release the AppDaemon addon 0.8.0.

Hope this clarifies your confusion. So my recommendation is not to upgrade the AppDaemon addon (there will be a new release soon) until I test it myself, and I make sure everything works as expected.

Regards,
Xavi M.

Sure will do so.

Hi Xavi,
Thanks for a great tool - I’ve recently stumpled over a challenge:

I’m trying to have a couple of lights controlled by two controllers (located in different end of the room), however when I implement both controllers I cannot always turn off the lights (neither of the controllers will let me do this)

The two controllers (different IKEA’s) are configured simple as follows

The new one - round IKEA
kaeldergang_kontakt2_app:
module: controllerx
class: ICTCG1Controller
controller: kaeldergang_kontakt
integration: deconz
light: light.kaeldergang_2

The old one 5-button IKEA
kaeldergang_kontakt_app:
module: controllerx
class: E1810Controller
controller: kaeldergang_kontakt
integration: deconz
light: light.kaeldergang_2

Is there something I should note in order to get this to work?

Kind regards

Hi @motionist,

Configuration looks good to me. I would need 5o see the AppDaemon logs to see qhat is happening. Please open a ticket in GitHub issue with the “Question” form and add rhe logs in there as well as what you are experiencing.

Regards,
Xavi M.

thx

I will do a log over the weekend.

regards

Morten

It’s here I think, I’ll await your findings before I update. :blush:

1 Like

I am only using standard functions in ControllerX and I forgot to switch off the auto update, so I got the new version tonight. So far everything is working fine!

1 Like

Hi everyone,

I have checked the compatibilities of the new AppDaemon version and everything worked except for configurations that imply template rendering. So you can safely upgrade if you are not using template rendering (using the double curly braces {{ }}).

I will push a new release either today or tomorrow for the fix for the template rendering.

If you find any other problems with the new AppDaemon version, please let me know.

Regards,
Xavi M.

Hi all,

I just released ControllerX v4.18.1 with the fix for the incompatibility for AppDaemon 4.2.0. This just fix the problem with the template rendering, the rest was working as expected.

Note that ControllerX 4.18.1 is also compatible with AppDaemon 4.1.0.

Regards,
Xavi M.

2 Likes

Would like to start off by saying thank you very much for this integration! It’s saved a lot of time and energy for creating the automations for the various devices I have! :slight_smile:

I am however struggling to get the SmartThings Button - IM6001-BTP01 to work correctly.

For some reason, it just doesn’t respond. I can setup automations to act when I single click, double click or hold and that works fine, but it doesn’t work with the template.

Here’s the app.yaml config (without actions):

lounge_light_button:
  module: controllerx
  class: SmartThingsButtonLightController
  controller: sensor.lounge_button_action
  integration: z2m
  light: light.lounge_lamp

Here’s the app.yaml config (with actions):

lounge_light_button:
  module: controllerx
  class: SmartThingsButtonLightController
  controller: sensor.lounge_button_action
  integration: z2m
  light: light.lounge_lamp
actions:
   - "single"
   - "double"
   - "hold"

In the logs I can see this:

Logger: homeassistant.helpers.template
Source: helpers/template.py:1706
First occurred: 10:27:38 (31 occurrences)
Last logged: 10:28:30

Template variable warning: ‘dict object’ has no attribute ‘click’ when rendering ‘{{ value_json.click }}’
Template variable warning: ‘dict object’ has no attribute ‘action’ when rendering ‘{{ value_json.action }}’
Template variable warning: ‘dict object’ has no attribute ‘battery’ when rendering ‘{{ value_json.battery }}’
Template variable warning: ‘dict object’ has no attribute ‘temperature’ when rendering ‘{{ value_json.temperature }}’

Which I’m not sure if it’s related to the issue or not.

Hi

The log is as follows - same issue when I try to turn on - then off on the IKEA 5 buttom - followed by some rotation of the dimmer.

I will submit in Github

Kind regards

Morten

2022-01-12 14:13:23.661014 WARNING AppDaemon: Excessive time spent in utility loop: 4001.0000000000005ms, 3999.0ms in check_app_updates(), 2.0000000000004547ms in other
2022-01-12 14:13:25.446509 INFO events: [‘K��ldergang’, ‘Morten’, ‘g��ster’] → [‘Gange’, ‘K��ldergang’, ‘Morten’, ‘g��ster’]
2022-01-12 14:13:25.457616 INFO events: sensor.personer_hjemme: 4, attributes={‘and’: ‘Gange, K��ldergang, Morten, og g��ster’, ‘or’: ‘Gange, K��ldergang, Morten, eller g��ster’, ‘people’: [‘Gange’, ‘K��ldergang’, ‘Morten’, ‘g��ster’], ‘icon’: ‘mdi:account-group’, ‘count’: 4}
2022-01-12 14:13:26.322069 INFO events: [‘Gange’, ‘K��ldergang’, ‘Morten’, ‘g��ster’] → [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’, ‘g��ster’]
2022-01-12 14:13:26.335511 INFO events: sensor.personer_hjemme: 5, attributes={‘and’: ‘Gange, Gruppe, K��ldergang, Morten, og g��ster’, ‘or’: ‘Gange, Gruppe, K��ldergang, Morten, eller g��ster’, ‘people’: [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’, ‘g��ster’], ‘icon’: ‘mdi:account-group’, ‘count’: 5}
2022-01-12 14:13:27.806887 WARNING AppDaemon: Excessive time spent in utility loop: 3129.0ms, 3127.0ms in check_app_updates(), 2.0ms in other
2022-01-12 14:13:27.823413 INFO events: [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’, ‘g��ster’] → [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’]
2022-01-12 14:13:27.827070 INFO events: sensor.personer_hjemme: 4, attributes={‘and’: ‘Gange, Gruppe, K��ldergang, og Morten’, ‘or’: ‘Gange, Gruppe, K��ldergang, eller Morten’, ‘people’: [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’], ‘icon’: ‘mdi:account-group’, ‘count’: 4}
2022-01-12 14:13:28.922258 INFO events: [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’] → [‘Gange’, ‘Gruppe’, ‘Morten’]
2022-01-12 14:13:28.927505 INFO events: sensor.personer_hjemme: 3, attributes={‘and’: ‘Gange, Gruppe, og Morten’, ‘or’: ‘Gange, Gruppe, eller Morten’, ‘people’: [‘Gange’, ‘Gruppe’, ‘Morten’], ‘icon’: ‘mdi:account-group’, ‘count’: 3}
2022-01-12 14:13:32.600271 INFO events: [‘Gange’, ‘Gruppe’, ‘Morten’] → [‘Gruppe’, ‘Morten’]
2022-01-12 14:13:32.609068 INFO events: sensor.personer_hjemme: 2, attributes={‘and’: ‘Gruppe og Morten’, ‘or’: ‘Gruppe eller Morten’, ‘people’: [‘Gruppe’, ‘Morten’], ‘icon’: ‘mdi:account-multiple’, ‘count’: 2}
2022-01-12 14:13:32.641608 WARNING AppDaemon: Excessive time spent in utility loop: 3744.0ms, 3742.0ms in check_app_updates(), 2.0ms in other
2022-01-12 14:13:33.498439 INFO events: [‘Gruppe’, ‘Morten’] → [‘Morten’]
2022-01-12 14:13:33.514353 INFO events: sensor.personer_hjemme: 1, attributes={‘and’: ‘Morten’, ‘or’: ‘Morten’, ‘people’: [‘Morten’], ‘icon’: ‘mdi:account’, ‘count’: 1}
2022-01-12 14:13:34.477971 INFO events: [‘Morten’] → [‘K��ldergang’, ‘Morten’]
2022-01-12 14:13:34.486975 INFO events: sensor.personer_hjemme: 2, attributes={‘and’: ‘K��ldergang og Morten’, ‘or’: ‘K��ldergang eller Morten’, ‘people’: [‘K��ldergang’, ‘Morten’], ‘icon’: ‘mdi:account-multiple’, ‘count’: 2}
2022-01-12 14:13:35.197366 INFO events: [‘K��ldergang’, ‘Morten’] → [‘K��ldergang’, ‘Morten’, ‘g��ster’]
2022-01-12 14:13:35.210218 INFO events: sensor.personer_hjemme: 3, attributes={‘and’: ‘K��ldergang, Morten, og g��ster’, ‘or’: ‘K��ldergang, Morten, eller g��ster’, ‘people’: [‘K��ldergang’, ‘Morten’, ‘g��ster’], ‘icon’: ‘mdi:account-group’, ‘count’: 3}
2022-01-12 14:13:37.721305 WARNING AppDaemon: Excessive time spent in utility loop: 3884.0ms, 3881.0ms in check_app_updates(), 3.0ms in other
2022-01-12 14:13:38.143248 INFO events: [‘K��ldergang’, ‘Morten’, ‘g��ster’] → [‘Gange’, ‘K��ldergang’, ‘Morten’, ‘g��ster’]
2022-01-12 14:13:38.146384 INFO events: sensor.personer_hjemme: 4, attributes={‘and’: ‘Gange, K��ldergang, Morten, og g��ster’, ‘or’: ‘Gange, K��ldergang, Morten, eller g��ster’, ‘people’: [‘Gange’, ‘K��ldergang’, ‘Morten’, ‘g��ster’], ‘icon’: ‘mdi:account-group’, ‘count’: 4}
2022-01-12 14:13:39.060317 INFO events: [‘Gange’, ‘K��ldergang’, ‘Morten’, ‘g��ster’] → [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’, ‘g��ster’]
2022-01-12 14:13:39.064441 INFO events: sensor.personer_hjemme: 5, attributes={‘and’: ‘Gange, Gruppe, K��ldergang, Morten, og g��ster’, ‘or’: ‘Gange, Gruppe, K��ldergang, Morten, eller g��ster’, ‘people’: [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’, ‘g��ster’], ‘icon’: ‘mdi:account-group’, ‘count’: 5}
2022-01-12 14:13:39.977092 INFO events: [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’, ‘g��ster’] → [‘Gange’, ‘Gruppe’, ‘Morten’, ‘g��ster’]
2022-01-12 14:13:39.980115 INFO events: sensor.personer_hjemme: 4, attributes={‘and’: ‘Gange, Gruppe, Morten, og g��ster’, ‘or’: ‘Gange, Gruppe, Morten, eller g��ster’, ‘people’: [‘Gange’, ‘Gruppe’, ‘Morten’, ‘g��ster’], ‘icon’: ‘mdi:account-group’, ‘count’: 4}
2022-01-12 14:13:40.796359 INFO events: [‘Gange’, ‘Gruppe’, ‘Morten’, ‘g��ster’] → [‘Gange’, ‘Gruppe’, ‘Morten’]
2022-01-12 14:13:40.798991 INFO events: sensor.personer_hjemme: 3, attributes={‘and’: ‘Gange, Gruppe, og Morten’, ‘or’: ‘Gange, Gruppe, eller Morten’, ‘people’: [‘Gange’, ‘Gruppe’, ‘Morten’], ‘icon’: ‘mdi:account-group’, ‘count’: 3}
2022-01-12 14:13:42.115612 WARNING AppDaemon: Excessive time spent in utility loop: 3361.0ms, 3359.0ms in check_app_updates(), 2.0ms in other
2022-01-12 14:13:43.532504 INFO events: [‘Gange’, ‘Gruppe’, ‘Morten’] → [‘Gruppe’, ‘Morten’]
2022-01-12 14:13:43.535211 INFO events: sensor.personer_hjemme: 2, attributes={‘and’: ‘Gruppe og Morten’, ‘or’: ‘Gruppe eller Morten’, ‘people’: [‘Gruppe’, ‘Morten’], ‘icon’: ‘mdi:account-multiple’, ‘count’: 2}
2022-01-12 14:13:44.370476 INFO events: [‘Gruppe’, ‘Morten’] → [‘Morten’]
2022-01-12 14:13:44.373393 INFO events: sensor.personer_hjemme: 1, attributes={‘and’: ‘Morten’, ‘or’: ‘Morten’, ‘people’: [‘Morten’], ‘icon’: ‘mdi:account’, ‘count’: 1}
2022-01-12 14:13:46.605771 WARNING AppDaemon: Excessive time spent in utility loop: 3487.0ms, 3486.0ms in check_app_updates(), 1.0ms in other
2022-01-12 14:13:51.410091 INFO events: [‘Morten’] → [‘K��ldergang’, ‘Morten’]
2022-01-12 14:13:51.417692 INFO events: sensor.personer_hjemme: 2, attributes={‘and’: ‘K��ldergang og Morten’, ‘or’: ‘K��ldergang eller Morten’, ‘people’: [‘K��ldergang’, ‘Morten’], ‘icon’: ‘mdi:account-multiple’, ‘count’: 2}
2022-01-12 14:13:51.933004 WARNING AppDaemon: Excessive time spent in utility loop: 4218.0ms, 4216.0ms in check_app_updates(), 2.0ms in other
2022-01-12 14:13:52.133419 INFO events: [‘K��ldergang’, ‘Morten’] → [‘K��ldergang’, ‘Morten’, ‘g��ster’]
2022-01-12 14:13:52.140004 INFO events: sensor.personer_hjemme: 3, attributes={‘and’: ‘K��ldergang, Morten, og g��ster’, ‘or’: ‘K��ldergang, Morten, eller g��ster’, ‘people’: [‘K��ldergang’, ‘Morten’, ‘g��ster’], ‘icon’: ‘mdi:account-group’, ‘count’: 3}
2022-01-12 14:13:53.170591 INFO events: [‘K��ldergang’, ‘Morten’, ‘g��ster’] → [‘Gange’, ‘K��ldergang’, ‘Morten’, ‘g��ster’]
2022-01-12 14:13:53.174279 INFO events: sensor.personer_hjemme: 4, attributes={‘and’: ‘Gange, K��ldergang, Morten, og g��ster’, ‘or’: ‘Gange, K��ldergang, Morten, eller g��ster’, ‘people’: [‘Gange’, ‘K��ldergang’, ‘Morten’, ‘g��ster’], ‘icon’: ‘mdi:account-group’, ‘count’: 4}
2022-01-12 14:13:54.181205 INFO events: [‘Gange’, ‘K��ldergang’, ‘Morten’, ‘g��ster’] → [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’, ‘g��ster’]
2022-01-12 14:13:54.183969 INFO events: sensor.personer_hjemme: 5, attributes={‘and’: ‘Gange, Gruppe, K��ldergang, Morten, og g��ster’, ‘or’: ‘Gange, Gruppe, K��ldergang, Morten, eller g��ster’, ‘people’: [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’, ‘g��ster’], ‘icon’: ‘mdi:account-group’, ‘count’: 5}
2022-01-12 14:13:55.459745 INFO kaeldergang_kontakt_app: :video_game: Button event triggered: 1002
2022-01-12 14:13:55.470709 INFO kaeldergang_kontakt2_app: :video_game: Button event triggered: 1002
2022-01-12 14:13:55.481666 INFO kaeldergang_kontakt_app: :running_man: Running Predefined (toggle) now
2022-01-12 14:13:55.496390 INFO kaeldergang_kontakt_app:
:robot: Service: light.toggle

  • entity_id: light.kaeldergang_2
    2022-01-12 14:13:55.501372 INFO kaeldergang_kontakt2_app: :running_man: Running Predefined (rotate_right_quick) now
    2022-01-12 14:13:55.515117 INFO kaeldergang_kontakt2_app:
    :robot: Service: light.turn_on
  • entity_id: light.kaeldergang_2
  • brightness: 255
    2022-01-12 14:13:57.982207 INFO events: [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’, ‘g��ster’] → [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’]
    2022-01-12 14:13:57.985869 INFO events: sensor.personer_hjemme: 4, attributes={‘and’: ‘Gange, Gruppe, K��ldergang, og Morten’, ‘or’: ‘Gange, Gruppe, K��ldergang, eller Morten’, ‘people’: [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’], ‘icon’: ‘mdi:account-group’, ‘count’: 4}
    2022-01-12 14:13:58.591925 WARNING AppDaemon: Excessive time spent in utility loop: 5655.0ms, 5653.0ms in check_app_updates(), 2.0ms in other
    2022-01-12 14:14:04.163174 WARNING AppDaemon: Excessive time spent in utility loop: 4418.0ms, 4414.0ms in check_app_updates(), 4.0ms in other
    2022-01-12 14:14:05.497539 INFO events: [‘Gange’, ‘Gruppe’, ‘K��ldergang’, ‘Morten’] → [‘Gange’, ‘Gruppe’, ‘Morten’]

I have this working nicely with my Ecosmart zigbee remotes (aka MLI404002) but the color temp doesn’t work at all and I don’t think the documentation is reflecting what the appropriate actions are to put in apps.yaml for these button pushes. I’m replying to your post where you reference putting them in for MLI404011, but I can’t seem to get this to work with 002 even though I know it does when connected to the pre-linked bulbs.

Here is one of the definitions I have. This works save color temp and the double light definition, which I was playing around with. (I’d love to get double taps working for this as well)

mb_rm_j_j:
module: controllerx
class: MLI404002LightController
controller: cc:cc:cc:ff:fe:e5:eb:3a
integration: zha
light: light.master_lamp_jared
light: light.master_lamp_chair
actions:
- “on”
- “off”
- move_up
- move_down
- stop
- step_up
- step_down
- recall
constrain_input_select: input_boolean.master_lamp_lock_jared,off

I have a couple other questions non-related…can I reference 2 lights in a remote definition? For reasons I don’t want to really get into depth on, I cannot use a light group in this instance. Its…a spousal use issue with specific lamps. This is a pretty complicated setup where I am using constraints to stop certain lamps from turning on/off sometimes depending on some input booleans…but I have a 3rd light that I want to always turn on/off regardless. I expect I can just go ahead and add yet another definition to the apps.yaml for the button pushes, but I’d rather keep this as simple as possible.

Next question…can I override a button definition to run something else?

Next question…I see some references to multi-tap button usage here. Is this something that has to be defined in apps.yaml or is it tied to only certain controllers?

Thanks

@xaviml

For the WXCJKG13LMLightController
image

with ZHA, the long press is 1_hold and not "1_long press" (small error in the documentation)

Here is the simplest way to manage 3 bottons, but it would be easier if each row was visible individually with cover functions…

# A Q A R A  O P P L E  2
volets: 
  module: controllerx
  class: WXCJKG13LMLightController
  controller: 54:ef:44:40:40:4c:48:fd
  integration: zha
  light: light.off
  mapping:
    1_single:
      service: cover.stop_cover
      entity_id: cover.vr_baie
    1_double:
      service: cover.close_cover
      entity_id: cover.vr_baie
    1_hold:
      service: cover.close_cover
      entity_id: cover.vr_baie
    1_release:
      service: cover.stop_cover
      entity_id: cover.vr_baie

    2_single:
      service: cover.stop_cover
      entity_id: cover.vr_baie
    2_double:
      service: cover.open_cover
      entity_id: cover.vr_baie
    2_hold:
      service: cover.open_cover
      entity_id: cover.vr_baie
    2_release:
      service: cover.stop_cover
      entity_id: cover.vr_baie
  • 3 4 5 and 6