-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathoppo20x.html
384 lines (360 loc) · 15.8 KB
/
oppo20x.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<!--
openHAB nodes for IBM's Node-Red
https://github.com/pdmangel/node-red-contrib-openhab2
(c) 2017, Peter De Mangelaere <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/x-red" data-template-name="OPPO UDP 20x player">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-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="fa fa-globe"></i> 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> Port</label>
<input type="text" id="node-config-input-port">
</div>
</script>
<script type="text/x-red" data-help-name="OPPO UDP 20x player">
<p>Configuration node for communication with an oppo UDP 20x player.</p>
<p></p>
<b>Configuration</b>
<ul>
<li><b>Name :</b> Specify a name for the configuration node</li>
<li><b>Host :</b> Specify the hostname or ip address</li>
<li><b>Port :</b> (Optionally) Specify the ip port</li>
</ul>
</script>
<script type="text/javascript">
RED.nodes.registerType('OPPO UDP 20x player', {
category: 'config',
defaults: {
name: {value: "", required: true},
host: {value: "", required: true},
port: {value: 23, required: true /*, validate:RED.validators.number() */}
},
label: function () {
return this.name || "OPPO UDP 20x player";
}
});
</script>
<script type="text/x-red" data-template-name="OPPO UDP 20x-in">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-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="fa fa-globe"></i> Player</label>
<input type="text" id="node-input-player">
</div>
<div class="form-row">
<label for="node-input-itemname"><i class="fa fa-crosshairs"></i> Item</label>
<select id="node-input-itemname" name="node-input-itemname" placeholder="Item">
<option value="QVM">Query verbose mode</option>
<option value="QPW">Query power status</option>
<option value="QVR">Query firmware version</option>
<option value="QVL">Query volume</option>
<option value="QHD">Query HDMI resolution</option>
<option value="QPL">Query playback status</option>
<option value="QTK">Query Track/Title</option>
<option value="QCH">Query Chapter</option>
<option value="QTE">Query Track/Title elapsed time</option>
<option value="QTR">Query Track/Title remaining time</option>
<option value="QCE">Query Chapter elapsed time</option>
<option value="QCR">Query Chapter remaining time</option>
<option value="QEL">Query Total elapsed time</option>
<option value="QRE">Query Total remaining time</option>
<option value="QDT">Query disc type</option>
<option value="QAT">Query audio type</option>
<option value="QST">Query subtitle type</option>
<option value="QST">Query subtitle shift</option>
<option value="QOP">Query OSD position</option>
<option value="QRP">Query Repeat Mode</option>
<option value="QZM">Query Zoom Mode</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="OPPO UDP 20x-in">
<p>Listens to state changes of a selected Oppo player item.</p>
<p></p>
<b>Configuration</b>
<ul>
<li><b>Name :</b> Optionally specify a name</li>
<li><b>Controller :</b> Select the OPPO player</li>
<li><b>Item :</b>Select the Item to monitor</li>
</ul>
<p></p>
<b>Messages injected in NodeRED flows (2 channels)</b>
<ul>
<li><code>msg.item</code> : the item's itemname (not label)</li>
<li><code>msg.topic</code> : "StateEvent"</li>
<li><code>msg.payload</code> : the new state of the selected item</li>
</ul>
</li>
</ul>
</script>
<script type="text/javascript">
RED.nodes.registerType('OPPO UDP 20x-in', {
category: 'input',
color: '#006738',
defaults: {
name: {value: ""},
player: {value: "", type: "OPPO UDP 20x player", required: true},
itemname: {value: "", required: true},
},
inputs: 1,
outputs: 1,
icon: "node-red-contrib-oppo.png",
label: function () {
return (this.name || this.itemname || 'OPPO UDP 20x');
},
oneditprepare: function () {
}
});
</script>
<script type="text/x-red" data-template-name="OPPO UDP 20x-out">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-player"><i class="fa fa-play"></i> Player</label>
<input type="text" id="node-input-player">
</div>
<div class="form-row">
<label for="node-input-test"><i class="fa fa-globe"></i> test</label>
<input type="hidden" id="node-input-test" style="width:70%">
<input type="hidden" id="node-input-payloadType">
</div>
<div class="form-row">
<label for="node-input-command"><i class="fa fa-crosshairs"></i> Command</label>
<select id="node-input-command" name="node-input-command">
<optgroup label="Remote Keys">
<option value="POW">Toggle power</option>
<option value="EJT">Open/close the disc tray</option>
<option value="PON">Discrete on</option>
<option value="POF">Discrete off</option>
<option value="DIM">Dim front panel display</option>
<option value="PUR">Pure audio mode</option>
<option value="VUP">Increase volume </option>
<option value="VDN">Decrease volume</option>
<option value="MUT">Mute audio</option>
<option value="NU1">Numeric key 1</option>
<option value="NU2">Numeric key 2</option>
<option value="NU3">Numeric key 3</option>
<option value="NU4">Numeric key 4</option>
<option value="NU5">Numeric key 5</option>
<option value="NU6">Numeric key 6</option>
<option value="NU7">Numeric key 7</option>
<option value="NU8">Numeric key 8</option>
<option value="NU9">Numeric key 9</option>
<option value="NU0">Numeric key 0</option>
<option value="CLR">Clear numeric input</option>
<option value="GTO">Play from a specified location</option>
<option value="HOM">Go to Home Menu to select media source</option>
<option value="PUP">Show previous page</option>
<option value="PDN">Show previous page</option>
<option value="OSD">Show/hide on-screen display</option>
<option value="TTL">Show BD top menu or DVD title menu</option>
<option value="MNU">Show BD pop-up menu or DVD menu</option>
<option value="NUP">Navigation Up</option>
<option value="NLT">Navigation Left</option>
<option value="NRT">Navigation Right</option>
<option value="NDN">Navigation Down</option>
<option value="SEL">ENTER</option>
<option value="SET">Enter the player setup menu</option>
<option value="RET">Return to the previous menu or mode</option>
<option value="RED">RED</option>
<option value="GRN">GREEN</option>
<option value="BLU">BLUE</option>
<option value="YLW">YELLOW</option>
<option value="STP">Stop playback</option>
<option value="PLA">Start playback</option>
<option value="PAU">Pause playback</option>
<option value="PRE">Skip to previous</option>
<option value="REV">Fast reverse play</option>
<option value="FWD">Fast forward play</option>
<option value="NXT">Skip to next</option>
<option value="AUD">Change audio language or channel</option>
<option value="SUB">Change subtitle language</option>
<option value="ANG">Change camera angle</option>
<option value="ZOM">Zoom in/out and adjust aspect ratio</option>
<option value="SAP">Turn on/off Secondary Audio Program</option>
<option value="ATB">Repeat play the selected section</option>
<option value="RPT">Repeat play</option>
<option value="PIP">Show/hide Picture-in-Picture</option>
<option value="HDM">Switch output resolution</option>
<option value="SUH">Press and hold the SUBTITLE key. This activates the subtitle shift feature</option>
<option value="OPT">Show/hide the Option menu</option>
<option value="M3D">Show/hide the 2D-to-3D Conversion or 3D adjustment menu</option>
<option value="SEH">Display the Picture Adjustment menu</option>
<option value="NOP">No operation</option>
</optgroup>
<optgroup label="Advanced Commands">
<option value="SVM" data-payload="true">Set Verbose Mode</option>
<option value="SHD" data-payload="true">Set HDMI output resolution for HDMI 2</option>
<option value="SZM" data-payload="true">Set zoom ratio</option>
<option value="SVL" data-payload="true">Set volume control </option>
<option value="SRP" data-payload="true">Set Repeat mode</option>
<option value="SRH" data-payload="true">Search to</option>
<option value="DPL" data-payload="true">Direct play </option>
<option value="RST" data-payload="true">Reset Command</option>
<option value="SSH" data-payload="true">Set subtitle shift</option>
<option value="SOP" data-payload="true">Set OSD position</option>
<option value="STC" data-payload="true">Set the time information display</option>
</optgroup>
<option value="PAYLOAD" data-payload="true">use msg.payload as command</option>
</select>
</div>
<div class="form-row">
<label for="node-input-payload"><i class="fa fa-envelope"></i> Payload / Paramater</label>
<input type="text" id="node-input-payload" placeholder="Payload">
</div>
</script>
<script type="text/x-red" data-help-name="OPPO UDP 20x-out">
<p>Listens to state changes of a selected Oppo player item.</p>
<p></p>
<b>Configuration</b>
<ul>
<li><b>Name :</b> Optionally specify a name</li>
<li><b>Controller :</b> Select the OPPO player</li>
<li><b>Item :</b>Select the Item to monitor</li>
</ul>
<p></p>
<b>Messages injected in NodeRED flows (2 channels)</b>
<ul>
<li><code>msg.item</code> : the item's itemname (not label)</li>
<li><code>msg.topic</code> : "StateEvent"</li>
<li><code>msg.payload</code> : the new state of the selected item</li>
</ul>
</li>
</ul>
</script>
<script type="text/javascript">
RED.nodes.registerType('OPPO UDP 20x-out', {
category: 'output',
color: '#006738',
defaults: {
name: {value: ""},
test: { value:''},
payloadType: { value:'str'},
player: {value: "", type: "OPPO UDP 20x player", required: true},
command: {value: "", required: true},
payload: {value: "{msg.payload}", required: false},
},
inputs: 1,
outputs: 0,
icon: "node-red-contrib-oppo.png",
align: 'right',
label: function () {
return (this.name || this.itemname || 'OPPO UDP 20x');
},
oneditprepare: function () {
/*
$('#node-input-test').typedInput({
default: "bool",
typeField: $("#node-input-payloadType"),
types: [ 'bool',
{
value: 'ir',
label: 'IR Commands',
options: [
'test',
{
value: 'POW',
label: 'Power Toggle'
}
]
},
{
value: 'set',
label: 'Adv Commands',
options: [
{
value: 'SVM',
label: 'Set Verbose Mode'
}
]
}
]
});*/
$('#node-input-command').change(function(ev){
var $option = $(this).find('option:selected');
if ($option.data('PAYLOAD') === 'true') {
}
});
}
});
</script>
<script type="text/x-red" data-template-name="testnode">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</div>
<div class="form-row">
<label for="node-input-test"><i class="fa fa-globe"></i> test</label>
<input type="hidden" id="node-input-test" style="width:70%">
<input type="hidden" id="node-input-testType">
</div>
</script>
<script type="text/x-red" data-help-name="testnode">
<p>test node for user defined typed input with key and values</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('testnode', {
category: 'output',
color: '#006738',
defaults: {
name: {value: ""},
test: { value:''},
testType: { value: 'msg'}
},
inputs: 1,
outputs: 0,
align: 'right',
label: function () {
return (this.name || 'testnode');
},
oneditprepare: function () {
$('#node-input-test').typedInput({
default: "msg",
typeField: $("#node-input-testType"),
types: [ 'msg',
{
value: 'ir',
label: 'IR Commands',
options: [
'test',
{
value: 'POW',
label: 'Power Toggle'
}
]
},
{
value: 'set',
label: 'Adv Commands',
options: [
{
value: 'SVM',
label: 'Set Verbose Mode'
}
]
}
]
});
}
});
</script>