Table of Contents

Turn On

Turns on a real unit, group or a pseudo.

usage:

turn on “name of the unit”
turnon is OK too.

optional parameters:

Color Support

Additional optional params are available for color capable devices:

Examples:

--just turn on the lamp right now
turnon "Kitchen Overhead"
--create a scheduled event that will turn on the light immediately and then return it to it’s current state, which may or may not be Off, in 30 minutes.
turnon "Kitchen Overhead" for (30 * minutes)
--to guarantee that a light turns back off after a specific time you need to verify the current state. The “for” switch
-- returns a light to the state it was at when the command is executed. If the light can be turned on or off by other scripts or
-- people use 2 commands to specifically generate the command you want.
turnon “Kitchen Overhead”
turnoff “Kitchen Overhead” in 30 * minutes
--create a scheduled event to turn on the light in 90 seconds
--and another event in 20 minutes and 90 seconds that will return it to it’s current state.
turnon "Kitchen Overhead" in 90 for (20 * minutes)
-- turn on the light at 8pm and off at 10pm that day
-- note that the until switch is the same as the for switch above. The light will
-- return to it’s current state which is not necessarily off.
turnon “outside light” at date (“8:00pm”) until date (“10:00pm”)
-- turnon a hue lamp to bright green
turnon “my hue bulb” rgb color “00FF00”
-- turnon a hue bulb moving to a color temperature saved as a preset
turnon “my hue bulb” color preset 2
-- set the mired color temperature for a hue bulb to a warm white
turnon “my hue bulb” color temperature 2700
-- do a short alert for a color capable device
turnon “my color device” rgb color “FF0000” for 2

Preset Levels

The behavior of the turn on command is dependent on the dimmable type setting of the unit.

Notes:

The command will do nothing if the unit is Blocked.

When using the “for” or “until” parameters note that the current state of the lamp is saved as the return value. If the lamp is already on then the event that is created will be to return the lamp to on, not to turn it off. If you wish the light to turn on for a specific amount of time while not knowing the current state of the lamp use a separate specific turn off command for the off ie:

turn on “myLamp” 
turn off “myLamp” at date (“11:00pm”)

For more info on making a motion controlled lamp or for extending the time that a light is kept on based on motion or other input please see Motion Controlled Light