UNPKG

@smappee/node-red-contrib-smappee-knx

Version:
52 lines (46 loc) 1.85 kB
<script type="text/x-red" data-template-name="gateway-config"> <div class="form-row"> <label for="node-config-input-host"><i class="fa fa-globe"></i> <span>Host</span></label> <input type="text" id="node-config-input-host"> </div> <div class="form-row"> <label for="node-config-input-port"><i class="fa fa-tag"></i> <span>Port</span></label> <input type="text" id="node-config-input-port" style="width:65px;"> </div> <div class="form-row"> <label>&nbsp;</label> <input type="checkbox" id="node-config-input-useTunneling" style="display: inline-block; width: auto; vertical-align: top;"> <label for="node-config-input-useTunneling" style="width: 70%;">Use tunneling?</label> </div> <div class="form-row"> <label for="node-config-input-name"><i class="fa fa-tag"></i> <span>Name</span></label> <input type="text" id="node-config-input-name" placeholder="Name"> </div> </script> <script type="text/x-red" data-help-name="gateway-config"> <p>A configuration node for a KNX gateway.</p> <h3>Properties</h3> <h4>Host</h4> <p>Host IP-address of the KNX gateway, this is <code>224.0.23.12</code> by default.</p> <h4>Port</h4> <p>Port for the KNX connection, this is <code>3671</code> by default.</p> <h4>Name</h4> <p>Type in a node name manually or keep the default name.</p> </script> <script type="text/javascript"> RED.nodes.registerType('gateway-config', { category: 'config', defaults: { name: {value: ''}, host: {value: '224.0.23.12', required: true}, port: {value: 3671, required: true, validate: RED.validators.number()}, useTunneling: {value: false}, }, label: function() { return this.name || `gateway:${host}:${port}`; }, labelStyle: function() { return this.name ? 'node_label_italic' : ''; }, }); </script>