UNPKG

node-red-contrib-yeelight-compat-hue

Version:

A collection of Node-RED nodes for controlling and observing Yeelight lighting devices, compatible with node-red-contrib-node-hue flows.

57 lines (54 loc) 2.27 kB
<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>