This module represents a Milight LED Bulb or LED strip controller. It is controlled by a MilightBridge.
The Milight system is sold under various brands around the world including "LimitlessLED, EasyBulb, AppLamp"
The API documentation is available here: http://www.limitlessled.com/dev/
Requires perl module Math::Round
Define
define <name> MilightDevice <devType(RGB|RGBW|White)> <IODev> <slot>
Specifies the Milight device.
<devType> One of RGB, RGBW, White depending on your device.
<IODev> The MilightBridge which the device is paired with.
<slot> The slot on the MilightBridge that the device is paired with or 'A' to group all slots.
Readings
-
state
[on xxx|off|night]: Current state of the device / night mode (xxx = 0-100%).
-
brightness
[0-100]: Current brightness level in %.
-
brightness_on
[0-100]: The brightness level before the off command was sent. This allows the light to turn back on to the last brightness level.
-
rgb
[FFFFFF]: HEX value for RGB.
-
previousState
[hsv]: hsv value before last change. Can be used with restorePreviousState set command.
-
savedState
[hsv]: hsv value that was saved using saveState set function
-
hue
[0-360]: Current hue value.
-
saturation
[0-100]: Current saturation value.
-
transitionInProgress
[0|1]: Set to 1 if a transition is currently in progress for this device (eg. fade).
-
discoMode
[0|1]: 1 if discoMode is enabled, 0 otherwise.
-
discoSpeed
[0|1]: 1 if discoSpeed is increased, 0 if decreased. Does not mean much for RGBW
-
lastPreset
[0..X]: Last selected preset.
-
ct
[1-10]: Current colour temperature (3000=Warm,6500=Cold) for White devices.
Set
-
on <ramp_time (seconds)>
-
off <ramp_time (seconds)>
-
toggle
-
night
-
dim <percent(0..100)> [seconds(0..x)] [flags(l=long path|q=don't clear queue)]
Will be replaced by brightness at some point
-
dimup <percent change(0..100)> [seconds(0..x)]
Special case: If percent change=100, seconds will be adjusted for actual change to go from current brightness.
-
dimdown <percent change(0..100)> [seconds(0..x)]
Special case: If percent change=100, seconds will be adjusted for actual change to go from current brightness.
-
pair
May not work properly. Sometimes it is necessary to use a remote to clear pairing first.
-
unpair
May not work properly. Sometimes it is necessary to use a remote to clear pairing first.
-
restorePreviousState
Set device to previous hsv state as stored in previousState reading.
-
saveState
Save current hsv state to savedState reading.
-
restoreState
Set device to saved hsv state as stored in savedState reading.
-
preset (0..X|+)
Load preset (+ for next preset).
-
hsv <h(0..360)>,<s(0..100)>,<v(0..100)> [seconds(0..x)] [flags(l=long path|q=don't clear queue)]
Set hsv value directly
-
rgb RRGGBB [seconds(0..x)] [flags(l=long path|q=don't clear queue)]
Set rgb value directly or using colorpicker.
-
hue <(0..360)> [seconds(0..x)] [flags(l=long path|q=don't clear queue)]
Set hue value.
-
saturation <s(0..100)> [seconds(0..x)] [flags(q=don't clear queue)]
Set saturation value directly
-
discoModeUp
Next disco Mode setting (for RGB and RGBW).
-
discoModeDown
Previous disco Mode setting (for RGB).
-
discoSpeedUp
Increase speed of disco mode (for RGB and RGBW).
-
discoSpeedDown
Decrease speed of disco mode (for RGB and RGBW).
-
ct <3000-6500>
Colour temperature 3000=Warm White,6500=Cold White (10 steps) (for White devices only).
-
set extensions are supported.
Get
Attributes
-
dimStep
Allows you to modify the default dimStep if required.
-
defaultRampOn
Set the default ramp time if not specified for on command.
-
defaultRampOff
Set the default ramp time if not specified for off command.
-
presets
List of hsv presets separated by spaces (eg 0,0,100 9,0,50).
-
colorCast
Color shift values for red,yellow,green,cyan,blue,magenta (-29..29) for HSV color correction (eg 0,5,10,-5,0,0)
-
gamma
Set gamma correction value for device (eg 0.8)
-
dimOffWhite
Use a different switching logic for White bulbs to better handle packet loss.
-
updateGroupDevices
Update the state of single devices switched with slot 'A'.
-
restoreAtStart
Restore the state of devices at startup. Default 0 for slot 'A', 1 otherwise.
-
defaultBrightness
Set the default brightness if not known. (Default: 36)
=end html
=cut