[
    {
        "id": "cefef0615c9d4ce2",
        "type": "tab",
        "label": "DEYE EVU",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "18b3b20ab0c6cdcd",
        "type": "tab",
        "label": "DEYE PV",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "dc9459bb70f93a1c",
        "type": "tab",
        "label": "DEYE BAT",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "8f25ec8b9a4e1af7",
        "type": "tab",
        "label": "not used",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "63639d0a229d08d9",
        "type": "mqtt-broker",
        "name": "",
        "broker": "10.2.10.40",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthRetain": "true",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    },
    {
        "id": "1fb26e1033f74235",
        "type": "mqtt-broker",
        "name": "",
        "broker": "10.2.10.49",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    },
    {
        "id": "1cbab8706d67e685",
        "type": "mqtt-broker",
        "name": "DEYE",
        "broker": "10.2.10.71",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "120",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthRetain": "true",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    },
    {
        "id": "d86b4235a09027db",
        "type": "mqtt in",
        "z": "cefef0615c9d4ce2",
        "name": "GridPower",
        "topic": "Deye10k/inverter_1/grid_power/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 140,
        "y": 240,
        "wires": [
            [
                "b630380311f9cf69"
            ]
        ]
    },
    {
        "id": "7bf50f3c0c7f3a1b",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/evu/W",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 880,
        "y": 220,
        "wires": []
    },
    {
        "id": "917643472a13ee3e",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/WhImported",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 920,
        "y": 360,
        "wires": []
    },
    {
        "id": "616d83bdf28d31d7",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/WhExported",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 810,
        "y": 500,
        "wires": []
    },
    {
        "id": "f47b46c334b71728",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "parse Grid Import Export Wh",
        "func": "var msg0 = { payload: Number }\nvar msg1 = { payload: Number }\n\n\nmsg.payload = parseInt((msg.payload));\nif(msg.payload < 0)\n{\n    msg0.payload = parseFloat((msg.payload*-1)/3600).toFixed(5);\n    flow.set(\"WhExport\",Number(msg0.payload));\n    flow.set(\"WhImport\", Number(0));\n}\nelse\n{\n    msg1.payload = parseFloat(msg.payload / 3600).toFixed(5);\n    flow.set(\"WhImport\",Number(msg1.payload));\n    flow.set(\"WhExport\", Number(0));\n    }\n\nreturn [msg,msg0,msg1];\n",
        "outputs": 3,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 590,
        "y": 240,
        "wires": [
            [
                "7bf50f3c0c7f3a1b"
            ],
            [],
            []
        ]
    },
    {
        "id": "718f8d5ec3ff47b2",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/Hz",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 690,
        "y": 780,
        "wires": []
    },
    {
        "id": "706705cbfe6700e8",
        "type": "mqtt in",
        "z": "cefef0615c9d4ce2",
        "name": "Frequenzy Grid",
        "topic": "Deye10k/inverter_1/grid_frequency/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 180,
        "y": 780,
        "wires": [
            [
                "f5100e86424dc023"
            ]
        ]
    },
    {
        "id": "9a94a91288c99cea",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/VPhase3",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 960,
        "wires": []
    },
    {
        "id": "70ed00e9e6aacbda",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/VPhase2",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 900,
        "wires": []
    },
    {
        "id": "1ec973b473ab7335",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/VPhase1",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 840,
        "wires": []
    },
    {
        "id": "4678f9d22ebf77a9",
        "type": "mqtt in",
        "z": "cefef0615c9d4ce2",
        "name": "Voltage Grid 1",
        "topic": "Deye10k/inverter_1/grid_voltage_1/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 170,
        "y": 840,
        "wires": [
            [
                "8da72e08f65b5692"
            ]
        ]
    },
    {
        "id": "d73c207a91edb4f2",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/PfPhase1",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 1200,
        "wires": []
    },
    {
        "id": "7e0a051e2fb38330",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/APhase2",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 1100,
        "wires": []
    },
    {
        "id": "f4afa3f6f9dc8f21",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/APhase1",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 1060,
        "wires": []
    },
    {
        "id": "fa789ece3712d6b6",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/APhase3",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 1140,
        "wires": []
    },
    {
        "id": "68cf6ed2cd2ee541",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/WPhase1",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 1380,
        "wires": []
    },
    {
        "id": "24f8d553f0f7fa2f",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/WPhase2",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 1440,
        "wires": []
    },
    {
        "id": "4a166ed4f70d0417",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/WPhase3",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 1500,
        "wires": []
    },
    {
        "id": "44d5c812fabb4296",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/PfPhase2",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 1240,
        "wires": []
    },
    {
        "id": "08cc0493a4626342",
        "type": "mqtt out",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "openWB/set/evu/PfPhase3",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 740,
        "y": 1280,
        "wires": []
    },
    {
        "id": "4eee7bd01883f6b7",
        "type": "mqtt in",
        "z": "cefef0615c9d4ce2",
        "name": "Voltage Grid 2",
        "topic": "Deye10k/inverter_1/grid_voltage_2/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 170,
        "y": 900,
        "wires": [
            [
                "bd81eeb9d365366f"
            ]
        ]
    },
    {
        "id": "09fba7d0dcaf3458",
        "type": "mqtt in",
        "z": "cefef0615c9d4ce2",
        "name": "Voltage Grid 3",
        "topic": "Deye10k/inverter_1/grid_voltage_3/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 170,
        "y": 960,
        "wires": [
            [
                "08f1ec08c6d59ddf"
            ]
        ]
    },
    {
        "id": "8da72e08f65b5692",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "parse Float",
        "func": "msg.payload = parseFloat((msg.payload).toFixed(5));\n\nflow.set(\"Voltage_1\", msg.payload);\nvar Voltage_1 = flow.get(\"Voltage_1\");\nmsg.payload = Voltage_1;\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 840,
        "wires": [
            []
        ]
    },
    {
        "id": "bd81eeb9d365366f",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "parse Float",
        "func": "msg.payload = parseFloat((msg.payload).toFixed(5));\n\nflow.set(\"Voltage_2\", msg.payload);\nvar Voltage_2 = flow.get(\"Voltage_2\");\nmsg.payload = Voltage_2;\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 900,
        "wires": [
            []
        ]
    },
    {
        "id": "08f1ec08c6d59ddf",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "parse Float",
        "func": "msg.payload = parseFloat((msg.payload).toFixed(5));\n\nflow.set(\"Voltage_3\", msg.payload);\nvar Voltage_3 = flow.get(\"Voltage_3\");\nmsg.payload = Voltage_3;\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 960,
        "wires": [
            []
        ]
    },
    {
        "id": "e67008dcd53c6207",
        "type": "mqtt in",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "Deye10k/inverter_1/grid_power_1/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 230,
        "y": 1380,
        "wires": [
            [
                "8905af7be6b8aca8"
            ]
        ]
    },
    {
        "id": "8905af7be6b8aca8",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "parse Float",
        "func": "msg.payload = parseFloat((msg.payload).toFixed(5));\n\nflow.set(\"Power_1\", msg.payload);\nvar Power_1 = flow.get(\"Power_1\");\nmsg.payload = Power_1;\n\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 490,
        "y": 1380,
        "wires": [
            []
        ]
    },
    {
        "id": "be175dcba5a51020",
        "type": "mqtt in",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "Deye10k/inverter_1/grid_power_2/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 230,
        "y": 1440,
        "wires": [
            [
                "8d67111593a78b22"
            ]
        ]
    },
    {
        "id": "261185fe430e8087",
        "type": "mqtt in",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "Deye10k/inverter_1/grid_power_3/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 230,
        "y": 1500,
        "wires": [
            [
                "b4bb9ca0ac5ed7c8"
            ]
        ]
    },
    {
        "id": "8d67111593a78b22",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "parse Float",
        "func": "msg.payload = parseFloat((msg.payload).toFixed(5));\n\nflow.set(\"Power_2\", msg.payload);\nvar Power_2 = flow.get(\"Power_2\");\nmsg.payload = Power_2;\n\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 490,
        "y": 1440,
        "wires": [
            []
        ]
    },
    {
        "id": "b4bb9ca0ac5ed7c8",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "parse Float",
        "func": "msg.payload = parseFloat((msg.payload).toFixed(5));\n\nflow.set(\"Power_3\", msg.payload);\nvar Power_3 = flow.get(\"Power_3\");\nmsg.payload = Power_3;\n\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 490,
        "y": 1500,
        "wires": [
            []
        ]
    },
    {
        "id": "1d8e8b40f6d2d996",
        "type": "inject",
        "z": "cefef0615c9d4ce2",
        "name": "Dummy",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 180,
        "y": 1040,
        "wires": [
            [
                "14bff71bab9382e0"
            ]
        ]
    },
    {
        "id": "f5100e86424dc023",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "parse Float",
        "func": "msg.payload = parseFloat((msg.payload).toFixed(5));\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 780,
        "wires": [
            []
        ]
    },
    {
        "id": "14bff71bab9382e0",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "parse Float",
        "func": "var V1 = flow.get(\"Voltage_3\");\nvar V2 = flow.get(\"Voltage_3\");\nvar V3 = flow.get(\"Voltage_3\");\n\nvar P1 = flow.get(\"Power_1\");\nvar P2 = flow.get(\"Power_2\");\nvar P3 = flow.get(\"Power_3\");\n\nvar msg0 = { payload: Number }\n\nmsg0.payload = parseFloat((P1 / V1).toFixed(3));\nvar msg1 = { payload: Number }\nmsg1.payload = parseFloat((P2 / V2).toFixed(3));\nvar msg2 = { payload: Number }\nmsg2.payload = parseFloat((P3 / V3).toFixed(3));\n\nreturn [msg0,msg1,msg2];",
        "outputs": 3,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 1040,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "b65737039687ffbb",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "Sum Import",
        "func": "var msg0 = { payload: Number }\nvar msg1 = { payload: Number }\n\nvar WhImportAll = Number(msg.payload);\n\nvar WhImport = flow.get(\"WhImport\");\nmsg.payload = parseFloat(WhImportAll + WhImport).toFixed(6);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 550,
        "y": 360,
        "wires": [
            [
                "84750cb3c130636f",
                "917643472a13ee3e"
            ]
        ]
    },
    {
        "id": "b5ee5cc1c74a5699",
        "type": "inject",
        "z": "cefef0615c9d4ce2",
        "name": "Timer",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 130,
        "y": 360,
        "wires": [
            [
                "a840983ea92320fd"
            ]
        ]
    },
    {
        "id": "a840983ea92320fd",
        "type": "file in",
        "z": "cefef0615c9d4ce2",
        "name": "Importt Wh sum",
        "filename": "/home/pi/log/import.txt",
        "filenameType": "str",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 350,
        "y": 360,
        "wires": [
            [
                "b65737039687ffbb"
            ]
        ]
    },
    {
        "id": "dc90db95fd97b654",
        "type": "file",
        "z": "cefef0615c9d4ce2",
        "name": "Import Wh sum",
        "filename": "/home/pi/log/import.txt",
        "filenameType": "str",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 560,
        "y": 440,
        "wires": [
            []
        ]
    },
    {
        "id": "08b42973482be046",
        "type": "file in",
        "z": "cefef0615c9d4ce2",
        "name": "Export Wh sum",
        "filename": "/home/pi/log/export.txt",
        "filenameType": "str",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 340,
        "y": 500,
        "wires": [
            [
                "8bb8e7eee3f772b5"
            ]
        ]
    },
    {
        "id": "8bb8e7eee3f772b5",
        "type": "function",
        "z": "cefef0615c9d4ce2",
        "name": "Sum Export",
        "func": "var msg0 = { payload: Number }\nvar msg1 = { payload: Number }\n\nvar WhExportAll = Number(msg.payload);\n\nvar WhExport = flow.get(\"WhExport\");\n\nmsg.payload = parseFloat(WhExportAll + WhExport).toFixed(6);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 550,
        "y": 500,
        "wires": [
            [
                "616d83bdf28d31d7",
                "fb1757d09687f3aa"
            ]
        ]
    },
    {
        "id": "d42d758dec9b5f9e",
        "type": "file",
        "z": "cefef0615c9d4ce2",
        "name": "Export Wh sum",
        "filename": "/home/pi/log/export.txt",
        "filenameType": "str",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 560,
        "y": 580,
        "wires": [
            []
        ]
    },
    {
        "id": "84750cb3c130636f",
        "type": "switch",
        "z": "cefef0615c9d4ce2",
        "name": "NaN",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "neq",
                "v": "NaN",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 370,
        "y": 440,
        "wires": [
            [
                "dc90db95fd97b654"
            ]
        ]
    },
    {
        "id": "fb1757d09687f3aa",
        "type": "switch",
        "z": "cefef0615c9d4ce2",
        "name": "NaN",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "neq",
                "v": "NaN",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 390,
        "y": 580,
        "wires": [
            [
                "d42d758dec9b5f9e"
            ]
        ]
    },
    {
        "id": "4a28cebfbde7565c",
        "type": "inject",
        "z": "cefef0615c9d4ce2",
        "name": "Timer",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 120,
        "y": 500,
        "wires": [
            [
                "08b42973482be046"
            ]
        ]
    },
    {
        "id": "b630380311f9cf69",
        "type": "aggregator",
        "z": "cefef0615c9d4ce2",
        "name": "",
        "topic": "",
        "intervalCount": "5",
        "intervalUnits": "s",
        "submitIncompleteInterval": true,
        "submitPerTopic": false,
        "aggregationType": "mean",
        "x": 330,
        "y": 240,
        "wires": [
            [
                "f47b46c334b71728"
            ]
        ]
    },
    {
        "id": "232e513d9606cd4f",
        "type": "debug",
        "z": "cefef0615c9d4ce2",
        "name": "debug 5",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 380,
        "y": 140,
        "wires": []
    },
    {
        "id": "1c4bdae3c847f7bc",
        "type": "debug",
        "z": "cefef0615c9d4ce2",
        "name": "debug 6",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 880,
        "y": 140,
        "wires": []
    },
    {
        "id": "0737817df89ef31f",
        "type": "debug",
        "z": "cefef0615c9d4ce2",
        "name": "debug 7",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 920,
        "y": 300,
        "wires": []
    },
    {
        "id": "5c0cc333fce997b4",
        "type": "debug",
        "z": "cefef0615c9d4ce2",
        "name": "debug 8",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 980,
        "y": 440,
        "wires": []
    },
    {
        "id": "b58fdd1e112aec1b",
        "type": "mqtt out",
        "z": "18b3b20ab0c6cdcd",
        "name": "",
        "topic": "openWB/set/pv/1/W",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 940,
        "y": 80,
        "wires": []
    },
    {
        "id": "8c1f2e03ae31f8db",
        "type": "mqtt out",
        "z": "18b3b20ab0c6cdcd",
        "name": "",
        "topic": "openWB/set/pv/1/WhCounter",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 890,
        "y": 200,
        "wires": []
    },
    {
        "id": "6119d474ca8c6e19",
        "type": "mqtt in",
        "z": "18b3b20ab0c6cdcd",
        "name": "PVPower",
        "topic": "Deye10k/inverter_1/pv_power/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 120,
        "y": 80,
        "wires": [
            [
                "3a0822e68ce0f351"
            ]
        ]
    },
    {
        "id": "78af1ab07afd3c9d",
        "type": "function",
        "z": "18b3b20ab0c6cdcd",
        "name": "parse INT",
        "func": "msg.payload = parseInt((msg.payload));\nvar msg0 = { payload: Number }\n\n\nmsg.payload = parseInt((msg.payload));\nmsg0.payload = parseFloat(msg.payload / 3600).toFixed(5);\nflow.set(\"WhImportPV\", Number(msg0.payload));\n\nreturn [msg, msg0];",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 520,
        "y": 80,
        "wires": [
            [
                "b58fdd1e112aec1b"
            ],
            []
        ]
    },
    {
        "id": "5db56231874d6b99",
        "type": "function",
        "z": "18b3b20ab0c6cdcd",
        "name": "Sum Import",
        "func": "var msg0 = { payload: Number }\nvar msg1 = { payload: Number }\n\nvar WhImportPVAll = Number(msg.payload);\n\nvar WhImportPV = flow.get(\"WhImportPV\");\n\nmsg.payload = parseFloat(WhImportPVAll + WhImportPV).toFixed(6);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 550,
        "y": 200,
        "wires": [
            [
                "8c1f2e03ae31f8db",
                "3efed8af8b142659"
            ]
        ]
    },
    {
        "id": "c82827a81d361038",
        "type": "file in",
        "z": "18b3b20ab0c6cdcd",
        "name": "Importt Wh sum",
        "filename": "/home/pi/log/importPV.txt",
        "filenameType": "str",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 350,
        "y": 200,
        "wires": [
            [
                "5db56231874d6b99"
            ]
        ]
    },
    {
        "id": "7817eba5843e6a07",
        "type": "file",
        "z": "18b3b20ab0c6cdcd",
        "name": "Import Wh sum",
        "filename": "/home/pi/log/importPV.txt",
        "filenameType": "str",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 560,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "3efed8af8b142659",
        "type": "switch",
        "z": "18b3b20ab0c6cdcd",
        "name": "NaN",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "neq",
                "v": "NaN",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 390,
        "y": 280,
        "wires": [
            [
                "7817eba5843e6a07"
            ]
        ]
    },
    {
        "id": "f1ebf4dda4106526",
        "type": "inject",
        "z": "18b3b20ab0c6cdcd",
        "name": "Timer",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 120,
        "y": 200,
        "wires": [
            [
                "c82827a81d361038"
            ]
        ]
    },
    {
        "id": "3a0822e68ce0f351",
        "type": "aggregator",
        "z": "18b3b20ab0c6cdcd",
        "name": "",
        "topic": "",
        "intervalCount": "5",
        "intervalUnits": "s",
        "submitIncompleteInterval": true,
        "submitPerTopic": false,
        "aggregationType": "mean",
        "x": 330,
        "y": 80,
        "wires": [
            [
                "78af1ab07afd3c9d"
            ]
        ]
    },
    {
        "id": "2697fc65ed7cb850",
        "type": "mqtt in",
        "z": "dc9459bb70f93a1c",
        "name": "BatteryPower",
        "topic": "Deye10k/total/battery_power/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 170,
        "y": 80,
        "wires": [
            [
                "8af6a7093786a5aa"
            ]
        ]
    },
    {
        "id": "dd61fc40121149e4",
        "type": "mqtt out",
        "z": "dc9459bb70f93a1c",
        "name": "",
        "topic": "openWB/set/houseBattery/WhExported",
        "qos": "0",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1060,
        "y": 380,
        "wires": []
    },
    {
        "id": "75bfb28d1319e660",
        "type": "mqtt out",
        "z": "dc9459bb70f93a1c",
        "name": "",
        "topic": "openWB/set/houseBattery/%Soc",
        "qos": "0",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 900,
        "y": 840,
        "wires": []
    },
    {
        "id": "20449e61dc2d2dfd",
        "type": "mqtt out",
        "z": "dc9459bb70f93a1c",
        "name": "",
        "topic": "openWB/set/houseBattery/W",
        "qos": "0",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1050,
        "y": 60,
        "wires": []
    },
    {
        "id": "e27d70134eb381c7",
        "type": "mqtt in",
        "z": "dc9459bb70f93a1c",
        "name": "BatterySOC%",
        "topic": "Deye10k/total/battery_state_of_charge/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 270,
        "y": 840,
        "wires": [
            [
                "594169bf08e6aecb"
            ]
        ]
    },
    {
        "id": "438723655c5ad605",
        "type": "function",
        "z": "dc9459bb70f93a1c",
        "name": "BAT",
        "func": "//msg.payload = parseInt(((msg.payload-20)*1.25).toFixed(2));\nmsg.payload = parseInt((msg.payload));\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 630,
        "y": 840,
        "wires": [
            [
                "75bfb28d1319e660"
            ]
        ]
    },
    {
        "id": "39ac113d04b636e2",
        "type": "function",
        "z": "dc9459bb70f93a1c",
        "name": "parse INT",
        "func": "var msg0 = { payload: Number }\nvar msg1 = { payload: Number }\n\n\nmsg.payload = parseInt((msg.payload));\nif (msg.payload < 0) {\n    msg0.payload = parseFloat((msg.payload * -1) / 3600).toFixed(5);\n    flow.set(\"WhExportBat\", Number(msg0.payload));\n    flow.set(\"WhImportBat\", Number(0));\n}\nelse {\n    msg1.payload = parseFloat(msg.payload / 3600).toFixed(5);\n    flow.set(\"WhImportBat\", Number(msg1.payload));\n    flow.set(\"WhExportBat\", Number(0));\n}\n\nreturn [msg, msg0, msg1];\n",
        "outputs": 3,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 560,
        "y": 80,
        "wires": [
            [
                "20449e61dc2d2dfd"
            ],
            [],
            []
        ]
    },
    {
        "id": "1f9b0d47f5be2d4e",
        "type": "mqtt out",
        "z": "dc9459bb70f93a1c",
        "name": "",
        "topic": "openWB/set/houseBattery/WhImported",
        "qos": "0",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1080,
        "y": 180,
        "wires": []
    },
    {
        "id": "66df96fda21f1379",
        "type": "function",
        "z": "dc9459bb70f93a1c",
        "name": "Sum Import",
        "func": "var msg0 = { payload: Number }\nvar msg1 = { payload: Number }\n\nvar WhImportBatAll = Number(msg.payload);\n\nvar WhImportBat = flow.get(\"WhImportBat\");\n\nmsg.payload = parseFloat(WhImportBatAll + WhImportBat).toFixed(6);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 670,
        "y": 180,
        "wires": [
            [
                "1f9b0d47f5be2d4e",
                "d78fe2e43fb5da9d"
            ]
        ]
    },
    {
        "id": "21b7d53e8061c80e",
        "type": "file in",
        "z": "dc9459bb70f93a1c",
        "name": "Import Wh sum",
        "filename": "/home/pi/log/importBat.txt",
        "filenameType": "str",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 460,
        "y": 180,
        "wires": [
            [
                "66df96fda21f1379"
            ]
        ]
    },
    {
        "id": "d6a462b681359895",
        "type": "file",
        "z": "dc9459bb70f93a1c",
        "name": "Import Wh sum",
        "filename": "/home/pi/log/importBat.txt",
        "filenameType": "str",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 680,
        "y": 260,
        "wires": [
            []
        ]
    },
    {
        "id": "fb9c8a6b2ab0517f",
        "type": "file in",
        "z": "dc9459bb70f93a1c",
        "name": "Export Wh sum",
        "filename": "/home/pi/log/exportBat.txt",
        "filenameType": "str",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 460,
        "y": 380,
        "wires": [
            [
                "625cc5cf49a042ca"
            ]
        ]
    },
    {
        "id": "625cc5cf49a042ca",
        "type": "function",
        "z": "dc9459bb70f93a1c",
        "name": "Sum Export",
        "func": "var msg0 = { payload: Number }\nvar msg1 = { payload: Number }\n\nvar WhExportBatAll = Number(msg.payload);\n\nvar WhExportBat = flow.get(\"WhExportBat\");\n\nmsg.payload = parseFloat(WhExportBatAll + WhExportBat).toFixed(6);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 670,
        "y": 380,
        "wires": [
            [
                "dd61fc40121149e4",
                "b00f8678c47573d7"
            ]
        ]
    },
    {
        "id": "f97a403bf11c0a1e",
        "type": "file",
        "z": "dc9459bb70f93a1c",
        "name": "Export Wh sum",
        "filename": "/home/pi/log/exportBat.txt",
        "filenameType": "str",
        "appendNewline": true,
        "createDir": false,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 680,
        "y": 460,
        "wires": [
            []
        ]
    },
    {
        "id": "d78fe2e43fb5da9d",
        "type": "switch",
        "z": "dc9459bb70f93a1c",
        "name": "NaN",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "neq",
                "v": "NaN",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 490,
        "y": 260,
        "wires": [
            [
                "d6a462b681359895"
            ]
        ]
    },
    {
        "id": "b00f8678c47573d7",
        "type": "switch",
        "z": "dc9459bb70f93a1c",
        "name": "NaN",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "neq",
                "v": "NaN",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 510,
        "y": 460,
        "wires": [
            [
                "f97a403bf11c0a1e"
            ]
        ]
    },
    {
        "id": "398cf340f021d2e1",
        "type": "inject",
        "z": "dc9459bb70f93a1c",
        "name": "Timer",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 240,
        "y": 180,
        "wires": [
            [
                "21b7d53e8061c80e"
            ]
        ]
    },
    {
        "id": "78da4ad28bf71439",
        "type": "inject",
        "z": "dc9459bb70f93a1c",
        "name": "Timer",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 240,
        "y": 380,
        "wires": [
            [
                "fb9c8a6b2ab0517f"
            ]
        ]
    },
    {
        "id": "8af6a7093786a5aa",
        "type": "aggregator",
        "z": "dc9459bb70f93a1c",
        "name": "",
        "topic": "",
        "intervalCount": "5",
        "intervalUnits": "s",
        "submitIncompleteInterval": true,
        "submitPerTopic": false,
        "aggregationType": "mean",
        "x": 370,
        "y": 80,
        "wires": [
            [
                "39ac113d04b636e2"
            ]
        ]
    },
    {
        "id": "594169bf08e6aecb",
        "type": "aggregator",
        "z": "dc9459bb70f93a1c",
        "name": "",
        "topic": "",
        "intervalCount": "5",
        "intervalUnits": "s",
        "submitIncompleteInterval": true,
        "submitPerTopic": false,
        "aggregationType": "mean",
        "x": 470,
        "y": 840,
        "wires": [
            [
                "438723655c5ad605"
            ]
        ]
    },
    {
        "id": "a949d926bd739125",
        "type": "mqtt in",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "Deye10k/total/pv_energy/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 450,
        "y": 240,
        "wires": [
            [
                "201fbb4eed8d5b5f"
            ]
        ]
    },
    {
        "id": "297d7fc843b19f37",
        "type": "mqtt in",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "Deye10k/total/battery_energy_out/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 430,
        "y": 520,
        "wires": [
            [
                "799917bf6a31c9c5"
            ]
        ]
    },
    {
        "id": "201fbb4eed8d5b5f",
        "type": "function",
        "z": "8f25ec8b9a4e1af7",
        "name": "change to Wh",
        "func": "\nmsg.payload = parseFloat((msg.payload * 1000));\n\nflow.set(\"Wh\", msg.payload);\nvar Wh = flow.get(\"Wh\");\nmsg.payload = Wh;\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 860,
        "y": 240,
        "wires": [
            []
        ]
    },
    {
        "id": "799917bf6a31c9c5",
        "type": "function",
        "z": "8f25ec8b9a4e1af7",
        "name": "change to kWh",
        "func": "msg.payload = parseFloat((msg.payload * 1000).toFixed(1));\n\nflow.set(\"WhBatEx\", msg.payload);\nvar WhBatEx = flow.get(\"WhBatEx\");\nmsg.payload = WhBatEx;\n\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 860,
        "y": 520,
        "wires": [
            []
        ]
    },
    {
        "id": "54c9db6a6ec2c0e7",
        "type": "inject",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "props": [],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": "1",
        "topic": "",
        "x": 690,
        "y": 460,
        "wires": [
            [
                "40e23f2028c54c45"
            ]
        ]
    },
    {
        "id": "40e23f2028c54c45",
        "type": "function",
        "z": "8f25ec8b9a4e1af7",
        "name": "Get Wh",
        "func": "var B1 = flow.get(\"WhBatEx\");\nmsg.payload = B1;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 840,
        "y": 460,
        "wires": [
            []
        ]
    },
    {
        "id": "2259b2c9b008c5ee",
        "type": "function",
        "z": "8f25ec8b9a4e1af7",
        "name": "Get Wh",
        "func": "var B1 = flow.get(\"Wh\");\nmsg.payload = B1;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 840,
        "y": 180,
        "wires": [
            []
        ]
    },
    {
        "id": "075ad34e09230368",
        "type": "inject",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "props": [],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": "1",
        "topic": "",
        "x": 690,
        "y": 180,
        "wires": [
            [
                "2259b2c9b008c5ee"
            ]
        ]
    },
    {
        "id": "2b757d04faf63f95",
        "type": "mqtt in",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "Deye10k/total/battery_energy_in/state",
        "qos": "2",
        "datatype": "auto-detect",
        "broker": "1cbab8706d67e685",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 430,
        "y": 380,
        "wires": [
            [
                "eefdb2c4d7a7efba"
            ]
        ]
    },
    {
        "id": "eefdb2c4d7a7efba",
        "type": "function",
        "z": "8f25ec8b9a4e1af7",
        "name": "change to kWh",
        "func": "msg.payload = parseFloat((msg.payload * 1000).toFixed(1));\n\nflow.set(\"WhBatIm\", msg.payload);\nvar WhBatIm = flow.get(\"WhBatIm\");\nmsg.payload = WhBatIm;\n\nreturn msg;\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 860,
        "y": 380,
        "wires": [
            []
        ]
    },
    {
        "id": "468153b9811fab3f",
        "type": "function",
        "z": "8f25ec8b9a4e1af7",
        "name": "Get Wh",
        "func": "var B1 = flow.get(\"WhBatIm\");\nmsg.payload = B1;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 840,
        "y": 320,
        "wires": [
            []
        ]
    },
    {
        "id": "38295de278dae8aa",
        "type": "inject",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "props": [],
        "repeat": "5",
        "crontab": "",
        "once": true,
        "onceDelay": "1",
        "topic": "",
        "x": 690,
        "y": 320,
        "wires": [
            [
                "468153b9811fab3f"
            ]
        ]
    },
    {
        "id": "7766d33758efe6b9",
        "type": "inject",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "10",
        "payloadType": "num",
        "x": 450,
        "y": 720,
        "wires": [
            []
        ]
    },
    {
        "id": "c29b36ed23b20392",
        "type": "inject",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 450,
        "y": 760,
        "wires": [
            []
        ]
    },
    {
        "id": "d8c00616084138b9",
        "type": "inject",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "5",
        "payloadType": "num",
        "x": 450,
        "y": 800,
        "wires": [
            []
        ]
    },
    {
        "id": "965a84460ed3c6fd",
        "type": "function",
        "z": "8f25ec8b9a4e1af7",
        "name": "EVU OpenWB",
        "func": "\nvar msg0 = { payload: Number }\nmsg0.payload = parseFloat(msg.payload.INVPowerToLocalLoad);\n\nvar msg1 = { payload: Number }\nmsg1.payload = parseFloat(msg.payload.L1ThreePhaseGridOutputCurrent/3);\n\nvar msg2 = { payload: Number }\nmsg2.payload = parseFloat(msg.payload.L1ThreePhaseGridVoltage);\n\nvar msg3 = { payload: Number }\nmsg3.payload = parseFloat(msg.payload.EnergyToGridTotal);\n\nvar msg4 = { payload: Number }\nmsg4.payload = parseFloat(msg.payload.LocalLoadEnergyTotal);\n\nvar msg5 = { payload: Number }\nmsg5.payload = parseFloat(msg.payload.GridFrequency);\n\nvar msg6 = { payload: Number }\nmsg6.payload = parseFloat(msg.payload.L1ThreePhaseGridOutputPower);\n\nvar msg7 = { payload: Number }\nmsg7.payload = parseFloat(msg.payload.L2ThreePhaseGridOutputPower);\n\nvar msg8 = { payload: Number }\nmsg.payload = parseFloat(msg.payload.L3ThreePhaseGridOutputPower);\n\n\n\n\n\nreturn [msg0, msg1, msg2, msg3, msg4, msg5,msg6,msg7,msg8];",
        "outputs": 9,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1320,
        "y": 880,
        "wires": [
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            [],
            []
        ]
    },
    {
        "id": "37b8ad10b10bd23a",
        "type": "debug",
        "z": "8f25ec8b9a4e1af7",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1240,
        "y": 1520,
        "wires": []
    },
    {
        "id": "52b892dc20a50db1",
        "type": "function",
        "z": "8f25ec8b9a4e1af7",
        "name": "PV OpenWB",
        "func": "\nvar msg0 = { payload: Number }\nmsg0.payload = parseInt(msg.payload.OutputPower);\n\nvar msg1 = { payload: Number }\nmsg1.payload = parseFloat(msg.payload.PVEnergyTotal*1000);\n\nvar msg2 = { payload: Number }\nmsg2.payload = parseInt(msg.payload.DischargePower * -1);\n\n\n// the Outputpower is Outputpower minus Bat power\n// because the discharge is same then Outputpower\ncontext.set(\"pvPower\", msg0.payload);\ncontext.set(\"batPower\", msg2.payload);\nvar P1 = context.get(\"pvPower\");\nvar P2 = context.get(\"batPower\");\nmsg0.payload = P1 + P2;\nreturn [msg0, msg1];",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1350,
        "y": 1120,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "5f81111e28f02c69",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/pv/1/W",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1570,
        "y": 1100,
        "wires": []
    },
    {
        "id": "d6b4b9d881857f76",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/pv/1/WhCounter",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1600,
        "y": 1160,
        "wires": []
    },
    {
        "id": "313fec7a7c5a9827",
        "type": "function",
        "z": "8f25ec8b9a4e1af7",
        "name": "BAT OpenWB",
        "func": "var msg0 = { payload: Number }\nmsg0.payload = parseInt(msg.payload.ChargePower);\nvar charge = parseInt(msg.payload.ChargePower);\n\nvar msg1 = { payload: Number}\nmsg1.payload = parseInt(msg.payload.DischargePower*-1);\n\nvar msg2 = { payload: Number }\nmsg2.payload = parseFloat(msg.payload.ChargeEnergyToday*1000);\n\nvar msg3 = { payload: Number }\nmsg3.payload = parseFloat(msg.payload.DischargeEnergyToday*1000);\n\nvar msg4 = { payload: Number }\nmsg4.payload = parseInt(msg.payload.SOC);\nif (charge == 0)\n{\n    return [msg1,msg2, msg3, msg4];\n}\nelse\n{\n    return [msg0,msg2, msg3, msg4];\n}\n",
        "outputs": 4,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1350,
        "y": 1340,
        "wires": [
            [],
            [],
            [],
            []
        ]
    },
    {
        "id": "891f23bc613f2554",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/houseBattery/WhImported",
        "qos": "0",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1670,
        "y": 1380,
        "wires": []
    },
    {
        "id": "3e97cf03ba72637b",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/houseBattery/WhExported",
        "qos": "0",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1670,
        "y": 1440,
        "wires": []
    },
    {
        "id": "154ea6abb6109f39",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/houseBattery/%Soc",
        "qos": "0",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1650,
        "y": 1500,
        "wires": []
    },
    {
        "id": "802a0c77f015a2e8",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/evu/W",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1260,
        "y": 1580,
        "wires": []
    },
    {
        "id": "02daf7622ad644e8",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/PfPhase1",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 2220,
        "wires": []
    },
    {
        "id": "087bd9b9268740c8",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/APhase2",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 1680,
        "wires": []
    },
    {
        "id": "c249a662666c7cdc",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/APhase1",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 1640,
        "wires": []
    },
    {
        "id": "822b47649ea62b06",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/APhase3",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 1720,
        "wires": []
    },
    {
        "id": "e446b67cb964c5c3",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/WhImported",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1310,
        "y": 1780,
        "wires": []
    },
    {
        "id": "3a0c5ec53c900a09",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/WhExported",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1310,
        "y": 1820,
        "wires": []
    },
    {
        "id": "2e5a104f2530a5ff",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/Hz",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1280,
        "y": 2020,
        "wires": []
    },
    {
        "id": "9433943dbf03b638",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/WPhase1",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 2080,
        "wires": []
    },
    {
        "id": "0f5ab612f82a5bc9",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/WPhase2",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 2120,
        "wires": []
    },
    {
        "id": "94c021494844fdc3",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/WPhase3",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 2160,
        "wires": []
    },
    {
        "id": "6d653422f990cb17",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/VPhase1",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 1880,
        "wires": []
    },
    {
        "id": "b13e452fafba88eb",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/VPhase2",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 1920,
        "wires": []
    },
    {
        "id": "e127f5fd76911a2b",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/VPhase3",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 1960,
        "wires": []
    },
    {
        "id": "53709149c3936d4f",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/PfPhase2",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 2260,
        "wires": []
    },
    {
        "id": "fb8ae67ba6ba148c",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/evu/PfPhase3",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1300,
        "y": 2300,
        "wires": []
    },
    {
        "id": "609e702f51f455d5",
        "type": "debug",
        "z": "8f25ec8b9a4e1af7",
        "name": "debug 2",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1520,
        "y": 980,
        "wires": []
    },
    {
        "id": "9915c53ac77f1659",
        "type": "mqtt out",
        "z": "8f25ec8b9a4e1af7",
        "name": "",
        "topic": "openWB/set/houseBattery/W",
        "qos": "0",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "63639d0a229d08d9",
        "x": 1640,
        "y": 1320,
        "wires": []
    },
    {
        "id": "5b2a1b20d66d3bc2",
        "type": "debug",
        "z": "8f25ec8b9a4e1af7",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1580,
        "y": 1580,
        "wires": []
    }
]