Can't change LED color on MagicHome LED controller

which is the code to set a specific colour and brightness? And the coding for the effects?

I would like to setup some scenes

Hi,

here you can find your answers

thanks but there is no instruction on how to setup scenes: like pressing a button (or automation) and fire up a specific colour and specific brightness

Hi,

use

I believe there is a problem with the flux_led component in 0.45.1.

Everything was working on 0.43.x, but started having problems after I upgraded to 0.45.1 on a Raspberry PI 3, running in a virtual environment.

If I change the brightness, I get this error:

2017-05-28 10:33:24 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/tasks.py”, line 233, in _step
result = coro.throw(exc)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py”, line 1015, in _event_to_service_call
yield from service_handler.func(service_call)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/init.py”, line 265, in async_handle_light_service
yield from light.async_turn_on(**params)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/flux_led.py”, line 238, in turn_on
self._bulb.setRgbw(*self.rgb_color, w=white_value)
File “/home/homeassistant/.homeassistant/deps/flux_led/main.py”, line 841, in setRgbw
raise Exception
Exception

Response from the bulb is inconsistent. It has a separate white channel, and I’ve been using the default settings.

Edit - adding:
If I then try to change to a color, I get this very similar error:

Exception
2017-05-28 10:51:11 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/tasks.py”, line 233, in _step
result = coro.throw(exc)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py”, line 1015, in _event_to_service_call
yield from service_handler.func(service_call)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/init.py”, line 265, in async_handle_light_service
yield from light.async_turn_on(**params)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/flux_led.py”, line 234, in turn_on
brightness=self.brightness)
File “/home/homeassistant/.homeassistant/deps/flux_led/main.py”, line 841, in setRgbw
raise Exception
Exception

It does switch to a color, but not necessarily the right color and only after a delay. In other words, it is switching off the white channel to the color channel. I cannot go back to the color channel without getting into the Magic light app.

You should report it here: https://github.com/home-assistant/home-assistant/issues/new

1 Like

Opened. Thanks.
https://github.com/home-assistant/home-assistant/issues/7814

Hi All,
I am new to home assistant which means I am still in the learning stages. :slight_smile: I came across this thread researching for a reason why the brightness on my LED controller would not work. The link to the one I purchased is below. I have a straight white LED strip connected to the CW channel on the controller. I have also tried the WW channel with the same results. In Home Assistant I am only able to turn the controller on and off with no brightness control. However using the Magic Home app works with no problem.

I have tried not adding a Mode (RGB or RGBW), I have tried it with the mode set, Tried with the ledenet protocol with no changes in results.

I am running hassio on a RPI3 and home assistant shows it at 0.53.1. That actually just updated today from 0.52.1.

The Controller shows as V1 in the magic home app.

Controller from Amazon - http://a.co/9f6S1xJ

If you have any suggestions that would be great as I am not sure if I am missing something.

Thanks

1 Like

the same problem with the Ledenet WiFi RGBW Controller.

Your lights are probably not supported by the library we are using: https://github.com/Danielhiversen/flux_led
Someone (probably you) have to add support for it.

Hi,

i’ve got the same problem. I’ve bought the Ledenet Controller from the Components Site: https://home-assistant.io/components/light.flux_led/

The only difference between us is, that i’m using an RGBWW Stripe. Maybe something in the firmware changed. I can’t even controll the stripe with openhab2. The native iPhone App works fine. Adding support isn’t a good idea for me. Installing Hass.io was a challange for me. Adding support for a led-controller is atm far far away :joy::see_no_evil:

Hi,

Adding a extra byte works for me:

EDIT:
The last sources of the official repository Danielhiversen/flux_led work correctly, apparently the sources in home assistant are not the last version.

Test Danielhiversen/flux_led OK:

fux_led in home assistant:

Temp correction:
Duplicate line 943 in the file /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/flux_led/__main__.py (this path depends on the installation of home assistant)

Diff (between the lines 900 ~ 944):

We need to validate how to update the library in Home Assistant,

I have made a new release of the flux led library, and it will be part of HA 0.55

2 Likes

Thanks Danielhiversen. Is there an expected release date for HA 0.55? I look forward to trying this out.

  1. October

Hi @Danielhiversen Thanks very much! I just wanted to mention that I am running 55.2, and with the Magichome / Flux library the effects have disappeared from within the GUI ( colorloop, etc ). Is it possible to please get these back? They were great to have in the HASS UI.

Thanks!

I have the effect options on 0.56.2

What is the status of the component?

Just bought RGBW lights and while they do work with 0.60.0 , the UI is confusing.
The color wheel changes the RGB colors just fine.
Brightness slider switches off the RGB leds and controls the brightness of the white leds.
It looks like the library supports setting color temperature, but the UI option is missing?
Effects are also missing.

Also, it loses connectivity way too often.
The wireless AP is 1 meters away. Is this due to the library being reverse engineered and not handling few edge cases or the led’s wifi controller just sucks that much?

1 Like

I’m also running version 0.60.0 and just installed the RGB controller here and all working well except for the lack of the effects option in the UI and I can’t seem to send effects via the developer tools. The MagicHue app tells me my controller is v4 if that helps. Cc @Danielhiversen

I just started writing my own component as the current one kept disconnecting (while the controller was 2m away from the wifi endpoint) and I don’t think it can be fixed without a whole rewrite.
Not planning on supporting effects or any version other than V4 though (this keeps the protocol simple for now)
I am planning on supporting white temperature calculations though, so I can match my other LIFX led strip…
No idea when it will be ready.

4 Likes