-
Notifications
You must be signed in to change notification settings - Fork 2
/
pioneer-avr-config.html
63 lines (61 loc) · 2.67 KB
/
pioneer-avr-config.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<script type="text/javascript">
RED.nodes.registerType('pioneer-avr-config', {
category: 'config',
defaults: {
hostname: {
value: '192.168.1.128',
required: true
},
port: {
value: 8102,
required: true,
validate: RED.validators.number()
},
volumeMultiplier: {
value: 0.4897959183673469,
required: false,
validate: v => v === undefined || typeof v === 'number',
},
name: {
value: '',
required: false,
},
},
label: function() {
const host = this.hostname + ":" + this.port;
return this.name ? this.name + ' (' + host + ')' : host;
}
});
</script>
<script type="text/x-red"
data-template-name="pioneer-avr-config">
<div class="form-row">
<label for="node-config-input-hostname"><i class="icon-bookmark"></i> Hostname/IP</label>
<input type="text" id="node-config-input-hostname" placeholder="192.168.1.128">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="icon-bookmark"></i> Port</label>
<input type="text" id="node-config-input-port" placeholder="8102">
</div>
<div class="form-row">
<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>
<input type="text" id="node-config-input-name">
</div>
</script>
<script type="text/x-red"
data-help-name="pioneer-avr-config">
<p>Configures a Pioneer AVR receiver connection to be used with "Pioneer Out" and "Pioneer State" nodes.</p>
<h3>Options</h3>
<dl class="message-properties">
<dt>Hostname <span class="property-type">string</span></dt>
<dd>an IP address or other hostname that points to a Pioneer receiver on the network</dd>
<dt>Port <span class="property-type">number</span></dt>
<dd>port number the receiver is accessible over, default being <code>8102</code></dd>
<dt>Volume Multiplier <span class="property-type">number</span></dt>
<dd>a factor to multiply volume values sent by the receiver by, default being <code>0.4897959183673469</code></dd>
</dl>
</script>