node-red-contrib-lifx-api
Version:
A collection of Node-RED nodes to control LIFX globes using the HTTP Remote Control API.
229 lines (188 loc) • 8.66 kB
HTML
<script type="text/x-red" data-help-name="lifx-list-lights">
<p>Gets lights belonging to the authenticated account.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">payload.selector
<span class="property-type">string</span>
</dt>
<dd>selector to limit which lights are to be listed</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">Object</span>
</dt>
<dd>collection of light objects</dd>
</dl>
<h3>Details</h3>
<p>The node can be configured in the Edit Dialog, or received as parameters in <code>msg.payload</code></p>
<h3>References</h3>
<ul>
<li><a href="https://github.com/alisdairjsmyth/node-red-contrib-lifx-api">Github</a> - the nodes github repository</li>
<li><a href="https://api.developer.lifx.com/docs/list-lights">List Lights</a> - API documentation</li>
</ul>
</script>
<script type="text/x-red" data-help-name="lifx-set-state">
<p>Sets the state of the lights within the selector.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">payload
<span class="property-type">Object</span>
</dt>
<dd>intended light state</dd>
</dl>
<h3>Details</h3>
<p>The node can be configured in the Edit Dialog, or received as parameters in <code>msg.payload</code>. All parameters (except for the selector) are optional. If you do not supply a parameter, the node will leave that value untouched.</p>
<h3>References</h3>
<ul>
<li><a href="https://github.com/alisdairjsmyth/node-red-contrib-lifx-api">Github</a> - the nodes github repository</li>
<li><a href="https://api.developer.lifx.com/docs/set-state">Set State</a> - API documentation</li>
</ul>
</script>
<script type="text/x-red" data-help-name="lifx-set-states">
<p>This node allows you to set different states on multiple selectors in a single request.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">Object</span>
</dt>
<dd>Array of light state hashes</dd>
</dl>
<h3>Details</h3>
<p>Each hash in states is comprised of a state hash as per Set State, except with the inclusion of selector.</p>
<p>You can optionally use the defaults hash to specify the base hash that each state hash is built from.</p>
<h3>References</h3>
<ul>
<li><a href="https://github.com/alisdairjsmyth/node-red-contrib-lifx-api">Github</a> - the nodes github repository</li>
<li><a href="https://api.developer.lifx.com/docs/set-states">Set States</a> - API documentation</li>
</ul>
</script>
<script type="text/x-red" data-help-name="lifx-toggle-power">
<p>Turn off lights if any of them are on, or turn them on if they are all off.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">payload.selector
<span class="property-type">string</span>
</dt>
<dd>selector to identify lights</dd>
</dl>
<h3>Details</h3>
<p>The node can be configured in the Edit Dialog, or received as parameters in <code>msg.payload</code></p>
<h3>References</h3>
<ul>
<li><a href="https://github.com/alisdairjsmyth/node-red-contrib-lifx-api">Github</a> - the nodes github repository</li>
<li><a href="https://api.developer.lifx.com/docs/toggle-power">Toggle Power</a> - API documentation</li>
</ul>
</script>
<script type="text/x-red" data-help-name="lifx-pulse-effect">
<p>Performs a pulse effect by quickly flashing between the given colors.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">payload
<span class="property-type">Object</span>
</dt>
<dd>pulse effect settings</dd>
</dl>
<h3>Details</h3>
<p>The node can be configured in the Edit Dialog, or received as parameters in <code>msg.payload</code></p>
<h3>References</h3>
<ul>
<li><a href="https://github.com/alisdairjsmyth/node-red-contrib-lifx-api">Github</a> - the nodes github repository</li>
<li><a href="https://api.developer.lifx.com/docs/pulse-effect">Pulse Effect</a> - API documentation</li>
</ul>
</script>
<script type="text/x-red" data-help-name="lifx-breathe-effect">
<p>Performs a breathe effect by slowly fading between the given colors.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">payload
<span class="property-type">Object</span>
</dt>
<dd>breathe effect settings</dd>
</dl>
<h3>Details</h3>
<p>The node can be configured in the Edit Dialog, or received as parameters in <code>msg.payload</code></p>
<h3>References</h3>
<ul>
<li><a href="https://github.com/alisdairjsmyth/node-red-contrib-lifx-api">Github</a> - the nodes github repository</li>
<li><a href="https://api.developer.lifx.com/docs/breathe-effect">Breathe Effect</a> - API documentation</li>
</ul>
</script>
<script type="text/x-red" data-help-name="lifx-cycle">
<p>Make the light(s) cycle to the next or previous state in a list of states.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">payload
<span class="property-type">Object</span>
</dt>
<dd>state hash</dd>
</dl>
<h3>Details</h3>
<p>The underlying API scores each state hash against the current states of all the lights in the selector, and if the score is high enough to be considered a match, it will apply the next state in the list, looping back to the first one if necessary. If there is no close match, it will apply the closest state to the selector.</p>
<p>You can optionally use the defaults hash to specify the base hash that each state hash is built from.</p>
<p>The optional direction parameter determines the direction the API uses to determine the next state.</p>
<h3>References</h3>
<ul>
<li><a href="https://github.com/alisdairjsmyth/node-red-contrib-lifx-api">Github</a> - the nodes github repository</li>
<li><a href="https://api.developer.lifx.com/docs/cycle">Cycle</a> - API documentation</li>
</ul>
</script>
<script type="text/x-red" data-help-name="lifx-list-scenes">
<p>Lists all the scenes available in the users account.</p>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">Object</span>
</dt>
<dd>Array of scene objects</dd>
</dl>
<h3>References</h3>
<ul>
<li><a href="https://github.com/alisdairjsmyth/node-red-contrib-lifx-api">Github</a> - the nodes github repository</li>
<li><a href="https://api.developer.lifx.com/docs/list-scenes">List Scenes</a> - API documentation</li>
</ul>
</script>
<script type="text/x-red" data-help-name="lifx-activate-scene">
<p>Activates a scene from the users account.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">payload
<span class="property-type">Object</span>
</dt>
<dd>Object containing scene activation parameters</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">Object</span>
</dt>
<dd>Object scene activation results</dd>
</dl>
<h3>References</h3>
<ul>
<li><a href="https://github.com/alisdairjsmyth/node-red-contrib-lifx-api">Github</a> - the nodes github repository</li>
<li><a href="https://api.developer.lifx.com/docs/activate-scene">Activate Scene</a> - API documentation</li>
</ul>
</script>
<script type="text/x-red" data-help-name="lifx-validate-color">
<p>This endpoint lets you validate a users color string.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">payload
<span class="property-type">Object</span>
</dt>
<dd>Colour to be validated</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">Object</span>
</dt>
<dd>Colour Object</dd>
</dl>
<h3>References</h3>
<ul>
<li><a href="https://github.com/alisdairjsmyth/node-red-contrib-lifx-api">Github</a> - the nodes github repository</li>
<li><a href="https://api.developer.lifx.com/docs/validate-color">Validate Color</a> - API documentation</li>
</ul>
</script>