I'm trying to use controllerX to control a group of 2 lights (one hue and one tradfri driver).
On and off actions are working as expected but not brightness_up and brightness_down.
While looking in the logs in appdaemon they seems not to be caught by controllerX whereas they are well produced and logged in Z2M.
I did all the updates of the devices but am still facing the problem.
Any idea what coul be the problem ?
Thanks in advance for your reply and kudos for the nice work 馃憤
Devices involved:
Integration: z2m
AppDaemon version: v4.0.3
ControllerX version: v3.4.0
HACS version : v1.5.2
Home Assistant Core version: v0.114.4
livingroom_controller:
module: controllerx
class: E1743Controller
controller: sensor.interrupteur_ikea_cuisine_action
integration: z2m
light: light.light_cuisine
Here are the logs from appdaemon:
2020-08-28 20:43:21.738572 INFO livingroom_controller: 馃幃 ControllerX v3.4.0
2020-08-28 20:43:51.582055 INFO livingroom_controller: 馃幃 Button event triggered: `off`
2020-08-28 20:43:51.591139 INFO livingroom_controller: 馃弮 Running `off` now
2020-08-28 20:43:51.599888 INFO livingroom_controller: 馃 Service: light.turn_off
2020-08-28 20:43:51.604814 INFO livingroom_controller: - entity_id: light.light_cuisine
2020-08-28 20:43:54.148403 INFO livingroom_controller: 馃幃 Button event triggered: `on`
2020-08-28 20:43:54.152569 INFO livingroom_controller: 馃弮 Running `on` now
2020-08-28 20:43:54.160841 INFO livingroom_controller: 馃 Service: light.turn_on
2020-08-28 20:43:54.165800 INFO livingroom_controller: - entity_id: light.light_cuisine
2020-08-28 20:43:57.609786 INFO livingroom_controller: 馃幃 Button event triggered: `brightness_stop`
2020-08-28 20:43:57.615302 INFO livingroom_controller: 馃弮 Running `release` now
2020-08-28 20:44:00.653136 INFO livingroom_controller: 馃幃 Button event triggered: `brightness_stop`
2020-08-28 20:44:00.658299 INFO livingroom_controller: 馃弮 Running `release` now
2020-08-28 20:44:01.505706 INFO livingroom_controller: 馃幃 Button event triggered: `off`
2020-08-28 20:44:01.510248 INFO livingroom_controller: 馃弮 Running `off` now
2020-08-28 20:44:01.515158 INFO livingroom_controller: 馃 Service: light.turn_off
2020-08-28 20:44:01.519848 INFO livingroom_controller: - entity_id: light.light_cuisine
2020-08-28 20:44:03.003193 INFO livingroom_controller: 馃幃 Button event triggered: `on`
2020-08-28 20:44:03.007443 INFO livingroom_controller: 馃弮 Running `on` now
2020-08-28 20:44:03.015825 INFO livingroom_controller: 馃 Service: light.turn_on
2020-08-28 20:44:03.020868 INFO livingroom_controller: - entity_id: light.light_cuisine
Corresponding logs in Z2M:
Zigbee2MQTT:info 2020-08-28 20:43:51: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":"off","click":"off"}'
Zigbee2MQTT:info 2020-08-28 20:43:51: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":""}'
Zigbee2MQTT:info 2020-08-28 20:43:51: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53/action', payload 'off'
Zigbee2MQTT:info 2020-08-28 20:43:51: MQTT publish: topic 'zigbee2mqtt/0xccccccfffed2757e', payload '{"update_available":false,"state":"OFF","brightness":0,"linkquality":188}'
Zigbee2MQTT:info 2020-08-28 20:43:54: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":"on","click":"on"}'
Zigbee2MQTT:info 2020-08-28 20:43:54: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":""}'
Zigbee2MQTT:info 2020-08-28 20:43:54: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53/action', payload 'on'
Zigbee2MQTT:info 2020-08-28 20:43:54: MQTT publish: topic 'zigbee2mqtt/0xccccccfffed2757e', payload '{"update_available":false,"state":"ON","brightness":112,"linkquality":188}'
Zigbee2MQTT:info 2020-08-28 20:43:56: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":"brightness_move_up","action_rate":83,"click":"brightness_up"}'
Zigbee2MQTT:info 2020-08-28 20:43:56: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":""}'
Zigbee2MQTT:info 2020-08-28 20:43:56: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53/action', payload 'brightness_move_up'
Zigbee2MQTT:info 2020-08-28 20:43:57: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":"brightness_stop","click":"brightness_stop"}'
Zigbee2MQTT:info 2020-08-28 20:43:57: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":""}'
Zigbee2MQTT:info 2020-08-28 20:43:57: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53/action', payload 'brightness_stop'
Zigbee2MQTT:info 2020-08-28 20:43:58: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":"brightness_move_down","action_rate":83,"click":"brightness_down"}'
Zigbee2MQTT:info 2020-08-28 20:43:58: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":""}'
Zigbee2MQTT:info 2020-08-28 20:43:58: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53/action', payload 'brightness_move_down'
Zigbee2MQTT:info 2020-08-28 20:44:00: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":"brightness_stop","click":"brightness_stop"}'
Zigbee2MQTT:info 2020-08-28 20:44:00: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":""}'
Zigbee2MQTT:info 2020-08-28 20:44:00: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53/action', payload 'brightness_stop'
Zigbee2MQTT:info 2020-08-28 20:44:01: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":"off","click":"off"}'
Zigbee2MQTT:info 2020-08-28 20:44:01: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":""}'
Zigbee2MQTT:info 2020-08-28 20:44:01: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53/action', payload 'off'
Zigbee2MQTT:info 2020-08-28 20:44:02: MQTT publish: topic 'zigbee2mqtt/0xccccccfffed2757e', payload '{"update_available":false,"state":"OFF","brightness":0,"linkquality":188}'
Zigbee2MQTT:info 2020-08-28 20:44:02: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":"on","click":"on"}'
Zigbee2MQTT:info 2020-08-28 20:44:02: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53', payload '{"linkquality":185,"update_available":false,"battery":74,"action":""}'
Zigbee2MQTT:info 2020-08-28 20:44:02: MQTT publish: topic 'zigbee2mqtt/0x14b457fffe5d3f53/action', payload 'on'
Zigbee2MQTT:info 2020-08-28 20:44:03: MQTT publish: topic 'zigbee2mqtt/0xccccccfffed2757e', payload '{"update_available":false,"state":"ON","brightness":112,"linkquality":188}'
Zigbee2MQTT:info 2020-08-28 20:44:52: MQTT publish: topic 'zigbee2mqtt/0x00178801038040b7', payload '{"state":"OFF","update_available":false,"brightness":0,"linkquality":213}'
Zigbee2MQTT:info 2020-08-28 20:44:54: MQTT publish: topic 'zigbee2mqtt/0x00178801038040b7', payload '{"state":"ON","update_available":false,"brightness":111,"linkquality":213}'
Add any other context or screenshots about the bug here.
Hi @silbats,
I see that the actions changed on z2m. Could it be you have a sensor called: sensor.interrupteur_ikea_cuisine_click?
Do you say that your controller firmware is up-to-date? What about z2m version?
If you are in the latest in everything, I will need to change the mapping, however, in the meantime you can do the following:
livingroom_controller:
module: controllerx
class: E1743Controller
controller: sensor.interrupteur_ikea_cuisine_action
integration: z2m
light: light.light_cuisine
mapping:
"on": "on"
"off": "off"
brightness_move_up: hold_brightness_up
brightness_move_down: hold_brightness_down
brightness_stop: release
This will map the correct events. The ones that are different are "brightness_move_up" and "brightness_move_down", which in ControllerX are marked as "brightness_up" and "brightness_down".
Cheers,
Xavi M.
Hi' @silbats
I can't determine whether your using a Hue light group or a HA defined light group ?
But most likely a HA light group as naming with an underscore suggests 馃檪
ControllerX support light groups as 'standard' groups (defined in HA groups.yaml)
Using HA light group platform will work (but not well) for larger groups. Especially notisable dimming large groups.
But with only two lights in group, you probably won't experience any difference 馃槈
Looks like E1743 z2m payloads have changed yet once more as @xaviml writes.
Really strange.. ?
Ciao !
You guys are right.
Payloads have changed, with @xaviml configuration it's now working fine !
For you other question, yes, when adding the E1743 switch to Z2M, it's created 5 entities (action, click, battery, link_quality and update_available). I'm not sure what's the difference between the click and action entities as both seems to be triggerred at same time but with slight different "action" name (click will say "brightness_up" and action 'brightness_move_up")
Yes the switch is up-to-date, and for z2m version i'm using 1.14.3 wrapped in hassio add-on
Thanks :)
For the group definition here is what i have in my configuration.yaml for it:
light:
- platform: group
name: light_cuisine
entities:
- light.ikeacuisine_light
- light.lightcuisine_light
How should i declare it in groups.yaml to be a "standard" group ?
Glad to hear @silbats, coukd you try the original configuration you shared with us, but with sensor.interrupteur_ikea_cuisine_click instead of the "_action" one? It should work without needing to specify the mapping.
Regarding the light groups, @htvekov is right, ControllerX officially supports groups of lights done with the group integration. However, the Light Group integration should also work, but I have no experience in performance, @htvekov have used ControllerX with more lights than me and has been using it for a while.
Cheers,
Xavi M.
You're right once again 馃憤
I've reverted the configuration as it was initially and used click entity instead of action and it's working perfectly :)
livingroom_controller:
module: controllerx
class: E1743Controller
controller: sensor.interrupteur_ikea_cuisine_click
integration: z2m
light: light.light_cuisine
I guess we can close this ticket which is not a bug but a bad usage of z2m entities.
Thanks for the quick replies
Hi @silbats
Its quite straight forward.
Just like this in HA's groups.yaml:
office_group_test:
name: Office test
entities:
- light.0x90fd9ffffe838cb3_light
- light.0xec1bbdfffed45c3b_light
- light.0x680ae2fffe924460_light
ControllerX uses first entity as kind of 'master' and replicates this bulbs attribute settings with single commands to all other entities in group.
This works without any problems. But best visual solution for big light groups to be completely in sync is to use MQTT z2m group commands.
I'm already pestering @xaviml about this 馃槈馃榿
Ciao !
Perfect I am glad it worked too @silbats , I will add this in the documentation, so I will leave this ticket open to update it.
We will get there one day @htvekov, although it will not be an easy change since everything is centred to HA call services.
Cheers,
Xavi M.
I've switched to standard group (not lightgroup) and it's still working perfectly.
Thanks guys !
Hi麓 @xaviml
We will get there one day @htvekov, although it will not be an easy change since everything is centred to HA call services.
I know, Xavi.
You'll probably have to build a parallel core to be able to easily expand the MQTT set commands.
Good part is that JSON objects accepted for mqttt set commands in many cases are completely identical to HA service calls.
Ciao !
@silbats
FYI
Check this comment I made in another issue.
click payload keys are deprecated in z2m v.114.3
Causing problems for HA automations based on 'old' HA discovery data + needed changes to be made for eg. ControllerX apps.
https://github.com/xaviml/controllerx/issues/129#issuecomment-687650832
Most helpful comment
I've switched to standard group (not lightgroup) and it's still working perfectly.
Thanks guys !