-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdenon.html
146 lines (137 loc) · 5.03 KB
/
denon.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<script type="text/x-red" data-template-name="denon-controller">
<div class="form-row">
<label for="node-config-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-config-input-host"><i class="icon-bookmark"></i> Denon Host</label>
<input type="text" id="node-config-input-host">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="icon-bookmark"></i> Denon Port</label>
<input type="text" id="node-config-input-port">
</div>
</script>
<script type="text/x-red" data-template-name="denon-out">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-controller"><i class="icon-bookmark"></i> Denon host</label>
<input type="text" id="node-input-controller">
</div>
<div class="form-row">
<label for="node-input-denoncommand"><i class="icon-bookmark"></i> Command</label>
<input type="text" id="node-input-denoncommand">
</div>
</script>
<script type="text/x-red" data-template-name="denon-in">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-controller"><i class="icon-bookmark"></i> Controller</label>
<input type="text" id="node-input-controller">
</div>
</script>
<script type="text/x-red" data-help-name="denon-out">
<p>
Use this node to <b>send</b> commands to a Denon AVRs.<br/>
<b>msg.payload</b> must be a JavaScript object or a string
</p>
<p>
For example, simple string (command does not has arguments): <code>PWON</code> or <code>PWOFF</code>
</p>
<p>
If topic if filled, it will be handled as command nad payload will be an argument, for example msg object may contain fields:<br/>
<pre>{
"topic": "SetVolumeDB",
"payload" : -60.5
}</pre>
</p>
Or Javascript object (command + params):
<pre>{
"cmd": "SetVolumeDB",
"params": 0
}</pre>
<p>
<h2>Supported commands:</h2>
<ul>
<li>All from official <a href="https://github.com/estbeetoo/node-red-contrib-denon/blob/master/doc/AVR3312CI_AVR3312_PROTOCOL_V7.6.0.pdf">Denon AVR protocol</a></li>
<li>
SetVolumeDB<br/>
Params:
<code>volume</code>:
<ul>
<li>type: <b>float</b></li>
<li>range: from <b>-80.0</b> to <b>+1.0</b></li>
</ul>
</li>
</ul>
</p>
}</pre>
</p>
<p>Take a look at Denon AVR protocol: <a href="https://github.com/estbeetoo/node-red-contrib-denon/blob/master/doc/AVR3312CI_AVR3312_PROTOCOL_V7.6.0.pdf">DENON_PROTOCOL_V7.6.0.pdf</a></p
</script>
<script type="text/x-red" data-help-name="denon-in">
<p>
Use this node to <b>receive</b> data from Denon devices and inject it into the flow.<br/>
Denon data being injected as a Javascript object of structure:
<pre>{
topic: 'denon',
payload: 'PWON'
}</pre>
</p>
<p>Take a look at Denon AVR protocol for full list of device response: <a href="https://github.com/estbeetoo/node-red-contrib-denon/blob/master/doc/AVR3312CI_AVR3312_PROTOCOL_V7.6.0.pdf">DENON_PROTOCOL_V7.6.0.pdf</a></p>
</script>
<script type="text/javascript">
RED.nodes.registerType('denon-controller', {
category: 'config',
defaults: {
name: {value: ""},
host: {value: "127.0.0.1", required: true},
port: {value: 23, required: false, validate: RED.validators.number()}
},
label: function () {
return (this.name || 'denon' ) + "@" + this.host + ":" + this.port;
}
});
</script>
<script type="text/javascript">
RED.nodes.registerType('denon-out', {
category: 'output',
color: '#26b050',
defaults: {
name: {value: ""},
controller: {value: "", type: "denon-controller"},
unit_number: {value: "1", required: false},
output: {value: "1", required: false},
denoncommand: {value: ""}
},
inputs: 1,
outputs: 0,
align: 'right',
icon: "denon.png",
label: function () {
return (this.groupaddr || this.name || "denon");
}
});
</script>
<script type="text/javascript">
RED.nodes.registerType('denon-in', {
category: 'input',
color: '#26b050',
defaults: {
name: {value: ""},
controller: {value: "", type: "denon-controller"}
},
inputs: 0,
outputs: 1,
icon: "denon.png",
label: function () {
return (this.groupaddr || this.name || "denon");
}
});
</script>