User Tools

Site Tools


dictionary:unitcontrol:turnon

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dictionary:unitcontrol:turnon [2016/03/14 19:12] – external edit 127.0.0.1dictionary:unitcontrol:turnon [2023/02/13 14:52] (current) – external edit 127.0.0.1
Line 9: Line 9:
  
 ===optional parameters:=== ===optional parameters:===
-**in** (integernumber of seconds)\\ +  * **in** (integer: seconds) If specified an event is created to apply your new settings after this number of seconds. 
-**at** (date, instead of in” you can pass a specific date, see below for examples)\\ +  **at** (date) Instead of the **in** param you may specify a specific date at which to create the event. 
-\\ +  **for** (integerseconds) returns the unit to it’s current state this many seconds after any **in** or **at** event has run. 
-**for** (integer, number of seconds)\\ +  **until** (date) similar to **for** but pass the specific date at which you wish the unit to return to it’s current state 
-**until** (date, instead of “for” you can pass specific date, see below for examples)\\ +  * **rate** (number: secondsThe number of seconds you wish the transition to take. You may specify a fractional seconds value such as 0.2 or 7.5. Not all devices support a rate param. 
-\\ +  **with no script** Stops the on or off script from running. 
-**with no script** (stops the ON or OFF script from running)\\ +  **with no transmit** Updates the database but doesn't actually send the command.
-**with no transmit** (updates the database but doesn't actually send the command)\\ +
-**rate** (integer, many devices support sending a ramp rate along with the command to control how fast the new level is reached)\\+
  
 ===Color Support=== ===Color Support===
  
-Many color capable bulbs are now available for ZWave and ZigBee via the [[supported_hardware:hue|Phillips Hue]] hub. XTension can also create an “RGB Pseudo” that groups any 3 other units as the red, green and blue channels of a single fixture. Even if your device is not directly supported as an individual color lamp the channels are usually available separately. This is normally the case with ZWave 3 channel controllers. There are several optional parameters to this command for setting color. Some are specific to the hue bulbs, others will work for any color capable device.+Additional optional params are available for color capable devices:
  
-**rgb color** (textstandard HTML color string with each 2 characters being 00 to FF a hex representation of the level of that color in the mix. All color devices support the rgb color command. This is the normal way to set the color of a bulb. “FF0000” would be full red, “0000FF” would be full blue.)\\ +  * **rgb color** (text:html color “RRGGBB") accepts a string the same as an html color definition but without the “#” at the front. “FF0000” would be full red, “00FF00” would be full green and “0000FF” would be full blue.  
-**hue/saturation** (integer, if using a Phillips Hue bulb you can set the color by passing the hue and saturationIf using this you must pass both the hue and saturation values.)\\ +  * **color temperature** (integer) The Mired color temperature you wish the bulb to displayThe range of available values is dependent on the individual device but would be in the range of 2000 to 50000 with 2700 being a warm white, 3500 being a “bright” or halogen white and 5000 to 6000 being a “daylight” color. Not all devices can display a color temperature
-**xvalue/yvalue** (number, another method of sending color to a Phillips Hue bulb. If using this you must pass both the x and y coordinate values.)\\ +  * **color preset** (integer: 1-8) go to a color preset by index that you have already saved for the unit in XTension
-**color temperature** (integer, currently supported only for Phillips Hue bulbs this number corresponds to the color temperatureFor the hue bulbs this is not the actual color temperature in kelvin, but a number from 153 to 500 with larger numbers being warmerAs other bulbs become more commonly available that support changes in color temperature support will be added for those.)\\ +  * **hue/saturation** (numbers) An alternative way to specify the color for a deviceYou must specify both the **hue** and **saturation** params to use this. The value is taken from the current brightness level of the device
-**color preset** (number, 1-8, all color capable devices can have 8 colors or color temperatures set as presets. You can recall one by passing the color preset number to this parameter.)+  * **xvalue/yvalue** (numbers) Another alternative way to specify the color for a device. You must specify both the **xvalue** and **yvalue** the z value or brightness is taken from the current brightness level of the device.
  
-===Color Handling=== 
-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. 
  
 ===Examples:=== ===Examples:===
Line 43: Line 36:
  
 <code> <code>
---create a scheduled event that will turn on the light in 30 minutes+--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) turnon "Kitchen Overhead" for (30 * minutes)
 +</code>
 +
 +<code>
 +--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
 </code> </code>
  
 <code> <code>
 --create a scheduled event to turn on the light in 90 seconds --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.+--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) turnon "Kitchen Overhead" in 90 for (20 * minutes)
 </code> </code>
Line 55: Line 56:
 <code> <code>
 -- turn on the light at 8pm and off at 10pm that day -- 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 “outside light” at date (“8:00pm”) until date (“10:00pm”)
 </code> </code>
Line 68: Line 71:
 </code> </code>
  
 +<code>
 +-- set the mired color temperature for a hue bulb to a warm white
 +turnon “my hue bulb” color temperature 2700
 +</code>
 +
 +<code>
 +-- do a short alert for a color capable device
 +turnon “my color device” rgb color “FF0000” for 2
 +</code>
 ===Preset Levels=== ===Preset Levels===
-Non-dimmable (discrete) units simply turn on and off. Different kinds of dimmable devices have widely varying behavior when receiving an ON commandOlder 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 [[getting_started:the_unit:dimmable_types|]] page for more information.+The behavior of the turn on command is dependent on the dimmable type setting of the unit.  
 +  * **Simple** a Simple unit assumes that when it is turned on that it goes to full onA simple device when sent an on will go to 100% 
 +  * **Simulated** a Simulated device includes the last dim level as known by XTensionThis is translated internally to a dim or set value command and will include the last dim level as well as the last color or color temperature the unit was at. This is the default for most modern device types such as ZWave and ZigBee. 
 +  * **Smart** a Smart device is assumed to be handling it’s own preset levels locally. XTension will send a simple On command and let the device decide what to do but will set it’s database level to the last known value. This is a special use case for “smart” X10 modules and may not apply in any sensible way to more modern devices.
  
 ===Notes:=== ===Notes:===
dictionary/unitcontrol/turnon.1457982743.txt.gz · Last modified: 2023/02/13 14:51 (external edit)