| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612 | [    {        "id": "49762a14.53df54",        "type": "tab",        "label": "S0Meters",        "disabled": false,        "info": ""    },    {        "id": "231ba654.08ce1a",        "type": "ui_text_input",        "z": "49762a14.53df54",        "name": "",        "label": "set new reading",        "group": "5cdd7758.149278",        "order": 2,        "width": 0,        "height": 0,        "passthru": false,        "mode": "text",        "delay": "300",        "topic": "",        "x": 540,        "y": 140,        "wires": [            [                "4a109952.f06e48"            ]        ]    },    {        "id": "1ca1176d.d5c471",        "type": "ui_text",        "z": "49762a14.53df54",        "group": "5cdd7758.149278",        "order": 1,        "width": 0,        "height": 0,        "name": "",        "label": "current reading",        "format": "{{msg.payload}}",        "layout": "row-spread",        "x": 540,        "y": 100,        "wires": []    },    {        "id": "74e1dc04.2d60a4",        "type": "mqtt in",        "z": "49762a14.53df54",        "name": "",        "topic": "T5/Zaehler/Strom/reading",        "qos": "2",        "datatype": "auto",        "broker": "594053fb.ec274c",        "x": 300,        "y": 100,        "wires": [            [                "1ca1176d.d5c471"            ]        ]    },    {        "id": "4a109952.f06e48",        "type": "function",        "z": "49762a14.53df54",        "name": "",        "func": "flow.set(\"stromz_newReading\", msg.payload, \"memoryOnly\");\nreturn msg;",        "outputs": 1,        "noerr": 0,        "initialize": "",        "finalize": "",        "x": 760,        "y": 140,        "wires": [            [                "6aa2d3.79145d2c"            ]        ]    },    {        "id": "6aa2d3.79145d2c",        "type": "debug",        "z": "49762a14.53df54",        "name": "",        "active": false,        "tosidebar": true,        "console": false,        "tostatus": false,        "complete": "false",        "statusVal": "",        "statusType": "auto",        "x": 970,        "y": 140,        "wires": []    },    {        "id": "7e3160e.661e0a",        "type": "ui_button",        "z": "49762a14.53df54",        "name": "",        "group": "5cdd7758.149278",        "order": 3,        "width": 0,        "height": 0,        "passthru": false,        "label": "WRITE TO HARDWARE",        "tooltip": "",        "color": "",        "bgcolor": "",        "icon": "",        "payload": "",        "payloadType": "str",        "topic": "",        "x": 570,        "y": 180,        "wires": [            [                "98434a49.bbb93",                "7eff858e.4161b4"            ]        ]    },    {        "id": "98434a49.bbb93",        "type": "function",        "z": "49762a14.53df54",        "name": "",        "func": "newReading = flow.get(\"stromz_newReading\", \"memoryOnly\")||undefined;\nif (newReading !== undefined && !isNaN(newReading)) {\n    newReading = parseFloat(newReading).toFixed(3);\n    msg.payload = \"set reading c1 \" + newReading;\n    return msg;\n}",        "outputs": 1,        "noerr": 0,        "initialize": "",        "finalize": "",        "x": 760,        "y": 180,        "wires": [            [                "88f97e0e.83b77",                "6a2c0078.8cc4e8"            ]        ]    },    {        "id": "88f97e0e.83b77",        "type": "debug",        "z": "49762a14.53df54",        "name": "",        "active": false,        "tosidebar": true,        "console": false,        "tostatus": false,        "complete": "false",        "statusVal": "",        "statusType": "auto",        "x": 970,        "y": 180,        "wires": []    },    {        "id": "1d4a3586.9f37f2",        "type": "ui_text_input",        "z": "49762a14.53df54",        "name": "",        "label": "set new reading",        "tooltip": "",        "group": "2edae4eb.ff06bc",        "order": 2,        "width": 0,        "height": 0,        "passthru": false,        "mode": "text",        "delay": "300",        "topic": "",        "x": 540,        "y": 320,        "wires": [            [                "b8760526.dcc028"            ]        ]    },    {        "id": "a298d89b.0734b",        "type": "ui_text",        "z": "49762a14.53df54",        "group": "2edae4eb.ff06bc",        "order": 1,        "width": 0,        "height": 0,        "name": "",        "label": "current reading",        "format": "{{msg.payload}}",        "layout": "row-spread",        "x": 540,        "y": 280,        "wires": []    },    {        "id": "49d5ee8f.e41a48",        "type": "mqtt in",        "z": "49762a14.53df54",        "name": "",        "topic": "T5/Zaehler/Gas/reading",        "qos": "2",        "datatype": "auto",        "broker": "594053fb.ec274c",        "x": 290,        "y": 280,        "wires": [            [                "a298d89b.0734b"            ]        ]    },    {        "id": "b8760526.dcc028",        "type": "function",        "z": "49762a14.53df54",        "name": "",        "func": "flow.set(\"gasz_newReading\", msg.payload, \"memoryOnly\");\nreturn msg;",        "outputs": 1,        "noerr": 0,        "initialize": "",        "finalize": "",        "x": 760,        "y": 320,        "wires": [            [                "9733c14a.9ce9e8"            ]        ]    },    {        "id": "9733c14a.9ce9e8",        "type": "debug",        "z": "49762a14.53df54",        "name": "",        "active": false,        "tosidebar": true,        "console": false,        "tostatus": false,        "complete": "false",        "statusVal": "",        "statusType": "auto",        "x": 970,        "y": 320,        "wires": []    },    {        "id": "8e6da1ad.d04a3",        "type": "ui_button",        "z": "49762a14.53df54",        "name": "",        "group": "2edae4eb.ff06bc",        "order": 3,        "width": 0,        "height": 0,        "passthru": false,        "label": "WRITE TO HARDWARE",        "tooltip": "",        "color": "",        "bgcolor": "",        "icon": "",        "payload": "",        "payloadType": "str",        "topic": "",        "x": 570,        "y": 360,        "wires": [            [                "4da8d6f3.5d40c",                "a8906b04.8cd618"            ]        ]    },    {        "id": "4da8d6f3.5d40c",        "type": "function",        "z": "49762a14.53df54",        "name": "",        "func": "newReading = flow.get(\"gasz_newReading\", \"memoryOnly\")||undefined;\nif (newReading !== undefined && !isNaN(newReading)) {\n    newReading = parseFloat(newReading).toFixed(2);\n    msg.payload = \"set reading c2 \" + newReading;\n    return msg;\n}",        "outputs": 1,        "noerr": 0,        "initialize": "",        "finalize": "",        "x": 760,        "y": 360,        "wires": [            [                "88add0c1.5051a",                "6a2c0078.8cc4e8"            ]        ]    },    {        "id": "88add0c1.5051a",        "type": "debug",        "z": "49762a14.53df54",        "name": "",        "active": false,        "tosidebar": true,        "console": false,        "tostatus": false,        "complete": "false",        "statusVal": "",        "statusType": "auto",        "x": 970,        "y": 360,        "wires": []    },    {        "id": "87a202e7.90692",        "type": "ui_button",        "z": "49762a14.53df54",        "name": "",        "group": "934e6f58.6bd9e8",        "order": 3,        "width": 0,        "height": 0,        "passthru": false,        "label": "get readings",        "tooltip": "",        "color": "",        "bgcolor": "",        "icon": "",        "payload": "",        "payloadType": "str",        "topic": "",        "x": 530,        "y": 460,        "wires": [            [                "ef18d5b.2d45ea8"            ]        ]    },    {        "id": "ef18d5b.2d45ea8",        "type": "function",        "z": "49762a14.53df54",        "name": "",        "func": "msg.payload = \"get readings\";\nreturn msg;\n",        "outputs": 1,        "noerr": 0,        "initialize": "",        "finalize": "",        "x": 760,        "y": 460,        "wires": [            [                "6a2c0078.8cc4e8"            ]        ]    },    {        "id": "6a2c0078.8cc4e8",        "type": "mqtt out",        "z": "49762a14.53df54",        "name": "",        "topic": "Top5/ImpCount/cmd",        "qos": "",        "retain": "",        "broker": "594053fb.ec274c",        "x": 1170,        "y": 440,        "wires": []    },    {        "id": "a8906b04.8cd618",        "type": "function",        "z": "49762a14.53df54",        "name": "clear",        "func": "msg.payload=\"\";\nreturn msg;",        "outputs": 1,        "noerr": 0,        "initialize": "",        "finalize": "",        "x": 610,        "y": 400,        "wires": [            [                "1d4a3586.9f37f2"            ]        ]    },    {        "id": "7eff858e.4161b4",        "type": "function",        "z": "49762a14.53df54",        "name": "clear",        "func": "msg.payload=\"\";\nreturn msg;",        "outputs": 1,        "noerr": 0,        "initialize": "",        "finalize": "",        "x": 610,        "y": 220,        "wires": [            [                "231ba654.08ce1a"            ]        ]    },    {        "id": "c3d72895.bfc2",        "type": "ui_button",        "z": "49762a14.53df54",        "name": "",        "group": "2edae4eb.ff06bc",        "order": 3,        "width": 0,        "height": 0,        "passthru": false,        "label": "CANCEL",        "tooltip": "",        "color": "",        "bgcolor": "",        "icon": "",        "payload": "",        "payloadType": "str",        "topic": "",        "x": 460,        "y": 400,        "wires": [            [                "a8906b04.8cd618"            ]        ]    },    {        "id": "a366ae9a.534ec8",        "type": "ui_button",        "z": "49762a14.53df54",        "name": "",        "group": "5cdd7758.149278",        "order": 3,        "width": 0,        "height": 0,        "passthru": false,        "label": "CANCEL",        "tooltip": "",        "color": "",        "bgcolor": "",        "icon": "",        "payload": "",        "payloadType": "str",        "topic": "",        "x": 460,        "y": 220,        "wires": [            [                "7eff858e.4161b4"            ]        ]    },    {        "id": "caee5194.1dd538",        "type": "ui_button",        "z": "49762a14.53df54",        "name": "",        "group": "934e6f58.6bd9e8",        "order": 3,        "width": 0,        "height": 0,        "passthru": false,        "label": "get counters config",        "tooltip": "",        "color": "",        "bgcolor": "",        "icon": "",        "payload": "",        "payloadType": "str",        "topic": "",        "x": 550,        "y": 520,        "wires": [            [                "d89d0bb6.ac3428"            ]        ]    },    {        "id": "d89d0bb6.ac3428",        "type": "function",        "z": "49762a14.53df54",        "name": "",        "func": "msg.payload = \"get conf\";\nreturn msg;\n",        "outputs": 1,        "noerr": 0,        "initialize": "",        "finalize": "",        "x": 760,        "y": 520,        "wires": [            [                "6a2c0078.8cc4e8"            ]        ]    },    {        "id": "c8dafb7.0a5c988",        "type": "mqtt in",        "z": "49762a14.53df54",        "name": "",        "topic": "Top5/ImpCount/stat",        "qos": "2",        "datatype": "auto",        "broker": "594053fb.ec274c",        "x": 290,        "y": 600,        "wires": [            [                "badc2da1.db2fc8"            ]        ]    },    {        "id": "badc2da1.db2fc8",        "type": "function",        "z": "49762a14.53df54",        "name": "",        "func": "var tmpstr;\nvar hasData = false;\n\nvar paramsarray;\nvar params;\nvar nameValue;\n\nvar data = {};\n\nif(msg.payload.startsWith('CONF GLOB: ')) {\n    //CONF GLOB: debuglevel=0, debounce=10, debRecov=70, pwrGood=500\n    tmpstr = msg.payload.replace('CONF GLOB: ', '');\n    data.glob = params;\n    hasData = true;\n}\nelse if(msg.payload.startsWith('CONF C1: ')) {\n    //CONF C1: impPerUnit=1000, noImpTout=60, saveInt=30\n    tmpstr = msg.payload.replace('CONF C1: ', '');\n    data.c1 = params;\n    hasData = true;\n}\nelse if(msg.payload.startsWith('CONF C2: ')) {\n    //CONF C2: impPerUnit=100, noImpTout=900, saveInt=60\n    tmpstr = msg.payload.replace('CONF C2: ', '');\n    data.c2 = params;\n    hasData = true;\n}\n\nif (hasData) {\n    tmpstr = tmpstr.replace(/ /g, '');\n    paramsarray = tmpstr.split(',');\n    params = {};\n    for(i=0; i < paramsarray.length; i++) {\n        nameValue = paramsarray[i].split('=');\n        params[nameValue[0]] = nameValue[1];\n    }\n    msg.payload = params;\n    return msg;\n}",        "outputs": 1,        "noerr": 0,        "initialize": "",        "finalize": "",        "x": 520,        "y": 600,        "wires": [            [                "50095636.7885c8"            ]        ]    },    {        "id": "50095636.7885c8",        "type": "debug",        "z": "49762a14.53df54",        "name": "",        "active": true,        "tosidebar": true,        "console": false,        "tostatus": false,        "complete": "false",        "statusVal": "",        "statusType": "auto",        "x": 780,        "y": 620,        "wires": []    },    {        "id": "5cdd7758.149278",        "type": "ui_group",        "name": "Stromzähler",        "tab": "635047a7.d277a8",        "order": 2,        "disp": true,        "width": "6",        "collapse": false    },    {        "id": "594053fb.ec274c",        "type": "mqtt-broker",        "name": "",        "broker": "127.0.0.1",        "port": "1883",        "clientid": "",        "usetls": false,        "compatmode": true,        "keepalive": "15",        "cleansession": true,        "birthTopic": "NodeRED/LWT",        "birthQos": "1",        "birthRetain": "true",        "birthPayload": "Online",        "closeTopic": "NodeRED/LWT",        "closeQos": "1",        "closeRetain": "true",        "closePayload": "Offline",        "willTopic": "NodeRED/LWT",        "willQos": "0",        "willRetain": "true",        "willPayload": "Offline"    },    {        "id": "2edae4eb.ff06bc",        "type": "ui_group",        "name": "Gaszähler",        "tab": "635047a7.d277a8",        "order": 3,        "disp": true,        "width": "6",        "collapse": false    },    {        "id": "934e6f58.6bd9e8",        "type": "ui_group",        "name": "Default",        "tab": "635047a7.d277a8",        "order": 1,        "disp": true,        "width": "6",        "collapse": false    },    {        "id": "635047a7.d277a8",        "type": "ui_tab",        "name": "StromGasZähler",        "icon": "dashboard"    }]
 |