[ { "id": "88300a67.53f0d8", "type": "tab", "label": "Envoy-Metered", "disabled": false, "info": "" }, { "id": "3667807e.0ac338", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "x": 410, "y": 60, "wires": [] }, { "id": "df69fc85.a7a448", "type": "inject", "z": "88300a67.53f0d8", "name": "", "topic": "", "payload": "", "payloadType": "date", "repeat": "10", "crontab": "", "once": true, "onceDelay": 0.1, "x": 130, "y": 40, "wires": [ [ "d6cbe207.df8cb8" ] ] }, { "id": "7645b785.6450c", "type": "function", "z": "88300a67.53f0d8", "name": "production[0].activeCount", "func": "msg.payload = msg.payload.production[0].activeCount;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 200, "wires": [ [ "2db3982a.9c5968" ] ] }, { "id": "2db3982a.9c5968", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 200, "wires": [] }, { "id": "e741d624.e9b6f", "type": "json", "z": "88300a67.53f0d8", "name": "", "property": "payload", "action": "", "pretty": false, "x": 130, "y": 180, "wires": [ [ "97ba04be.dfe66" ] ] }, { "id": "6c16d231.b1be1c", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].measurementType", "func": "msg.payload = msg.payload.consumption[0].measurementType;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 520, "y": 620, "wires": [ [ "a9208a75.585b7" ] ] }, { "id": "a9208a75.585b7", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 620, "wires": [] }, { "id": "dc5f82da.000cf8", "type": "function", "z": "88300a67.53f0d8", "name": "storage[0].type", "func": "msg.payload = msg.payload.storage[0].type;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 440, "y": 2880, "wires": [ [ "93c6fc56.20df8" ] ] }, { "id": "cb332ed3.570bc", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].wNow", "func": "msg.payload = msg.payload.consumption[0].wNow;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 480, "y": 740, "wires": [ [ "e8a6df01.3a4458" ] ] }, { "id": "e8a6df01.3a4458", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 740, "wires": [] }, { "id": "10f2f863.b9178", "type": "function", "z": "88300a67.53f0d8", "name": "production[0].wNow", "func": "msg.payload = msg.payload.production[0].wNow;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 470, "y": 320, "wires": [ [ "954d1306.4b65" ] ] }, { "id": "954d1306.4b65", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 320, "wires": [] }, { "id": "e6a69e10.0e268", "type": "function", "z": "88300a67.53f0d8", "name": "production[0].readingTime", "func": "msg.payload = msg.payload.production[0].readingTime *1000;\n\n\n\nvar dt = new Date(msg.payload);\n msg = {\n\t'month':\tdt.getMonth() + 1,\n\t'day':\t\tdt.getDate(),\n\t'year':\t\tdt.getFullYear(),\n\t'hours':\tdt.getHours(),\n\t'mins':\t\tdt.getMinutes(),\n\t'sec':\t\tdt.getSeconds(),\n\t'msecs':\tdt.getMilliseconds()\n}\n\nif(msg.day < 10 ){msg.day = \"0\" + msg.day;}\nif(msg.month < 10 ){msg.month = \"0\" + msg.month;}\nif(msg.hours < 10 ){msg.hours = \"0\" + msg.hours;}\nif(msg.mins < 10 ){msg.mins = \"0\" + msg.mins;}\nif(msg.sec < 10 ){msg.sec = \"0\" + msg.sec;}\n\nmsg.payload = msg.day + \"/\" + msg.month + \"/\" + msg.year +\" - \"+ msg.hours + \":\" + msg.mins +\":\" +msg.sec;\n\n\n\n\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 260, "wires": [ [ "ef6dc308.12fe9" ] ] }, { "id": "ef6dc308.12fe9", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 260, "wires": [] }, { "id": "aaab119e.dfd8e", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].readingTime", "func": "msg.payload = msg.payload.consumption[0].readingTime *1000;\n\n\n\nvar dt = new Date(msg.payload);\n msg = {\n\t'month':\tdt.getMonth() + 1,\n\t'day':\t\tdt.getDate(),\n\t'year':\t\tdt.getFullYear(),\n\t'hours':\tdt.getHours(),\n\t'mins':\t\tdt.getMinutes(),\n\t'sec':\t\tdt.getSeconds(),\n\t'msecs':\tdt.getMilliseconds()\n}\n\nif(msg.day < 10 ){msg.day = \"0\" + msg.day;}\nif(msg.month < 10 ){msg.month = \"0\" + msg.month;}\nif(msg.hours < 10 ){msg.hours = \"0\" + msg.hours;}\nif(msg.mins < 10 ){msg.mins = \"0\" + msg.mins;}\nif(msg.sec < 10 ){msg.sec = \"0\" + msg.sec;}\n\nmsg.payload = msg.day + \"/\" + msg.month + \"/\" + msg.year +\" - \"+ msg.hours + \":\" + msg.mins +\":\" +msg.sec;\n\n\n\n\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 500, "y": 680, "wires": [ [ "cb74d2b2.bcc788" ] ] }, { "id": "cb74d2b2.bcc788", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 680, "wires": [] }, { "id": "9d3f6a0e.f2abe8", "type": "function", "z": "88300a67.53f0d8", "name": "production[0].type", "func": "msg.payload = msg.payload.production[0].type;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 470, "y": 140, "wires": [ [ "12e7a721.14e579" ] ] }, { "id": "12e7a721.14e579", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 140, "wires": [] }, { "id": "a8c327b8.4c9b3", "type": "function", "z": "88300a67.53f0d8", "name": "production[0].whLifetime", "func": "msg.payload = msg.payload.production[0].whLifetime;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 380, "wires": [ [ "f7345ac2.a36048" ] ] }, { "id": "f7345ac2.a36048", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 380, "wires": [] }, { "id": "85bd0579.bb072", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].type", "func": "msg.payload = msg.payload.consumption[0].type;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 470, "y": 480, "wires": [ [ "fc879866.ece798" ] ] }, { "id": "fc879866.ece798", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 480, "wires": [] }, { "id": "f5605759.1cffe8", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].activeCount", "func": "msg.payload = msg.payload.consumption[0].activeCount;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 500, "y": 540, "wires": [ [ "70d0063b.c3e86" ] ] }, { "id": "70d0063b.c3e86", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 540, "wires": [] }, { "id": "5252fd2e.0aa32c", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 790, "y": 3000, "wires": [] }, { "id": "49746a3e.027254", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 790, "y": 3060, "wires": [] }, { "id": "93c6fc56.20df8", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 790, "y": 2880, "wires": [] }, { "id": "bb32a29f.48117", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 790, "y": 2940, "wires": [] }, { "id": "98065e02.6f1058", "type": "function", "z": "88300a67.53f0d8", "name": "storage[0].activeCount", "func": "msg.payload = msg.payload.storage[0].activeCount;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 460, "y": 2940, "wires": [ [ "bb32a29f.48117" ] ] }, { "id": "f7f612e7.1e074", "type": "function", "z": "88300a67.53f0d8", "name": "storage[0].readingTime", "func": "msg.payload = msg.payload.storage[0].readingTime *1000;\n\n\n\nvar dt = new Date(msg.payload);\n msg = {\n\t'month':\tdt.getMonth() + 1,\n\t'day':\t\tdt.getDate(),\n\t'year':\t\tdt.getFullYear(),\n\t'hours':\tdt.getHours(),\n\t'mins':\t\tdt.getMinutes(),\n\t'sec':\t\tdt.getSeconds(),\n\t'msecs':\tdt.getMilliseconds()\n}\n\nif(msg.day < 10 ){msg.day = \"0\" + msg.day;}\nif(msg.month < 10 ){msg.month = \"0\" + msg.month;}\nif(msg.hours < 10 ){msg.hours = \"0\" + msg.hours;}\nif(msg.mins < 10 ){msg.mins = \"0\" + msg.mins;}\nif(msg.sec < 10 ){msg.sec = \"0\" + msg.sec;}\n\nmsg.payload = msg.day + \"/\" + msg.month + \"/\" + msg.year +\" - \"+ msg.hours + \":\" + msg.mins +\":\" +msg.sec;\n\n\n\n\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 460, "y": 3000, "wires": [ [ "5252fd2e.0aa32c" ] ] }, { "id": "6ec22066.4fd228", "type": "function", "z": "88300a67.53f0d8", "name": "storage[0].wNow", "func": "msg.payload = msg.payload.storage[0].wNow;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 440, "y": 3060, "wires": [ [ "49746a3e.027254" ] ] }, { "id": "3fe391ea.296a8e", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 790, "y": 3120, "wires": [] }, { "id": "44dc3fea.7fc768", "type": "function", "z": "88300a67.53f0d8", "name": "storage[0].whNow", "func": "msg.payload = msg.payload.storage[0].whNow;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 450, "y": 3120, "wires": [ [ "3fe391ea.296a8e" ] ] }, { "id": "1c341fa8.3def58", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 790, "y": 3180, "wires": [] }, { "id": "79c38bd9.0491f4", "type": "function", "z": "88300a67.53f0d8", "name": "storage[0].state", "func": "msg.payload = msg.payload.storage[0].state;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 440, "y": 3180, "wires": [ [ "1c341fa8.3def58" ] ] }, { "id": "1340ce9.6001631", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].whLifetime", "func": "msg.payload = msg.payload.consumption[0].whLifetime;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 800, "wires": [ [ "839701c1.7f1338" ] ] }, { "id": "839701c1.7f1338", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 800, "wires": [] }, { "id": "8126bc8.14758c", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].vahLifetime", "func": "msg.payload = msg.payload.consumption[0].vahLifetime;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 500, "y": 920, "wires": [ [ "6ffbb590.c304cc" ] ] }, { "id": "6ffbb590.c304cc", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 920, "wires": [] }, { "id": "8163c05f.e439d8", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].varhLeadLifetime", "func": "msg.payload = msg.payload.consumption[0].varhLeadLifetime;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 510, "y": 860, "wires": [ [ "4ca434c1.69e194" ] ] }, { "id": "4ca434c1.69e194", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 860, "wires": [] }, { "id": "1e2a0b33.402aad", "type": "switch", "z": "88300a67.53f0d8", "name": "Switch batterie", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "payload", "vt": "msg" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 180, "y": 3000, "wires": [ [ "dc5f82da.000cf8", "98065e02.6f1058", "f7f612e7.1e074", "6ec22066.4fd228", "44dc3fea.7fc768", "79c38bd9.0491f4" ] ] }, { "id": "ceb74871.1f63f", "type": "switch", "z": "88300a67.53f0d8", "name": "Switch Net-conso", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "payload", "vt": "msg" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 170, "y": 2200, "wires": [ [ "1e2a0b33.402aad", "a5bd3282.3f34a8", "7954d0b7.c27ac8", "3efe8f85.db2d", "fc2cfe68.626308", "ba4ff09e.c287b8", "59291444.874b5c", "16618b61.5576cd", "207466ef.d918d2", "74d6aba2.2277c4", "47ea69bb.7806a", "d143018d.464cb8", "c9290ef6.a26ee8", "2167093e.8b06d6", "65d0263a.11f238", "e7d26325.739378", "a54f1113.52a278", "7f431b53.47975c", "da169d52.8db9b8" ] ] }, { "id": "87dc0bad.9684b8", "type": "switch", "z": "88300a67.53f0d8", "name": "Switch Total conso", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "payload", "vt": "msg" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 150, "y": 940, "wires": [ [ "ceb74871.1f63f", "85bd0579.bb072", "f5605759.1cffe8", "6c16d231.b1be1c", "aaab119e.dfd8e", "cb332ed3.570bc", "1340ce9.6001631", "8163c05f.e439d8", "8126bc8.14758c", "d71728f0.2d0e28", "13c59125.62aa77", "c64563ec.9ccee8", "603f9f6.465a06", "48399c21.d3c38c", "6753b520.c56244", "56a30a7c.05580c", "d7db0ec4.5e6468", "6d461099.37558", "8f4982c8.c2dfa" ] ] }, { "id": "97ba04be.dfe66", "type": "switch", "z": "88300a67.53f0d8", "name": "Switch production", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "payload", "vt": "msg" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 150, "y": 240, "wires": [ [ "87dc0bad.9684b8", "9d3f6a0e.f2abe8", "7645b785.6450c", "e6a69e10.0e268", "10f2f863.b9178", "a8c327b8.4c9b3", "3667807e.0ac338" ] ] }, { "id": "d6cbe207.df8cb8", "type": "http request", "z": "88300a67.53f0d8", "name": "production.json", "method": "GET", "ret": "txt", "paytoqs": false, "url": "http://192.168.0.248/production.json", "tls": "", "persist": false, "proxy": "", "authType": "", "x": 140, "y": 100, "wires": [ [ "e741d624.e9b6f" ] ] }, { "id": "d71728f0.2d0e28", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].rmsCurrent", "func": "msg.payload = msg.payload.consumption[0].rmsCurrent;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 500, "y": 980, "wires": [ [ "f370d7f9.44f2a" ] ] }, { "id": "f370d7f9.44f2a", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 980, "wires": [] }, { "id": "c64563ec.9ccee8", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].reactPwr", "func": "msg.payload = msg.payload.consumption[0].reactPwr;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 1100, "wires": [ [ "d0ac1fd7.b58be8" ] ] }, { "id": "d0ac1fd7.b58be8", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1100, "wires": [] }, { "id": "13c59125.62aa77", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].rmsVoltage", "func": "msg.payload = msg.payload.consumption[0].rmsVoltage;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 500, "y": 1040, "wires": [ [ "71ffa41b.8fca4c" ] ] }, { "id": "71ffa41b.8fca4c", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1040, "wires": [] }, { "id": "603f9f6.465a06", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].apprntPwr", "func": "msg.payload = msg.payload.consumption[0].apprntPwr;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 1160, "wires": [ [ "5822d44a.29563c" ] ] }, { "id": "5822d44a.29563c", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1160, "wires": [] }, { "id": "48399c21.d3c38c", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].pwrFactor", "func": "msg.payload = msg.payload.consumption[0].pwrFactor;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 1220, "wires": [ [ "4cc3e406.114e2c" ] ] }, { "id": "4cc3e406.114e2c", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1220, "wires": [] }, { "id": "56a30a7c.05580c", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].whLastSevenDays", "func": "msg.payload = msg.payload.consumption[0].whLastSevenDays;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 520, "y": 1340, "wires": [ [ "6c1d6a3.48dff14" ] ] }, { "id": "6c1d6a3.48dff14", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1340, "wires": [] }, { "id": "6753b520.c56244", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].whToday", "func": "msg.payload = msg.payload.consumption[0].whToday;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 1280, "wires": [ [ "f29d1dc0.fa8f2" ] ] }, { "id": "f29d1dc0.fa8f2", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1280, "wires": [] }, { "id": "d7db0ec4.5e6468", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].vahToday", "func": "msg.payload = msg.payload.consumption[0].vahToday;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 1400, "wires": [ [ "c5496292.6b1738" ] ] }, { "id": "c5496292.6b1738", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1400, "wires": [] }, { "id": "8f4982c8.c2dfa", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].varhLagToday", "func": "msg.payload = msg.payload.consumption[0].varhLagToday;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 510, "y": 1520, "wires": [ [ "608f5076.3ddc18" ] ] }, { "id": "608f5076.3ddc18", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1520, "wires": [] }, { "id": "6d461099.37558", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[0].varhLeadToday", "func": "msg.payload = msg.payload.consumption[0].varhLeadToday;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 510, "y": 1460, "wires": [ [ "48fd0474.3856fc" ] ] }, { "id": "48fd0474.3856fc", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1460, "wires": [] }, { "id": "3efe8f85.db2d", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].measurementType", "func": "msg.payload = msg.payload.consumption[1].measurementType;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 520, "y": 1760, "wires": [ [ "3f02dd12.ca5cc2" ] ] }, { "id": "3f02dd12.ca5cc2", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1760, "wires": [] }, { "id": "ba4ff09e.c287b8", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].wNow", "func": "msg.payload = msg.payload.consumption[1].wNow;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 480, "y": 1880, "wires": [ [ "e7dc46ef.ce607" ] ] }, { "id": "e7dc46ef.ce607", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1880, "wires": [] }, { "id": "fc2cfe68.626308", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].readingTime", "func": "msg.payload = msg.payload.consumption[1].readingTime *1000;\n\n\n\nvar dt = new Date(msg.payload);\n msg = {\n\t'month':\tdt.getMonth() + 1,\n\t'day':\t\tdt.getDate(),\n\t'year':\t\tdt.getFullYear(),\n\t'hours':\tdt.getHours(),\n\t'mins':\t\tdt.getMinutes(),\n\t'sec':\t\tdt.getSeconds(),\n\t'msecs':\tdt.getMilliseconds()\n}\n\nif(msg.day < 10 ){msg.day = \"0\" + msg.day;}\nif(msg.month < 10 ){msg.month = \"0\" + msg.month;}\nif(msg.hours < 10 ){msg.hours = \"0\" + msg.hours;}\nif(msg.mins < 10 ){msg.mins = \"0\" + msg.mins;}\nif(msg.sec < 10 ){msg.sec = \"0\" + msg.sec;}\n\nmsg.payload = msg.day + \"/\" + msg.month + \"/\" + msg.year +\" - \"+ msg.hours + \":\" + msg.mins +\":\" +msg.sec;\n\n\n\n\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 500, "y": 1820, "wires": [ [ "9df551b5.cd6838" ] ] }, { "id": "9df551b5.cd6838", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1820, "wires": [] }, { "id": "a5bd3282.3f34a8", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].type", "func": "msg.payload = msg.payload.consumption[1].type;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 470, "y": 1620, "wires": [ [ "de8bb3aa.4f774" ] ] }, { "id": "de8bb3aa.4f774", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1620, "wires": [] }, { "id": "7954d0b7.c27ac8", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].activeCount", "func": "msg.payload = msg.payload.consumption[1].activeCount;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 500, "y": 1680, "wires": [ [ "6d40d4a7.6b125c" ] ] }, { "id": "6d40d4a7.6b125c", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1680, "wires": [] }, { "id": "59291444.874b5c", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].whLifetime", "func": "msg.payload = msg.payload.consumption[1].whLifetime;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 1940, "wires": [ [ "59193667.db3508" ] ] }, { "id": "59193667.db3508", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 1940, "wires": [] }, { "id": "207466ef.d918d2", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].vahLifetime", "func": "msg.payload = msg.payload.consumption[1].vahLifetime;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 500, "y": 2060, "wires": [ [ "d196c718.4f938" ] ] }, { "id": "d196c718.4f938", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2060, "wires": [] }, { "id": "16618b61.5576cd", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].varhLeadLifetime", "func": "msg.payload = msg.payload.consumption[1].varhLeadLifetime;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 510, "y": 2000, "wires": [ [ "baeb0c16.d0a768" ] ] }, { "id": "baeb0c16.d0a768", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2000, "wires": [] }, { "id": "74d6aba2.2277c4", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].rmsCurrent", "func": "msg.payload = msg.payload.consumption[1].rmsCurrent;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 500, "y": 2120, "wires": [ [ "b4dbc27b.b821b" ] ] }, { "id": "b4dbc27b.b821b", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2120, "wires": [] }, { "id": "d143018d.464cb8", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].reactPwr", "func": "msg.payload = msg.payload.consumption[1].reactPwr;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 2240, "wires": [ [ "e11f2791.939088" ] ] }, { "id": "e11f2791.939088", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2240, "wires": [] }, { "id": "47ea69bb.7806a", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].rmsVoltage", "func": "msg.payload = msg.payload.consumption[1].rmsVoltage;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 500, "y": 2180, "wires": [ [ "2e68c954.87f5ee" ] ] }, { "id": "2e68c954.87f5ee", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2180, "wires": [] }, { "id": "c9290ef6.a26ee8", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].apprntPwr", "func": "msg.payload = msg.payload.consumption[1].apprntPwr;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 2300, "wires": [ [ "66394621.a5b6b" ] ] }, { "id": "66394621.a5b6b", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2300, "wires": [] }, { "id": "2167093e.8b06d6", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].pwrFactor", "func": "msg.payload = msg.payload.consumption[1].pwrFactor;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 2360, "wires": [ [ "ab063e66.d294c" ] ] }, { "id": "ab063e66.d294c", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2360, "wires": [] }, { "id": "e7d26325.739378", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].whLastSevenDays", "func": "msg.payload = msg.payload.consumption[1].whLastSevenDays;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 520, "y": 2480, "wires": [ [ "f9e292e8.0d3c48" ] ] }, { "id": "f9e292e8.0d3c48", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2480, "wires": [] }, { "id": "65d0263a.11f238", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].whToday", "func": "msg.payload = msg.payload.consumption[1].whToday;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 2420, "wires": [ [ "e85db170.5b03b" ] ] }, { "id": "e85db170.5b03b", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2420, "wires": [] }, { "id": "a54f1113.52a278", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].vahToday", "func": "msg.payload = msg.payload.consumption[1].vahToday;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 490, "y": 2540, "wires": [ [ "3af9c4b.0d7d63c" ] ] }, { "id": "3af9c4b.0d7d63c", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2540, "wires": [] }, { "id": "da169d52.8db9b8", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].varhLagToday", "func": "msg.payload = msg.payload.consumption[1].varhLagToday;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 510, "y": 2660, "wires": [ [ "10ea4a.b8a1c5b6" ] ] }, { "id": "10ea4a.b8a1c5b6", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2660, "wires": [] }, { "id": "7f431b53.47975c", "type": "function", "z": "88300a67.53f0d8", "name": "consumption[1].varhLeadToday", "func": "msg.payload = msg.payload.consumption[1].varhLeadToday;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 510, "y": 2600, "wires": [ [ "5dfd7eb3.a58698" ] ] }, { "id": "5dfd7eb3.a58698", "type": "debug", "z": "88300a67.53f0d8", "name": "", "active": true, "tosidebar": false, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "x": 810, "y": 2600, "wires": [] } ]