-
Notifications
You must be signed in to change notification settings - Fork 3
/
myq.html
69 lines (64 loc) · 2.69 KB
/
myq.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
<script type="text/javascript">
RED.nodes.registerType('myq-device-node', {
category: 'function',
color: '#3FADB5',
defaults: {
user: { value: "", type: "myq-credentials" },
name: { value: "", required: true },
serialnumber: { value: "" }
},
inputs: 1,
outputs: 1,
icon: "myq.png",
label: function () {
return this.name || "myq-device-node";
}
});
</script>
<script type="text/html" data-template-name="myq-device-node">
<div class="form-row">
<label for="node-input-user"><i class="fa fa-user"></i> Credentials</label>
<input type="text" id="node-input-user" placeholder="Credentials">
</div>
<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-serialnumber"><i class="fa fa-barcode"></i> Serial number</label>
<input type="text" id="node-input-serialnumber" placeholder="Serial number">
</div>
</script>
<script type="text/html" data-help-name="myq-device-node">
<p>Node representing one MyQ device (door, light or lamp)</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt class="optional">payload
<span class="property-type">string</span>
</dt>
<dd> Action to perform on device. Supported actions for doors <code>open</code> and <code>close</code>, for lights <code>on</code> and <code>off</code>, for lamps <code>lamp_on</code> and <code>lamp_off</code>. Any other content or no payload at all will trigger retrieval of status information </dd>
</dl>
<h3>Outputs</h3>
<ol class="node-ports">
<li>Status output
<dl class="message-properties">
<dt>payload <span class="property-type">object</span></dt>
<dd>Returns extended status information about device in payload.device</dd>
</dl>
</li>
<li>Action output
<dl class="message-properties">
<dt>payload <span class="property-type">object</span></dt>
<dd>Confirmation of succussful action execution</dd>
</dl>
</li>
<li>Standard error
<dl class="message-properties">
<dt>payload <span class="property-type">string</span></dt>
<dd>the standard error of the command.</dd>
</dl>
</li>
</ol>
<h3>Details</h3>
<p>Node to control MyQ device (door, light or lamp). Requires serial number or name of device and credentials for MyQ app.</p>
</script>