huepi
Version:
hue (Philips Wireless Lighting) Api interface for JavaScript
2,071 lines (386 loc) • 19.2 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Lightstate</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Lightstate</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="huepi.html">huepi</a>.</span>Lightstate</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="Lightstate"><span class="type-signature"></span>new Lightstate<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
huepi.Lightstate Object.
Internal object to recieve all settings that are about to be send to the Bridge as a string.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1004">line 1004</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="AlertLSelect"><span class="type-signature"></span>AlertLSelect<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1104">line 1104</a>
</li></ul></dd>
</dl>
<h4 class="name" id="AlertNone"><span class="type-signature"></span>AlertNone<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1109">line 1109</a>
</li></ul></dd>
</dl>
<h4 class="name" id="AlertSelect"><span class="type-signature"></span>AlertSelect<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1099">line 1099</a>
</li></ul></dd>
</dl>
<h4 class="name" id="EffectColorloop"><span class="type-signature"></span>EffectColorloop<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1118">line 1118</a>
</li></ul></dd>
</dl>
<h4 class="name" id="EffectNone"><span class="type-signature"></span>EffectNone<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1123">line 1123</a>
</li></ul></dd>
</dl>
<h4 class="name" id="Get"><span class="type-signature"></span>Get<span class="signature">()</span><span class="type-signature"> → {string}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1138">line 1138</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Stringified version of the content of LightState ready to be sent to the Bridge.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="Off"><span class="type-signature"></span>Off<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1016">line 1016</a>
</li></ul></dd>
</dl>
<h4 class="name" id="On"><span class="type-signature"></span>On<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1011">line 1011</a>
</li></ul></dd>
</dl>
<h4 class="name" id="SetBrightness"><span class="type-signature"></span>SetBrightness<span class="signature">(Brightness)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Brightness</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="description last">Range [0..255]</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1048">line 1048</a>
</li></ul></dd>
</dl>
<h4 class="name" id="SetColortemperature"><span class="type-signature"></span>SetColortemperature<span class="signature">(Colortemperature)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Colortemperature</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Range [2200..6500] for the 2012 lights</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1083">line 1083</a>
</li></ul></dd>
</dl>
<h4 class="name" id="SetCT"><span class="type-signature"></span>SetCT<span class="signature">(Ct)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Ct</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Micro Reciprocal Degree of Colortemperature (Ct = 10^6 / Colortemperature)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1076">line 1076</a>
</li></ul></dd>
</dl>
<h4 class="name" id="SetHue"><span class="type-signature"></span>SetHue<span class="signature">(Hue)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Hue</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Range [0..65535]</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1034">line 1034</a>
</li></ul></dd>
</dl>
<h4 class="name" id="SetHueAngSatBri"><span class="type-signature"></span>SetHueAngSatBri<span class="signature">(Ang, Sat, Bri)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Ang</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="description last">Range [0..360]</td>
</tr>
<tr>
<td class="name"><code>Sat</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="description last">Range [0..1]</td>
</tr>
<tr>
<td class="name"><code>Bri</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="description last">Range [0..1]</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1057">line 1057</a>
</li></ul></dd>
</dl>
<h4 class="name" id="SetRGB"><span class="type-signature"></span>SetRGB<span class="signature">(Red, Green, Blue)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Red</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Range [0..1]</td>
</tr>
<tr>
<td class="name"><code>Green</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Range [0..1]</td>
</tr>
<tr>
<td class="name"><code>Blue</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Range [0..1]</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1069">line 1069</a>
</li></ul></dd>
</dl>
<h4 class="name" id="SetSaturation"><span class="type-signature"></span>SetSaturation<span class="signature">(Saturation)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Saturation</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="description last">Range [0..255]</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1041">line 1041</a>
</li></ul></dd>
</dl>
<h4 class="name" id="SetTransitiontime"><span class="type-signature"></span>SetTransitiontime<span class="signature">(Transitiontime)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>Transitiontime</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">Optional Transitiontime in multiple of 100ms, defaults to 4 (on bridge, meaning 400 ms)</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1130">line 1130</a>
</li></ul></dd>
</dl>
<h4 class="name" id="SetXY"><span class="type-signature"></span>SetXY<span class="signature">(X, Y)</span><span class="type-signature"></span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>X</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>Y</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="huepi.js.html">huepi.js</a>, <a href="huepi.js.html#line1090">line 1090</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="huepi.html">huepi</a></li><li><a href="huepi.Lightstate.html">Lightstate</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Fri Mar 31 2017 18:18:59 GMT+0200 (CEST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>