-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathyeelight-compat-hue-config.html
56 lines (54 loc) · 2.21 KB
/
yeelight-compat-hue-config.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
<script type="text/javascript">
RED.nodes.registerType('yeelight-compat-hue-config', {
category: 'config',
defaults: {
hostname: {
value: '',
required: true
},
port: {
value: 55443,
required: true,
validate: RED.validators.number()
},
name: {
value: '',
required: false,
},
},
label: function() {
const host = this.hostname + ":" + this.port;
return this.name ? this.name + ' (' + host + ')' : host;
}
});
</script>
<script type="text/x-red"
data-template-name="yeelight-compat-hue-config">
<div class="form-row">
<label for="node-config-input-hostname"><i class="icon-bookmark"></i> Hostname/IP</label>
<input type="text" id="node-config-input-hostname" placeholder="192.168.1.140">
</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="55443">
</div>
<div class="form-row">
<label for="node-config-input-name"><i class="icon-bookmark"></i> Name</label>
<input type="text" id="node-config-input-name">
</div>
</script>
<script type="text/x-red"
data-help-name="yeelight-compat-hue-config">
<p>Configures a Yeelight connection to be used with "Yeelight Out" and "Yeelight State" nodes.</p>
<h3>Options</h3>
<dl class="message-properties">
<dt>Hostname <span class="property-type">string</span></dt>
<dd>an IP address or other hostname that points to a Yeelight on the network</dd>
<dt>Port <span class="property-type">number</span></dt>
<dd>port number the Yeelight is accessible over, default being <code>55443</code></dd>
</dl>
<h3>Details</h3>
<p>
<strong>Developer mode/LAN control</strong> has to be activated (usually from within the Yeelight app) to allow local control of the Yeelight through Node-RED. You can <a href="https://www.yeelight.com/en_US/developer">learn more about Yeelight developer options</a> here.
</p>
</script>