Obsolete MiLight Plugins

Before you can control a lamp via the WiFi Bridge, it has to be registered on that bridge. This has to be done for each lamp in each zone/group. A lamp may be registered in up to four groups. A fifth registration will overwrite the first etc. Registration on the normal remote control also counts as one of the four. The process is slightly different between White and RGB versions of the lamp:

MiLight White
Turn off the power to the lamp with the wall-switch. Wait about ten seconds. Turn the power back on and, as soon as the lamp is on, press the Z X On button - where X is the zone to which you want to add this lamp. If successful, the lamp will flash three times.

MiLight RGB
Turn off the power to the lamp with the wall-switch. Wait about ten seconds. Turn the power back on and, as soon as the lamp is on, press the Fast button. If successful, the lamp will flash twice.

After a play with the plugin, you will probably want to control the lamps directly from scenes. The Luup for this is straightforward. Each command requires a UDP packet of three bytes to be sent to the WiFi Bridge. The following examples assume the bridge is on IP address 192.168.1.240 - change as required.

To turn on zone 1 (MiLight White)

socket = require("socket") local s = socket.udp() s:sendto(string.char(0x38,0x00,0x55), "192.168.1.240", 50000) s:close()

The WiFi Bridge will accept a sequence of commands provided there is a gap of at least 50ms between them. Some special commands require at least 100ms gap (see command list).

To set zone 1 to full brightness (MiLight White)

socket = require("socket") local s = socket.udp() s:sendto(string.char(0x38,0x00,0x55), "192.168.1.240", 50000) luup.sleep(100) s:sendto(string.char(0xB8,0x00,0x55), "192.168.1.240", 50000) s:close()

To set zone 1 to half brightness (MiLight White)

socket = require("socket") local s = socket.udp() s:sendto(string.char(0x38,0x00,0x55), "192.168.1.240", 50000) luup.sleep(100) s:sendto(string.char(0xB8,0x00,0x55), "192.168.1.240", 50000) for i = 1,5 do luup.sleep(50) s:sendto(string.char(0x34,0x00,0x55), "192.168.1.240", 50000) end s:close()

The commands must be sent as hexadecimal bytes as shown above. The commands are:

MiLight White
35 00 55 - All On
39 00 55 - All Off
3C 00 55 - Brightness Up
34 00 55 - Brightness Down (There are ten steps between min and max)
3E 00 55 - Warmer
3F 00 55 - Cooler (There are ten steps between warmest and coolest)
38 00 55 - Zone 1 On
3B 00 55 - Zone 1 Off
3D 00 55 - Zone 2 On
33 00 55 - Zone 2 Off
37 00 55 - Zone 3 On
3A 00 55 - Zone 3 Off
32 00 55 - Zone 4 On
36 00 55 - Zone 4 Off
B5 00 55 - All On Full (Send >=100ms after All On)
B8 00 55 - Zone 1 Full (Send >=100ms after Zone 1 On)
BD 00 55 - Zone 2 Full (Send >=100ms after Zone 2 On)
B7 00 55 - Zone 3 Full (Send >=100ms after Zone 3 On)
B2 00 55 - Zone 4 Full (Send >=100ms after Zone 4 On)
B9 00 55 - All Nightlight (Send >=100ms after All Off)
BB 00 55 - Zone 1 Nightlight (Send >=100ms after Zone 1 Off)
B3 00 55 - Zone 2 Nightlight (Send >=100ms after Zone 2 Off)
BA 00 55 - Zone 3 Nightlight (Send >=100ms after Zone 3 Off)
B6 00 55 - Zone 4 Nightlight (Send >=100ms after Zone 4 Off)

MiLight RGB
22 00 55 - Lamps On
21 00 55 - Lamps Off
23 00 55 - Brightness Up
24 00 55 - Brightness Down (There are nine steps between min and max)
27 00 55 - Mode Up
28 00 55 - Mode Down (There are 20 modes. The lowest is constant white)
25 00 55 - Speed Up (Fast)
26 00 55 - Speed Down (Slow)
20 xx 55 - Set Colour to xx (value shown on MiLightRGB plugin converted to hexadecimal)

Edit 15/03/2013 - Added additional MiLight White commands. Thanks to Hamish at LimitlessLED.

.

[quote=“LimitlessLED, post:3, topic:185699”]Yeah you are correct, we currently have 3 brands: LimitlessLED is sold in AU/NZ/USA/CANADA/GERMANY/Netherlands/Sweden, EasyBulb is sold in United Kingdom, and MiLight is sold in China/HongKong.

The full list of commands are on the website: http://www.limitlessled.com/dev/

The Ninja Blocks team have been busy making some cool LimitlessLED plugins too… take a look.

-Hamish.
LimitlessLED.[/quote]

Hamish,

Maybe some good will should be sent to RexBeckett for stepping up and getting this app running which no doubt will increase your exposure to a wider audience and potential global customer base. I also note from the thread if that is extended to a few other forum members, you might get some different development coming to address the current limitation for limitlessLED RGB bulb.

Thanks a lot! I plan to get some of these bulbs now that they work with Vera. One suggestion: is to try to do something similar to what @intveltr did in his plugin for Philips Hue, where each bulb is represented by 2 devices in Vera: a plain simple dimmable light (for compatibility with mobile apps, where the bulb acts as a simple dimmbale light switch) and another device that adds the extra bells and whistles… just my .02

I’ve uploaded a new version of MiLightW that now includes Full (full brightness) and Night (nightlight mode) buttons. I knew I left those two gaps in the UI for a reason. ;D

Use the Full button after any of the …On buttons to set the lamps to full brightness. Use the Night button after any of the …Off buttons to set the lamps to nightlight mode. If you discover that you can use the Full and Night buttons interchangeably, don’t tell anyone. ::slight_smile:

One suggestion: is to try to do something similar to what @intveltr did in his plugin for Philips Hue, where each bulb is represented by 2 devices in Vera: a plain simple dimmable light (for compatibility with mobile apps, where the bulb acts as a simple dimmbale light switch) and another device that adds the extra bells and whistles.. just my .02
That's certainly worth a thought or two.

[quote=“RexBeckett, post:7, topic:185699”]

One suggestion: is to try to do something similar to what @intveltr did in his plugin for Philips Hue, where each bulb is represented by 2 devices in Vera: a plain simple dimmable light (for compatibility with mobile apps, where the bulb acts as a simple dimmbale light switch) and another device that adds the extra bells and whistles… just my .02

That’s certainly worth a thought or two.[/quote]
I have thought (or two) and come up with a possible solution. I’ve made a plugin that uses the standard DimmableLight UI to control all the MiLight White lamps in one, selectable, zone. You should be able to use multiple instances to handle up to four zones. The plugin uses the standard D_DimmableLight1.json and supports SetLoadLevelTarget and SetTarget actions. It appears to work OK with mobile control but I’ll await feedback on that. :wink: The plugin name is MiLightWU1 (you must admit it’s catchy) and there is a download link at the start of this thread.

When I get the bugs ironed-out, I will consider getting the plugin to auto-create devices for all four zones. Meanwhile, it only takes a few seconds to create them manually.

It is important to understand that there is no way for a plugin to interrogate these lamps or the WiFi Bridge to determine the on/off status or current dim level. The plugin can only assume that the lamps are doing what it last told them to do. If you control the lamps through other means - like a scene sending UDP commands, a MiLightW plugin, an iGadget, etc. - the MiLightWU1 plugin will not know about this. If this happens, it would be necessary to re-synchronize the dimmer device and lamps by hitting either the Off or On button and then setting the dimmer to where you want it.

It is also not possible to set these lamps to a specific dim level. MiLightWU1 sets new dim levels based on the last one it saved (in LoadLevelStatus) and issues dim or bright commands as appropriate. If the last setting was 0% or Off, MiLightWU1 has to set the lamp to full brightness before dimming it down to the required level. This is not ideal but I can’t see a good way around it. ???

I am confident that I have missed out something that will be necessary to make this plugin play nicely with the rest of the gang. When you find out what it/they is/are, please let me know and I’ll do my best to fix it/them. ;D

Let me expand on why I would like to see a visual indication on the UI.
I noticed that when either of the ON/OFF buttons were clicked, neither showed any indication message of “Transmit OK”, making me wonder if the mouse click has changed the status of the globe.
For me to check whether the LED responded requires me to walk to the other end of the house…a long way, when all I need is a visual from the UI.

DimmableLight type plugin for the RGB lamps

Yes please… :slight_smile:

For me to check whether the LED responded requires me to walk to the other end of the house....a long way, when all I need is a visual from the UI.
Whatever I do with the icon will not give you any guarantee that the lamp got switched on. Sadly there is no return path from the lamp so I can only indicate that I sent the command. MiLightW and MiLightRGB are really debug tools. They do not attempt to keep track of what the lamps are doing. They are just a way to send all possible commands through the bridge.

I think you should try MiLightWU1 which looks and behaves much like a normal dimmer. And now, [pause for roll on the drums] the icon changes to reflect the on/off state as well as the dim level. This feature is just for you. If you don’t use the plugin I shall be inconsolable. :’(

You can install MiLightWU along with the existing tools. Just remember that it can only keep track of the lamps by assuming it alone is controlling them. If you send commands with the other tools, MiLightWU will lose track. It took me less than a day before I stopped using MiLightW at all. MiLightWU makes these lamps work like a real dimmer only better. Do try it out.

See the following post for other new features.

Hey Rex, sorry, I didn’t make it very clear that there are two independent brightness settings in the LimitlessLED RGB color lightbulb, one brightness memory setting for the White Mode, and a separate brightness memory setting for the RGB colors.

So even if you turned the white mode all the way to full brightness, does not mean that the color is turned all the way up to full brightness. By default the color bulbs come with RGB White Mode at full brightness, and color at half brightness level.

Everyone might like to check that the both the color mode and the white mode on the RGB LED bulb is set to full brightness :slight_smile:

Cheers,
Hamish.
-LimitlessLED.

Sorry for reviving this very old topic…
I have some old MiLight bulbs and bridge lying around that I want to start using again.

Anyone any idea why this code will not run on a Vera Plus with latest firmware 7.31
I tested the code in develop apps - test luup code.
Off course I changed the IP-adress to the correct one :grinning:

I found the solution. 50000 = portnumber
Changed it into 8899 and now it works!

Thanks to myself :grinning: :innocent:

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules