forked from estbeetoo/node-red-contrib-eiscp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheiscp.html
109 lines (100 loc) · 3.74 KB
/
eiscp.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
<script type="text/x-red" data-template-name="eiscp-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> 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" placeholder="60128">
</div>
<div class="form-row">
<label for="node-config-input-model"><i class="icon-bookmark"></i> Model</label>
<input type="text" id="node-config-input-model" placeholder="model (for example: DTR-6.6)">
</div>
</script>
<script type="text/x-red" data-template-name="eiscp-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> Controller</label>
<input type="text" id="node-input-controller">
</div>
</script>
<script type="text/x-red" data-template-name="eiscp-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="eiscp-out">
<p>
Use this to <b>send</b> EISCP packets to Onkyo/Integra device familiar with EISCP protocol.<br/>
<b>msg.payload</b> must be a JavaScript object (with <b>cmd<b> and <b>args</b> fields) or a string.
</p>
<p>
For example: <code>system-power=on</code> or <code>system-power=standby</code>
</p>
<p>
Please, take a look at full list of commands here: https://raw.githubusercontent.com/estbeetoo/eiscp.js/master/eiscp-commands.json
<p>
</script>
<script type="text/x-red" data-help-name="eiscp-in">
<p>Use this to <b>inject</b> flows from EISCP device<br/>
</script>
<script type="text/javascript">
RED.nodes.registerType('eiscp-controller', {
category: 'config',
defaults: {
name: {value: ""},
host: {value: "127.0.0.1", required: true},
port: {value: 60128, required: false, validate: RED.validators.number()},
model: {value: "", required: true}
},
label: function () {
return (this.name || 'eiscp' ) + "@" + this.host + ":" + this.port;
}
});
</script>
<script type="text/javascript">
RED.nodes.registerType('eiscp-out', {
category: 'output',
color: '#26b050',
defaults: {
name: {value: ""},
controller: {value: "", type: "eiscp-controller"}
},
inputs: 1,
outputs: 0,
align: 'right',
icon: "bridge-dash.png",
label: function () {
return (this.groupaddr || this.name || "eiscp");
}
});
</script>
<script type="text/javascript">
RED.nodes.registerType('eiscp-in', {
category: 'input',
color: '#26b050',
defaults: {
name: {value: ""},
controller: {value: "", type: "eiscp-controller"}
},
inputs: 0,
outputs: 1,
icon: "bridge-dash.png",
label: function () {
return (this.groupaddr || this.name || "eiscp");
}
});
</script>