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.18k stars 30.2k forks source link

Limitless led broken in 0.63 #12285

Closed RiRomain closed 6 years ago

RiRomain commented 6 years ago

Home Assistant release: 0.63

Python release: 3.6

Component/platform: Limimtless led

Description of problem: Limitless led component fail to initialize.

Problem-relevant configuration.yaml entries:

light:
  - platform: limitlessled
    bridges:
    - host: 192.168.0.214
      groups:
        - number: 1
          name: SmallBulb
          type: rgbw
        - number: 1
          name: BridgeLed
          type: bridge-led
        - number: 2
          name: BigBulb
          type: rgbw
        - number: 3
          name: SmallBulb2
          type: rgbw

Traceback:

2018-02-11 01:06:38 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform limitlessled
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 84, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 352, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/limitlessled.py", line 119, in setup_platform
    'fade': group_conf[CONF_FADE]
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/limitlessled.py", line 177, in factory
    return LimitlessLEDRGBWGroup(group, config)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/limitlessled.py", line 258, in __init__
    self.group.white()
  File "/config/deps/lib/python3.6/site-packages/limitlessled/group/rgbw.py", line 56, in white
    cmd = self.command_set.white()
AttributeError: 'CommandSetRgbwV6' object has no attribute 'white'

Additional info: I suspect it might be due to the update to limitlessled v1.0.9 that happened in PR12275. But I quickly had a look at the difference between v1.0.8 and v1.0.9 and couldn't spot any breaking change.

gitissues commented 6 years ago

Got this too, with a mix of rgbw and white lights. I have 1 v5 bridge and 1 v6. If I modify the config to one type of light it works

RiRomain commented 6 years ago

Yes, the issue might appear only with v6 of the bridge. This commit might be it: https://github.com/happyleavesaoc/python-limitlessled/commit/93103b918ef7a770724df834041371b75ac2d15b

DavidLP commented 6 years ago

The issue is the simple version bump in #12275. Reverting to limitlessled==1.0.8 fixes this issue.

RiRomain commented 6 years ago

Yes, I believe the issue lies in limitlessled 1.0.9 itself that is broken. Did you commit the revert?

Marcelhoog commented 6 years ago

My limitlessled lights are gone after updating my Hassio to version 0.63 Please help... I use the Mi-light wifi bridge with almost the same Yaml file as RiRomain:

light: platform: limitlessled bridges:

After updating to 0.63 the light entities disappeared.... The lights work fine with the app.

happyleavesaoc commented 6 years ago

Can someone with a v6 bridge please test a fix and either submit a PR to python-limitlessled or even just send me a diff. I'll push a new version to pypi at that point, so we can get this resolved.

Marcelhoog commented 6 years ago

@happyleavesaoc sure i wil help, but i am new to hassio, and dont know what you mean.

Marcelhoog commented 6 years ago

I succeeded to downgrade to Hassio 0.62.1 and now it works again! Hassio finds my Mi lights (wifi v6 bridge) again.

balloob commented 6 years ago

This should be fixed in 0.63.1. Can you check it?

Marcelhoog commented 6 years ago

certainly! I will let you know immediately as soon as the update is available. thanks for your help

amelchio commented 6 years ago

@happyleavesaoc I will look at this tonight.

Everyone, you can downgrade just LimitlessLED by putting this file in config/custom_components/light/limitlessled.py and restarting. Delete the file again when this issue is fixed.

glenn20 commented 6 years ago

Still broken in 0.63.1 for me.

glenn20 commented 6 years ago

Ignore last comment - 0.63.1 is working for me. Thanks for speedy response to this bug. I had a cached version of the broken limitlessled.py loading over 0.63.1.

Marcelhoog commented 6 years ago

To bad....i just updated from 0.62.1 to 0.63.1 an my lights are gone again.

Marcelhoog commented 6 years ago

I now downgraded just LimitlessLED by putting the file in config as Amelchio advised, and this works. The lights are back again in 0.63.1 Can i delete the file after the next update?

Try2Fly commented 6 years ago

For me the lights also do not work in 0.63.1 but do with the fix of Amelchio

Valiceemo commented 6 years ago

Also not working for me in 0.63.1. Happy to help / test where ever I can.

AMGeneral commented 6 years ago

how can I go back to 0.62.1? There are no lights found.

ERROR (MainThread) [homeassistant.components.light] Error while setting up platform limitlessled
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 84, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/light/limitlessled.py", line 119, in setup_platform
    'fade': group_conf[CONF_FADE]
  File "/usr/lib/python3.6/site-packages/homeassistant/components/light/limitlessled.py", line 177, in factory
    return LimitlessLEDRGBWGroup(group, config)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/light/limitlessled.py", line 258, in __init__
    self.group.white()
  File "/usr/lib/python3.6/site-packages/limitlessled/group/rgbw.py", line 56, in white
    cmd = self.command_set.white()
AttributeError: 'CommandSetRgbwV6' object has no attribute 'white'
light:
  platform: limitlessled
  bridges:
    - host: 192.168........
      version: 6
      port: 5987
      groups:
      - number: 1
        type: rgbw
        name: Wohnzimmer1
        fade: on
      - number: 2
        type: rgbw
        name: Wohnzimmer2
        fade: on
      - number: 1
        type: white
        name: Küche
    - host: 192.168........
      version: 5
      port: 8899
      groups:
      - number: 1
        type: rgbw
        name: Schlafzimmer
      - number: 2
        type: rgbw
        name: Wohnzimmer
      - number: 3
        type: rgbw
        name: Flur
      - number: 4
        type: rgbw
        name: ohne1

I can control with Mi-Light app Sorry, I can not speak English.

Thx Tom

glenn20 commented 6 years ago

Ok - I apologise for my confusing reports about whether this works on 0.63.1. I happened to be logged in when 0.63.1 hit my hassio box so I updated immediately. I restarted and the limitlessled component still did not work. I rebooted again later and it did work. A it happens something had caused my hassio to download limitlessled 1.0.8 into my config/deps/lib/python3.6/site-packages folder so it overrode the version distributed with hassio!!! I can't tell you what triggered that download.

I did follow the suggestion from amelchio above and maybe that triggered a dependency install of 1.0.8 - or something else I did. I deleted the file before I upgraded to 0.63.1 as recommended, but the dependency was still in place - so it seemed to be working.

If I put the limitlessled 1.0.8 folders back in config/deps/lib/python3.6/site-package then it all works fine again.

Marcelhoog commented 6 years ago

@AMGeneral I managed to go back to 0.62.1 with Dustins Blog enable the Hassio ssh add-on and follow the link on https://blog.dustinrue.com/tag/hassio/

amelchio commented 6 years ago

Everyone please listen! 😛

The downgrade is included in 0.63.2 so that one will work again. Those of you that created config/custom_components/light/limitlessled.py should delete it when upgrading.

Please stop writing "me too" so this message does not get buried like my other one. Just add a thumbs up so people can see that it's working ...

Gmac33 commented 6 years ago

Limitlessled's 1.0.9 failure In v63.1

Hi All I am new to this and I had the same problem with Limitlessled's failure In v63.1 File "/usr/lib/python3.6/site-packages/limitlessled/group/rgbw.py", line 56, in white cmd = self.command_set.white() AttributeError: 'CommandSetRgbwV6' object has no attribute 'white' I got mine working again by opening rgbw.py and commenting out 2 lines, 56 and 57.

 def white(self):
         """Set color to white. """
         self._color = RGB_WHITE
         cmd = self.command_set.white()
         self.send(cmd)

change to """cmd = self.command_set.white() self.send(cmd)"""

Hope this helps

Marcelhoog commented 6 years ago

Hi, I have the same problem in 0.64

amelchio commented 6 years ago

Please file a new issue for 0.64. Include the logs so I know what "the same problem" is exactly. Thanks!