home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.51k stars 30.34k forks source link

flux_led brightness/color changing issues on 0.45.1 #7814

Closed mplawner closed 6 years ago

mplawner commented 7 years ago

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version): 0.45.1

Python release (python3 --version): Python 3.4.2

Component/platform: Platform: flux_led

Light: Flux Led v5

Environment: Linux raspberrypi 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux Running in virtual environment as described https://home-assistant.io/docs/installation/virtualenv/

Description of problem: Working: Switch on/off Status: Bulb on, in either color or white mode mode Action: Set brightness via slider in hass web interface.

Expected: Bulb to switch from color mode to white mode if not already in white mode and brightness to reflect new setting.

Problem-relevant configuration.yaml entries and steps to reproduce:

- platform: flux_led
  scan_interval: 15
  devices:
    192.168.0.42:
      name: office_desk_lamp
  1. Switch bulb on and set to either color or white mode via MagicHome application
  2. Set brightness via slider in hass web interface
  3. Capture error in log and note no change to bulb setting

Traceback (if applicable):

2017-05-29 11:07:19 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

Additional info: If in color mode and setting to new color via web interface, web interface notification acknowledges the change, but the light gets set to rgb values 5,5,5 (essentially black) appearing off.

If in white mode and setting to new color via web interface, web interface notification acknowledges the change, but the light does not change and an error is raised in the log:

2017-05-29 11:26:59 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

Danielhiversen commented 7 years ago

I can confirm the same behavior here. It was introduced by in this pr: https://github.com/home-assistant/home-assistant/pull/7221 @wuub : Could have a look at this? Or should we revert the pr?

wuub commented 7 years ago

From my point of view you can revert everything I did to flux_led. My flux led controller was completely unreliable on default firmware. I reflashed it with an mqtt based solution, so I cannot even test original one anymore.

Sorry for causing trouble.

Danielhiversen commented 7 years ago

Ok, this seams to fix it: https://github.com/home-assistant/home-assistant/compare/flux_led_fix?expand=1

dale3h commented 7 years ago

This issue still persists on 0.47.1 when using the LEDENET 5-channel RGB+WW+CW controller.

light:
  - platform: flux_led
    devices:
      192.168.1.100:
        name: rack_light
        protocol: 'ledenet'
        mode: 'rgb'
quadflight commented 7 years ago

Same issue. Only functions work but set color, brightness and WW level does not work


    devices:
     192.168.2.131:
       name: Garden LED
       protocol: 'ledenet'
       mode: "rgbw"
sailorseashell commented 7 years ago

Any updates on this?

balloobbot commented 6 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

dale3h commented 6 years ago

This was still broken in 0.54.0, but seems to be fixed in 0.55.1.