[
   {
       "id": "c54bca7562265ca3",
       "type": "tab",
       "label": "Flow 3",
       "disabled": false,
       "info": "",
       "env": []
   },
   {
       "id": "f2922e884087f046",
       "type": "function",
       "z": "c54bca7562265ca3",
       "name": "WriteModbus",
       "func": "msg = msg;\n\nmsg.payload = {\n    value: msg.payload,\n    'fc': 6,\n    'unitid': 1,//msg.unitId,\n    'address': msg.modbusRequest.address,\n    'quantity': msg.modbusRequest.quantity\n}\nreturn msg;\n\n",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 1030,
       "y": 280,
       "wires": [
           [
               "99c1f11c70531f02"
           ]
       ]
   },
   {
       "id": "815a99d2e6bf9ed4",
       "type": "split",
       "z": "c54bca7562265ca3",
       "name": "Split array",
       "splt": "\\n",
       "spltType": "str",
       "arraySplt": "1",
       "arraySpltType": "len",
       "stream": false,
       "addname": "parts",
       "x": 360,
       "y": 320,
       "wires": [
           [
               "f3f2d24ab23758cd"
           ]
       ]
   },
   {
       "id": "f3f2d24ab23758cd",
       "type": "function",
       "z": "c54bca7562265ca3",
       "name": "ReadModbus",
       "func": "msg = msg.payload;\nconst fc = 4;\n//const unitid = 10;\n\nmsg = {\n    topic : msg.name,\n    payload : {\n            'fc': fc,\n            'unitid': msg.unitId,//JSON.parse(unitid),\n            'address': msg._address,//JSON.parse(y.number),\n            'quantity': 2,\n            'value': 2\n        }\n    }\n\nnode.send(msg);\n",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 530,
       "y": 320,
       "wires": [
           [
               "1c1d3d0c781fb502"
           ]
       ]
   },
   {
       "id": "6550c3991f50a8f4",
       "type": "comment",
       "z": "c54bca7562265ca3",
       "name": "L1 ID 10 - read/write",
       "info": "",
       "x": 490,
       "y": 260,
       "wires": []
   },
   {
       "id": "8d95de296353e88f",
       "type": "comment",
       "z": "c54bca7562265ca3",
       "name": "L2 ID 11 - read/write",
       "info": "",
       "x": 490,
       "y": 480,
       "wires": []
   },
   {
       "id": "972d431852b0de4d",
       "type": "comment",
       "z": "c54bca7562265ca3",
       "name": "L3 ID 12 - read/write",
       "info": "",
       "x": 490,
       "y": 680,
       "wires": []
   },
   {
       "id": "1c1d3d0c781fb502",
       "type": "modbus-flex-getter",
       "z": "c54bca7562265ca3",
       "name": "",
       "showStatusActivities": false,
       "showErrors": false,
       "logIOActivities": false,
       "server": "40f20c7f.13a934",
       "useIOFile": false,
       "ioFile": "",
       "useIOForPayload": false,
       "emptyMsgOnFail": false,
       "keepMsgProperties": false,
       "x": 730,
       "y": 320,
       "wires": [
           [
               "f2922e884087f046"
           ],
           [
               "ee5558d45eeaf040",
               "a035f7f84b852f5b"
           ]
       ]
   },
   {
       "id": "ee5558d45eeaf040",
       "type": "function",
       "z": "c54bca7562265ca3",
       "name": "JSON ID11",
       "func": "let x = msg;\nif (x.topic === \"TotalReactiveEnergy\") {\n\n\nmsg.payload = \n        [\n            {\n                \"unitId\": 11,\n                \"_address\": 0,\n                \"name\": \"Voltage\",\n                \"description\": \"Voltage\",\n                \"unit\": \"V\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 6,\n                \"name\": \"Current\",\n                \"description\": \"Current\",\n                \"unit\": \"A\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 12,\n                \"name\": \"ActivePower\",\n                \"description\": \"Active Power\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 18,\n                \"name\": \"ApparentPower\",\n                \"description\": \"ApparentPower\",\n                \"unit\": \"VA\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 24,\n                \"name\": \"ReactivePower\",\n                \"description\": \"ReactivePower\",\n                \"unit\": \"VAr\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 30,\n                \"name\": \"PowerFactor\",\n                \"description\": \"PowerFactor\",\n                \"unit\": \"\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 70,\n                \"name\": \"Frequency\",\n                \"description\": \"Frequency\",\n                \"unit\": \"Hz\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 72,\n                \"name\": \"ActiveEnergy\",\n                \"description\": \"Active Energy\",\n                \"unit\": \"kWh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 74,\n                \"name\": \"ExportActiveEnergy\",\n                \"description\": \"ExportActiveEnergy\",\n                \"unit\": \"kWh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 74,\n                \"name\": \"TotalSystemPowerDemand\",\n                \"description\": \"TotalSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 76,\n                \"name\": \"ImportReactiveEnergy\",\n                \"description\": \"ImportReactiveEnergy\",\n                \"unit\": \"kvarh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 76,\n                \"name\": \"MaxTotalSystemPowerDemand\",\n                \"description\": \"MaxTotalSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 78,\n                \"name\": \"ExportReactiveEnergy\",\n                \"description\": \"ExportReactiveEnergy\",\n                \"unit\": \"kvarh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 88,\n                \"name\": \"ImportSystemPowerDemand\",\n                \"description\": \"ImportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 90,\n                \"name\": \"MaxImportSystemPowerDemand\",\n                \"description\": \"MaxImportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 92,\n                \"name\": \"ExportSystemPowerDemand\",\n                \"description\": \"ExportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 94,\n                \"name\": \"MaxExportSystemPowerDemand\",\n                \"description\": \"MaxExportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 258,\n                \"name\": \"CurrentDemand\",\n                \"description\": \"CurrentDemand\",\n                \"unit\": \"A\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 264,\n                \"name\": \"MaxCurrentDemand\",\n                \"description\": \"MaxCurrentDemand\",\n                \"unit\": \"A\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 342,\n                \"name\": \"TotalActiveEnergy\",\n                \"description\": \"TotalActiveEnergy\",\n                \"unit\": \"kWh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 11,\n                \"_address\": 344,\n                \"name\": \"TotalReactiveEnergy\",\n                \"description\": \"TotalReactiveEnergy\",\n                \"unit\": \"kvarh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            }\n\n        ]\n\n\nreturn msg;\n}",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 210,
       "y": 540,
       "wires": [
           [
               "82f015af713aaed9"
           ]
       ]
   },
   {
       "id": "7a55b60b988b7063",
       "type": "modbus-flex-getter",
       "z": "c54bca7562265ca3",
       "name": "",
       "showStatusActivities": false,
       "showErrors": false,
       "logIOActivities": false,
       "server": "40f20c7f.13a934",
       "useIOFile": false,
       "ioFile": "",
       "useIOForPayload": false,
       "emptyMsgOnFail": false,
       "keepMsgProperties": false,
       "x": 730,
       "y": 540,
       "wires": [
           [
               "c41c8139b9c03e79"
           ],
           [
               "48aa3a74bcafa90e",
               "363902c7450bf34a"
           ]
       ]
   },
   {
       "id": "82f015af713aaed9",
       "type": "split",
       "z": "c54bca7562265ca3",
       "name": "Split array",
       "splt": "\\n",
       "spltType": "str",
       "arraySplt": "1",
       "arraySpltType": "len",
       "stream": false,
       "addname": "parts",
       "x": 360,
       "y": 540,
       "wires": [
           [
               "5f7fb500131410b5"
           ]
       ]
   },
   {
       "id": "5f7fb500131410b5",
       "type": "function",
       "z": "c54bca7562265ca3",
       "name": "ReadModbus",
       "func": "msg = msg.payload;\nconst fc = 4;\n//const unitid = 10;\n\nmsg = {\n    topic : msg.name,\n    payload : {\n            'fc': fc,\n            'unitid': msg.unitId,//JSON.parse(unitid),\n            'address': msg._address,//JSON.parse(y.number),\n            'quantity': 2,\n            'value': 2\n        }\n    }\n\nnode.send(msg);\n",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 530,
       "y": 540,
       "wires": [
           [
               "7a55b60b988b7063"
           ]
       ]
   },
   {
       "id": "48aa3a74bcafa90e",
       "type": "function",
       "z": "c54bca7562265ca3",
       "name": "JSON ID12",
       "func": "let x = msg;\nif (x.topic === \"TotalReactiveEnergy\") {\n\n\n    msg.payload = \n    [\n        {\n            \"unitId\": 12,\n            \"_address\": 0,\n            \"name\": \"Voltage\",\n            \"description\": \"Voltage\",\n            \"unit\": \"V\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 6,\n            \"name\": \"Current\",\n            \"description\": \"Current\",\n            \"unit\": \"A\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 12,\n            \"name\": \"ActivePower\",\n            \"description\": \"Active Power\",\n            \"unit\": \"W\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 18,\n            \"name\": \"ApparentPower\",\n            \"description\": \"ApparentPower\",\n            \"unit\": \"VA\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 24,\n            \"name\": \"ReactivePower\",\n            \"description\": \"ReactivePower\",\n            \"unit\": \"VAr\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 30,\n            \"name\": \"PowerFactor\",\n            \"description\": \"PowerFactor\",\n            \"unit\": \"\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 70,\n            \"name\": \"Frequency\",\n            \"description\": \"Frequency\",\n            \"unit\": \"Hz\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 72,\n            \"name\": \"ActiveEnergy\",\n            \"description\": \"Active Energy\",\n            \"unit\": \"kWh\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 74,\n            \"name\": \"ExportActiveEnergy\",\n            \"description\": \"ExportActiveEnergy\",\n            \"unit\": \"kWh\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 74,\n            \"name\": \"TotalSystemPowerDemand\",\n            \"description\": \"TotalSystemPowerDemand\",\n            \"unit\": \"W\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 76,\n            \"name\": \"ImportReactiveEnergy\",\n            \"description\": \"ImportReactiveEnergy\",\n            \"unit\": \"kvarh\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 76,\n            \"name\": \"MaxTotalSystemPowerDemand\",\n            \"description\": \"MaxTotalSystemPowerDemand\",\n            \"unit\": \"W\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 78,\n            \"name\": \"ExportReactiveEnergy\",\n            \"description\": \"ExportReactiveEnergy\",\n            \"unit\": \"kvarh\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 88,\n            \"name\": \"ImportSystemPowerDemand\",\n            \"description\": \"ImportSystemPowerDemand\",\n            \"unit\": \"W\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 90,\n            \"name\": \"MaxImportSystemPowerDemand\",\n            \"description\": \"MaxImportSystemPowerDemand\",\n            \"unit\": \"W\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 92,\n            \"name\": \"ExportSystemPowerDemand\",\n            \"description\": \"ExportSystemPowerDemand\",\n            \"unit\": \"W\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 94,\n            \"name\": \"MaxExportSystemPowerDemand\",\n            \"description\": \"MaxExportSystemPowerDemand\",\n            \"unit\": \"W\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 258,\n            \"name\": \"CurrentDemand\",\n            \"description\": \"CurrentDemand\",\n            \"unit\": \"A\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 264,\n            \"name\": \"MaxCurrentDemand\",\n            \"description\": \"MaxCurrentDemand\",\n            \"unit\": \"A\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 342,\n            \"name\": \"TotalActiveEnergy\",\n            \"description\": \"TotalActiveEnergy\",\n            \"unit\": \"kWh\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        },\n        {\n            \"unitId\": 12,\n            \"_address\": 344,\n            \"name\": \"TotalReactiveEnergy\",\n            \"description\": \"TotalReactiveEnergy\",\n            \"unit\": \"kvarh\",\n            \"type\": \"floatbe\",\n            \"len\": 2,\n            \"factor\": 1,\n            \"offset\": 0,\n            \"formula\": \"\",\n            \"role\": \"level\",\n            \"room\": \"\",\n            \"cw\": false,\n            \"isScale\": false\n        }\n\n    ]\n\n\n\nreturn msg;\n}",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 210,
       "y": 740,
       "wires": [
           [
               "5ba607adfe619264"
           ]
       ]
   },
   {
       "id": "77c985566abb5e50",
       "type": "modbus-flex-getter",
       "z": "c54bca7562265ca3",
       "name": "",
       "showStatusActivities": false,
       "showErrors": false,
       "logIOActivities": false,
       "server": "40f20c7f.13a934",
       "useIOFile": false,
       "ioFile": "",
       "useIOForPayload": false,
       "emptyMsgOnFail": false,
       "keepMsgProperties": false,
       "x": 730,
       "y": 740,
       "wires": [
           [
               "e7d9c9ab5ee6383f"
           ],
           [
               "66b67a91e4198f33",
               "ebc8a38e5380b0e3"
           ]
       ]
   },
   {
       "id": "5ba607adfe619264",
       "type": "split",
       "z": "c54bca7562265ca3",
       "name": "Split array",
       "splt": "\\n",
       "spltType": "str",
       "arraySplt": "1",
       "arraySpltType": "len",
       "stream": false,
       "addname": "parts",
       "x": 360,
       "y": 740,
       "wires": [
           [
               "76c860654c1beb5c"
           ]
       ]
   },
   {
       "id": "76c860654c1beb5c",
       "type": "function",
       "z": "c54bca7562265ca3",
       "name": "ReadModbus",
       "func": "msg = msg.payload;\nconst fc = 4;\n//const unitid = 10;\n\nmsg = {\n    topic : msg.name,\n    payload : {\n            'fc': fc,\n            'unitid': msg.unitId,//JSON.parse(unitid),\n            'address': msg._address,//JSON.parse(y.number),\n            'quantity': 2,\n            'value': 2\n        }\n    }\n\nnode.send(msg);\n",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 530,
       "y": 740,
       "wires": [
           [
               "77c985566abb5e50"
           ]
       ]
   },
   {
       "id": "ebc8a38e5380b0e3",
       "type": "function",
       "z": "c54bca7562265ca3",
       "name": "JSON ID10",
       "func": "let x = msg;\nif (x.topic === \"TotalReactiveEnergy\") {\n\n\n    msg.payload = \n        [\n            {\n                \"unitId\": 10,\n                \"_address\": 0,\n                \"name\": \"Voltage\",\n                \"description\": \"Voltage\",\n                \"unit\": \"V\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 6,\n                \"name\": \"Current\",\n                \"description\": \"Current\",\n                \"unit\": \"A\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 12,\n                \"name\": \"ActivePower\",\n                \"description\": \"Active Power\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 18,\n                \"name\": \"ApparentPower\",\n                \"description\": \"ApparentPower\",\n                \"unit\": \"VA\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 24,\n                \"name\": \"ReactivePower\",\n                \"description\": \"ReactivePower\",\n                \"unit\": \"VAr\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 30,\n                \"name\": \"PowerFactor\",\n                \"description\": \"PowerFactor\",\n                \"unit\": \"\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 70,\n                \"name\": \"Frequency\",\n                \"description\": \"Frequency\",\n                \"unit\": \"Hz\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 72,\n                \"name\": \"ActiveEnergy\",\n                \"description\": \"Active Energy\",\n                \"unit\": \"kWh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 74,\n                \"name\": \"ExportActiveEnergy\",\n                \"description\": \"ExportActiveEnergy\",\n                \"unit\": \"kWh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 74,\n                \"name\": \"TotalSystemPowerDemand\",\n                \"description\": \"TotalSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 76,\n                \"name\": \"ImportReactiveEnergy\",\n                \"description\": \"ImportReactiveEnergy\",\n                \"unit\": \"kvarh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 76,\n                \"name\": \"MaxTotalSystemPowerDemand\",\n                \"description\": \"MaxTotalSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 78,\n                \"name\": \"ExportReactiveEnergy\",\n                \"description\": \"ExportReactiveEnergy\",\n                \"unit\": \"kvarh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 88,\n                \"name\": \"ImportSystemPowerDemand\",\n                \"description\": \"ImportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 90,\n                \"name\": \"MaxImportSystemPowerDemand\",\n                \"description\": \"MaxImportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 92,\n                \"name\": \"ExportSystemPowerDemand\",\n                \"description\": \"ExportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 94,\n                \"name\": \"MaxExportSystemPowerDemand\",\n                \"description\": \"MaxExportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 258,\n                \"name\": \"CurrentDemand\",\n                \"description\": \"CurrentDemand\",\n                \"unit\": \"A\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 264,\n                \"name\": \"MaxCurrentDemand\",\n                \"description\": \"MaxCurrentDemand\",\n                \"unit\": \"A\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 342,\n                \"name\": \"TotalActiveEnergy\",\n                \"description\": \"TotalActiveEnergy\",\n                \"unit\": \"kWh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 344,\n                \"name\": \"TotalReactiveEnergy\",\n                \"description\": \"TotalReactiveEnergy\",\n                \"unit\": \"kvarh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            }\n\n        ]\n\nreturn msg;\n}",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 210,
       "y": 320,
       "wires": [
           [
               "815a99d2e6bf9ed4"
           ]
       ]
   },
   {
       "id": "7d7e7f06c4fe1986",
       "type": "inject",
       "z": "c54bca7562265ca3",
       "name": "Start",
       "props": [
           {
               "p": "payload"
           },
           {
               "p": "topic",
               "vt": "str"
           }
       ],
       "repeat": "",
       "crontab": "",
       "once": false,
       "onceDelay": 0.1,
       "topic": "",
       "payload": "",
       "payloadType": "date",
       "x": 190,
       "y": 200,
       "wires": [
           [
               "01a58d010ff88442"
           ]
       ]
   },
   {
       "id": "01a58d010ff88442",
       "type": "function",
       "z": "c54bca7562265ca3",
       "name": "JSON ID10",
       "func": "msg.payload = \n[\n            {\n                \"unitId\": 10,\n                \"_address\": 0,\n                \"name\": \"Voltage\",\n                \"description\": \"Voltage\",\n                \"unit\": \"V\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 6,\n                \"name\": \"Current\",\n                \"description\": \"Current\",\n                \"unit\": \"A\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 12,\n                \"name\": \"ActivePower\",\n                \"description\": \"Active Power\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 18,\n                \"name\": \"ApparentPower\",\n                \"description\": \"ApparentPower\",\n                \"unit\": \"VA\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 24,\n                \"name\": \"ReactivePower\",\n                \"description\": \"ReactivePower\",\n                \"unit\": \"VAr\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 30,\n                \"name\": \"PowerFactor\",\n                \"description\": \"PowerFactor\",\n                \"unit\": \"\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 70,\n                \"name\": \"Frequency\",\n                \"description\": \"Frequency\",\n                \"unit\": \"Hz\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 72,\n                \"name\": \"ActiveEnergy\",\n                \"description\": \"Active Energy\",\n                \"unit\": \"kWh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 74,\n                \"name\": \"ExportActiveEnergy\",\n                \"description\": \"ExportActiveEnergy\",\n                \"unit\": \"kWh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 74,\n                \"name\": \"TotalSystemPowerDemand\",\n                \"description\": \"TotalSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 76,\n                \"name\": \"ImportReactiveEnergy\",\n                \"description\": \"ImportReactiveEnergy\",\n                \"unit\": \"kvarh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 76,\n                \"name\": \"MaxTotalSystemPowerDemand\",\n                \"description\": \"MaxTotalSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 78,\n                \"name\": \"ExportReactiveEnergy\",\n                \"description\": \"ExportReactiveEnergy\",\n                \"unit\": \"kvarh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 88,\n                \"name\": \"ImportSystemPowerDemand\",\n                \"description\": \"ImportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 90,\n                \"name\": \"MaxImportSystemPowerDemand\",\n                \"description\": \"MaxImportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 92,\n                \"name\": \"ExportSystemPowerDemand\",\n                \"description\": \"ExportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 94,\n                \"name\": \"MaxExportSystemPowerDemand\",\n                \"description\": \"MaxExportSystemPowerDemand\",\n                \"unit\": \"W\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 258,\n                \"name\": \"CurrentDemand\",\n                \"description\": \"CurrentDemand\",\n                \"unit\": \"A\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 264,\n                \"name\": \"MaxCurrentDemand\",\n                \"description\": \"MaxCurrentDemand\",\n                \"unit\": \"A\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 342,\n                \"name\": \"TotalActiveEnergy\",\n                \"description\": \"TotalActiveEnergy\",\n                \"unit\": \"kWh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            },\n            {\n                \"unitId\": 10,\n                \"_address\": 344,\n                \"name\": \"TotalReactiveEnergy\",\n                \"description\": \"TotalReactiveEnergy\",\n                \"unit\": \"kvarh\",\n                \"type\": \"floatbe\",\n                \"len\": 2,\n                \"factor\": 1,\n                \"offset\": 0,\n                \"formula\": \"\",\n                \"role\": \"level\",\n                \"room\": \"\",\n                \"cw\": false,\n                \"isScale\": false\n            }\n]\n\nreturn msg;\n",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 330,
       "y": 200,
       "wires": [
           [
               "815a99d2e6bf9ed4"
           ]
       ]
   },
   {
       "id": "99c1f11c70531f02",
       "type": "modbus-flex-write",
       "z": "c54bca7562265ca3",
       "name": "",
       "showStatusActivities": true,
       "showErrors": true,
       "server": "17022420f90b4c00",
       "emptyMsgOnFail": false,
       "keepMsgProperties": false,
       "x": 1330,
       "y": 500,
       "wires": [
           [
               "d6ba8355a5f61ed8"
           ],
           []
       ]
   },
   {
       "id": "c41c8139b9c03e79",
       "type": "function",
       "z": "c54bca7562265ca3",
       "name": "WriteModbus",
       "func": "msg = msg;\n\nmsg.payload = {\n    value: msg.payload,\n    'fc': 6,\n    'unitid': 1,//msg.unitId,\n    'address': msg.modbusRequest.address + 1000,\n    'quantity': msg.modbusRequest.quantity\n}\nreturn msg;\n\n",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 1030,
       "y": 500,
       "wires": [
           [
               "99c1f11c70531f02"
           ]
       ]
   },
   {
       "id": "d6ba8355a5f61ed8",
       "type": "modbus-response",
       "z": "c54bca7562265ca3",
       "name": "",
       "registerShowMax": 20,
       "x": 1550,
       "y": 500,
       "wires": []
   },
   {
       "id": "e7d9c9ab5ee6383f",
       "type": "function",
       "z": "c54bca7562265ca3",
       "name": "WriteModbus",
       "func": "msg = msg;\n\nmsg.payload = {\n    value: msg.payload,\n    'fc': 6,\n    'unitid': 1,//msg.unitId,\n    'address': msg.modbusRequest.address + 2000,\n    'quantity': msg.modbusRequest.quantity\n}\nreturn msg;\n\n",
       "outputs": 1,
       "noerr": 0,
       "initialize": "",
       "finalize": "",
       "libs": [],
       "x": 1030,
       "y": 700,
       "wires": [
           [
               "99c1f11c70531f02"
           ]
       ]
   },
   {
       "id": "31181ec89d6ec4a7",
       "type": "modbus-flex-server",
       "z": "c54bca7562265ca3",
       "name": "",
       "logEnabled": true,
       "serverAddress": "192.168.60.153",
       "serverPort": "502",
       "responseDelay": 100,
       "unitId": "1",
       "delayUnit": "ms",
       "coilsBufferSize": 20000,
       "registersBufferSize": 20000,
       "minAddress": 0,
       "splitAddress": 10000,
       "funcGetCoil": "function getFlexCoil(addr, unitID) {\n\tif (unitID === node.unitId && \n\t\taddr >= node.minAddress && \n\t\taddr <= node.splitAddress) { \n\n\t\treturn node.coils.readUInt8(addr * node.bufferFactor) \n\t}  \n}",
       "funcGetDiscreteInput": "function getFlexDiscreteInput(addr, unitID) {\n\taddr += node.splitAddress\n\tif (unitID === node.unitId && \n\t\taddr >= node.splitAddress && \n\t\taddr <= node.splitAddress * 2) { \n\n\t\treturn node.coils.readUInt8(addr * node.bufferFactor) \n\t}  \n}",
       "funcGetInputRegister": "function getFlexInputRegister(addr, unitID) { \n\tif (unitID === node.unitId && \n\t\taddr >= node.minAddress && \n\t\taddr <= node.splitAddress) { \n\n\t\treturn node.registers.readUInt16BE(addr * node.bufferFactor)  \n\t} \n}",
       "funcGetHoldingRegister": "function getFlexHoldingRegsiter(addr, unitID) { \n\taddr += node.splitAddress\n\tif (unitID === node.unitId && \n\t\taddr >= node.splitAddress && \n\t\taddr <= node.splitAddress * 2) { \n\n\t\treturn node.registers.readUInt16BE(addr * node.bufferFactor)  \n\t} \n}",
       "funcSetCoil": "function setFlexCoil(addr, value, unitID) { \n\tif (unitID === node.unitId && \n\t\taddr >= node.minAddress && \n\t\taddr <= node.splitAddress) { \n\n\t\tnode.coils.writeUInt8(value, addr * node.bufferFactor)  \n\t} \n}",
       "funcSetRegister": "function setFlexRegister(addr, value, unitID) { \n\taddr += node.splitAddress\n\tif (unitID === node.unitId && \n\t\taddr >= node.splitAddress && \n\t\taddr <= node.splitAddress * 2) { \n\n\t\tnode.registers.writeUInt16BE(value, addr * node.bufferFactor)  \n\t} \n}",
       "showErrors": true,
       "x": 1240,
       "y": 160,
       "wires": [
           [],
           [],
           [],
           [],
           []
       ]
   },
   {
       "id": "a035f7f84b852f5b",
       "type": "modbus-response",
       "z": "c54bca7562265ca3",
       "name": "",
       "registerShowMax": 20,
       "x": 1030,
       "y": 340,
       "wires": []
   },
   {
       "id": "363902c7450bf34a",
       "type": "modbus-response",
       "z": "c54bca7562265ca3",
       "name": "",
       "registerShowMax": 20,
       "x": 1030,
       "y": 560,
       "wires": []
   },
   {
       "id": "66b67a91e4198f33",
       "type": "modbus-response",
       "z": "c54bca7562265ca3",
       "name": "",
       "registerShowMax": 20,
       "x": 1030,
       "y": 760,
       "wires": []
   },
   {
       "id": "40f20c7f.13a934",
       "type": "modbus-client",
       "name": "Serial_10",
       "clienttype": "serial",
       "bufferCommands": true,
       "stateLogEnabled": false,
       "queueLogEnabled": true,
       "failureLogEnabled": true,
       "tcpHost": "127.0.0.1",
       "tcpPort": "502",
       "tcpType": "DEFAULT",
       "serialPort": "/dev/ttyUSB0",
       "serialType": "RTU",
       "serialBaudrate": "9600",
       "serialDatabits": "8",
       "serialStopbits": "2",
       "serialParity": "none",
       "serialConnectionDelay": "100",
       "serialAsciiResponseStartDelimiter": "",
       "unit_id": "10",
       "commandDelay": "20",
       "clientTimeout": "2000",
       "reconnectOnTimeout": false,
       "reconnectTimeout": "5000",
       "parallelUnitIdsAllowed": true
   },
   {
       "id": "17022420f90b4c00",
       "type": "modbus-client",
       "name": "neutral",
       "clienttype": "tcp",
       "bufferCommands": true,
       "stateLogEnabled": false,
       "queueLogEnabled": false,
       "failureLogEnabled": true,
       "tcpHost": "192.168.60.153",
       "tcpPort": "502",
       "tcpType": "DEFAULT",
       "serialPort": "/dev/ttyUSB",
       "serialType": "RTU-BUFFERD",
       "serialBaudrate": "9600",
       "serialDatabits": "8",
       "serialStopbits": "1",
       "serialParity": "none",
       "serialConnectionDelay": "100",
       "serialAsciiResponseStartDelimiter": "0x3A",
       "unit_id": 1,
       "commandDelay": 1,
       "clientTimeout": 1000,
       "reconnectOnTimeout": true,
       "reconnectTimeout": 2000,
       "parallelUnitIdsAllowed": true
   }
]