Skip to content

Commit

Permalink
smarthome input docu
Browse files Browse the repository at this point in the history
  • Loading branch information
586837r committed Aug 12, 2019
1 parent b0c0829 commit 26e0869
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 14 deletions.
12 changes: 6 additions & 6 deletions nodes/alexa-remote-init.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<p>This node is for manual control of Account Node intialisation.
The associated Account Node should have <em>Auto Init</em> turned off to use this node.</p>
<hr>
<h3 id="Inputs"><strong>Inputs</strong></h3>
<h3><strong>Inputs</strong></h3>
<ul>
<li><strong>payload</strong>
<ul>
Expand All @@ -42,7 +42,7 @@ <h3 id="Inputs"><strong>Inputs</strong></h3>
</li>
</ul>
<hr>
<h3 id="Outputs"><strong>Outputs</strong></h3>
<h3><strong>Outputs</strong></h3>
<ul>
<li><strong>payload</strong>
<ul>
Expand All @@ -52,14 +52,14 @@ <h3 id="Outputs"><strong>Outputs</strong></h3>
</li>
</ul>
<hr>
<h3 id="Info"><strong>Info</strong></h3>
<h3><strong>Info</strong></h3>
<p>Instead of saving the the Authentication result to a file specified in the Account Config Node you can also manually
initialise the Account and save the Authentication result however you want. Here is an example how you can do that:
</p>
initialise the Account and save the Authentication result however you want. Here is an example of how you can do
that:</p>
<pre><code><div>[{&quot;id&quot;:&quot;bf44407a.c20d4&quot;,&quot;type&quot;:&quot;alexa-remote-init&quot;,&quot;z&quot;:&quot;c0bfc064.e8d26&quot;,&quot;name&quot;:&quot;&quot;,&quot;account&quot;:&quot;&quot;,&quot;option&quot;:&quot;initialise&quot;,&quot;x&quot;:260,&quot;y&quot;:2800,&quot;wires&quot;:[[&quot;123e6678.5acbaa&quot;]]},{&quot;id&quot;:&quot;c7f04444.fed188&quot;,&quot;type&quot;:&quot;inject&quot;,&quot;z&quot;:&quot;c0bfc064.e8d26&quot;,&quot;name&quot;:&quot;&quot;,&quot;topic&quot;:&quot;&quot;,&quot;payload&quot;:&quot;alexa&quot;,&quot;payloadType&quot;:&quot;flow&quot;,&quot;repeat&quot;:&quot;&quot;,&quot;crontab&quot;:&quot;00 12 * * 3,4,0&quot;,&quot;once&quot;:false,&quot;onceDelay&quot;:0.1,&quot;x&quot;:110,&quot;y&quot;:2800,&quot;wires&quot;:[[&quot;bf44407a.c20d4&quot;]]},{&quot;id&quot;:&quot;123e6678.5acbaa&quot;,&quot;type&quot;:&quot;change&quot;,&quot;z&quot;:&quot;c0bfc064.e8d26&quot;,&quot;name&quot;:&quot;&quot;,&quot;rules&quot;:[{&quot;t&quot;:&quot;set&quot;,&quot;p&quot;:&quot;alexa&quot;,&quot;pt&quot;:&quot;flow&quot;,&quot;to&quot;:&quot;payload&quot;,&quot;tot&quot;:&quot;msg&quot;}],&quot;action&quot;:&quot;&quot;,&quot;property&quot;:&quot;&quot;,&quot;from&quot;:&quot;&quot;,&quot;to&quot;:&quot;&quot;,&quot;reg&quot;:false,&quot;x&quot;:420,&quot;y&quot;:2800,&quot;wires&quot;:[[]]}]
</div></code></pre>
<hr>
<h3 id="References"><strong>References</strong></h3>
<h3><strong>References</strong></h3>
<ul>
<li><a href="https://npmjs.com/package/node-red-contrib-alexa-remote2">npm</a> - the nodes npm repository</li>
<li><a href="https://github.com/586837r/node-red-contrib-alexa-remote2">GitHub</a> - the nodes GitHub repository
Expand Down
52 changes: 45 additions & 7 deletions nodes/alexa-remote-smarthome.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,54 @@

<p>Interface to Smarthome features.</p>
<hr>
<h3 id="Options"><strong>Options</strong></h3>
<h3><strong>Info</strong></h3>
<ul>
<li><strong>Action</strong> and <strong>Query</strong> let you send multiple commands/requests at once. You can
increase the <em>Outputs</em> to split the message by the Items in the list. For example if you have 3 items in
the list and 3 outputs then each output corresponds to one item. If you have less outputs than items then the
last output will have an array of messages. You can have the same Appliance multiple times in the list.
Each item in the list creates its own message on success and its own error on failure.</li>
<li>
<p><strong>Action</strong> and <strong>Query</strong> let you send multiple commands/requests at once. You can
increase the <em>Outputs</em> to split the message by the Items in the list. For example if you have 3 items
in the list and 3 outputs then each output corresponds to one item. If you have less outputs than items then
the last output will have an array of messages. You can have the same Appliance multiple times in the list.
Each item in the list creates its own message on success and its own error on failure.</p>
</li>
<li>
<p><strong>Color</strong> can be a color name (case and non-alpha insensitive) or a hex value like
<code>#FF0000</code> or <code>FF0000</code></p>
</li>
<li>
<p><strong>Color Temperature</strong> can be a color temperature name (case and non-alpha insensitive), a Kelvin
value or a hex value like <code>#FF0000</code> or <code>FF0000</code></p>
</li>
</ul>
<hr>
<h3><strong>Input</strong></h3>
<ul>
<li>
<p><strong>Query</strong> will use <code>msg.payload</code> as input if the list is empty. The payload must be
an array of objects with the properties:</p>
<ul>
<li><strong>entity</strong>: name or id of a smarthome appliance or group</li>
<li><strong>property</strong>: undefined for all properties or something like <code>color</code>,
<code>brightness</code>, <code>powerState</code>, ...</li>
<li><strong>format</strong> <em>(only for <code>color</code> property)</em>: <code>hex</code>,
<code>rgb</code>, <code>hsv</code> or anything else for the native format</li>
</ul>
</li>
<li>
<p><strong>Action</strong> will use <code>msg.payload</code> as input if the list is empty. The payload must be
an array of objects with the properties:</p>
<ul>
<li><strong>entity</strong>: name or id of a smarthome appliance or group</li>
<li><strong>action</strong>: something like <code>turnOn</code>, <code>turnOff</code>,
<code>setColor</code>, <code>setColorTemperature</code>, <code>setBrightness</code>,
<code>lockAction</code>, <code>setPercentage</code>, <code>setTargetTemperature</code>, ...</li>
<li><strong>value</strong>: the value for <code>setColor</code> and other supported actions</li>
<li><strong>scale</strong> <em>(only for <code>setTargetTemperature</code> action)</em>: either
<code>celsius</code> or <code>fahrenheit</code></li>
</ul>
</li>
</ul>
<hr>
<h3 id="References"><strong>References</strong></h3>
<h3><strong>References</strong></h3>
<ul>
<li><a href="https://npmjs.com/package/node-red-contrib-alexa-remote2">npm</a> - the nodes npm repository</li>
<li><a href="https://github.com/586837r/node-red-contrib-alexa-remote2">GitHub</a> - the nodes GitHub repository
Expand Down
2 changes: 1 addition & 1 deletion nodes/markdown/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The associated Account Node should have *Auto Init* turned off to use this node.

### **Info**

Instead of saving the the Authentication result to a file specified in the Account Config Node you can also manually initialise the Account and save the Authentication result however you want. Here is an example how you can do that:
Instead of saving the the Authentication result to a file specified in the Account Config Node you can also manually initialise the Account and save the Authentication result however you want. Here is an example of how you can do that:
```
[{"id":"bf44407a.c20d4","type":"alexa-remote-init","z":"c0bfc064.e8d26","name":"","account":"","option":"initialise","x":260,"y":2800,"wires":[["123e6678.5acbaa"]]},{"id":"c7f04444.fed188","type":"inject","z":"c0bfc064.e8d26","name":"","topic":"","payload":"alexa","payloadType":"flow","repeat":"","crontab":"00 12 * * 3,4,0","once":false,"onceDelay":0.1,"x":110,"y":2800,"wires":[["bf44407a.c20d4"]]},{"id":"123e6678.5acbaa","type":"change","z":"c0bfc064.e8d26","name":"","rules":[{"t":"set","p":"alexa","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":2800,"wires":[[]]}]
```
Expand Down
15 changes: 15 additions & 0 deletions nodes/markdown/smarthome.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ Each item in the list creates its own message on success and its own error on fa

---

### **Input**

- **Query** will use `msg.payload` as input if the list is empty. The payload must be an array of objects with the properties:
- **entity**: name or id of a smarthome appliance or group
- **property**: undefined for all properties or something like `color`, `brightness`, `powerState`, ...
- **format** *(only for `color` property)*: `hex`, `rgb`, `hsv` or anything else for the native format

- **Action** will use `msg.payload` as input if the list is empty. The payload must be an array of objects with the properties:
- **entity**: name or id of a smarthome appliance or group
- **action**: something like `turnOn`, `turnOff`, `setColor`, `setColorTemperature`, `setBrightness`, `lockAction`, `setPercentage`, `setTargetTemperature`, ...
- **value**: the value for `setColor` and other supported actions
- **scale** *(only for `setTargetTemperature` action)*: either `celsius` or `fahrenheit`

---

### **References**
- [npm](https://npmjs.com/package/node-red-contrib-alexa-remote2) - the nodes npm repository
- [GitHub](https://github.com/586837r/node-red-contrib-alexa-remote2) - the nodes GitHub repository

0 comments on commit 26e0869

Please sign in to comment.