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

[QUESTION] Controlling IKEA light colors with E1810Controller #56

Closed
Ronnie-J opened this issue Mar 14, 2020 · 8 comments
Closed

[QUESTION] Controlling IKEA light colors with E1810Controller #56

Ronnie-J opened this issue Mar 14, 2020 · 8 comments
Assignees
Labels
question Further information is requested

Comments

@Ronnie-J
Copy link

Question

Hi!

It's not clear to me if it's possible with the E1810Controller to controll the different light colors from the IKEA lamps. Nothing happens when pushing the right and left arrow with the following configuration. I tried to manually config actions on the buttons but I havent been able to get anything working. It can turn the light off/on and dim the lights which is great but the last bit is missing - thanks.

Additional information

  • Devices involved:
  • Model: IKEA of Sweden, TRADFRI bulb E27 WS opal 1000lm, Version 2.0.022
  • Integration: deconz
  • AppDaemon version: v4.0.3
  • ControllerX version: v2.4.2
  • HACS version v0.23.2

AppDaemon app configuration

livingroom_controller:
  module: controllerx
  class: E1810Controller
  controller: tradfri_remote_control
  integration: deconz
  light: light.stue
@Ronnie-J Ronnie-J added the question Further information is requested label Mar 14, 2020
@xaviml
Copy link
Owner

xaviml commented Mar 14, 2020

Hi @Ronnie-J,

Are you able to change the color through Home Assistant? Something like this:
image
)

Is this your light? If so, I am afraid it does not support color, just brightness. This is why the arrows might not work.

@htvekov
Copy link
Contributor

htvekov commented Mar 14, 2020

hi @Ronnie-J

I've exact same Ikea bulb working flawlessly with ControllerX on z2m network and on Hue brigde as well.

{"ieeeAddr":"0xec1bbdfffed45c3b","type":"Router","networkAddress":6729,"model":"LED1732G11","friendly_name":"0xec1bbdfffed45c3b","manufacturerID":4476,"manufacturerName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelID":"TRADFRI bulb E27 WS opal 1000lm","hardwareVersion":1,"softwareBuildID":"2.0.022","dateCode":"20190308","lastSeen":1584228540926},

It is indeed a white spectrum bulb with color change capabilities.
It must be down to the deconz integration as I've no problems via z2m integration.

@Ronnie-J
Copy link
Author

Hi @xaviml

The bulb have, as @htvekov mentions, some color capabilities (temperature) but not a full color spectrum.

lamp

The deconz events are being picked up just fine when I press the button;

{
    "event_type": "deconz_event",
    "data": {
        "id": "tradfri_remote_control_2",
        "unique_id": "cc:cc:cc:ff:fe:a5:84:7d",
        "event": 4002
    },
    "origin": "LOCAL",
    "time_fired": "2020-03-15T12:25:18.109438+00:00",
    "context": {
        "id": "bda7148cb0bd49478dd524d8b8a4d8da",
        "parent_id": null,
        "user_id": null
    }
}

{
    "event_type": "deconz_event",
    "data": {
        "id": "tradfri_remote_control_2",
        "unique_id": "cc:cc:cc:ff:fe:a5:84:7d",
        "event": 5002
    },
    "origin": "LOCAL",
    "time_fired": "2020-03-15T12:29:28.699089+00:00",
    "context": {
        "id": "f8ec8c8bfac74417b477a31bca1bc5eb",
        "parent_id": null,
        "user_id": null
    }
}

@xaviml
Copy link
Owner

xaviml commented Mar 15, 2020

Hi @Ronnie-J,

So the color temperature does not work either when the light is on and the arrows are pressed or held? Could you put the AppDaemon logs in here when the arrows are pressed or held?

Also, could you put in here the state and the state attributes of your light when is on? Like this:
Screenshot from 2020-03-15 13-41-35

I also see that this is a group of deconz lights, is this correct? Can you try the same with just one light?

Thank you :)

@Ronnie-J
Copy link
Author

Hi @xaviml,

Yes, its not changing color when pressing the arrows. I can do it by controlling it though Home Assistant. I have tried both as a Deconz group and without - I just reconfigured it to just control the light bulb without a group.

I just noticed that there pressing the arrows generates some errors within AppDaemon;

2020-03-15 15:01:14.613378 WARNING office_controller: ------------------------------------------------------------
2020-03-15 15:01:14.612630 WARNING office_controller: Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/appdaemon/threading.py", line 725, in async_worker
    await funcref(args["event"], data, args["kwargs"])
  File "/config/appdaemon/apps/controllerx/core/integration/deconz.py", line 16, in callback
    await self.controller.handle_action(data[type_])
  File "/config/appdaemon/apps/controllerx/core/controller.py", line 120, in handle_action
    await action(*args)
  File "/config/appdaemon/apps/controllerx/core/controller.py", line 28, in _action_impl
    await method(self, *args, **kwargs)
  File "/config/appdaemon/apps/controllerx/core/type/light_controller.py", line 354, in click
    await self.change_light_state(
  File "/config/appdaemon/apps/controllerx/core/type/light_controller.py", line 404, in change_light_state
    new_state_attribute, exceeded = stepper.step(old, direction)
  File "/config/appdaemon/apps/controllerx/core/stepper/minmax_stepper.py", line 21, in step
    new_value = value + sign * step
TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

2020-03-15 15:01:14.611028 WARNING office_controller: ------------------------------------------------------------
2020-03-15 15:01:14.610189 WARNING office_controller: Worker Ags: {'id': '0280b980c1f0499f9ac7cd2d078d7ee2', 'name': 'office_controller', 'objectid': '7a1805949c1e4f2c803e7434888614d6', 'type': 'event', 'event': 'deconz_event', 'function': >, 'data': {'id': 'tradfri_remote_control_2', 'unique_id': 'cc:cc:cc:ff:fe:a5:84:7d', 'event': 4002}, 'pin_app': True, 'pin_thread': 0, 'kwargs': {'id': 'tradfri_remote_control_2', '__thread_id': 'MainThread'}}
2020-03-15 15:01:14.609112 WARNING office_controller: Unexpected error in worker for App office_controller:
2020-03-15 15:01:14.608068 WARNING office_controller: ------------------------------------------------------------
2020-03-15 15:01:04.714170 WARNING office_controller: ------------------------------------------------------------
2020-03-15 15:01:04.713352 WARNING office_controller: Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/appdaemon/threading.py", line 725, in async_worker
    await funcref(args["event"], data, args["kwargs"])
  File "/config/appdaemon/apps/controllerx/core/integration/deconz.py", line 16, in callback
    await self.controller.handle_action(data[type_])
  File "/config/appdaemon/apps/controllerx/core/controller.py", line 120, in handle_action
    await action(*args)
  File "/config/appdaemon/apps/controllerx/core/controller.py", line 28, in _action_impl
    await method(self, *args, **kwargs)
  File "/config/appdaemon/apps/controllerx/core/type/light_controller.py", line 354, in click
    await self.change_light_state(
  File "/config/appdaemon/apps/controllerx/core/type/light_controller.py", line 404, in change_light_state
    new_state_attribute, exceeded = stepper.step(old, direction)
  File "/config/appdaemon/apps/controllerx/core/stepper/minmax_stepper.py", line 21, in step
    new_value = value + sign * step
TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

lamp1

@xaviml
Copy link
Owner

xaviml commented Mar 15, 2020

Hi @Ronnie-J

I see the problem then. The problem is that the light does not provide color_temp state attribute when is on. This means that ControllerX cannot read the current color temperature of the light. I would say that this is a bug from the deCONZ integration. I just realised that I have the same light, but integrated with z2m, I will try now to integrate it with a conbee II that I have and see if I can find a way to fix this problem. I will let you know with my discoveries.

@Ronnie-J
Copy link
Author

Hi @xaviml

That makes sense - more info found here https://community.home-assistant.io/t/deconz-ikea-light-color-temp-missing/149490/12 look like its a problem with the deconz rest api.

Should we just close this ticket then and wait for deconz update?

@xaviml
Copy link
Owner

xaviml commented Mar 17, 2020

Indeed, you are right @Ronnie-J. The bug seems to be in this issue dresden-elektronik/deconz-rest-plugin#1861 . For this reason, I will close this issue and wait for them to fix this problem. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants