[ { "id": "d9dfc24bfe232003", "type": "tab", "label": "SMA->Venus", "disabled": false, "info": "", "env": [ { "name": "DeviceName", "value": "ID001", "type": "str" } ] }, { "id": "85271181f2763b2f", "type": "mqtt out", "z": "d9dfc24bfe232003", "name": "", "topic": "device/st002/Status", "qos": "0", "retain": "", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "86834cf8676e9a42", "x": 510, "y": 40, "wires": [] }, { "id": "2fb5baf64b538377", "type": "inject", "z": "d9dfc24bfe232003", "name": "Grid init", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": "1", "topic": "", "payload": "{\"clientId\":\"st002\",\"connected\":1,\"version\":\"v0.9\",\"services\":{\"pv1\":\"pvinverter\"}}", "payloadType": "json", "x": 140, "y": 60, "wires": [ [ "85271181f2763b2f", "e33ccf47f4d6c6bb" ] ] }, { "id": "f4912d38ba32a7aa", "type": "inject", "z": "d9dfc24bfe232003", "name": "Grid abmelden", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": "2", "topic": "", "payload": "{\"clientId\":\"st002\",\"connected\":0,\"version\":\"v1\",\"services\":{\"pv1\":\"pvinverter\"}}", "payloadType": "json", "x": 160, "y": 120, "wires": [ [ "85271181f2763b2f" ] ] }, { "id": "8180f43fee1c8246", "type": "mqtt in", "z": "d9dfc24bfe232003", "name": "", "topic": "device/st002/DBus", "qos": "2", "datatype": "auto-detect", "broker": "86834cf8676e9a42", "nl": false, "rap": true, "rh": 0, "inputs": 0, "x": 450, "y": 120, "wires": [ [ "dad824d698d7b957" ] ] }, { "id": "dad824d698d7b957", "type": "function", "z": "d9dfc24bfe232003", "name": "Store PortalID and DeviceID", "func": "flow.set('portalID',msg.payload.portalId);\nflow.set('deviceID',msg.payload.deviceInstance.pv1);", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 720, "y": 120, "wires": [ [ "af8c158b241a2aad" ] ] }, { "id": "52742d362bb7f598", "type": "function", "z": "d9dfc24bfe232003", "name": "Voltage L1", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = Math.round(msg.payload * 100) / 100;\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L1/Voltage\";\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 830, "y": 180, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "5e37a0523903b69c", "type": "function", "z": "d9dfc24bfe232003", "name": "Voltage L2", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = Math.round(msg.payload * 100) / 100;\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L2/Voltage\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 830, "y": 220, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "83fad0ce3dd7ddfb", "type": "function", "z": "d9dfc24bfe232003", "name": "Voltage L3", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = Math.round(msg.payload * 100) / 100;\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L3/Voltage\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 830, "y": 260, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "9c234abfd0ab835e", "type": "function", "z": "d9dfc24bfe232003", "name": "Current L1", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = Math.round(msg.payload * 100) / 100;\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L1/Current\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 830, "y": 320, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "d9a9bd85e7bb0cf8", "type": "function", "z": "d9dfc24bfe232003", "name": "Current L2", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = Math.round(msg.payload * 100) / 100;\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L2/Current\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 830, "y": 360, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "f1de78f5dc5e03a0", "type": "function", "z": "d9dfc24bfe232003", "name": "Current L3", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = Math.round(msg.payload * 100) / 100;\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L3/Current\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 830, "y": 400, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "af8c158b241a2aad", "type": "debug", "z": "d9dfc24bfe232003", "name": "debug 4", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 940, "y": 120, "wires": [] }, { "id": "d07d58a163c5fdc4", "type": "function", "z": "d9dfc24bfe232003", "name": "Power L1", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = Math.round(msg.payload * 100) / 100;\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L1/Power\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 820, "y": 500, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "051c3f0dcb8c4059", "type": "function", "z": "d9dfc24bfe232003", "name": "Power L2", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = Math.round(msg.payload * 100) / 100;\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L2/Power\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 820, "y": 540, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "b14d8d8681f04772", "type": "function", "z": "d9dfc24bfe232003", "name": "Power L3", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = Math.round(msg.payload * 100) / 100;\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L3/Power\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 820, "y": 580, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "9930b284f6de64d4", "type": "mqtt out", "z": "d9dfc24bfe232003", "name": "", "topic": "", "qos": "", "retain": "", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "86834cf8676e9a42", "x": 1250, "y": 700, "wires": [] }, { "id": "43becd5948904b56", "type": "function", "z": "d9dfc24bfe232003", "name": "Frequenz", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = Math.round(msg.payload * 100) / 100;\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/grid/\" + deviceID + \"/Ac/Frequency\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 820, "y": 720, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "e33ccf47f4d6c6bb", "type": "debug", "z": "d9dfc24bfe232003", "name": "debug 5", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 1220, "y": 80, "wires": [] }, { "id": "b7499f9029cdae85", "type": "modbus-read", "z": "d9dfc24bfe232003", "name": "Leistung", "topic": "L1", "showStatusActivities": false, "logIOActivities": false, "showErrors": false, "showWarnings": true, "unitid": "3", "dataType": "InputRegister", "adr": "30775", "quantity": "8", "rate": "1", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "b92a6581b4d08e73", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": false, "x": 300, "y": 540, "wires": [ [ "7c4065e2065e09de", "6f6d35c235d18c8e", "85e14f38cf201d94", "9720339035f7022a" ], [] ] }, { "id": "7c4065e2065e09de", "type": "change", "z": "d9dfc24bfe232003", "name": "Leistung L1", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[3]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 490, "y": 500, "wires": [ [ "d07d58a163c5fdc4" ] ] }, { "id": "6f6d35c235d18c8e", "type": "change", "z": "d9dfc24bfe232003", "name": "Leistung L2", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[5]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 490, "y": 540, "wires": [ [ "051c3f0dcb8c4059" ] ] }, { "id": "85e14f38cf201d94", "type": "change", "z": "d9dfc24bfe232003", "name": "Leistung L3", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[7]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 490, "y": 580, "wires": [ [ "b14d8d8681f04772" ] ] }, { "id": "4aaf54070cf90ccf", "type": "modbus-read", "z": "d9dfc24bfe232003", "name": "Strom", "topic": "", "showStatusActivities": false, "logIOActivities": false, "showErrors": false, "showWarnings": true, "unitid": "3", "dataType": "InputRegister", "adr": "30795", "quantity": "8", "rate": "1", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "b92a6581b4d08e73", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": false, "x": 290, "y": 360, "wires": [ [ "ab9fecc6c78942be", "f5c08f16fa80a736", "715b3a03fb931a70", "97fc43f354e807cb" ], [] ] }, { "id": "ab9fecc6c78942be", "type": "change", "z": "d9dfc24bfe232003", "name": "Strom L1", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[3]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 480, "y": 320, "wires": [ [ "92acd76d6ce73a9c" ] ] }, { "id": "f5c08f16fa80a736", "type": "change", "z": "d9dfc24bfe232003", "name": "Strom L2", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[5]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 480, "y": 360, "wires": [ [ "bf414220b6cca7b8" ] ] }, { "id": "715b3a03fb931a70", "type": "change", "z": "d9dfc24bfe232003", "name": "Strom L3", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[7]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 480, "y": 400, "wires": [ [ "3b9ed5084b5828c4" ] ] }, { "id": "1be4991c9c2ff38d", "type": "modbus-read", "z": "d9dfc24bfe232003", "name": "Spannung", "topic": "", "showStatusActivities": false, "logIOActivities": false, "showErrors": false, "showWarnings": true, "unitid": "3", "dataType": "InputRegister", "adr": "30783", "quantity": "8", "rate": "1", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "b92a6581b4d08e73", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": false, "x": 300, "y": 220, "wires": [ [ "565ed289f5e102ca", "6d43ca60667105c5", "4af8b2aa3c09a09b" ], [] ] }, { "id": "565ed289f5e102ca", "type": "change", "z": "d9dfc24bfe232003", "name": "Spannung L1", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[1]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 500, "y": 180, "wires": [ [ "02bf7b96d592d1b6" ] ] }, { "id": "6d43ca60667105c5", "type": "change", "z": "d9dfc24bfe232003", "name": "Spannung L2", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[3]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 500, "y": 220, "wires": [ [ "060db6cc335c45ab" ] ] }, { "id": "4af8b2aa3c09a09b", "type": "change", "z": "d9dfc24bfe232003", "name": "Spannung L3", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[5]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 500, "y": 260, "wires": [ [ "617beb4228d73a82" ] ] }, { "id": "ec7e76892aca6e39", "type": "modbus-read", "z": "d9dfc24bfe232003", "name": "Frequenz", "topic": "", "showStatusActivities": false, "logIOActivities": false, "showErrors": false, "showWarnings": true, "unitid": "3", "dataType": "InputRegister", "adr": "30803", "quantity": "8", "rate": "1", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "b92a6581b4d08e73", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": false, "x": 300, "y": 720, "wires": [ [ "be9880883122e594" ], [] ] }, { "id": "be9880883122e594", "type": "change", "z": "d9dfc24bfe232003", "name": "Netzfrequenz", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[1]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 470, "y": 720, "wires": [ [ "42f6e518c85423c0" ] ] }, { "id": "92acd76d6ce73a9c", "type": "function", "z": "d9dfc24bfe232003", "name": "Wert/1000", "func": "msg.payload = msg.payload/1000;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 670, "y": 320, "wires": [ [ "9c234abfd0ab835e" ] ] }, { "id": "bf414220b6cca7b8", "type": "function", "z": "d9dfc24bfe232003", "name": "Wert/1000", "func": "msg.payload = msg.payload/1000;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 670, "y": 360, "wires": [ [ "d9a9bd85e7bb0cf8" ] ] }, { "id": "3b9ed5084b5828c4", "type": "function", "z": "d9dfc24bfe232003", "name": "Wert/1000", "func": "msg.payload = msg.payload/1000;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 670, "y": 400, "wires": [ [ "f1de78f5dc5e03a0" ] ] }, { "id": "617beb4228d73a82", "type": "function", "z": "d9dfc24bfe232003", "name": "Wert/100", "func": "msg.payload = msg.payload/100;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 680, "y": 260, "wires": [ [ "83fad0ce3dd7ddfb" ] ] }, { "id": "060db6cc335c45ab", "type": "function", "z": "d9dfc24bfe232003", "name": "Wert/100", "func": "msg.payload = msg.payload/100;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 680, "y": 220, "wires": [ [ "5e37a0523903b69c" ] ] }, { "id": "02bf7b96d592d1b6", "type": "function", "z": "d9dfc24bfe232003", "name": "Wert/100", "func": "msg.payload = msg.payload/100;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 680, "y": 180, "wires": [ [ "52742d362bb7f598" ] ] }, { "id": "42f6e518c85423c0", "type": "function", "z": "d9dfc24bfe232003", "name": "Wert/100", "func": "msg.payload = msg.payload/10;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 660, "y": 720, "wires": [ [ "43becd5948904b56" ] ] }, { "id": "8b7cb684f613aa09", "type": "function", "z": "d9dfc24bfe232003", "name": "Power Total", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nlet U1 = msg.payload.toFixed(1);\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/Power\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 830, "y": 620, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "9720339035f7022a", "type": "change", "z": "d9dfc24bfe232003", "name": "Leistung ges", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[1]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 490, "y": 620, "wires": [ [ "8b7cb684f613aa09" ] ] }, { "id": "d1928f676e530db8", "type": "inject", "z": "d9dfc24bfe232003", "name": "1s", "props": [ { "p": "payload" } ], "repeat": "1", "crontab": "", "once": true, "onceDelay": "5", "topic": "", "payload": "", "payloadType": "date", "x": 610, "y": 840, "wires": [ [ "8c47f0a034b9f9d8", "f22197d0a0a25fe4", "8d47bd7d201d921a" ] ] }, { "id": "8c47f0a034b9f9d8", "type": "function", "z": "d9dfc24bfe232003", "name": "Error Code", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nmsg={};\nmsg.payload = {\"value\":0};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/ErrorCode\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 810, "y": 840, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "f22197d0a0a25fe4", "type": "function", "z": "d9dfc24bfe232003", "name": "Position", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nmsg={};\nmsg.payload = {\"value\":0};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Position\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 800, "y": 880, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "8d47bd7d201d921a", "type": "function", "z": "d9dfc24bfe232003", "name": "max. Power", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nmsg={};\nmsg.payload = {\"value\":20000};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/MaxPower\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 810, "y": 920, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "b60d6383fe349343", "type": "function", "z": "d9dfc24bfe232003", "name": "Import Total", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nvar volts=new Int32Array(2);\nlet U1 = msg.payload.toFixed(1);\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/Energy/Forward\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 810, "y": 960, "wires": [ [] ] }, { "id": "9ec215d56e82103c", "type": "function", "z": "d9dfc24bfe232003", "name": "Import L1", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nvar volts=new Int32Array(2);\nlet U1 = msg.payload.toFixed(1);\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L1/Energy/Forward\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 800, "y": 1000, "wires": [ [] ] }, { "id": "5c55619479029570", "type": "function", "z": "d9dfc24bfe232003", "name": "Import L2", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nvar volts=new Int32Array(2);\nlet U1 = msg.payload.toFixed(1);\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L2/Energy/Forward\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 800, "y": 1040, "wires": [ [] ] }, { "id": "eba0f36e5d3d7b21", "type": "function", "z": "d9dfc24bfe232003", "name": "Import L3", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nvar volts=new Int32Array(2);\nlet U1 = msg.payload.toFixed(1);\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/L3/Energy/Forward\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 800, "y": 1080, "wires": [ [] ] }, { "id": "013da512010c4382", "type": "function", "z": "d9dfc24bfe232003", "name": "Current Total", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nvar volts=new Int32Array(2);\nlet U1 = msg.payload.toFixed(1);\nmsg={};\nmsg.payload = {\"value\":U1};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/Ac/Current\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 830, "y": 440, "wires": [ [ "9930b284f6de64d4" ] ] }, { "id": "97fc43f354e807cb", "type": "change", "z": "d9dfc24bfe232003", "name": "Strom ges", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload[1]", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 490, "y": 440, "wires": [ [ "b4a93f73694abd86" ] ] }, { "id": "b4a93f73694abd86", "type": "function", "z": "d9dfc24bfe232003", "name": "Wert/1000", "func": "msg.payload = msg.payload/1000;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 670, "y": 440, "wires": [ [ "013da512010c4382" ] ] }, { "id": "17f63249e7327f6f", "type": "function", "z": "d9dfc24bfe232003", "name": "function 1", "func": "var Ertrag=global.get('Ertrag') || 0;\n\nglobal.set('Ertrag', Ertrag + msg.payload/3600/1000);\nmsg.payload = Ertrag;\nmsg.payload = Math.round(msg.payload * 100) / 100;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 520, "y": 960, "wires": [ [ "b60d6383fe349343", "8367de0a34f311df" ] ] }, { "id": "8367de0a34f311df", "type": "function", "z": "d9dfc24bfe232003", "name": "function 2", "func": "msg.payload = msg.payload/3;\nmsg.payload = Math.round(msg.payload * 100) / 100;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 520, "y": 1040, "wires": [ [ "eba0f36e5d3d7b21", "5c55619479029570", "9ec215d56e82103c" ] ] }, { "id": "812475e68ab3ad4a", "type": "function", "z": "d9dfc24bfe232003", "name": "ProductId", "func": "var portalID = flow.get(\"portalID\");\nvar deviceID = flow.get(\"deviceID\");\n\nmsg={};\nmsg.payload = {\"value\":45058};\n\nmsg.topic = \"W/\" + portalID + \"/pvinverter/\" + deviceID + \"/ProductId\";\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 800, "y": 800, "wires": [ [] ] }, { "id": "a685d92a94dbcc68", "type": "modbus-read", "z": "d9dfc24bfe232003", "name": "Gesamtertrag", "topic": "", "showStatusActivities": false, "logIOActivities": false, "showErrors": true, "showWarnings": true, "unitid": "3", "dataType": "InputRegister", "adr": "30529", "quantity": "4", "rate": "5", "rateUnit": "s", "delayOnStart": false, "startDelayTime": "", "server": "b92a6581b4d08e73", "useIOFile": false, "ioFile": "", "useIOForPayload": false, "emptyMsgOnFail": false, "x": 270, "y": 1160, "wires": [ [ "5d93d9a9a883412c" ], [] ] }, { "id": "5d93d9a9a883412c", "type": "debug", "z": "d9dfc24bfe232003", "name": "debug 6", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 520, "y": 1160, "wires": [] }, { "id": "86834cf8676e9a42", "type": "mqtt-broker", "name": "VenusOS", "broker": "127.0.0.1", "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": "b92a6581b4d08e73", "type": "modbus-client", "name": "STP_X_20-50", "clienttype": "tcp", "bufferCommands": true, "stateLogEnabled": false, "queueLogEnabled": false, "failureLogEnabled": true, "tcpHost": "192.168.178.89", "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, "showWarnings": true, "showLogs": true } ]