Skip to content

Commit

Permalink
docs: update node descriptions with better documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmattmatt committed Dec 2, 2018
1 parent 564bfbb commit 404a921
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ Provides two palette nodes – one to send control commands to a Pioneer AVR, an

Sets the state of the receiver.

`msg.payload` must be an object containing the new state's properties of the selected Yeelight device.
`msg.payload` must be an object containing the new state's properties of the Pioneer receiver.

| Property | Details |
| :---| :---|
| `on` | Sets the `on` state where the value is `true` or `false` |
| `muted` | Sets the `muted` state where the value is `true` or `false` |
| `volume` | Sets the volume from `0` to `153` |
| `volume` | Sets the volume from `0` to `74`, or whatever your receiver's maximum is |
| `channel` | Sets the active input channel, must be one of `CD`, `TUNER`, `DVD`, `TV`, `SAT/CBL`, `VIDEO`, `DVR/BDR`, `IPOD/USB`, `BD`, `ADAPTER`, `NETRADIO`, `MEDIA SERVER`, `FAVORITE`, `GAME` |

#### Example payloads

```JSON
{
{
"on": true
}
```
Expand Down
4 changes: 2 additions & 2 deletions pioneer-avr-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<input type="text" id="node-config-input-port" placeholder="8102">
</div>
<div class="form-row">
<label for="node-config-input-volume-multiplier"><i class="icon-bookmark"></i> Volume Multiplier</label>
<input type="text" id="node-config-input-volume-multiplier" placeholder="0.4897959183673469">
<label for="node-config-input-volume-multiplier" title="a factor to multiply volume values sent by the receiver by"><i class="icon-bookmark"></i> Volume Multiplier</label>
<input type="text" id="node-config-input-volume-multiplier" placeholder="0.4897959183673469" title="a factor to multiply volume values sent by the receiver by">
</div>
<div class="form-row">
<label for="node-config-input-name"><i class="icon-bookmark"></i> Name</label>
Expand Down
34 changes: 15 additions & 19 deletions pioneer-avr-out.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<script type="text/x-red"
data-template-name="pioneer-avr-out">
<div class="form-row">
<label for="node-input-server"><i class="icon-tag"></i> Yeelight</label>
<label for="node-input-server"><i class="icon-tag"></i> Receiver</label>
<input type="text" id="node-input-server" />
</div>
<div class="form-row">
Expand All @@ -40,37 +40,33 @@

<script type="text/x-red"
data-help-name="pioneer-avr-out">
<p>Sets the state of the selected Yeelight device, largely <a href="https://github.com/jdomeij/node-red-contrib-node-hue#readme">compatible with node-red-contrib-node-hue</a>.</p>
<p>Sets the state of the selected Pioneer receiver.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload <span class="property-type">object</span></dt>
<dd>an object containing the next state of the selected Yeelight device.</dd>
<dd>an object containing the next state of the Pioneer receiver.</dd>
<dt>payload.on <span class="property-type">bool</span></dt>
<dd></dd>
<dt>payload.muted <span class="property-type">bool</span></dt>
<dd></dd>
<dt>payload.volume <span class="property-type">number</span></dt>
<dd></dd>
<dt>payload.channel <span class="property-type">enum</span></dt>
<dd>One of <code>CD</code>, <code>TUNER</code>, <code>DVD</code>, <code>TV</code>, <code>SAT/CBL</code>, <code>VIDEO</code>, <code>DVR/BDR</code>, <code>IPOD/USB</code>, <code>BD</code>, <code>ADAPTER</code>, <code>NETRADIO</code>, <code>MEDIA SERVER</code>, <code>FAVORITE</code>, <code>GAME</code></dd>
</dl>

<h3>Details</h3>
<p>The node supports sending hex values, HSV values and color temperature values.</p>
<p>The brightness value will always have to be provided separately and will not be deducted from e.g. a hex value's brightness component.</p>

<h4>Example inputs</h4>
<p>
<pre><code>{
"on": true,
"bri": 255,
"hue": 913,
"sat": 255,
"duration": 5000
"on": true
}</code></pre>
<pre><code>{
"on": true,
"bri": 120,
"hex": "#AA00CC"
"channel": "CD",
"volume": 111
}</code></pre>
<pre><code>{
"on": true,
"ct": 2200
"muted": true
}</code></pre>
</p>

<h3>References</h3>
<p>This node's input is based on <a href="https://github.com/jdomeij/node-red-contrib-node-hue#readme">node-red-contrib-node-hue</a>, which is based on <a href="https://github.com/peter-murray/node-hue-api#lightstate-options">Node Hue API</a>.</p>
</script>

0 comments on commit 404a921

Please sign in to comment.