This is an old revision of the document!
Turns on a real unit, group or a pseudo.
turn on “name of the unit”
turnon is OK too.
Additional optional params are available for color capable devices:
If you are using a color capable device keep in mind that the level that the lamp displays the color at is separate from the brightness of the color that you are passing. For example, dimming a lamp to 10% with an rgb color of “FF0000” would result in a color at the lamp that is really “190000” So if you wish a dimmer red, you can just pass the full on along with a lower dim level. Color presets are handled in the same way. This can be a little confusing when just reading about it, but it does seem to make the most sense when actually using the lamp. You have your lamp at a specific color and you wish to change it to another color, you don’t wish the level to change dramatically along with that color preset change. This is how the Phillips Hue bulbs handle color changes natively and how XTension handles the RGB pseudo internally.
Since the phillips hue bulbs are always treated as simulated including a color setting in the ON command will return the bulb to the last level with that level altering the color that you are passing to be the proper brightness.
RGB colors on the computer screen do not correspond perfectly to the color displayed by the bulb. A lot of work was done to support the specific transforms necessary for the Phillips hue bulbs and as long as you are choosing a color that the bulb can actually generate the color display is pretty close. For RGB Pseudo devices there could be considerable differences between what is displayed on your screen and what is shown at the lamp. Many less expensive devices seem to have an underpowered red channel and so you may have to boost the red above what you need to see the proper color on the screen in order to see the proper color on the lamp itself.
--just turn on the lamp right now turnon "Kitchen Overhead"
--create a scheduled event that will turn on the light in 30 minutes turnon "Kitchen Overhead" for (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 turn it back off again. turnon "Kitchen Overhead" in 90 for (20 * minutes)
-- turn on the light at 8pm and off at 10pm that day 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
Non-dimmable (discrete) units simply turn on and off. Different kinds of dimmable devices have widely varying behavior when receiving an ON command. Older X10 devices and some ZWave devices treat an on as a dim to 100%. They will always go to full on when receiving an ON command. Other “smart” devices will remember their last dim level and return to that when they receive an ON command. XTension supports all these types of dimmers but some setup in the unit preferences may be necessary to get them to behave as you wish. See the Dimmable Unit Types page for more information.
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