Problems controlling my milight bulb

Hello,

I´m still struggeling with my milight RGW bulb. I can controll my bulb with the remote and app but not with opneHAB. Here are some informations about the configuration:

I´m using

  • OpenHAB 1.7.1
  • Windowns 10 Pro 64 Bit
  • JAVA SDK 8 Update 65

Here are my configurations:
openhab.cfg

milight:bridge1.host=192.168.0.105
milight:bridge1.port=8899

Here is my Itemfile

Switch Switch_MiLight6 {milight=“bridge1;6;whiteMode”}
Switch Switch_MiLight7 {milight=“bridge1;7;whiteMode”}
Switch Switch_MiLight8 {milight=“bridge1;8;whiteMode”}
Switch Switch_MiLight9 {milight=“bridge1;9;whiteMode”}
Switch Switch_MiLight10 {milight=“bridge1;10;whiteMode”}

Sitemap

sitemap demo label=“Demo House”
{
Frame {
Switch item=Switch_MiLight6 label=“LED1”
Switch item=Switch_MiLight7 label=“LED1”
Switch item=Switch_MiLight8 label=“LED1”
Switch item=Switch_MiLight9 label=“LED1”
Switch item=Switch_MiLight10 label=“LED1”
}
}

the log

12:37:36.100 [DEBUG] [.o.b.m.internal.MilightBinding:126 ] - milight: item is of type whiteMode
12:37:36.104 [DEBUG] [.o.b.m.internal.MilightBinding:608 ] - milight: sendOn
12:37:36.106 [DEBUG] [.o.b.m.internal.MilightBinding:780 ] - milight: messageBytes to transform: ‘45:00:55’
12:37:36.109 [DEBUG] [.o.b.m.internal.MilightBinding:771 ] - Sent packet ‘45:00:55’ to bridge ‘bridge1’ (192.168.0.105:8899)
12:37:36.210 [DEBUG] [.o.b.m.internal.MilightBinding:537 ] - milight: sendWhiteMode
12:37:36.210 [DEBUG] [.o.b.m.internal.MilightBinding:780 ] - milight: messageBytes to transform: ‘C5:00:55’
12:37:36.212 [DEBUG] [.o.b.m.internal.MilightBinding:771 ] - Sent packet ‘C5:00:55’ to bridge ‘bridge1’ (192.168.0.105:8899)

I hope you can help me, because it´s a university project ;(

Hi,
I guess you are using the wrong port.
What is written on the label on your MiLight bridge?

Best
Hans-Jörg

Hi hmerk,

this is the bridge im using:

I also tried to use the port 50000 but also no reaction at all

Looks like a V3.0 version, so port 8899 will be correct.
What Java version are you using ?

Edit: just saw you are using java 8 SDK.
Is there any firewall blocking udp traffic ?

yes my windows firewall is deactivated and i´m not using any other firewalls at the moment.

Two quick things to confirm:

  • Is the bridge still at 192.168.0.105? If it’s on DHCP and without a static assignment, there’s a chance its IP address has changed.
  • Can you control the LED lamps with the Milight / LimitlessLED app from your phone?

edit: Oops, sorry I re-read and see you’ve already answered the second question (yes).

What do you see if you run Wireshark or another packet capture program on the same PC as OpenHAB?

Hi. I had similar problem. I bought RGBW bulbs and wifi bridge few weeks ago. It seems that wifi bridge had API v 5.0 and it didn’t work correct with openhab using existing version of milight binding, but worked fine with mobile app. So, I sniffered the traffic with tcpdump on my openhab server (running on bananapi), then, sniffered the traffic of my smartphone (generated by the official milight app while controlling bulbs) with free wireshark-like app for android, looked through it, then looked through the api at http://www.limitlessled.com/dev/ and saw that only mobile app sends correct commands, according to API v5.0. Then I started to send custom commands (according to API v5.0) to milight bridge using sendip command (see https://moythreads.com/wordpress/2012/03/15/sending-udp-packets-from-the-command-line/) and had success - I managed to control all bulb parameters. Then I wrote bash scripts for bulbs control and integrated them into openhab using exec binding.
Sure, it isn’t the best solution, but at least, it works and it’s usefull for debugging.
I plan to write to milight binding authors about this issue.
Sorry for my English

1 Like

The author is already reding this thread :blush:
I will have a look into API V 5.0 documentation and find a fix for this.

Best
Hans-Jörg

Nice to read this =) let me know if any testing is required

As I don’t have a V5 bridge, I will come back to you for testing.

Hi, the Author! :wink:
Any progress with the binding?

Sorry, did not find the time for it but will try to fix it soon.

Best
Hans-Jörg

@strelok1986
I had a look at the API description but did not find any different codes for the V5 bridge.
Am I blind ? Where exactly did you find the codes ??

I also have openhab with milight binding, but android led app works much smoother than openhab milight binding. If i want to change color, sometimes it isn´t working. With android app it switches very smooth when moving the finger. With openhab sometimes it works, sometimes color isn´t changing.

I have the latest version of the controller, using it with 3 milight led bulbs.

Hi,

I have a very similar situation, so continuing this thread rather than starting a new one. Would really appreciate anyone’s help here. I’m anxious to get this working so I can go out and buy some more lights!

I have a Milight 4-zone wireless LED dimmer connected to an LED strip. It’s synced to my mi-light app on my phone and the battery operated remote control. Both can dim successfully on channel 1. However, I can’t get openhab to do the same.

I am running raspberry pi 2 with openhab 1.8 and the milight 1.8 binding. My milight hub is plugged into one of the USB ports of the pi. My java version is
java version "1.8.0"
Java™ SE Runtime Environment (build 1.8.0-b132)
Java HotSpot™ Client VM (build 25.0-b70, mixed mode)

I don’t know which version of the milight bridge (is there a way to tell?) but I’ve tried both ports 50000 and 8899 without success. I’ve also tried using the IP address of the raspberry pi along with the only other DHCP listing which I didn’t recognise and therefore assumed belong to the milight. Its hostname is AUD-R9010ZM4 with MAC address of 7c:7a:91:a2:dc:5d.

My item configuration is:
Dimmer Light_Pool “Milight Dimmer Test” (Pool) {milight=“MilightHub;0;brightness”}
Dimmer Light_Pool2 “Milight Dimmer Test2” (Pool) {milight=“MilightHub;1;brightness”}
Switch Light_Pool “Milight Switch” (Pool){milight=“MilightHub;1”}

As you can see, I’ve tried both channels 0 and 1, without any success.

I’ve got debug level tracing going in a separate log file (thanks Hakam). The following extract is representative:
2016-02-02 22:47:54 - milight: sendDecrease
2016-02-02 22:47:54 - milight: Bulb ‘1’ getting decreased to '18’
2016-02-02 22:47:54 - milight: messageBytes to transform: '34:00:55’
2016-02-02 22:47:54 - Sent packet ‘34:00:55’ to bridge ‘MilightHub’ (192.168.1.13:8899)
2016-02-02 22:47:54 - milight: sendDecrease
2016-02-02 22:47:54 - milight: Bulb ‘1’ getting decreased to '9’
2016-02-02 22:47:54 - milight: messageBytes to transform: '34:00:55’
2016-02-02 22:47:54 - Sent packet ‘34:00:55’ to bridge ‘MilightHub’ (192.168.1.13:8899)
2016-02-02 22:47:54 - milight: messageBytes to transform: '3B:00:55’
2016-02-02 22:47:54 - Sent packet ‘3B:00:55’ to bridge ‘MilightHub’ (192.168.1.13:8899)
2016-02-02 22:47:55 - milight: item is of type brightness
2016-02-02 22:47:55 - milight: sendOn
2016-02-02 22:47:55 - milight: messageBytes to transform: '38:00:55’
2016-02-02 22:47:55 - Sent packet ‘38:00:55’ to bridge ‘MilightHub’ (192.168.1.13:8899)

Thanks in advance for any suggestions you might have.

Trevor.

Don’t have a LED Strip, but I think it is RGB right ? So please use channels higher than 4, cause 0-4 are for the old white bulbs only.

Best
Hans-jörg

Hi Hans-Jörg,

Thanks for such a fast reply.

I think it’s white only as the outputs are just + and -. There’s no separate outputs for R,G and B, which I assume it would need. I’ll try channels 5-9, see if it works and report back.

Trevor.

Hi,

Checking back in with an update. I tried changing the items to Channel 5 (all RGB). I can see the change in the log file, but it did not adjust the actual lights.

Dimmer Light_Pool2 “Milight Dimmer Test2” (Pool) {milight=“MilightHub;5;brightness”}
Switch Light_Pool “Milight Switch” (Pool){milight=“MilightHub;5”}

2016-02-03 19:48:35 - milight: item is of type brightness
2016-02-03 19:48:35 - milight: sendOn
2016-02-03 19:48:35 - milight: messageBytes to transform: ‘22:00:55’
2016-02-03 19:48:35 - Sent packet ‘22:00:55’ to bridge ‘MilightHub’ (192.168.1.13:8899)
2016-02-03 19:48:48 - milight: item is of type brightness
2016-02-03 19:48:48 - milight: sendOff
2016-02-03 19:48:48 - milight: messageBytes to transform: ‘21:00:55’
2016-02-03 19:48:48 - Sent packet ‘21:00:55’ to bridge ‘MilightHub’ (192.168.1.13:8899)

I’ve attached photos of my Milight bridge and the wireless dimmer unit, in case that helps diagnose the problem. Sorry about the orientation of the photos!

Thanks again,

Trevor.

Hi all,

I tried turning on “trace” level logging to see if it gave any additional info, but it didn’t, so I’ve got no further info to add. If you have any ideas to either solve or to help diagnose, I’d love to hear them.

Thanks,
Trevor.

Ok, it’s quite easy, this is not a milight bridge, so it is not supported by the binding and won’t be.
If I remember right, there was a post about led stripe controllers, you could try that.