Update Limitlessled/Milight Component V6 Bridge (iBox)

I installed the limitlessled module (without v6 support). Then I tried to install the version with v6 support using the “setup.py install” command. But HA is still using the old code without v6 support. How can I get the new code to work? Or am I missing something.

You need to installed the forked limitless led by installing from source using pip.
Then you need to change the limitlessled.py file in home-assistant component.

I’ve just started to try the integration in home-assistant, work without problem.
No idea however how the backward-compatibility will be implemented.

Can you control your V6-bridge with home-assistant using these configurations: https://home-assistant.io/components/light.limitlessled/ ?

Maybe you can explain all the steps to integrate the fork in home-assistant? Which changes has to be made in limitlessled.py to get it work? Do you mean ‘/usr/local/lib/python3.4/dist-packages/homeassistant/components/light/limitlessled.py’?

Yes I can but it’s only a development in progress as for now. Don’t expect to use it in your home for now.

There is still some bug and for now the bridge stop responding after a while. But, it’s already a great step and soldag is doing a great job at updating the library.

You need to:

1 Like

That sounds really good! Is it necessary to change the port and version in ‘limitlessled.py’? Because you can set these in the configuration-file. Like this:
http://pastebin.com/KbcU5BnF

Great work from soldag! It is unfortunate that there are bugs. Strange that the bridge stops responding. I hope these issues can be solved.

I’m a bit scared to change my current settings if the fork is still not ready to use. Can I install the fork without removing my current lamp settings?

Thank you Touliloup, it is working!

You’ll anyway have to edit limitlessled.py for type bridge-led and rgbww to be supported. But yes default port and version can (should) stay on actual value.

I guess the session expire and need to be renewed. In the library that’s only done by object creation. The library should maybe be extended to react properly on expired session.

For the person who is working on the library, don’t forget to reset the Sequence Number to 0 when it passed 255. Otherwise you are only able to send 255 commands.

self._sn = (self._sn + 1) % 256

The modulo 256 here already take care of that, or did you meant something else?
Edit: was corrected according to your comment before I checked :grin:

This was added just 9 hours ago, it wasn’t there when Global commented :slight_smile: . Backward compatibility should be working fine, you just have to define your bridge version. v6 is default, but you can overwrite it. I tested the library, and so far the RGBW lights and RGBWW lights work great. I added a pull request for the saturation of the new RGBWW lights, and once that is merged I think we’re almost there.

1 Like

That’s great news :slight_smile:
The problem of expiring session have also been corrected.

EDIT:
I don’t know if that was already the case before but I see that if the bridge is not reachable (v6), home-assistant start will hang at “Setting up light.limitlessled”.
I guess that the refresh of session ID will also have to be handle in case of deconnection/restart of the bridge. Keep-alive might not be enough in that case.
Another point: If the bridge (iBox) is restarted, the control is lost until home-assistant is restarted.

Is there a way to extend the milight functionality to include “modes” like discomode? I know the old LimitlessLED api allowed it but the home assistant module did not include it.

1 Like

The problem is that within the light element nothing allow for such a mode to be triggered as far as I know. I guess that would have to be handled as a separate entity like hue scene.
You could open a separate feature request. It’s better if this thread focus on the implementation and not mix other feature request in within.

What a great results! Good work guys!

I’m pretty new with the way home assistant components will be updated. Can I wait for the final update? And is it an automated process? Or should I do it manually with the fork as described above?

Once tested, that fork will probably be merged into the python-limitlessled repository. Then a new limitlessled release will be published to pypi, and then the home assistant dependency version number set to that new release, and Home Assistant documentation updated accordingly.

So if you wait a bit, you will have to do nothing but upgrade Home Assistant and read the new documentation.

Any idea when that might be?

I don’t know how long testing will take. It is up to the testers and developers.

Home Assistant is normally on two-week release cycle, so it could take up to two weeks from a merge of tested code.

I’m able to get the bridge light to work using the config posted above, but I can’t get any of the associated rgbww lights to work. Anytime I add a light group homeassistant hangs on startup trying to setup limitless led. I don’t get any error. Here is my config:

light:
  platform: limitlessled
  bridges:
    - host: 192.168.86.159
      version: 6
      port: 5987
      groups:
      - number: 1
        name: bridge
        type: bridge-led
      - number: 1
        name: lr
        type: rgbww

@alexmat, should be good. Did you update your /usr/local/lib/python3.4/dist-packages/homeassistant/components/light/limitlessled.py with the new led-types?

I got this working in HA. However, after some time all commands stop working. Another thing is that we should be able to specify the default color-temperature for rgbww lights. When I turn it on now, it is the coldest temperature, while I would like the most warm color to be automatically set.