UNPKG

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

Version:
80 lines (74 loc) 3.02 kB
<script type="text/x-red" data-template-name="destination"> <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-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-dpt"><i class="fa fa-bookmark"></i> <span>DPT</span></label> <select id="node-input-dpt"> <option value="DPT1">DPT 1 (1-bit boolean)</option> <option value="DPT2">DPT 2 (1-bit priority control)</option> <option value="DPT3">DPT 3 (3-bit control)</option> <option value="DPT4">DPT 4 (character set)</option> <option value="DPT5">DPT 5 (8-bit unsigned)</option> <option value="DPT6">DPT 6 (8-bit signed)</option> <option value="DPT7">DPT 7 (2-byte unsigned)</option> <option value="DPT8">DPT 8 (2-byte signed)</option> <option value="DPT9">DPT 9 (2-byte floating point)</option> <option value="DPT10">DPT 10 (3-byte time)</option> <option value="DPT11">DPT 11 (3-byte date)</option> </select> </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="destination"> <p>Destination for a KNX device to send messages to.</p> <h3>Properties</h3> <h4>Gateway</h4> <p>KNX gateway to connect to.</p> <h4>Destination</h4> <p>Destination address to send messages to.</p> <h4>DPT</h4> <p>Data point type of the sent message.</p> <h4>Name</h4> <p>Type in a node name manually or keep the default name.</p> <h3>Inputs</h3> <p>Send input through <code>msg.payload</code> values.</p> <dl class="message-properties"> <dt>payload <span class="property-type">string | object</span></dt> <dd>Optional payload input .</dd> </dl> <h3>Outputs</h3> <p>Formatted request object for a charge point node.</p> <h3>Details</h3> <p>Supports most data point types for KNX. Formatting the message correctly for the DPT is required.</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('destination', { category: 'smappee knx', color: '#99c031', defaults: { name: {value: ''}, gateway: {value: '', required: true, type: 'gateway-config'}, destination: {value: '', required: true}, dpt: {value: '0', required: true}, }, inputs: 1, outputs: 0, icon: 'inject.png', label: function() { return this.name || 'destination:' + (this.destination ? this.destination : ''); }, labelStyle: function() { return this.name ? 'node_label_italic' : ''; }, }); </script>