huepi
Version:
hue (Philips Wireless Lighting) Api interface for JavaScript
4,840 lines (1,182 loc) • 139 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: huepi</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: huepi</h1>
<section>
<header>
<h2>huepi</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="huepi"><span class="type-signature"></span>new huepi<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
huepi Object, Entry point for all interaction with Lights etc via the Bridge.
</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#line19">line 19</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="huepi.Lightstate.html">Lightstate</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="BridgeCache"><span class="type-signature"></span>BridgeCache<span class="type-signature"> :object</span></h4>
<div class="description">
Cache Hashmap of huepi BridgeID and Whitelisted Username
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">object</span>
</li>
</ul>
<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#line37">line 37</a>
</li></ul></dd>
</dl>
<h4 class="name" id="BridgeCacheAutosave"><span class="type-signature"></span>BridgeCacheAutosave<span class="type-signature"> :boolean</span></h4>
<div class="description">
Autosave Cache Hasmap of huepi BridgeID and Whitelisted Username
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
</li>
</ul>
<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#line39">line 39</a>
</li></ul></dd>
</dl>
<h4 class="name" id="BridgeConfig"><span class="type-signature"></span>BridgeConfig<span class="type-signature"> :object</span></h4>
<div class="description">
Configuration of the Current(active) Bridge
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">object</span>
</li>
</ul>
<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#line43">line 43</a>
</li></ul></dd>
</dl>
<h4 class="name" id="BridgeID"><span class="type-signature"></span>BridgeID<span class="type-signature"> :string</span></h4>
<div class="description">
ID (Unique, is MAC address) of the Current(active) Bridge
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<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#line32">line 32</a>
</li></ul></dd>
</dl>
<h4 class="name" id="BridgeIP"><span class="type-signature"></span>BridgeIP<span class="type-signature"> :string</span></h4>
<div class="description">
IP address of the Current(active) Bridge
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<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#line30">line 30</a>
</li></ul></dd>
</dl>
<h4 class="name" id="BridgeName"><span class="type-signature"></span>BridgeName<span class="type-signature"> :string</span></h4>
<div class="description">
Name of the Current(active) Bridge
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<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#line45">line 45</a>
</li></ul></dd>
</dl>
<h4 class="name" id="GroupIds"><span class="type-signature"></span>GroupIds<span class="type-signature"> :array</span></h4>
<div class="description">
Array of all GroupIds of the Current(active) Bridge
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">array</span>
</li>
</ul>
<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#line55">line 55</a>
</li></ul></dd>
</dl>
<h4 class="name" id="Groups"><span class="type-signature"></span>Groups<span class="type-signature"> :array</span></h4>
<div class="description">
Array of all Groups of the Current(active) Bridge
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">array</span>
</li>
</ul>
<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#line53">line 53</a>
</li></ul></dd>
</dl>
<h4 class="name" id="LightIds"><span class="type-signature"></span>LightIds<span class="type-signature"> :array</span></h4>
<div class="description">
Array of all LightIds of the Current(active) Bridge
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">array</span>
</li>
</ul>
<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#line50">line 50</a>
</li></ul></dd>
</dl>
<h4 class="name" id="Lights"><span class="type-signature"></span>Lights<span class="type-signature"> :array</span></h4>
<div class="description">
Array of all Lights of the Current(active) Bridge
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">array</span>
</li>
</ul>
<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#line48">line 48</a>
</li></ul></dd>
</dl>
<h4 class="name" id="LocalBridges"><span class="type-signature"></span>LocalBridges<span class="type-signature"> :array</span></h4>
<div class="description">
Array of all Bridges on the local network
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">array</span>
</li>
</ul>
<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#line24">line 24</a>
</li></ul></dd>
</dl>
<h4 class="name" id="Rules"><span class="type-signature"></span>Rules<span class="type-signature"> :array</span></h4>
<div class="description">
Array of all Rules of the Current(active) Bridge, NOTE: There are no Setter functions yet
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">array</span>
</li>
</ul>
<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#line65">line 65</a>
</li></ul></dd>
</dl>
<h4 class="name" id="ScanningNetwork"><span class="type-signature"></span>ScanningNetwork<span class="type-signature"> :bool</span></h4>
<div class="description">
get: local network scan in progress / set:proceed with scan
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">bool</span>
</li>
</ul>
<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#line27">line 27</a>
</li></ul></dd>
</dl>
<h4 class="name" id="Scenes"><span class="type-signature"></span>Scenes<span class="type-signature"> :array</span></h4>
<div class="description">
Array of all Scenes of the Current(active) Bridge, NOTE: There are no Setter functions yet
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">array</span>
</li>
</ul>
<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#line61">line 61</a>
</li></ul></dd>
</dl>
<h4 class="name" id="Schedules"><span class="type-signature"></span>Schedules<span class="type-signature"> :array</span></h4>
<div class="description">
Array of all Schedules of the Current(active) Bridge, NOTE: There are no Setter functions yet
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">array</span>
</li>
</ul>
<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#line59">line 59</a>
</li></ul></dd>
</dl>
<h4 class="name" id="Sensors"><span class="type-signature"></span>Sensors<span class="type-signature"> :array</span></h4>
<div class="description">
Array of all Sensors of the Current(active) Bridge, NOTE: There are no Setter functions yet
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">array</span>
</li>
</ul>
<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#line63">line 63</a>
</li></ul></dd>
</dl>
<h4 class="name" id="Username"><span class="type-signature"></span>Username<span class="type-signature"> :string</span></h4>
<div class="description">
Username for Whitelisting, generated by the Bridge
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<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#line34">line 34</a>
</li></ul></dd>
</dl>
<h4 class="name" id="version"><span class="type-signature"></span>version<span class="type-signature"> :string</span></h4>
<div class="description">
version of the huepi interface
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<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#line21">line 21</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".HelperColortemperaturetoCT"><span class="type-signature">(static) </span>HelperColortemperaturetoCT<span class="signature">(ColorTemperature)</span><span class="type-signature"> → {number}</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"></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#line966">line 966</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
CT in Mired (micro reciprocal degree)
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id=".HelperColortemperaturetoHueAngSatBri"><span class="type-signature">(static) </span>HelperColortemperaturetoHueAngSatBri<span class="signature">(Temperature)</span><span class="type-signature"> → {object}</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>Temperature</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">ranges [1000..6600]</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#line925">line 925</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Ang, Sat, Bri] - Ranges [0..360] [0..1] [0..1]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id=".HelperColortemperaturetoRGB"><span class="type-signature">(static) </span>HelperColortemperaturetoRGB<span class="signature">(Temperature)</span><span class="type-signature"> → {object}</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>Temperature</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">ranges [1000..6600]</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#line659">line 659</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Red, Green, Blue] ranges [0..1] [0..1] [0..1]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id=".HelperColortemperaturetoXY"><span class="type-signature">(static) </span>HelperColortemperaturetoXY<span class="signature">(Temperature)</span><span class="type-signature"> → {object}</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>Temperature</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last">ranges [1000..6600]</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#line947">line 947</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[x, y] - Ranges [0..1] [0..1]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id=".HelperCTtoColortemperature"><span class="type-signature">(static) </span>HelperCTtoColortemperature<span class="signature">(CT)</span><span class="type-signature"> → {number}</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">in Mired (micro reciprocal degree)</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#line957">line 957</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
ColorTemperature
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id=".HelperGamutXYforModel"><span class="type-signature">(static) </span>HelperGamutXYforModel<span class="signature">(Px, Py, Model)</span><span class="type-signature"> → {object}</span></h4>
<div class="description">
Tests if the Px,Py resides within the Gamut for the model.
Otherwise it will calculated the closesed point on the Gamut.
</div>
<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>Px</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>Py</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>Model</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Modelname of the Light to Gamutcorrect Px, Py for</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#line839">line 839</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[x, y] - Ranges [0..1] [0..1]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id=".HelperHueAngSatBritoColortemperature"><span class="type-signature">(static) </span>HelperHueAngSatBritoColortemperature<span class="signature">(Ang, Sat, Bri)</span><span class="type-signature"> → {number}</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#line915">line 915</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Temperature ranges [2200..6500]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id=".HelperHueAngSatBritoRGB"><span class="type-signature">(static) </span>HelperHueAngSatBritoRGB<span class="signature">(Ang, Sat, Bri)</span><span class="type-signature"> → {object}</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#line579">line 579</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Red, Green, Blue] - Ranges [0..1] [0..1] [0..1]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id=".HelperModelCapableCT"><span class="type-signature">(static) </span>HelperModelCapableCT<span class="signature">(Model)</span><span class="type-signature"> → {boolean}</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>Model</code></td>
<td class="type">
<span class="param-type">string</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#line526">line 526</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Model is capable of CT
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".HelperModelCapableXY"><span class="type-signature">(static) </span>HelperModelCapableXY<span class="signature">(Model)</span><span class="type-signature"> → {boolean}</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>Model</code></td>
<td class="type">
<span class="param-type">string</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#line537">line 537</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Model is capable of XY
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id=".HelperRGBtoColortemperature"><span class="type-signature">(static) </span>HelperRGBtoColortemperature<span class="signature">(Red, Green, Blue)</span><span class="type-signature"> → {number}</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">float</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">float</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">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#line635">line 635</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Temperature ranges [2200..6500]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id=".HelperRGBtoHueAngSatBri"><span class="type-signature">(static) </span>HelperRGBtoHueAngSatBri<span class="signature">(Red, Green, Blue)</span><span class="type-signature"> → {object}</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">float</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">float</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">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#line550">line 550</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Ang, Sat, Bri] - Ranges [0..360] [0..1] [0..1]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id=".HelperRGBtoXY"><span class="type-signature">(static) </span>HelperRGBtoXY<span class="signature">(Red, Green, Blue)</span><span class="type-signature"> → {object}</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">float</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">float</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">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#line713">line 713</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[x, y] - Ranges [0..1] [0..1]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id=".HelperToStringArray"><span class="type-signature">(static) </span>HelperToStringArray<span class="signature">(Items)</span><span class="type-signature"> → {string}</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>Items</code></td>
<td class="type">
<span class="param-type">multiple</span>
</td>
<td class="description last">Items to convert to StringArray</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#line975">line 975</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
String array containing Items
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id=".HelperXYtoColortemperature"><span class="type-signature">(static) </span>HelperXYtoColortemperature<span class="signature">(x, y, Brightness)</span><span class="type-signature"> → {number}</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>
<tr>
<td class="name"><code>Brightness</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="description last">Optional</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#line937">line 937</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Temperature ranges [1000..6600]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
<h4 class="name" id=".HelperXYtoRGB"><span class="type-signature">(static) </span>HelperXYtoRGB<span class="signature">(x, y, Brightness)</span><span class="type-signature"> → {object}</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>
<tr>
<td class="name"><code>Brightness</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="description last">Optional</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#line744">line 744</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Red, Green, Blue] - Ranges [0..1] [0..1] [0..1]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id=".HelperXYtoRGBforModel"><span class="type-signature">(static) </span>HelperXYtoRGBforModel<span class="signature">(x, y, Brightness, Model)</span><span class="type-signature"> → {object}</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>
<tr>
<td class="name"><code>Brightness</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="description last">Optional</td>
</tr>
<tr>
<td class="name"><code>Model</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Modelname of the Light</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#line825">line 825</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
[Red, Green, Blue] - Ranges [0..1] [0..1] [0..1]
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
<h4 class="name" id="_BridgeCacheLoad"><span class="type-signature"></span>_BridgeCacheLoad<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Loads the BridgeCache, typically on startup
</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#line112">line 112</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_BridgeCacheSave"><span class="type-signature"></span>_BridgeCacheSave<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Saves the BridgeCache, typically on Whitelist new Device or Device no longer whitelisted
as is the case with with @BridgeCacheAutosave on @_BridgeCacheAddCurrent and @_BridgeCacheRemoveCurrent
NOTE: Saving this cache might be considered a security issue
To counter this security issue, arrange your own load/save code with proper encryption
</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#line182">line 182</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_BridgeCacheSelectFromLocalBridges"><span class="type-signature"></span>_BridgeCacheSelectFromLocalBridges<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Selects the first Bridge from LocalBridges found in BridgeCache and stores in BridgeIP
defaults to 1st Bridge in LocalBridges if no bridge from LocalBridges is found in BridgeCache
Internally called in PortalDiscoverLocalBridges and NetworkDiscoverLocalBridges
</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#line156">line 156</a>
</li></ul></dd>
</dl>
<h4 class="name" id="BridgeCreateUser"><span class="type-signature"></span>BridgeCreateUser<span class="signature">(DeviceName)</span><span class="type-signature"></span></h4>
<div class="description">
Whitelists the Username stored in this object.
Note: a buttonpress on the bridge is requered max 30 sec before this to succeed.
please only use this once per device, Username is stored in cache.
</div>
<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>DeviceName</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Optional device name to Whitelist.</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#line476">line 476</a>
</li></ul></dd>
</dl>
<h4 class="name" id="BridgeDeleteUser"><span class="type-signature"></span>BridgeDeleteUser<span class="signature">(UsernameToDelete)</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>