Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Support for color/color_temp values from mqtt #236

Closed
ashp8i opened this issue Jan 31, 2021 · 29 comments
Closed

[FEATURE REQUEST] Support for color/color_temp values from mqtt #236

ashp8i opened this issue Jan 31, 2021 · 29 comments
Assignees
Labels
enhancement New feature or request

Comments

@ashp8i
Copy link

ashp8i commented Jan 31, 2021

Feature Request

I would like to be able to map color / color_temp values published from mqtt, also can you confirm if action groups from mqtt are supported

using the following yaml:

  module: controllerx
  class: LightController
  controller: zigbee2mqtt/Ashish-Full-Remote/action
  integration:
    name: mqtt
    action_group: 16388
  light: light.ashish_room_lamp
  mapping:
    "on": toggle
    "off": toggle
    brightness_down_click: click_brightness_down
    brightness_down_hold: hold_brightness_down
    brightness_down_release: release
    brightness_up_click: click_brightness_up
    brightness_up_hold: hold_brightness_up
    brightness_up_release: release
    color_temperature: *(color_temperature_value)
    color: *(color_xy_value)

* Denotes new feature request
@ashp8i ashp8i added the enhancement New feature or request label Jan 31, 2021
@xaviml
Copy link
Owner

xaviml commented Jan 31, 2021

Hi @ashp8i,

The feature to use the action_xy_color and the action_color_temp is possible, however, it needs to be configured by controller. However, I have seen this type of request quite often, so I will start factoring out to the LightController, so anyone can use this in the YAML mapping. However, which controller are you using that fires the xy_color and color_temp?

Regarding the action groups, you can use action_group the way you are using it to indicate which action group you want to listen. However, I just realised that it just parses lists, so your yaml should be like:

example_app:
  module: controllerx
  class: LightController
  controller: zigbee2mqtt/Ashish-Full-Remote/action
  integration:
    name: mqtt
    action_group: [16388]
  light: light.ashish_room_lamp
  mapping:
    "on": toggle
    "off": toggle
    brightness_down_click: click_brightness_down
    brightness_down_hold: hold_brightness_down
    brightness_down_release: release
    brightness_up_click: click_brightness_up
    brightness_up_hold: hold_brightness_up
    brightness_up_release: release
    color_temperature: *(color_temperature_value)
    color: *(color_xy_value)

I will fix this, so you can add just the action group individually without a list if needed. In your example, if the controller fires an action group different from 16388, it will not fire the action that carries with it. So the mapping will just work if the action group is 16388.

Hope it helps, and I will leave this request open to fix/add this feature request.

Also, could you show me the mqtt messages where the xy color and color temp is shown?

Thanks,
Xavi M.

@ashp8i
Copy link
Author

ashp8i commented Jan 31, 2021

Hi Xavi,

Thanks for your response, it's the Müller-Licht 404010 and I also have a Aurora AU-A1ZBR1GW and AU-A1ZBR2GW which also output color values

@ashp8i
Copy link
Author

ashp8i commented Feb 1, 2021

Zigbee2MQTT:info  2021-02-01 00:06:16: MQTT publish: topic 'zigbee2mqtt/Ashish-Full-Remote', payload '{"action":"color_temp","action_color_temperature":153,"action_group":16388,"linkquality":24,"rate":100,"transition_time":10}'
Zigbee2MQTT:info  2021-02-01 00:06:16: MQTT publish: topic 'zigbee2mqtt/Ashish-Full-Remote', payload '{"action":"","linkquality":24,"rate":100}'
Zigbee2MQTT:info  2021-02-01 00:06:16: MQTT publish: topic 'zigbee2mqtt/Ashish-Full-Remote/action', payload 'color_temp'

Zigbee2MQTT:info  2021-02-01 00:08:13: MQTT publish: topic 'zigbee2mqtt/Living Spot', payload '{"brightness":254,"linkquality":108,"state":"ON"}'
Zigbee2MQTT:debug 2021-02-01 00:08:27: Received Zigbee message from 'Ashish-Full-Remote', type 'commandMoveToColor', cluster 'lightingColorCtrl', data '{"colorx":32302,"colory":14512,"transtime":0}' from endpoint 1 with groupID 16388
Zigbee2MQTT:info  2021-02-01 00:08:27: MQTT publish: topic 'zigbee2mqtt/Ashish-Full-Remote', payload '{"action":"color_wheel","action_color":{"x":0.493,"y":0.221},"action_group":16388,"linkquality":27,"rate":100,"transition_time":0}'
Zigbee2MQTT:info  2021-02-01 00:08:27: MQTT publish: topic 'zigbee2mqtt/Ashish-Full-Remote', payload '{"action":"","linkquality":27,"rate":100}'
Zigbee2MQTT:info  2021-02-01 00:08:27: MQTT publish: topic 'zigbee2mqtt/Ashish-Full-Remote/action', payload 'color_wheel'
Zigbee2MQTT:debug 2021-02-01 00:08:30: Received Zigbee message from 'Ashish-Full-Remote', type 'commandMoveToColor', cluster 'lightingColorCtrl', data '{"colorx":29739,"colory":13540,"transtime":0}' from endpoint 1 with groupID 16388
Zigbee2MQTT:info  2021-02-01 00:08:30: MQTT publish: topic 'zigbee2mqtt/Ashish-Full-Remote', payload '{"action":"color_wheel","action_color":{"x":0.454,"y":0.207},"action_group":16388,"linkquality":27,"rate":100,"transition_time":0}'
Zigbee2MQTT:info  2021-02-01 00:08:30: MQTT publish: topic 'zigbee2mqtt/Ashish-Full-Remote', payload '{"action":"","linkquality":27,"rate":100}'
Zigbee2MQTT:info  2021-02-01 00:08:30: MQTT publish: topic 'zigbee2mqtt/Ashish-Full-Remote/action', payload 'color_wheel'

xaviml added a commit that referenced this issue Feb 6, 2021
…_from_controller predefined actions

related to #236
@xaviml
Copy link
Owner

xaviml commented Feb 6, 2021

Hi @ashp8i,

The support for this controller has been added to a pre-release v4.6.0b0.

Could you please confirm that the support for Müller-Licht 404010 works as expected for z2m?

I added the following predefined actions:

  • xycolor_from_controller: It reads action_color from the MQTT payload and uses it to change the color of the light.
  • colortemp_from_controller: It reads action_color_temperature from the MQTT payload and uses it to change the color temperature of the light.

Thank you,
Xavi M.

@xaviml
Copy link
Owner

xaviml commented Feb 6, 2021

Also, if you want the Aurora devices to be supported by ControllerX, you can create a new ticket with the specification of the mapping in here.

Cheers,

@ashp8i
Copy link
Author

ashp8i commented Feb 6, 2021

Hi Xavi,

Thanks for your hard work, code looks to be doing the right thing but not quite there yet let me provide you with some logs, also could you help me to set highest output in logs, so we can get all the debugging info needed: -

2021-02-06 23:00:24.064657 INFO bedfullremote1: 🎮 ControllerX v4.6.0b0
2021-02-06 23:00:25.489181 INFO bedfullremote1: 🎮 Button event triggered: `on`
2021-02-06 23:00:25.504400 INFO bedfullremote1: 🏃 Running `Predefined (toggle)` now
2021-02-06 23:00:25.515900 INFO bedfullremote1: 🤖 Service: light.toggle
2021-02-06 23:00:25.520234 INFO bedfullremote1:   - entity_id: light.ashish_test_lamp
2021-02-06 23:00:26.179096 INFO bedfullremote1: 🎮 Button event triggered: `off`
2021-02-06 23:00:26.187971 INFO bedfullremote1: 🏃 Running `Predefined (toggle)` now
2021-02-06 23:00:26.204155 INFO bedfullremote1: 🤖 Service: light.toggle
2021-02-06 23:00:26.213183 INFO bedfullremote1:   - entity_id: light.ashish_test_lamp
2021-02-06 23:01:03.916121 INFO bedfullremote1: 🎮 Button event triggered: `color_temp`
2021-02-06 23:01:03.922836 INFO bedfullremote1: 🏃 Running `Predefined (colortemp_from_controller)` now
2021-02-06 23:01:03.938916 WARNING bedfullremote1: No event data present
2021-02-06 23:01:06.658501 INFO bedfullremote1: 🎮 Button event triggered: `color_wheel`
2021-02-06 23:01:06.664491 INFO bedfullremote1: 🏃 Running `Predefined (xycolor_from_controller)` now
2021-02-06 23:01:06.683741 WARNING bedfullremote1: No event data present
2021-02-06 22:46:56.568868 INFO bedfullremote1:   - entity_id: light.ashish_test_lamp
2021-02-06 22:46:56.565725 INFO bedfullremote1: 🤖 Service: �[1mlight.toggle�[0m
2021-02-06 22:46:56.556556 INFO bedfullremote1: 🏃 Running `Predefined (toggle)` now
2021-02-06 22:46:56.535516 INFO bedfullremote1: 🎮 Button event triggered: `off`
2021-02-06 22:46:55.795614 INFO bedfullremote1:   - entity_id: light.ashish_test_lamp
2021-02-06 22:46:55.790029 INFO bedfullremote1: 🤖 Service: �[1mlight.toggle�[0m
2021-02-06 22:46:55.780974 INFO bedfullremote1: 🏃 Running `Predefined (toggle)` now
2021-02-06 22:46:55.758888 INFO bedfullremote1: 🎮 Button event triggered: `on`
2021-02-06 22:46:53.569584 INFO AppDaemon: Found 16 total apps
2021-02-06 22:46:53.568874 INFO AppDaemon: /config/appdaemon/apps/apps.yaml added or modified
2021-02-06 22:46:53.460107 INFO AppDaemon: Reading config
2021-02-06 22:46:52.451894 INFO bedfullremote1: 🎮 ControllerX v4.6.0b0
2021-02-06 22:46:52.439862 INFO AppDaemon: Initializing app bedfullremote1 using class MLI404011LightController from module controllerx
2021-02-06 22:46:52.437259 INFO AppDaemon: Terminating bedfullremote1
2021-02-06 22:46:52.359901 INFO AppDaemon: Found 16 total apps
2021-02-06 22:46:52.358157 INFO AppDaemon: App 'bedfullremote1' changed
2021-02-06 22:46:52.356924 INFO AppDaemon: /config/appdaemon/apps/apps.yaml added or modified
2021-02-06 22:46:52.204341 INFO AppDaemon: Reading config
2021-02-06 22:46:23.853156 WARNING bedfullremote1: No event data present
2021-02-06 22:46:23.846208 INFO bedfullremote1: 🏃 Running `Predefined (colortemp_from_controller)` now
2021-02-06 22:46:23.828098 INFO bedfullremote1: 🎮 Button event triggered: `color_temp`
2021-02-06 22:46:21.121555 WARNING bedfullremote1: No event data present
2021-02-06 22:46:21.107073 INFO bedfullremote1: 🏃 Running `Predefined (xycolor_from_controller)` now
2021-02-06 22:46:21.093829 INFO bedfullremote1: 🎮 Button event triggered: `color_wheel`

apps.yaml

bedfullremote1:
  module: controllerx
  #  class: LightController
  class: MLI404011LightController
  controller: zigbee2mqtt/Ashish-Full-Remote/action
  integration:
    name: mqtt
    action_group: [16388]
  light: light.ashish_test_lamp
  mapping:
    "on": toggle
    "off": toggle
    brightness_down_click: click_brightness_down
    brightness_down_hold: hold_brightness_down
    brightness_down_release: release
    brightness_up_click: click_brightness_up
    brightness_up_hold: hold_brightness_up
    brightness_up_release: release
    color_temp: colortemp_from_controller
    color_wheel: xycolor_from_controller

also can't seem to figure out what is wrong with action groups, other than that thanks for your help hope I can help with debugging let me know what you require from my side, so I can assist with the feature request

Regards,
Ashish

@xaviml
Copy link
Owner

xaviml commented Feb 6, 2021

Hi @ashp8i,

You can activate the debugging logs by placing log_level: DEBUG in your config, at the same level as module and class.

Also, the problem is that you set up the mqtt integration rather than the z2m one. So with the current config your config is listening only to zigbee2mqtt/Ashish-Full-Remote/action, but the action_color is in zigbee2mqtt/Ashish-Full-Remote for example. This is why, your config should be change to:

bedfullremote1:
  module: controllerx
  #  class: LightController
  class: MLI404011LightController
  controller: Ashish-Full-Remote
  integration:
    name: z2m
    listen_to: mqtt
    action_group: [16388]
  light: light.ashish_test_lamp
  mapping:
    "on": toggle
    "off": toggle
    brightness_down_click: click_brightness_down
    brightness_down_hold: hold_brightness_down
    brightness_down_release: release
    brightness_up_click: click_brightness_up
    brightness_up_hold: hold_brightness_up
    brightness_up_release: release
    color_temp: colortemp_from_controller
    color_wheel: xycolor_from_controller

And since you are now using the MLI404011LightController class and the mapping you defined is the default mapping for this controller, you can remove the mapping section, as well as the [ ] from action_group, so the following should also work:

bedfullremote1:
  module: controllerx
  class: MLI404011LightController
  controller: Ashish-Full-Remote
  integration:
    name: z2m
    listen_to: mqtt
    action_group: 16388
  light: light.ashish_test_lamp

Let me know if this works for you.

Regards,
Xavi M.

@ashp8i
Copy link
Author

ashp8i commented Feb 7, 2021

Hi Xavi,

Many Thanks for getting this working, the colour wheel works as expected also action groups now work discretely so all good few gotchas, cannot seem to use color_temp control and cannot work out how to control all lights when all three LED's lit

021-02-07 00:41:45.215237 INFO bedfullremote1: 🏃 Running `Predefined (toggle)` now
2021-02-07 00:41:45.217269 INFO bedfullremote1: 🤖 Service: light.toggle
2021-02-07 00:41:45.219022 INFO bedfullremote1:   - entity_id: light.ashish_room_lamp
2021-02-07 00:41:45.228575 DEBUG bedfullremote1: call_service: light/toggle, {'entity_id': 'light.ashish_room_lamp'}
2021-02-07 00:43:53.180826 DEBUG bedfullremote1: MQTT data event: {'topic': 'zigbee2mqtt/Ashish-Full-Remote', 'payload': '{"action":"color_temp","action_color_temperature":153,"action_group":16388,"linkquality":36,"rate":100,"transition_time":10}', 'wildcard': None}
2021-02-07 00:43:53.193552 DEBUG bedfullremote1: 🎮 Button event triggered, but not registered: `color_temp`
2021-02-07 00:43:53.199760 DEBUG bedfullremote2: MQTT data event: {'topic': 'zigbee2mqtt/Ashish-Full-Remote', 'payload': '{"action":"color_temp","action_color_temperature":153,"action_group":16388,"linkquality":36,"rate":100,"transition_time":10}', 'wildcard': None}
2021-02-07 00:43:53.215628 DEBUG bedfullremote2: Action group 16388 not found in action groups: [16389]
2021-02-07 00:43:53.223599 DEBUG bedfullremote3: MQTT data event: {'topic': 'zigbee2mqtt/Ashish-Full-Remote', 'payload': '{"action":"color_temp","action_color_temperature":153,"action_group":16388,"linkquality":36,"rate":100,"transition_time":10}', 'wildcard': None}
2021-02-07 00:43:53.225098 DEBUG bedfullremote3: Action group 16388 not found in action groups: [16390]
2021-02-07 00:43:53.228173 DEBUG bedfullremote1: MQTT data event: {'topic': 'zigbee2mqtt/Ashish-Full-Remote', 'payload': '{"action":"","linkquality":36,"rate":100}', 'wildcard': None}
2021-02-07 00:43:53.229732 DEBUG bedfullremote1: 🎮 Button event triggered, but not registered: ``
2021-02-07 00:43:53.233097 DEBUG bedfullremote2: MQTT data event: {'topic': 'zigbee2mqtt/Ashish-Full-Remote', 'payload': '{"action":"","linkquality":36,"rate":100}', 'wildcard': None}
2021-02-07 00:43:53.234534 DEBUG bedfullremote2: 🎮 Button event triggered, but not registered: ``
2021-02-07 00:43:53.237378 DEBUG bedfullremote3: MQTT data event: {'topic': 'zigbee2mqtt/Ashish-Full-Remote', 'payload': '{"action":"","linkquality":36,"rate":100}', 'wildcard': None}
2021-02-07 00:43:53.238712 DEBUG bedfullremote3: 🎮 Button event triggered, but not registered: ``

this is much better as I'm struggling to implement this in node-red got stuck at passing color values from z2m to tasmota

Many Thanks,
Ashish

@ashp8i
Copy link
Author

ashp8i commented Feb 7, 2021

Apologies, figured out color_temp might not be mapped in the default template so this works now: -

bedfullremote1:
  module: controllerx
  class: MLI404011LightController
  controller: Ashish-Full-Remote
  integration:
    name: z2m
    listen_to: mqtt
    action_group: 16388
  light: light.ashish_room_lamp
  merge_mapping:
    color_temp: colortemp_from_controller
  log_level: DEBUG

Regards,
Ashish

@ashp8i
Copy link
Author

ashp8i commented Feb 7, 2021

also noticed a brightness button issue the default mapping brightness_up_hold seems to be dimming overidding with

  merge_mapping:
    brightness_up_hold: hold_brightness_up

seems to do the trick

Many Thanks,
Ashish

@xaviml
Copy link
Owner

xaviml commented Feb 7, 2021

Hi @ashp8i,

Apologies, figured out color_temp might not be mapped in the default template so this works now.

I will add this to the default mapping, thanks!

also noticed a brightness button issue the default mapping brightness_up_hold seems to be dimming overidding with

Indeed, you are right, I mapped to dim, rather than bright up, thank you for reporting it back :)

Both changes will be reflected in the next stable release.

Regards,
Xavi M.

xaviml added a commit that referenced this issue Feb 7, 2021
@xaviml
Copy link
Owner

xaviml commented Feb 7, 2021

This feature has been added to ControllerX v4.6.0

@xaviml xaviml closed this as completed Feb 7, 2021
@CorePoint
Copy link

CorePoint commented Mar 31, 2021

@xaviml
Sorry if this is not the right place to ask this, but if I try to use the config you posted here the remote doesn't work for me as opposed to not using "listen_to: mqtt". Am I doing something wrong?
Here are the debug messages:

2021-03-31 21:58:32.307770 DEBUG Tint: light.desk is not recognized as a template
2021-03-31 21:58:32.337507 DEBUG Tint: toggle is not recognized as a template
2021-03-31 21:58:32.440347 INFO Tint: Previous message repeated 1 times
2021-03-31 21:58:32.442221 DEBUG Tint: click_brightness_down is not recognized as a template
2021-03-31 21:58:32.453439 DEBUG Tint: hold_brightness_down is not recognized as a template
2021-03-31 21:58:32.464368 DEBUG Tint: release is not recognized as a template
2021-03-31 21:58:32.475741 DEBUG Tint: click_brightness_up is not recognized as a template
2021-03-31 21:58:32.486948 DEBUG Tint: hold_brightness_up is not recognized as a template
2021-03-31 21:58:32.497895 DEBUG Tint: release is not recognized as a template
2021-03-31 21:58:32.508669 DEBUG Tint: xycolor_from_controller is not recognized as a template
2021-03-31 21:58:32.520063 DEBUG Tint: colortemp_from_controller is not recognized as a template

Tint:
  module: controllerx
  class: MLI404011LightController
  controller: namexyz
  integration:
    name: z2m
    listen_to: mqtt
  light: light.desk
  log_level: DEBUG

@xaviml
Copy link
Owner

xaviml commented Mar 31, 2021

Hi @CorePoint

Did you set up MQTT broker in appdaemon.yaml? You can see here how to do it in the Z2M section and MQTT one.

Regards,
Xavi M.

@CorePoint
Copy link

@xaviml
Oh sorry, I should have stated that I already set it up like this.
The only thing where I was not 100% sure was the namespace option as I didn't have set anything like that for z2m or mosquitto, so I used mqtt as it said in the example. Could the error lie there?

@xaviml
Copy link
Owner

xaviml commented Mar 31, 2021

Hi @CorePoint,

You did well, namespace should be "mqtt" so ControllerX can read from mqtt.

The logs you showed are the ones including when you are pressing the controller?

Could you please restart AppDaemon and share the logs when AppDaemon initializes? It should show in there the connection to MQTT.

Additionally, could you share the z2m logs when you press the controller?

Finally, you said that when not listening to mqtt, it works, right?

Regards,
Xavi M

@CorePoint
Copy link

CorePoint commented Mar 31, 2021

2021-03-31 23:01:13.882856 INFO MQTT: Using 'mqtt-client/status' as Will Topic
2021-03-31 23:01:13.884700 INFO MQTT: Using 'mqtt-client/status' as Birth Topic
2021-03-31 23:01:13.886349 INFO MQTT: Using appdaemon_mqtt_client as Client ID
2021-03-31 23:01:13.891419 INFO AppDaemon: Initializing HTTP
2021-03-31 23:01:13.894044 INFO AppDaemon: Using 'ws' for event stream
2021-03-31 23:01:13.908202 INFO AppDaemon: Starting API
2021-03-31 23:01:13.926513 INFO AppDaemon: Starting Admin Interface
2021-03-31 23:01:13.929817 INFO AppDaemon: Starting Dashboards
2021-03-31 23:01:14.006324 INFO HASS: Connected to Home Assistant 2021.3.4
2021-03-31 23:01:14.157482 INFO AppDaemon: App 'Tint' added
2021-03-31 23:01:14.172757 INFO AppDaemon: App 'Symfonsik' added
2021-03-31 23:01:14.176798 INFO AppDaemon: Found 2 total apps
2021-03-31 23:01:14.181402 INFO AppDaemon: Starting Apps with 2 workers and 2 pins
2021-03-31 23:01:14.189088 INFO AppDaemon: Running on port 5050
2021-03-31 23:01:14.246069 INFO HASS: Evaluating startup conditions
2021-03-31 23:01:14.288262 INFO HASS: Startup condition met: hass state=RUNNING
2021-03-31 23:01:14.289811 INFO HASS: All startup conditions met
2021-03-31 23:01:14.364594 INFO AppDaemon: Got initial state from namespace default
2021-03-31 23:01:15.395194 INFO MQTT: Connected to Broker at URL 192.168.0.126:1883
2021-03-31 23:01:16.049563 INFO AppDaemon: Got initial state from namespace mqtt
2021-03-31 23:01:16.051807 INFO MQTT: MQTT Plugin initialization complete
2021-03-31 23:01:17.221939 INFO AppDaemon: Scheduler running in realtime
2021-03-31 23:01:17.237984 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2021-03-31 23:01:17.239980 INFO AppDaemon: Adding /config/appdaemon/apps/accu_allergies to module import path
2021-03-31 23:01:17.241965 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx to module import path
2021-03-31 23:01:17.244207 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/cx_devices to module import path
2021-03-31 23:01:17.246611 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/cx_core to module import path
2021-03-31 23:01:17.249198 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/cx_core/action_type to module import path
2021-03-31 23:01:17.251412 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/cx_core/type to module import path
2021-03-31 23:01:17.253488 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/cx_core/stepper to module import path
2021-03-31 23:01:17.255581 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/cx_core/feature_support to module import path
2021-03-31 23:01:17.257620 INFO AppDaemon: Adding /config/appdaemon/apps/controllerx/cx_core/integration to module import path
2021-03-31 23:01:17.409027 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/hello.py - ignoring
2021-03-31 23:01:17.414945 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/accu_allergies/accu_allergies.py - ignoring
2021-03-31 23:01:17.419872 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_const.py - ignoring
2021-03-31 23:01:17.425044 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_version.py - ignoring
2021-03-31 23:01:17.430649 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/controllerx/controllerx.py
2021-03-31 23:01:17.587933 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/__init__.py - ignoring
2021-03-31 23:01:17.592425 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/sonoff.py - ignoring
2021-03-31 23:01:17.596679 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/trust.py - ignoring
2021-03-31 23:01:17.600584 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/lutron.py - ignoring
2021-03-31 23:01:17.605117 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/livarno.py - ignoring
2021-03-31 23:01:17.609937 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/aurora.py - ignoring
2021-03-31 23:01:17.615902 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/smartthings.py - ignoring
2021-03-31 23:01:17.620415 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/aqara.py - ignoring
2021-03-31 23:01:17.625358 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/osram.py - ignoring
2021-03-31 23:01:17.629536 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/phillips.py - ignoring
2021-03-31 23:01:17.633893 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/legrand.py - ignoring
2021-03-31 23:01:17.637998 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/ikea.py - ignoring
2021-03-31 23:01:17.642353 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/terncy.py - ignoring
2021-03-31 23:01:17.646924 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/rgb_genie.py - ignoring
2021-03-31 23:01:17.651821 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_devices/muller_licht.py - ignoring
2021-03-31 23:01:17.656355 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/type_controller.py - ignoring
2021-03-31 23:01:17.661026 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/color_helper.py - ignoring
2021-03-31 23:01:17.666205 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/__init__.py - ignoring
2021-03-31 23:01:17.670520 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/custom_controller.py - ignoring
2021-03-31 23:01:17.674698 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/controller.py - ignoring
2021-03-31 23:01:17.679063 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/release_hold_controller.py - ignoring
2021-03-31 23:01:17.683882 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/action_type/call_service_action_type.py - ignoring
2021-03-31 23:01:17.688493 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/action_type/__init__.py - ignoring
2021-03-31 23:01:17.692886 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/action_type/delay_action_type.py - ignoring
2021-03-31 23:01:17.697665 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/action_type/base.py - ignoring
2021-03-31 23:01:17.702740 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/action_type/predefined_action_type.py - ignoring
2021-03-31 23:01:17.707680 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/action_type/scene_action_type.py - ignoring
2021-03-31 23:01:17.712292 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/type/__init__.py - ignoring
2021-03-31 23:01:17.717703 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/type/cover_controller.py - ignoring
2021-03-31 23:01:17.722204 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/type/light_controller.py - ignoring
2021-03-31 23:01:17.727862 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/type/media_player_controller.py - ignoring
2021-03-31 23:01:17.732663 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/type/switch_controller.py - ignoring
2021-03-31 23:01:17.738286 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/stepper/circular_stepper.py - ignoring
2021-03-31 23:01:17.742860 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/stepper/__init__.py - ignoring
2021-03-31 23:01:17.747633 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/stepper/minmax_stepper.py - ignoring
2021-03-31 23:01:17.752285 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/feature_support/__init__.py - ignoring
2021-03-31 23:01:17.756641 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/feature_support/light.py - ignoring
2021-03-31 23:01:17.760700 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/feature_support/media_player.py - ignoring
2021-03-31 23:01:17.765155 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/feature_support/cover.py - ignoring
2021-03-31 23:01:17.769319 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/integration/__init__.py - ignoring
2021-03-31 23:01:17.773850 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/integration/z2m.py - ignoring
2021-03-31 23:01:17.780470 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/integration/state.py - ignoring
2021-03-31 23:01:17.784939 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/integration/mqtt.py - ignoring
2021-03-31 23:01:17.789261 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/integration/lutron_caseta.py - ignoring
2021-03-31 23:01:17.793421 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/integration/zha.py - ignoring
2021-03-31 23:01:17.798145 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/controllerx/cx_core/integration/deconz.py - ignoring
2021-03-31 23:01:17.801637 INFO AppDaemon: Initializing app Tint using class MLI404011LightController from module controllerx
2021-03-31 23:01:17.810872 INFO AppDaemon: Initializing app Symfonsik using class E1744LightController from module controllerx
2021-03-31 23:01:18.257887 INFO Tint: 🎮 ControllerX v4.8.0
2021-03-31 23:01:18.269648 DEBUG Tint: `light.desk` is not recognized as a template
2021-03-31 23:01:18.290875 DEBUG Tint: `toggle` is not recognized as a template
2021-03-31 23:01:18.388794 INFO Tint: Previous message repeated 1 times
2021-03-31 23:01:18.390314 DEBUG Tint: `click_brightness_down` is not recognized as a template
2021-03-31 23:01:18.401682 DEBUG Tint: `hold_brightness_down` is not recognized as a template
2021-03-31 23:01:18.412634 DEBUG Tint: `release` is not recognized as a template
2021-03-31 23:01:18.424237 DEBUG Tint: `click_brightness_up` is not recognized as a template
2021-03-31 23:01:18.435345 DEBUG Tint: `hold_brightness_up` is not recognized as a template
2021-03-31 23:01:18.447713 DEBUG Tint: `release` is not recognized as a template
2021-03-31 23:01:18.458651 DEBUG Tint: `xycolor_from_controller` is not recognized as a template
2021-03-31 23:01:18.470736 DEBUG Tint: `colortemp_from_controller` is not recognized as a template
2021-03-31 23:01:18.480260 INFO Symfonsik: 🎮 ControllerX v4.8.0
2021-03-31 23:01:18.553485 INFO AppDaemon: App initialization complete
2021-03-31 23:01:18.571511 DEBUG Tint: Calling listen_event for Tint
info MQTT publish: topic 'zigbee2mqtt/0x00158d000361cf51', payload '{"action":"color_wheel","action_color":{"x":0.7,"y":0.3},"action_group":16388,"linkquality":81,"rate":100,"transition_time":0}'
info MQTT publish: topic 'zigbee2mqtt/0x00158d000361cf51', payload '{"action":"","linkquality":81,"rate":100}'
info MQTT publish: topic 'zigbee2mqtt/0x00158d000361cf51/action', payload 'color_wheel'
info MQTT publish: topic 'zigbee2mqtt/0x00158d000361cf51', payload '{"action":"color_wheel","action_color":{"x":0.609,"y":0.265},"action_group":16388,"linkquality":84,"rate":100,"transition_time":0}'
info MQTT publish: topic 'zigbee2mqtt/0x00158d000361cf51', payload '{"action":"","linkquality":84,"rate":100}'
info MQTT publish: topic 'zigbee2mqtt/0x00158d000361cf51/action', payload 'color_wheel'
info MQTT publish: topic 'zigbee2mqtt/Desk', payload '{"brightness":249,"color":{"x":0.447991567541816,"y":0.407559831563923},"color_temp":350,"color_temp_startup":370,"linkquality":81,"state":"ON"}'
info MQTT publish: topic 'zigbee2mqtt/Desk', payload '{"brightness":249,"color":{"x":0.699,"y":0.3},"color_temp":37,"color_temp_startup":370,"linkquality":84,"state":"ON"}'
info MQTT publish: topic 'zigbee2mqtt/0x00158d000361cf51', payload '{"action":"color_temp","action_color_temperature":200,"action_group":16388,"linkquality":84,"rate":100,"transition_time":10}'
info MQTT publish: topic 'zigbee2mqtt/0x00158d000361cf51', payload '{"action":"","linkquality":84,"rate":100}'
info MQTT publish: topic 'zigbee2mqtt/0x00158d000361cf51/action', payload 'color_temp'

Seems like the MQTT connection was successful. Yes it works when not listening to mqtt, but if I understood that right to use the color wheel it has to listen directly to mqtt right?

edit: Forgot to answer one of your questions. When I press a button nothing appears in the appdeamon log.

@xaviml
Copy link
Owner

xaviml commented Apr 1, 2021

Hi @CorePoint,

Thank you for your answer. I see in the configuration you share earlier that the controller is namexyz. Not sure if you removed the name deliverately, but the correct value should be 0x00158d000361cf51. Is that the value you have tried?

Regards,
Xavi M.

@CorePoint
Copy link

@xaviml
Yep that's the value I have in there, I initially quoted your config and then thought I should just put the real config there, but left the name out.

@xaviml
Copy link
Owner

xaviml commented Apr 1, 2021

Hi @CorePoint,

Interesting.. could you install ControllerX v4.6.0 and see if it works with that version. I don't think that will do much, but at least we will make sure that no breaking changes were added. You have everything well configured, so I don't have anything else left to recommend you for now.

Make sure to restart AppDaemon after the downgrade.

Regards,
Xavi M.

@CorePoint
Copy link

@xaviml
Tried it with 4.6.0, same problem sadly. I will redo my whole Zigbee setup again soon anyway (new coordinator and device constellation) I will try it again after that.

Thank you anyway for your quick and friendly answers!

@xaviml
Copy link
Owner

xaviml commented Apr 1, 2021

No worries @CorePoint . Glad to help. I will investigate later the logs again on the computer and see if I missed something.

If you have more questions, I prefer that you open a new ticket, this way is less likely I forget about it.

Cheers,

@CorePoint
Copy link

@xaviml
Alright, thanks again for checking.
Yeah, if it doesn't work after re-setup I will open a new issue.

Greetings

@xaviml
Copy link
Owner

xaviml commented Apr 1, 2021

Hi @CorePoint,

I have checked the logs and compared them with mine, and I see everything the same as you do.. However, I come up with some questions for you to answer, and see if there are any differences between your setup and mine:

  • Could you share your appdaemon.yaml? Remove or replace the sensitive data
  • Where are you placing the configurations? /config/appdaemon/apps/apps.yaml?
  • Is the symfonisk controller working as expected? Does it use the MQTT as well?

Regards,
Xavi M.

@CorePoint
Copy link

Sure @xaviml

---
secrets: /config/secrets.yaml
appdaemon:
  latitude: 1.1
  longitude: 1.1
  elevation: 1
  time_zone: Europe/x
  plugins:
    HASS:
      type: hass
    MQTT:
      type: mqtt
      namespace: mqtt
      client_host: 192.168.0.126
      client_user: mqtt
      client_password: ****
http:
  url: http://127.0.0.1:5050
admin:
api:
hadashboard:

Yes config is exactly in that location.

The Symfonisk controller is working, I'm using z2m with it, without the listen_to: mqtt.

@xaviml
Copy link
Owner

xaviml commented Apr 1, 2021

Hi @CorePoint,

Thanks for the input. Everything is exactly the same as my setup, and I am not able to spot any differences. There is one more thing that we could try, and I believe that is the problem... I bet your configuration looks like:

Tint:
  module: controllerx
  class: MLI404011LightController
  controller: 0x00158d000361cf51
  integration:
    name: z2m
    listen_to: mqtt
  light: light.desk
  log_level: DEBUG

I know you shared this before with me, but the key in here is the controller: 0x00158d000361cf51. YAML has some "gotchas" that are annoying if you don't know about then. For example, if you use the word 'on' without quoting it like ' "on" ', then it gets translated as True (the same with 'off'). In this case, if you put a number with the '0x', it will recognize it as a number (6066005707181905). You can copy&paste thie config from above in here, and you will see what I mean. Therefore, the solution is to quote the number with double quotes ("):

Tint:
  module: controllerx
  class: MLI404011LightController
  controller: "0x00158d000361cf51"
  integration:
    name: z2m
    listen_to: mqtt
  light: light.desk
  log_level: DEBUG

Not sure if this is the problem since you didn't share this exact configuration, but that could explain why no messages are shown in the logs, and the controller does not work.

Regards,
Xavi M.

@CorePoint
Copy link

CorePoint commented Apr 1, 2021

@xaviml
Oh my, hahaha.
Yes it's working now. Not the first time that I had problems with YAML, maybe I should read a little bit more about it. :D

Thank you again for your help and patience!

@xaviml
Copy link
Owner

xaviml commented Apr 1, 2021

Glad you got it working! I normally rename my devices, so I have never encountered this before, but it is good to know for the future since the default device id in z2m is a hexadecimal number.

@CorePoint
Copy link

That's good that this problem surfaced something that could prevent future problems.
I just recently discovered that you could set friendly names directly in z2m, funny how that could've prevented the problem entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants