The "new" Milight IBox and milight binding

Hey David,
thanks for the good news. I regret that I will not be very helpful at programming, but I’m quite willing to test any updated binding.

best regards,
Donald

I was trying to use WireShark to intercept the commands between my iPhone (using the app) and the ibox, but unfortunately, couldn’t get the wireless signals properly decrypted. My wireshark skills are rather rusty.

Based on the iBox’s internal web server page, it is still looking for port 8899. However, if you look at the dev page from limitlessled, they are calling for UDP 5987.

http://www.limitlessled.com/dev/

I am out of my depth here. If you give me some direction to help you, I can research and figure it out. Or I can also easily just help test when you are ready.

Moral of the story - We all appreciate your work David! Take your time and thank you again!

JMac

I recently put Milight downlights throughout the house (colour temp adjustable white) and some RGBW lights outside. I’ve paired each individual light to a separate channel (15 bridges required all up!).

Looking forward to seeing this binding updated to support the iBox so I can make some use of them!

Hi, I own a milight ibox as seen in the picture below:

The example app from milight as you can find under the link of JMacIV isn’t working with this controller. The app can discover the ibox a readout the wifi-data (ssid, bridge-ssid, router make, etc.) but isn’t able to control any light - but this is working via the milight v3 app under android. Strange.

If it is helpful, I can upload some Wireshark captured data, looking like:

i am really looking forward to see this binding working and am willing to contribute. (But I haven’t written any code since 10 years… Sorry)

1 Like

Hey all,

it will save me some research time if everyone, who wants to contribute, could provide me with this information:

  • The discovery/control port of the iBox
  • The used network protocol (UDP/TCP)
  • The bytes that are send to the network for discovery (appended as .bin file, or preferable as hex string)
  • The bytes that are send by the iBox as response for a discovery. If those are dynamic, a small explanation would be fine
  • The bytes that are necessary to switch a light on/off with a small explanation.

That will hopefully make me able to implement a basic discover/on/off for those lights.

Thanks,
David

Hey all,

I made a first attempt of adding iBox support. Only discover/on/off/whitemode/nightmode is implemented.

Thanks,
David

1 Like

Hey David,

Thanks so much for the new binding.

I can confirm my device was discovered via discovery… yesssss.

Unfortunately, All my lights are RGB. On/off/Nightmode is not working for these bulbs.

@Duncan_Pullen

Could you post the log messages especially the “Sent packet … to bridge…” messages? I do not have an iBox at hand and therefore can not test with real hardware unfortunately.

Thanks,
David

Daivd,

Not exactly sure of the relevant bits… so here’s my log since last reset, performed not long ago to see if that would make them work.

https://drive.google.com/file/d/0B0r7CYNTNqQIaXdOMzVHWlNqeUk/view?usp=sharing

Happy to help if anything else is needed. The events log just shows the buttons being triggered.

Thanks Duncan

Hey @Duncan_Pullen,

thanks for the test. I may have fixed that problem. Could you give it another try?

Thanks,
David

@David_Graeff,

Not looking good. I could delete then discover the device again. All devices come online. The following things are created:
Milight iBox Bridge
All Color
Color (iBox)
Color (Zone 1)
to Zone 4

But:
Callback errors.
Command not confirmed error
No additional functions appear to be working.

I’m just doing a full reboot with a new log file. I’ll then post the old and fresh log files.

Thanks Duncan

EDIT: Ok, here they are.
https://drive.google.com/open?id=0B0r7CYNTNqQIQUU3ODQzTUpCVzg

Thanks for the hard work @David_Graeff!

I deleted the old milight bindings, then first installed the new alpha, ran some tests, then the second.

On both, I got the device discovery fine. It found the iBox fine. Tried to send commands using both alphas (with no result to iBox) and this is the result on the openhab log. I have copy and pasted some relevant info. Seems to be throwing quite a few errors, not sure if it has something to do with my install, or if it is the Alpha.

Any ways, let me know if there is any thing else I can do to help. As you saw, I tried to decrypt the wireless signals the other day, but did not get very far. Could not fully break through the 802.11 encryption to decode the signals.

I did play around with PacketSender though, based on the limitless dev page. I was getting some responses from the iBox, but couldn’t get the commands to work on it. second-alpha.txt.pdf (7.3 KB)
first-alpha.txt.pdf (7.1 KB)

Thank you for your testing. I fixed the particular exception and appended a new version.

Please again have a look at the logs for exceptions.

Hey David,

Thanks for the quick response!

No exceptions this time! However, the log did give some kind of other error.

Saying that the commands were not “confirmed”

Attaching log.

Johnalpha3.txt.pdf (5.2 KB)

To understand your logs better, what is your setup at the moment? Do you use “old” and “new” milights at the same time? Because I see the line:

“ONLINE: V2 compatibility mode” which definitely is not good if you are only using the iBox and no older brigdes.

Thanks,
David

Hey David,

I have the iBox and 2 of the RGBWW bulbs. That is it.

This is the link for the bulbs: https://www.amazon.com/gp/product/B01LPRQ4BK/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1

Thanks,
John

Changelog:

  • Fixed wrong V2 compatibility mode message
  • Fixed handling with the iBox bulb itself

If you set the message level of OH2 to debug, there might be a lot more information about what is going on. Most of the addon messages are printed with the debug level only actually.

Hey David,

Sorry for the delay… Was struggling to set the Debug level, but I finally got it. Could not get karaf started based on the instructions. Finally figured it out because I was using SSH into my Pi from my main Mac. Turns out it has to be local.

Now that we have that out of the way, here is the latest. Tried to send on/off command to iBox. Here is the result.

alpha5.txt.pdf (9.0 KB)

Thanks for your continued work!

John

Changelog:

  • Check for a valid session before issuing any commands to the bridge
  • Receive session only after the receive thread has been started
  • Fix missing byte for the command byte sequence
  • Use the session register bytes from the examples instead of documentation (they differ, no idea which is correct)

The produced bytes are now exactly like in the documentation/examples. Hopefully this works now.

Thanks,
David

Hey David,

The Openhab log is a lot more active with this build. It appears that it is getting some responses that it is not expecting.

Once again, tried brightness on/off, adjusting brightness and changing color of iBox.

alpha6.txt.pdf (12.7 KB)

If I can do anything more specifically, let me know!

Thanks again,
John