[ { "id": "a908366f.6e6348", "type": "tab", "label": "Automation UI", "disabled": false, "info": "" }, { "id": "83f0f520.8ad388", "type": "realknx-get", "z": "a908366f.6e6348", "name": "Get temp.", "controller": "1052ca19.1e70b6", "itemname": "Home cinema - Thermostat-current-temperature", "booleanoutput": false, "x": 300, "y": 90, "wires": [ [ "c3bb4bd0.377658", "17fefc42.cb6034" ] ] }, { "id": "e2334cc5.7cd73", "type": "ui_button", "z": "a908366f.6e6348", "name": "", "group": "ffa241b1.d4aa1", "order": 1, "width": "2", "height": "1", "passthru": false, "label": "Get temp.", "color": "orange", "bgcolor": "grey", "icon": "fa-upload", "payload": "", "payloadType": "str", "topic": "", "x": 147.99994277954102, "y": 90, "wires": [ [ "83f0f520.8ad388" ] ] }, { "id": "c3bb4bd0.377658", "type": "ui_text", "z": "a908366f.6e6348", "group": "ffa241b1.d4aa1", "order": 2, "width": "7", "height": "1", "name": "", "label": "Value from get:", "format": "{{msg.payload | number:2}} °C", "layout": "row-left", "x": 560.9999923706055, "y": 149.00000762939453, "wires": [] }, { "id": "a1351977.e79a58", "type": "ui_button", "z": "a908366f.6e6348", "name": "", "group": "ffa241b1.d4aa1", "order": 3, "width": "2", "height": "1", "passthru": false, "label": "Clear temp.", "color": "orange", "bgcolor": "grey", "icon": "fa-eraser", "payload": "0", "payloadType": "num", "topic": "", "x": 158.99994659423828, "y": 153.00000381469727, "wires": [ [ "c3bb4bd0.377658", "17fefc42.cb6034" ] ] }, { "id": "5bf55701.75fcc8", "type": "comment", "z": "a908366f.6e6348", "name": "Demo of a realKNX-get item printed to the dashboard text", "info": "* Open the realKNX-get 'Get temp.' node and select a temperature item from your system.\n* (Optional) Open the 'Get Temp.' button node and rename the Dashboard button.\n* (Optional) Activate the Debug node by clicking the pale green tab.", "x": 293.9658432006836, "y": 52.97443389892578, "wires": [] }, { "id": "d640455b.d7b988", "type": "ui_audio", "z": "a908366f.6e6348", "name": "", "group": "ffa241b1.d4aa1", "voice": "0", "always": true, "x": 1031.9660110473633, "y": 90.05961608886719, "wires": [] }, { "id": "17fefc42.cb6034", "type": "function", "z": "a908366f.6e6348", "name": "float to string", "func": "function round(value, exp) {\n if (typeof exp === 'undefined' || +exp === 0)\n return Math.round(value);\n\n value = +value;\n exp = +exp;\n\n if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0))\n return NaN;\n\n // Shift\n value = value.toString().split('e');\n value = Math.round(+(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp)));\n\n // Shift back\n value = value.toString().split('e');\n return +(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp));\n}\n\nvar newMsg = { payload: String(round(msg.payload,2)) };\nreturn newMsg;\n", "outputs": 1, "noerr": 0, "x": 548.7839813232422, "y": 89.39770746231079, "wires": [ [ "a9eaa7ec.1fc1a8" ] ] }, { "id": "f92a9b69.3174a8", "type": "realknx-out", "z": "a908366f.6e6348", "name": "Set dimmer", "controller": "1052ca19.1e70b6", "itemname": "Home cinema - Ceiling", "topic": "", "payload": "", "booleaninput": false, "x": 954.7924423217773, "y": 263.5706253051758, "wires": [] }, { "id": "fd56d5a4.3470c8", "type": "range", "z": "a908366f.6e6348", "minin": "0", "maxin": "100", "minout": "0", "maxout": "255", "action": "scale", "round": true, "name": "Scale", "x": 784.7866058349609, "y": 264.17867946624756, "wires": [ [ "f92a9b69.3174a8" ] ] }, { "id": "452f4d7d.8df2a4", "type": "ui_text", "z": "a908366f.6e6348", "group": "aa75fc7d.60a3e", "order": 2, "width": "1", "height": "1", "name": "", "label": "", "format": "{{msg.payload}}", "layout": "row-left", "x": 463.7839584350586, "y": 305.2072219848633, "wires": [] }, { "id": "5c69ffeb.6a9fb", "type": "comment", "z": "a908366f.6e6348", "name": "Text-To-Speech with IBM Watson", "info": "To use IBM WatsonText-To-Speech (and many other services), do this:\n\n1. Install 'node-red-node-watson' from the palette. Select top right Menu | Manage palette | Install\n2. Drop a 'text to speech' node here below. Connect the output of the 'Int to String' (below) and the 'float to string' node (left) to the input of the 'text to speech'.\n2. Signup to [IBM Watson/Bluemix](https://console.bluemix.net/)\n3. Goto IBM Bluemix Application Services and activate the 'Text to Speech' service\n5. Open Service credentials and copy Username and password to the Text-To-Speech node\n6. Select language and voice.\n7. Click Get Temp button or slider, the value should now be red out.\n", "x": 915.7924880981445, "y": 50.25566101074219, "wires": [] }, { "id": "d540657e.6c9ed8", "type": "function", "z": "a908366f.6e6348", "name": "Int to String", "func": "return { payload: String(msg.payload) };", "outputs": 1, "noerr": 0, "x": 774.7838363647461, "y": 224.40900421142578, "wires": [ [ "a9eaa7ec.1fc1a8" ] ] }, { "id": "a9eaa7ec.1fc1a8", "type": "ui_toast", "z": "a908366f.6e6348", "position": "bottom right", "displayTime": "3", "highlight": "", "outputs": 0, "ok": "OK", "cancel": "", "topic": "", "name": "", "x": 1005.7926254272461, "y": 198.99146270751953, "wires": [] }, { "id": "39794cc1.3a05a4", "type": "delay", "z": "a908366f.6e6348", "name": "Filter", "pauseType": "queue", "timeout": "5", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "2", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": true, "x": 623.7811012268066, "y": 265.1930570602417, "wires": [ [ "fd56d5a4.3470c8", "d540657e.6c9ed8" ] ] }, { "id": "bd261b93.661688", "type": "range", "z": "a908366f.6e6348", "minin": "0", "maxin": "255", "minout": "0", "maxout": "100", "action": "scale", "round": true, "name": "Scale", "x": 285.7839584350586, "y": 274.17884063720703, "wires": [ [ "452f4d7d.8df2a4", "ba665c8c.46578" ] ] }, { "id": "3de17382.c9408c", "type": "comment", "z": "a908366f.6e6348", "name": "Demo of a realKNX-in & out mapped to a slider", "info": "The realKNX-in node updates a text value and a slider in the dashboard.\n\n* The output of the slider is filtered to limit the number of messages.\n* (Optional)The output of the slider is forwarded to the Text-to-Speech and notification.\n* The range of the dimmer in this example is 0-255.\n* The input and output of the slider is scaled to 0-100 in the UI.\n\n**Note** that the slider shouldn't pass-through values to the output. \n", "x": 262.7840347290039, "y": 228.44317626953125, "wires": [] }, { "id": "ba665c8c.46578", "type": "ui_slider", "z": "a908366f.6e6348", "name": "", "label": "Dimmer", "group": "aa75fc7d.60a3e", "order": 1, "width": "11", "height": "1", "passthru": false, "topic": "", "min": 0, "max": "100", "step": 1, "x": 474.7869186401367, "y": 264.4827346801758, "wires": [ [ "39794cc1.3a05a4" ] ] }, { "id": "d7acd64c.5529a8", "type": "realknx-in", "z": "a908366f.6e6348", "name": "Dimmer", "controller": "1052ca19.1e70b6", "itemname": "Home cinema - Ceiling", "passthru": true, "booleanoutput": false, "outputatstartup": true, "x": 132.99996185302734, "y": 274.00000762939453, "wires": [ [ "bd261b93.661688" ] ] }, { "id": "d6a74b83.5b5fa8", "type": "realknx-monitor", "z": "a908366f.6e6348", "name": "controller", "controller": "1052ca19.1e70b6", "x": 100, "y": 540, "wires": [ [], [ "31065a46.640016" ], [] ] }, { "id": "bd2daf8b.94dd7", "type": "ui_text", "z": "a908366f.6e6348", "group": "45a8554d.16200c", "order": 1, "width": "0", "height": "0", "name": "", "label": "power consumption kW (update)", "format": "{{msg.payload}}", "layout": "row-center", "x": 470, "y": 460, "wires": [] }, { "id": "d47fd422.316ad8", "type": "ui_chart", "z": "a908366f.6e6348", "name": "Power consumption chart", "group": "45a8554d.16200c", "order": 2, "width": "0", "height": "0", "label": "", "chartType": "line", "legend": "false", "xformat": "dd HH:mm", "interpolate": "linear", "nodata": "no data yet", "dot": false, "ymin": "", "ymax": "", "removeOlder": "2", "removeOlderPoints": "500", "removeOlderUnit": "86400", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff8000", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "x": 450, "y": 500, "wires": [ [], [] ] }, { "id": "d845e077.1045a", "type": "ui_chart", "z": "a908366f.6e6348", "name": "Temperature chart", "group": "ffa241b1.d4aa1", "order": 4, "width": "0", "height": "0", "label": "temperature (°C)", "chartType": "line", "legend": "true", "xformat": "dd HH:mm", "interpolate": "linear", "nodata": "be patient, no data yet", "dot": true, "ymin": "20", "ymax": "30", "removeOlder": "2", "removeOlderPoints": "500", "removeOlderUnit": "86400", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff8000", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "x": 710, "y": 700, "wires": [ [], [] ] }, { "id": "4762d771.ece9b8", "type": "comment", "z": "a908366f.6e6348", "name": "Demo of a realKNX-in item plotted in a chart", "info": "This demontrates how to plot two temperature values (actual and set value) in a graph.\n\n* Open the realKNX-in **Temp actual** and **Temp set** nodes and select an item from your system.\n* Open the 'Temperature chart' to configure the Dashboard Chart node.\n* Activate the Debug node by clicking the pale green tab.\n\nComments: \n* The 'Clear chart data' node will remove all data from the chart.", "x": 210, "y": 640, "wires": [] }, { "id": "60073802.51b7f8", "type": "comment", "z": "a908366f.6e6348", "name": "Demo of a realKNX-in item plotted in a chart", "info": "* Open the realKNX-in node 'Updates of power' and select an item from your system.\n* Open the 'Power consumption chart' to configure the chart item.\n* Activate the Debug node by clicking the pale green tabs.", "x": 210, "y": 400, "wires": [] }, { "id": "31065a46.640016", "type": "debug", "z": "a908366f.6e6348", "name": "Debug connection errors", "active": false, "console": "false", "complete": "payload", "x": 450, "y": 540, "wires": [] }, { "id": "782f76c4.bafa98", "type": "change", "z": "a908366f.6e6348", "name": "", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "actual", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 350, "y": 680, "wires": [ [ "d845e077.1045a" ] ] }, { "id": "e9d926d5.d75be8", "type": "change", "z": "a908366f.6e6348", "name": "", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "set value", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 330, "y": 740, "wires": [ [ "d845e077.1045a" ] ] }, { "id": "1df2c7a1.2f43e8", "type": "inject", "z": "a908366f.6e6348", "name": "Clear chart data", "topic": "", "payload": "[]", "payloadType": "json", "repeat": "", "crontab": "", "once": false, "x": 500, "y": 640, "wires": [ [ "d845e077.1045a" ] ] }, { "id": "591f4046.5d0fc", "type": "realknx-in", "z": "a908366f.6e6348", "name": "Temp actual", "controller": "1052ca19.1e70b6", "itemname": "Home cinema - Thermostat-current-temperature", "passthru": true, "booleanoutput": false, "outputatstartup": true, "x": 110, "y": 680, "wires": [ [ "782f76c4.bafa98" ] ] }, { "id": "aebf3ab0.150138", "type": "realknx-in", "z": "a908366f.6e6348", "name": "Temp set", "controller": "1052ca19.1e70b6", "itemname": "Home cinema - Thermostat", "passthru": true, "booleanoutput": false, "outputatstartup": true, "x": 100, "y": 740, "wires": [ [ "e9d926d5.d75be8" ] ] }, { "id": "91ba0182.fd98b", "type": "realknx-in", "z": "a908366f.6e6348", "name": "Updates of power", "controller": "1052ca19.1e70b6", "itemname": "Général - Consommation", "passthru": true, "booleanoutput": false, "outputatstartup": true, "x": 120, "y": 480, "wires": [ [ "bd2daf8b.94dd7", "d47fd422.316ad8" ] ] }, { "id": "41c09b41.234ab4", "type": "debug", "z": "a908366f.6e6348", "name": "Debug", "active": false, "console": "false", "complete": "payload", "x": 510, "y": 1000, "wires": [] }, { "id": "d6b997c2.73f958", "type": "ui_button", "z": "a908366f.6e6348", "name": "", "group": "4cd8c3f3.7508ac", "order": 2, "width": 0, "height": 0, "passthru": false, "label": "Click to 'pump'", "color": "", "bgcolor": "", "icon": "", "payload": "1", "payloadType": "num", "topic": "mytopic", "x": 120, "y": 960, "wires": [ [ "ec8947c6.39d018" ] ] }, { "id": "a029781f.2ed118", "type": "ui_gauge", "z": "a908366f.6e6348", "name": "", "group": "4cd8c3f3.7508ac", "order": 1, "width": 0, "height": 0, "gtype": "gage", "title": "Gauge", "label": "units", "format": "{{value}}%", "min": 0, "max": "100", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 510, "y": 960, "wires": [] }, { "id": "890758c.a0907a8", "type": "ui_text", "z": "a908366f.6e6348", "group": "91c27927.3b71e8", "order": 3, "width": "0", "height": "0", "name": "", "label": "Temperature:", "format": "{{msg.payload.tempc}} °C", "layout": "row-left", "x": 690, "y": 820, "wires": [] }, { "id": "d2271b58.69b9e8", "type": "ui_text", "z": "a908366f.6e6348", "group": "91c27927.3b71e8", "order": 1, "width": "0", "height": "0", "name": "", "label": "Location:", "format": "{{msg.payload.location}}", "layout": "row-left", "x": 380, "y": 820, "wires": [] }, { "id": "e34b85cc.284e38", "type": "ui_text", "z": "a908366f.6e6348", "group": "91c27927.3b71e8", "order": 2, "width": "0", "height": "0", "name": "", "label": "Weather:", "format": "{{msg.payload.detail }}", "layout": "row-left", "x": 540, "y": 820, "wires": [] }, { "id": "ec8947c6.39d018", "type": "function", "z": "a908366f.6e6348", "name": "increase", "func": "function getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}\n\nvar count = flow.get(\"count\") || 0;\ncount += getRandomInt(2,7);\ncount = count>=100 ? 100 : count;\nflow.set(\"count\", count);\nmsg.payload = count;\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 280, "y": 960, "wires": [ [ "a029781f.2ed118", "41c09b41.234ab4" ] ] }, { "id": "3b4f8bd9.286b14", "type": "function", "z": "a908366f.6e6348", "name": "decrease", "func": "function getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}\n\nvar count = flow.get(\"count\") || 0;\nif (count > 0) {\n count -= getRandomInt(1,5);\n count = count<=0 ? 0 : count;\n}\nflow.set(\"count\", count);\nmsg.payload = count;\nreturn msg;\n", "outputs": 1, "noerr": 0, "x": 280, "y": 1000, "wires": [ [ "a029781f.2ed118", "41c09b41.234ab4" ] ] }, { "id": "23e6f761.f26058", "type": "interval", "z": "a908366f.6e6348", "name": "interval", "interval": "1", "onstart": false, "msg": "1", "showstatus": false, "unit": "seconds", "statusformat": "YYYY-MM-D HH:mm:ss", "x": 90, "y": 1000, "wires": [ [ "3b4f8bd9.286b14" ] ] }, { "id": "71aba47e.65ad9c", "type": "comment", "z": "a908366f.6e6348", "name": "Demo of logical function", "info": "This demonstrates how function nodes can be used for creating powerful logic.", "x": 140, "y": 920, "wires": [] }, { "id": "58d5a95.c6b8e58", "type": "comment", "z": "a908366f.6e6348", "name": "Demo of openweathermap", "info": "Sign-up for a API-key at https://openweathermap.org/api\nand add the 'openweathermap' node.", "x": 150, "y": 820, "wires": [] }, { "id": "81d8e5d3.af8da8", "type": "ui_text", "z": "a908366f.6e6348", "group": "91c27927.3b71e8", "order": 0, "width": 0, "height": 0, "name": "", "label": "Humidity", "format": "{{msg.payload.humidity}} %", "layout": "row-left", "x": 380, "y": 880, "wires": [] }, { "id": "b152d596.f7ed78", "type": "ui_text", "z": "a908366f.6e6348", "group": "91c27927.3b71e8", "order": 0, "width": 0, "height": 0, "name": "", "label": "windspeed ", "format": "{{msg.payload.windspeed}} m/s", "layout": "row-left", "x": 530, "y": 880, "wires": [] }, { "id": "ea7d1e82.9c374", "type": "ui_text", "z": "a908366f.6e6348", "group": "91c27927.3b71e8", "order": 0, "width": 0, "height": 0, "name": "", "label": "winddirection ", "format": "{{msg.payload.winddirection }} °", "layout": "row-left", "x": 690, "y": 880, "wires": [] }, { "id": "822a6271.4e6b5", "type": "openweathermap in", "z": "a908366f.6e6348", "name": "", "lon": "", "lat": "", "city": "Valbonne", "country": "France", "language": "en", "x": 120, "y": 860, "wires": [ [ "d2271b58.69b9e8", "e34b85cc.284e38", "890758c.a0907a8", "81d8e5d3.af8da8", "b152d596.f7ed78", "ea7d1e82.9c374" ] ] }, { "id": "1052ca19.1e70b6", "type": "realknx-controller", "z": "", "name": "realknx-ctrl", "host": "localhost", "port": "3000" }, { "id": "ffa241b1.d4aa1", "type": "ui_group", "z": "", "name": "Temperature", "tab": "81f8737d.c5fda", "order": 3, "disp": true, "width": "12" }, { "id": "aa75fc7d.60a3e", "type": "ui_group", "z": "", "name": "Slider", "tab": "81f8737d.c5fda", "order": 1, "disp": true, "width": "12" }, { "id": "45a8554d.16200c", "type": "ui_group", "z": "", "name": "Power", "tab": "81f8737d.c5fda", "order": 2, "disp": true, "width": "12" }, { "id": "4cd8c3f3.7508ac", "type": "ui_group", "z": "", "name": "Button & gauge", "tab": "8a0dd6b7.61b088", "order": 2, "disp": true, "width": "12" }, { "id": "91c27927.3b71e8", "type": "ui_group", "z": "", "name": "Weather stuff", "tab": "9ef6670b.057008", "order": 1, "disp": true, "width": "12" }, { "id": "81f8737d.c5fda", "type": "ui_tab", "z": "", "name": "realKNX", "icon": "dashboard", "order": 1 }, { "id": "8a0dd6b7.61b088", "type": "ui_tab", "z": "", "name": "Functions", "icon": "dashboard", "order": 3 }, { "id": "9ef6670b.057008", "type": "ui_tab", "z": "", "name": "Weather", "icon": "dashboard", "order": 4 } ]