-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremootio.html
156 lines (148 loc) · 6.19 KB
/
remootio.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
<script type="text/html" data-template-name="credentials: remootio">
<div class="form-row">
<label for="node-config-input-ipaddress"><i class="fa fa-tag"></i> IP Address</label>
<input type="text" id="node-config-input-ipaddress">
</div>
<div class="form-row">
<label for="node-config-input-apisecretkey"><i class="fa fa-tag"></i> API Secret Key</label>
<input type="password" id="node-config-input-apisecretkey">
</div>
<div class="form-row">
<label for="node-config-input-apiauthkey"><i class="fa fa-tag"></i> API Auth Key</label>
<input type="password" id="node-config-input-apiauthkey">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType('credentials: remootio', {
category: 'config',
color: '#EB6E00',
defaults: {
ipaddress: { value: "" }
},
credentials: {
apisecretkey: { type: "password" },
apiauthkey: { type: "password" }
},
label: function () {
return this.ipaddress || "credentials: remootio";
},
exportable: false
});
</script>
<script type="text/html" data-template-name="events: remootio">
<div class="form-row">
<label for="node-input-remootioname">Name</label>
<input type="text" id="node-input-remootioname">
<label for="node-input-remootio">Remootio Connection</label>
<input type="text" id="node-input-remootio">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType('events: remootio', {
category: 'remootio',
color: "#EB6E00",
defaults: {
remootioname : {value : ""},
remootio: { type: "credentials: remootio", required: true }
},
inputs: 0,
outputs: 1,
icon: "file.png",
label: function () {
return this.remootioname || "events: remootio";
}
});
</script>
<script type="text/html" data-help-name="events: remootio">
<p>Report status messages from a Remootio Device</p>
<p>See the full documentation <a href="https://flows.nodered.org/node/node-red-contrib-remootio">here</a></p>
<h3>Config Properties</h3>
<p>You will need to enter configuration properties for the Remootio, you can find these under Settings -> Websocket API in the Remootio App</p>
<dl class="message-properties">
<dt>IP Address <span class="property-type">string</span></dt>
<dd>the IP address of your Remootio.</dd>
<dt>API Secret Key <span class="property-type">password</span></dt>
<dd>the API Secret Key of your Remootio.</dd>
<dt>API Auth Key<span class="property-type">password</span></dt>
<dd>the API Auth key of your Remootio.</dd>
</dl>
<h3>Details</h3>
<p>This node does provides a <code>msg.payload</code> object with the following properties.</p>
<dl class="message-properties">
<dt>payload.state<span class="property-type">string</span></dt>
<dd>the state of the Remootio device</dd>
<dt>payload.type<span class="property-type">string</span></dt>
<dd>the type of state event triggered</dd>
<dt>payload.event<span class="property-type">string</span></dt>
<dd>the full event payload of state event triggered</dd>
</dl>
<p>You can find details about the state and type of these events <a href="https://github.com/remootio/remootio-api-documentation/blob/master/websocket_api_v3_specification.md#10-events-from-the-api">here</a></p>
</script>
<script type="text/html" data-template-name="switch: remootio">
<div class="form-row">
<label for="node-input-remootioname">Name</label>
<input type="text" id="node-input-remootioname">
<br/>
<label for="node-input-remootio">Remootio Connection</label>
<input type="text" id="node-input-remootio">
<label for="node-input-remootiocommand">Remootio Command</label>
<select name="command" id="node-input-remootiocommand">
<option value="sendPing">sendPing</option>
<option value="sendHello">sendHello</option>
<option value="sendQuery">sendQuery</option>
<option value="sendTrigger">sendTrigger</option>
<option value="sendOpen">sendOpen</option>
<option value="sendClose">sendClose</option>
<option value="sendRestart">sendRestart</option>
</select>
</div>
</script>
<script type="text/html" data-help-name="switch: remootio">
<p>Send a message to a Remootio Device</p>
<p>See the full documentation <a href="https://flows.nodered.org/node/node-red-contrib-remootio">here</a></p>
<h3>Config Properties</h3>
<p>You will need to enter configuration properties for the Remootio, you can find these under Settings -> Websocket API in the Remootio App</p>
<dl class="message-properties">
<dt>IP Address <span class="property-type">string</span></dt>
<dd>the IP address of your Remootio.</dd>
<dt>API Secret Key <span class="property-type">password</span></dt>
<dd>the API Secret Key of your Remootio.</dd>
<dt>API Auth Key<span class="property-type">password</span></dt>
<dd>the API Auth key of your Remootio.</dd>
</dl>
<h3>Details</h3>
<p>This node does takes a message type and sends it to the Remootio device</p>
<dl class="message-properties">
<ul>
<li>sendPing</li>
<li>sendHello</li>
<li>sendQuery</li>
<li>sendTrigger</li>
<li>sendOpen</li>
<li>sendClose</li>
<li>sendRestart</li>
</ul>
</dl>
</script>
<script type="text/javascript">
RED.nodes.registerType('switch: remootio', {
category: 'remootio',
color: "#EB6E00",
defaults: {
remootioname : {value : ""},
remootio: { type: "credentials: remootio", required: true },
remootiocommand: { value: "sendPing" }
},
inputs: 1,
outputs: 1,
icon: "file.png",
label: function () {
if (this.remootioname) {
return this.remootioname + " - " + this.remootiocommand;
}
else {
return this.remootiocommand;
}
}
});
</script>