Milight/Limitlessled iBox

In that thread someone is pointing out how to get it work with the udp command:

Send out the following HEX UDP package to wifi bridge port 5987
UDP 20 00 00 00 16 02 62 3A D5 ED A3 01 AE 08 2D 46 61 41 A7 F6 DC AF D3 E6 00 00 1E
The Wifi Bridge responds with a hex string and I pick the 20 th HEX code as wifibrdige ID.
:black_medium_small_square:UDP.SEND hex bytes: 20 00 00 00 16 02 62 3A D5 ED A301 AE 08 2D 46 61 41 A7 F6 DC AF D3 E6 00 00 1E
:black_medium_small_square:UDP.Response: 28 00 00 00 11 00 02 (AC CF 23 F5 7A D4)(mac) 69 F0 3C 23 00 01 05 00 00
Then I have used this value in the following example string to turn the lamp wifibridge on / off
WB = for example 05
SN = 01
:black_medium_small_square:LimitlessLED Wifi Bridge Light ON 80 00 00 00 11 WB 00 00 SN 00 (31 00 00 00 03 03 00 00 00)(cmd) 01(zone) 00 38(chksum) UDP response: (88 00 00 00 03 00 SN 00)
:black_medium_small_square:LimitlessLED Wifi Bridge Light OFF 80 00 00 00 11 WB 00 00 SN 00 (31 00 00 00 03 04 00 00 00)(cmd) 01(zone) 00 39(chksum) UDP response: (88 00 00 00 03 00 SN 00)

This has worked in practice

Yea i have seen all of that, including the javascript code, and sending the same command with my own bridge id does nothing (i also recalculate the checksum, so thats also not it). however im getting the 88 00 00 00 03 00 SN 01 response, and not 88 00 00 00 03 00 SN 00. I dont know what that means

Just tried again last night and i got it to work, Ill work on adding features somewhere this week. Also need to look into how im actually going to add this to home-assistant

3 Likes

Glad you got it working…I have also been struggling to get it going, and it would great if you can share why it wasn’t working for you…I suspect my bytecode conversion might be an issue, but I’ve just about given up until I saw your post. :slight_smile:

It actually had to do with the wifi bridge id, i picked the wrong value from the response.

Interesting…I am sure I am grabbing the right ones according to limitlessled.com/dev/:slight_smile:

Sending payload of 200000001602623AD5EDA301AE082D466141A7F6DCAFD3E600001E
Data received: 28000000110002f0fe6b14b1684214252f0001490000 from (‘x.x.x.x’, 5987)
WBID 1 is 49, and WBID 2 is: 00
Sending payload of 80000000114900000100310000000303000000010038
Data received: 8800000003000101 from (‘x.x.x.x’, 5987)

Maybe you can use or make changes in the code of the current module to integrate it in milight: https://github.com/happyleavesaoc/python-limitlessled

Which program on windows do you use to send and receive the UDP-packages?

1 Like

Weird, have you tried any other command? I have my lights assigned to group one and using the ON command (31 00 00 08 04 01 00 00 00) works

I looked into it, but it differs a lot from prev generation wifi bridges

Yeah I have tried a couple of other commands, including a working bulb that works via IOS Milight App. I calculate the checksum, and it matches the checksums on the EXAMPLE commands on the dev site, so yeah running out of things to try :slight_smile:

Any updates on the progress?

Speaking as a total noob with close to zero CS knowledge, isn’t it possible to sniff the UDP commands sent using the working official app? Is it all encrypted?

Hi varzyl,

Yes that is exactly how I discovered my mistake. When obtaining the WB ID 1 and 2, I had to complete the commands on the same socket in Python. I am still having some issues with hex->int->hex in my Python code, but all the basic commands are working now.

So steps are:

  1. Open UDP socket
  2. Send command to discover WB ID 1 and WB ID 2.
  3. Send command to light bulb and/or wifi bridge light
  4. Close UDP socket

UDP traffic is in the clear, so you can see all the commands as they fly by.

Are you working on updating the Python library used by home-assistant or did you make your own library/software?

There is an issue opened on Home-assistant github:

And one on the Python library github:

Is there a way to use home assistant to turn on the “discoMode” for the milight controller?

As far as I know isn’t there a preprogrammed option in the current component.

Thats what I thought, just wanted to be sure I was not missing something. Thanks!

You can use effect: colorloop for something similar to that.

I’m using the limitless Windows app to discover the udp commands I need for HA Bridge. I am able to control the system settings of the ibox but the color/light commands never work. What are you using to send the UDP commands for testing? And see responses? Have you used the limitless sample Windows app? It says it uses v6 commands

Using a RFLink to control Milight bulbs might be a very interesting option:

In home assistance output i can see that the older bulbs are already detected by the RFlink. I did not get them working though, no programming skills here. They are also working on support for the new bulbs.

It seems to me that adding support for MiLight bulbs in RFlink might be easier then supporting the original wifi controller. Building a RFlink is easy, costs just a much as the official controller, and offers loads more option.