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

[BUG] Dimming down Ikea Controller won't work anymore #455

Closed
olibissa opened this issue Apr 7, 2022 · 15 comments · Fixed by #459
Closed

[BUG] Dimming down Ikea Controller won't work anymore #455

olibissa opened this issue Apr 7, 2022 · 15 comments · Fixed by #459
Assignees
Labels
bug Something isn't working

Comments

@olibissa
Copy link

olibissa commented Apr 7, 2022

Bug report

Description

Hye,

I've been using controllerx with 2 IKEA remotes. Dimming lights and groups was just fine but since the last HA upgrade Dimming down doesn't work anymore. Dimming Up works just fine.

Additional information

  • Devices involved:
    • Model: E1810Controller, E1743Controller, W2049LightController
    • ...
  • Integration: Choose from zha
  • AppDaemon version: v0.8.2
  • ControllerX version: v4.18.2
  • HACS version (if installed from there): v1.24.3
  • Home Assistant Core version: core-2022.4.0

AppDaemon app configuration

telecommande_5_boutons_bureau:
module: controllerx
class: E1810Controller
controller: 14:b4:57:ff:fe:d0:3a:00
integration: zha
light: light.groupe_lumiere_couleur_bureau
interrupteur_ikea_camila:
module: controllerx
class: E1743Controller
controller: 04:cd:15:ff:fe:4a:71:4d
integration: zha
light: light.ikea_ampoule_02
interrupteur_ikea_salon:
module: controllerx
class: W2049LightController
controller: 50:32:5f:ff:fe:2a:c7:b2
integration: zha
light: light.ikea_ampoule_couleur_01

Logs

Here is the log in appdeamon when I long press to dim down from the E1810 Controller

2022-04-07 11:20:42.541788 INFO telecommande_5_boutons_bureau: 🎮 Button event triggered: stop
2022-04-07 11:20:42.544479 INFO telecommande_5_boutons_bureau: 🏃 Running Predefined (release) now

Thanks in advance for your help and great job by the way.

Cheers

@olibissa olibissa added the bug Something isn't working label Apr 7, 2022
@olibissa olibissa changed the title [BUG] [BUG] Dimming down Ikea Controller won't work anymore Apr 7, 2022
@JonathanTreffler
Copy link

JonathanTreffler commented Apr 7, 2022

My instance has the same problem.

@xaviml
Copy link
Owner

xaviml commented Apr 8, 2022

Hi both,

Could ypu please privide the following:

  • AppDaemon logs again but with log_level: DEBUG on the application configuration (same level as class, module, controller, light, etc).
  • Share the ZHA events when the down brightness is held. You can check this in Developer Tools from HA (EVENTS tab). You need to listen to zha_event.

Cheers,

@olibissa
Copy link
Author

olibissa commented Apr 8, 2022

Hi Xavi,

Thanks for your reply.

I tried different way to activate the log_level but I didn't find the proper way. Can you guide me please ?

The ZHA event :

When down is held :

Événement 4 déclenché 17:14:
{
"event_type": "zha_event",
"data": {
"device_ieee": "14:b4:57:ff:fe:d0:3a:00",
"unique_id": "14:b4:57:ff:fe:d0:3a:00:1:0x0008",
"device_id": "06d154020805af723b1e4cb3141f0a86",
"endpoint_id": 1,
"cluster_id": 8,
"command": "stop",
"args": [
0,
0
],
"params": {
"options_mask": 0,
"options_override": 0
}
},
"origin": "LOCAL",
"time_fired": "2022-04-08T15:14:24.538169+00:00",
"context": {
"id": "6b6fc36f2fd8c7d8de3ecf0bd0397b86",
"parent_id": null,
"user_id": null
}
}
Événement 3 déclenché 17:14:
{
"event_type": "zha_event",
"data": {
"device_ieee": "14:b4:57:ff:fe:d0:3a:00",
"unique_id": "14:b4:57:ff:fe:d0:3a:00:1:0x0008",
"device_id": "06d154020805af723b1e4cb3141f0a86",
"endpoint_id": 1,
"cluster_id": 8,
"command": "move",
"args": [
1,
84,
0,
0
],
"params": {
"move_mode": 1,
"rate": 84,
"options_mask": 0,
"options_override": 0
}
},
"origin": "LOCAL",
"time_fired": "2022-04-08T15:14:24.189212+00:00",
"context": {
"id": "3e1d13954d2c622838ab00b2d6431a54",
"parent_id": null,
"user_id": null
}
}

when pressed :

Événement 6 déclenché 17:16:
{
"event_type": "zha_event",
"data": {
"device_ieee": "14:b4:57:ff:fe:d0:3a:00",
"unique_id": "14:b4:57:ff:fe:d0:3a:00:1:0x0008",
"device_id": "06d154020805af723b1e4cb3141f0a86",
"endpoint_id": 1,
"cluster_id": 8,
"command": "step",
"args": [
1,
43,
5,
0,
0
],
"params": {
"step_mode": 1,
"step_size": 43,
"transition_time": 5,
"options_mask": 0,
"options_override": 0
}
},
"origin": "LOCAL",
"time_fired": "2022-04-08T15:16:06.008228+00:00",
"context": {
"id": "2cdb997861a95c2c095313014a3e8576",
"parent_id": null,
"user_id": null
}
}

Cheers

@xaviml
Copy link
Owner

xaviml commented Apr 8, 2022

Hi @olibissa ,

Is the hold down the only one not working? I see the mapping is wrong (maybe something changed in ZHA), but the step one also changed. So wondering if you have problems with other actions.

Regarding the log_level, it needs to be place like this:

example_app:
  log_level: DEBUG
  module: controllerx
  class: ...
  light: ...

Cheers,

@olibissa
Copy link
Author

olibissa commented Apr 8, 2022

You rock !

The press down doesn't work either. Here is the log :

2022-04-08 18:20:42.368464 DEBUG telecommande_5_boutons_bureau: 🎮 Button event triggered, but not registered: move_1_84_0_0
2022-04-08 18:20:43.579071 INFO telecommande_5_boutons_bureau: 🎮 Button event triggered: stop
2022-04-08 18:20:43.580002 DEBUG telecommande_5_boutons_bureau: Extra:
None
2022-04-08 18:20:43.581118 INFO telecommande_5_boutons_bureau: 🏃 Running Predefined (release) now
2022-04-08 18:20:43.582044 DEBUG telecommande_5_boutons_bureau: release is not recognized as a template
2022-04-08 18:20:49.092728 DEBUG telecommande_5_boutons_bureau: 🎮 Button event triggered, but not registered: move_1_84_0_0
2022-04-08 18:20:49.548945 INFO telecommande_5_boutons_bureau: 🎮 Button event triggered: stop
2022-04-08 18:20:49.550098 DEBUG telecommande_5_boutons_bureau: Extra:
None
2022-04-08 18:20:49.550994 INFO telecommande_5_boutons_bureau: 🏃 Running Predefined (release) now
2022-04-08 18:20:49.551777 DEBUG telecommande_5_boutons_bureau: release is not recognized as a template
2022-04-08 18:20:53.819663 DEBUG telecommande_5_boutons_bureau: 🎮 Button event triggered, but not registered: step_1_43_5_0_0

@xaviml
Copy link
Owner

xaviml commented Apr 8, 2022

Hi @olibissa ,

Seems the problem is the two 0's added in the args, this makes the command being unexpected by controllerx.

I will work on this when I have time to fix it. In the meantime, you can use mapping attribute with the right action event (like step_1_43_5_0_0) to have the right mapping.

Regards,
Xavi M.

@Philipameen
Copy link

After I updated HA today to 2022.4.1 my remote (E1743) had the same issue.
Also with this controller two 0's has been added to the args for the hold "O" making the command move_1_83_0_0. The command for Release "I" or "O" has also changed from stop to stop_with_on_off.

@xaviml
Copy link
Owner

xaviml commented Apr 9, 2022

Thank you @Philipameen for checking it. If someone with this controller with ZHA and it is willing to change the code, I would appreciate. All is needed to change is this: https://github.com/xaviml/controllerx/blob/dev/apps/controllerx/cx_devices/ikea.py#L63-L79

We need to map the right mapping in there. It can be tested with the mapping attribute in the configuration too.

Otherwise, I would need someone that shares with me the "command" and the "args" of all events (clicks, holds, releases of all buttons).

Regards,

@xaviml xaviml mentioned this issue Apr 9, 2022
@mjmcg
Copy link

mjmcg commented Apr 9, 2022

I'm having same problem with E1810MediaPlayerController with ZHA. Volume down doesn't work. The zha_event fires, but doesn't show in the AppDaemon logs. Here's the zha_event for volume down click.

{
"event_type": "zha_event",
"data": {
"device_ieee": "2c:11:65:ff:fe:c5:f1:88",
"unique_id": "2c:11:65:ff:fe:c5:f1:88:1:0x0008",
"device_id": "809631773d003a153d1e35090fc45cc8",
"endpoint_id": 1,
"cluster_id": 8,
"command": "step",
"args": [
1,
43,
5,
0,
0
],
"params": {
"step_mode": 1,
"step_size": 43,
"transition_time": 5,
"options_mask": 0,
"options_override": 0
}
},
"origin": "LOCAL",
"time_fired": "2022-04-09T13:19:39.105533+00:00",
"context": {
"id": "aa1038189606a422211fa87f8268ef22",
"parent_id": null,
"user_id": null
}
}

@olibissa
Copy link
Author

olibissa commented Apr 9, 2022

Hey everyone,

Is that enough to correct ?

E1810Controller

 def get_zha_actions_mapping(self) -> DefaultActionsMapping:
        return {
            "toggle": Light.TOGGLE, // OK
            "press_2_0_0": Light.SYNC,
            "step_with_on_off_0_43_5": Light.CLICK_BRIGHTNESS_UP, // OK
            "step_1_43_5_0_0": Light.CLICK_BRIGHTNESS_DOWN, // Corrected
            "press_257_13_0": Light.CLICK_COLOR_DOWN, // OK
            "press_256_13_0": Light.CLICK_COLOR_UP, // OK
            "move_with_on_off_0_83": Light.HOLD_BRIGHTNESS_UP, 
            "move_with_on_off_0_84": Light.HOLD_BRIGHTNESS_UP,  # ZigBee 3.0 firmware // OK
            "move_1_83": Light.HOLD_BRIGHTNESS_DOWN, 
            "move_1_84_0_0": Light.HOLD_BRIGHTNESS_DOWN,  # ZigBee 3.0 firmware // Corrected
            "hold_3329_0": Light.HOLD_COLOR_DOWN, // OK
            "hold_3328_0": Light.HOLD_COLOR_UP, // OK
            "stop_with_on_off": Light.RELEASE, // Corrected
            "release": Light.RELEASE, // Not recognized as a template
        }

Log for the release event. I don't get why it not recongnized

2022-04-09 19:27:43.231305 INFO telecommande_5_boutons_bureau: 🎮 Button event triggered: release
2022-04-09 19:27:43.232152 DEBUG telecommande_5_boutons_bureau: Extra:
None
2022-04-09 19:27:43.233144 INFO telecommande_5_boutons_bureau: 🏃 Running Predefined (release) now
2022-04-09 19:27:43.233922 DEBUG telecommande_5_boutons_bureau: release is not recognized as a template

E1743Controller

def get_zha_actions_mapping(self) -> DefaultActionsMapping:
        return {
            "on": Light.ON, // OK
            "off": Light.OFF, // OK
            "move_with_on_off_0_83": Light.HOLD_BRIGHTNESS_UP, // OK
            "move_1_83_0_0": Light.HOLD_BRIGHTNESS_DOWN, // Corrected
            "stop": Light.RELEASE,
        }

W2049

def get_zha_actions_mapping(self) -> DefaultActionsMapping:
    return {
        "on": Light.ON, // OK
        "off": Light.OFF, // OK
        "press_257_13_0": Light.CLICK_COLOR_DOWN, // OK
        "press_256_13_0": Light.CLICK_COLOR_UP, // OK
        "move_with_on_off_0_83": Light.HOLD_BRIGHTNESS_UP, // OK
        "move_1_83_0_0": Light.HOLD_BRIGHTNESS_DOWN, // Corrected
        "hold_3329_0": Light.HOLD_COLOR_DOWN, // OK
        "hold_3328_0": Light.HOLD_COLOR_UP, // OK
        "stop_with_on_off": Light.RELEASE, // Corrected
        "release": Light.RELEASE,
    }

Logs :

Strange thing about Light.HOLD_COLOR_UP - It triggers a on event. Here is the log. Hope this helps

2022-04-09 19:53:49.904322 INFO interrupteur_ikea_salon: Previous message repeated 2 times
2022-04-09 19:53:49.904486 INFO interrupteur_ikea_salon: 🎮 Button event triggered: release
2022-04-09 19:53:49.905543 DEBUG interrupteur_ikea_salon: Extra:
None
2022-04-09 19:53:49.906538 INFO interrupteur_ikea_salon: 🏃 Running Predefined (release) now
2022-04-09 19:53:49.907348 DEBUG interrupteur_ikea_salon: release is not recognized as a template
2022-04-09 19:53:50.363932 INFO interrupteur_ikea_salon: 🎮 Button event triggered: on
2022-04-09 19:53:50.364862 DEBUG interrupteur_ikea_salon: Extra:
None
2022-04-09 19:53:50.366424 INFO interrupteur_ikea_salon: 🏃 Running Predefined (on) now
2022-04-09 19:53:50.367562 DEBUG interrupteur_ikea_salon: on is not recognized as a template
2022-04-09 19:53:50.368773 DEBUG interrupteur_ikea_salon: light.ikea_ampoule_couleur_01 is not recognized as a template
2022-04-09 19:53:50.369992 INFO interrupteur_ikea_salon:
🤖 Service: light.turn_on

  • entity_id: light.ikea_ampoule_couleur_01
    2022-04-09 19:53:50.370680 DEBUG interrupteur_ikea_salon: call_service: light/turn_on, {'entity_id': 'light.ikea_ampoule_couleur_01'}
    2022-04-09 19:53:50.902505 DEBUG interrupteur_ikea_salon: 🎮 Button event triggered, but not registered: press_2_0_0

Hope this helps

@howlermonkeys
Copy link

I'm having the same issue using E1744 dials as media controllers. Only press down is working, none of the dial rotations are working.

@olibissa
Copy link
Author

FYI

home-assistant/core#69375

A bug is opened on the ZHA side

@xaviml
Copy link
Owner

xaviml commented Apr 11, 2022

It seems this got fixed in 2022.4.1: home-assistant/core#69633

Could someone try 2022.4.1 or 2022.4.2?

Thanks,

@olibissa
Copy link
Author

I'm on it

@olibissa
Copy link
Author

The last update of hass corrects the bug.

Thanks a lot for your time Xavi.

Cheers and keep up the great work.

xaviml added a commit that referenced this issue Apr 13, 2022
xaviml added a commit that referenced this issue Apr 13, 2022
xaviml added a commit that referenced this issue Apr 14, 2022
xaviml added a commit that referenced this issue Apr 14, 2022
* fix(ikea): Fix ZHA mapping for IKEA controllers

related to #455, #457

* fix(ikea): fix E1744 ZHA mapping

related to #455, #457

* docs(release_notes): add warning note

related to ##455, #457
xaviml added a commit that referenced this issue Apr 14, 2022
* fix(ikea): Fix ZHA mapping for IKEA controllers

related to #455, #457

* fix(ikea): fix E1744 ZHA mapping

related to #455, #457

* docs(release_notes): add warning note

related to ##455, #457
xaviml added a commit that referenced this issue Apr 15, 2022
xaviml added a commit that referenced this issue Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants