UNPKG

node-red-contrib-knx-ultimate

Version:

Control your KNX and KNX Secure intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer. Easy to use and highly configurable.

100 lines (82 loc) 3.71 kB
<script type="text/javascript" src="resources/node-red-contrib-knx-ultimate/htmlUtils.js"></script> <script type="text/javascript"> RED.nodes.registerType('knxUltimateAutoResponder', { category: "KNX Ultimate", color: '#C7E9C0', defaults: { //buttonState: {value: true}, server: { type: "knxUltimate-config", required: true }, name: { value: "Auto responder", required: false }, commandText: { value: `[{"ga":"2/7/1","default":true},{"note":"Virtual sensors coming from Hikvision AX-Pro","ga":"3/1/1..22","dpt":"1.001","default":false},{"note":"DALI garden virtual brightness %","ga":"2/2/5..21","dpt":"5.001","default":25},{"note":"Alarm armed status text","ga":"2/4/22","dpt":"16.001","default":"Unknown status!"}]`, required: false } }, inputs: 0, outputs: 0, icon: "node-knx-icon.svg", label: function () { return (this.name || "KNX Auto Responder"); }, paletteLabel: "KNX Auto Responder", // button: { // enabled: function() { // // return whether or not the button is enabled, based on the current // // configuration of the node // return !this.changed // }, // visible: function() { // // return whether or not the button is visible, based on the current // // configuration of the node // return this.hasButton // }, // //toggle: "buttonState", // onclick: function() {} // }, oneditprepare: function () { // Go to the help panel try { RED.sidebar.show("help"); } catch (error) { } $("#node-input-commandText").typedInput({ type: "json", types: ["json"] }) }, oneditsave: function () { // Return to the info tab try { RED.sidebar.show("info"); } catch (error) { } }, oneditcancel: function () { // Return to the info tab try { RED.sidebar.show("info"); } catch (error) { } } }) </script> <script type="text/html" data-template-name="knxUltimateAutoResponder"> <div class="form-row"> <b>Auto Responder</b>&nbsp&nbsp<span style="color:red" &nbsp &nbsp<i class="fa fa-youtube"></i></span>&nbsp<a target="_blank" href=""><u>Youtube sample coming soon...</u></a> <br /> <br /> <label for="node-input-server"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAKnRFWHRDcmVhdGlvbiBUaW1lAEZyIDYgQXVnIDIwMTAgMjE6NTI6MTkgKzAxMDD84aS8AAAAB3RJTUUH3gYYCicNV+4WIQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAARnQU1BAACxjwv8YQUAAACUSURBVHjaY2CgFZg5c+Z/ZEyWAZ8+f/6/ZsWs/xoamqMGkGrA6Wla/1+fVARjEBuGsSoGmY4eZSCNL59d/g8DIDbIAHR14OgFGQByKjIGKX5+6/T///8gGMQGiV1+/B0Fg70GIkD+RMYgxf/O5/7//2MSmAZhkBi6OrgB6Bg5DGB4ajr3f2xqsYYLSDE2THJUDg0AAAqyDVd4tp4YAAAAAElFTkSuQmCC"></img> Gateway </label> <input type="text" id="node-input-server" /> </div> <div class="form-row"> <label for="node-input-name" > <i class="fa fa-tag"></i> Name </label> <input type="text" id="node-input-name" data-i18n="[placeholder]knxUltimateAutoResponder.node-input-name" style="flex:1 1 240px; min-width:240px; max-width:240px;" /> </div> <div class="form-row"> <label for="node-input-commandText"><i class="fa fa-tasks"></i> Respond to</label> <input type="text" id="node-input-commandText"> </div> </script>