UNPKG

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

Version:
72 lines (65 loc) 2.44 kB
<script type="text/x-red" data-template-name="connection"> <div class="form-row"> <label for="node-input-gateway"><i class="fa fa-globe"></i> <span>Gateway</span></label> <input type="text" id="node-input-gateway"> </div> <div class="form-row"> <label for="node-input-source"><i class="fa fa-tag"></i> <span>Source</span></label> <input type="text" id="node-input-source"> </div> <div class="form-row"> <label for="node-input-destination"><i class="fa fa-tag"></i> <span>Destination</span></label> <input type="text" id="node-input-destination"> </div> <div class="form-row"> <label for="node-input-value"><i class="fa fa-tag"></i> <span>Value</span></label> <input type="text" id="node-input-value"> </div> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> <span>Name</span></label> <input type="text" id="node-input-name" placeholder="Name"> </div> </script> <script type="text/x-red" data-help-name="connection"> <p>Connection to a KNX network that listens to communication.</p> <h3>Properties</h3> <h4>Gateway</h4> <p>KNX gateway to connect to.</p> <h4>Source</h4> <p>Source address of the device to filter on.</p> <h4>Destination</h4> <p>Destination address to filter on.</p> <h4>Value</h4> <p>Value to filter on.</p> <h4>Name</h4> <p>Type in a node name manually or keep the default name.</p> <h3>Outputs</h3> <p>Output received from the KNX device.</p> <h3>Details</h3> <p>This node can be used to filter on and listen to specific communications in a KNX network.</p> <p><b>Note:</b> Please contact <a href="mailto:support@smappee.com">support@smappee.com</a> if you are having issues.</p> </script> <script type="text/javascript"> RED.nodes.registerType('connection', { category: 'smappee knx', color: '#99c031', defaults: { name: {value: ''}, gateway: {value: '', required: true, type: 'gateway-config'}, source: {value: ''}, destination: {value: ''}, value: {value: ''}, }, inputs: 0, outputs: 1, icon: 'inject.png', label: function() { const gateway = RED.nodes.node(this.gateway); return this.name || 'connection:' + (gateway ? (gateway.name ? gateway.name : `${gateway.host}:${gateway.port}`) : ''); }, labelStyle: function() { return this.name ? 'node_label_italic' : ''; }, }); </script>