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, ETS group address importer, KNX AI for diagnosticsand KNX routing between interfaces. Easy to use and highly configurable.

126 lines (107 loc) 5.17 kB
<script type="text/javascript" src="resources/node-red-contrib-knx-ultimate/htmlUtils.js"></script> <script type="text/javascript"> RED.nodes.registerType('knxUltimateGlobalContext', { category: "KNX Ultimate", color: '#C7E9C0', defaults: { //buttonState: {value: true}, server: { type: "knxUltimate-config", required: true }, name: { value: "KNXGlobalContext", validate: RED.validators.regex(/^[a-zA-Z]+$/) }, exposeAsVariable: { value: "exposeAsVariableREADWRITE", required: false }, writeExecutionInterval: { value: 1000 }, contextStorage: { value: "" } }, inputs: 0, outputs: 0, icon: "node-knx-icon.svg", label: function () { return (this.name); }, paletteLabel: "KNX Global Context", // 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) { } }, 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="knxUltimateGlobalContext"> <div class="form-row"> <b><span data-i18n="knxUltimateGlobalContext.title"></span></b> <br /> <div class="form-tips" style="margin-top: 11px;background-color:#FFEEEE;text-align:center"> <b><span data-i18n="knxUltimateGlobalContext.advanced.warning"></span></b> </div> <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> <span data-i18n="knxUltimateGlobalContext.advanced.node-input-server"></span> </label> <input type="text" id="node-input-server" /> </div> <div class="form-row"> <label for="node-input-name" style="width:60%;"> <i class="fa fa-tag"></i> <span data-i18n="knxUltimateGlobalContext.node-input-name"></span> </label> <input style="flex:1 1 240px; min-width:240px; max-width:240px;" type="text" id="node-input-name" data-i18n="[placeholder]knxUltimateGlobalContext.node-input-name" /> </div> <div class="form-row"> <label for="node-input-exposeAsVariable" style="width:60%;"> <i class="fa fa-link"></i> <span data-i18n="knxUltimateGlobalContext.advanced.exposeAsVariable"></span> </label> <select id="node-input-exposeAsVariable" style="width:35%;"> <option value="exposeAsVariableNO" data-i18n="knxUltimateGlobalContext.advanced.exposeAsVariableNO"></option> <option value="exposeAsVariableREADONLY" data-i18n="knxUltimateGlobalContext.advanced.exposeAsVariableREADONLY"></option> <option value="exposeAsVariableREADWRITE" data-i18n="knxUltimateGlobalContext.advanced.exposeAsVariableREADWRITE"></option> </select> </div> <div class="form-row"> <label for="node-input-writeExecutionInterval" style="width:60%;"> <i class="fa fa-link"></i> <span data-i18n="knxUltimateGlobalContext.advanced.writeExecutionInterval"></span> </label> <select id="node-input-writeExecutionInterval" style="width:35%;"> <option value=250 data-i18n="knxUltimateGlobalContext.interval_250ms"></option> <option value=500 data-i18n="knxUltimateGlobalContext.interval_500ms"></option> <option value=1000 data-i18n="knxUltimateGlobalContext.interval_1000ms_default"></option> <option value=1500 data-i18n="knxUltimateGlobalContext.interval_1500ms"></option> <option value=2000 data-i18n="knxUltimateGlobalContext.interval_2000ms"></option> </select> </div> <div class="form-row"> <label for="node-input-contextStorage" style="width:60%;"> <i class="fa fa-tag"></i> Context storage </label> <input style="width:35%;" type="text" id="node-input-contextStorage" placeholder="Optional context storage name" /> </div> </script>