As mentioned in my previous post, I updated your flow.
I changed for every inverter the "day value" to the "total value".
Can you test it? Configure your sensor as "From device" instead of "Computed".
Code: Select all
[
{
"id": "4c9f255573e89019",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "f459f57f0c5746e9",
"type": "mqtt in",
"z": "4c9f255573e89019",
"name": "MQTT In Growatt",
"topic": "energy/growatt",
"qos": "0",
"datatype": "json",
"broker": "f9f13036.e28b58",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 270,
"y": 40,
"wires": [
[
"93a6265c9704e392"
]
]
},
{
"id": "78923483c2aa04c6",
"type": "mqtt in",
"z": "4c9f255573e89019",
"name": "MQTT In SMA",
"topic": "energy/sma",
"qos": "2",
"datatype": "json",
"broker": "f9f13036.e28b58",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 260,
"y": 180,
"wires": [
[
"fc15b7c977b0244f"
]
]
},
{
"id": "757f32fc9dcba9fc",
"type": "mqtt in",
"z": "4c9f255573e89019",
"name": "MQTT In Omnik (Power)",
"topic": "energy/omnik/NLDN1020138B1009/ac_power",
"qos": "0",
"datatype": "auto",
"broker": "f9f13036.e28b58",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 290,
"y": 320,
"wires": [
[
"233ead4f9fa70e29"
]
]
},
{
"id": "93a6265c9704e392",
"type": "change",
"z": "4c9f255573e89019",
"name": "Store Data 1",
"rules": [
{
"t": "set",
"p": "growatt_power",
"pt": "flow",
"to": "payload.values.pvpowerout",
"tot": "msg"
},
{
"t": "set",
"p": "growatt_energy",
"pt": "flow",
"to": "payload.values.pvenergytotal",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
"y": 80,
"wires": [
[
"646239bb4e28e2a3"
]
]
},
{
"id": "fc15b7c977b0244f",
"type": "change",
"z": "4c9f255573e89019",
"name": "Store Data 2",
"rules": [
{
"t": "set",
"p": "sma_power",
"pt": "flow",
"to": "payload.PAC1",
"tot": "msg"
},
{
"t": "set",
"p": "sma_energy",
"pt": "flow",
"to": "payload.ETotal",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
"y": 220,
"wires": [
[
"a14f389999ff4f13"
]
]
},
{
"id": "7c2c907eac473fde",
"type": "change",
"z": "4c9f255573e89019",
"name": "Store Data 3",
"rules": [
{
"t": "set",
"p": "omnik_power",
"pt": "flow",
"to": "payload[\"energy/omnik/NLDN1020138B1009/ac_power\"]",
"tot": "msg"
},
{
"t": "set",
"p": "omnik_energy",
"pt": "flow",
"to": "payload[\"energy/omnik/NLDN1020138B1009/e_total\"]",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 730,
"y": 360,
"wires": [
[
"ca0f1675abc53316"
]
]
},
{
"id": "85bda728286247c9",
"type": "inject",
"z": "4c9f255573e89019",
"name": "5 Min Tick",
"props": [
{
"p": "payload"
}
],
"repeat": "300",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 270,
"y": 720,
"wires": [
[
"16dc6bc6e7313a27",
"dfbc1db8562a1b2d",
"9a7747a2f6150e99"
]
]
},
{
"id": "a6399e43a4a46139",
"type": "function",
"z": "4c9f255573e89019",
"name": "Function",
"func": "var msg1 = {};\nvar msg2 = {};\nvar msg3 = {};\n\n\nlet growatt_power = flow.get(\"growatt_power\");\nlet sma_power = flow.get(\"sma_power\");\nlet omnik_power = parseFloat(flow.get(\"omnik_power\"));\n\nlet growatt_energy = flow.get(\"growatt_energy\");\nlet sma_energy = flow.get(\"sma_energy\");\nlet omnik_energy = parseFloat(flow.get(\"omnik_energy\"));\n\nlet total_power = growatt_power/10 + sma_power + omnik_power; //v2\nlet total_energy = growatt_energy*100 + sma_energy*1000 + omnik_energy*1000; //v1\n\nmsg1.payload = { \"command\": \"udevice\", \"idx\": 16, \"nvalue\": 0, \"svalue\": total_power + \";\" + total_energy };\nmsg2.payload = total_energy;\nmsg3.payload = total_power;\n\nreturn [msg1,msg2,msg3];",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 680,
"y": 480,
"wires": [
[
"8d0bce4ab027b9f6",
"1f19337be4e5fdb0"
],
[
"e2638ceab6273728"
],
[
"42bd2f24e28e6849"
]
]
},
{
"id": "8d0bce4ab027b9f6",
"type": "debug",
"z": "4c9f255573e89019",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 890,
"y": 440,
"wires": []
},
{
"id": "b7a1b8f0930a8cb4",
"type": "inject",
"z": "4c9f255573e89019",
"name": "Set to 0",
"props": [
{
"p": "payload.values.pvpowerout",
"v": "0",
"vt": "num"
},
{
"p": "payload.values.pvenergytotal",
"v": "0",
"vt": "num"
}
],
"repeat": "",
"crontab": "00 00 * * *",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 240,
"y": 120,
"wires": [
[
"93a6265c9704e392"
]
]
},
{
"id": "5aa2c2b741e69c78",
"type": "inject",
"z": "4c9f255573e89019",
"name": "Set to 0",
"props": [
{
"p": "payload.PAC1",
"v": "0",
"vt": "num"
},
{
"p": "payload.ETotal",
"v": "0",
"vt": "num"
}
],
"repeat": "",
"crontab": "00 00 * * *",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 240,
"y": 260,
"wires": [
[
"fc15b7c977b0244f"
]
]
},
{
"id": "33a0ff3c796d3e4a",
"type": "inject",
"z": "4c9f255573e89019",
"name": "Set to 0",
"props": [
{
"p": "payload[\"energy/omnik/NLDN1020138B1009/ac_power\"]",
"v": "0",
"vt": "num"
},
{
"p": "payload[\"energy/omnik/NLDN1020138B1009/e_total\"]",
"v": "0",
"vt": "num"
}
],
"repeat": "",
"crontab": "00 00 * * *",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 540,
"y": 420,
"wires": [
[
"7c2c907eac473fde"
]
]
},
{
"id": "646239bb4e28e2a3",
"type": "debug",
"z": "4c9f255573e89019",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 690,
"y": 80,
"wires": []
},
{
"id": "a14f389999ff4f13",
"type": "debug",
"z": "4c9f255573e89019",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 690,
"y": 220,
"wires": []
},
{
"id": "ca0f1675abc53316",
"type": "debug",
"z": "4c9f255573e89019",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 930,
"y": 360,
"wires": []
},
{
"id": "233ead4f9fa70e29",
"type": "join",
"z": "4c9f255573e89019",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": true,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 510,
"y": 360,
"wires": [
[
"7c2c907eac473fde"
]
]
},
{
"id": "5e509b8e055839bc",
"type": "mqtt in",
"z": "4c9f255573e89019",
"name": "MQTT In Omnik (Energy)",
"topic": "energy/omnik/NLDN1020138B1009/e_today",
"qos": "0",
"datatype": "auto",
"broker": "f9f13036.e28b58",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 290,
"y": 400,
"wires": [
[
"233ead4f9fa70e29"
]
]
},
{
"id": "1f19337be4e5fdb0",
"type": "mqtt out",
"z": "4c9f255573e89019",
"name": "To Domoticz",
"topic": "domoticz/in",
"qos": "0",
"retain": "false",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "f9f13036.e28b58",
"x": 890,
"y": 500,
"wires": []
},
{
"id": "2fc002c2638d7336",
"type": "join",
"z": "4c9f255573e89019",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "4",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 670,
"y": 720,
"wires": [
[
"56f118eea5b28066",
"fb4543e971312205"
]
]
},
{
"id": "e2638ceab6273728",
"type": "change",
"z": "4c9f255573e89019",
"name": "V1",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "v1",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 670,
"y": 580,
"wires": [
[
"2fc002c2638d7336",
"6b1e59e9c36465dd"
]
]
},
{
"id": "42bd2f24e28e6849",
"type": "change",
"z": "4c9f255573e89019",
"name": "V2",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "v2",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 670,
"y": 640,
"wires": [
[
"2fc002c2638d7336",
"a4d36530bf0d95b1"
]
]
},
{
"id": "56f118eea5b28066",
"type": "function",
"z": "4c9f255573e89019",
"name": "Set API key here !",
"func": "msg.action = msg.payload;\nmsg.headers = { \n 'X-Pvoutput-Apikey': 'xxxxxxxxxxxxxxxxxxx',\n 'X-Pvoutput-SystemId': 'xxxxxx',\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 870,
"y": 720,
"wires": [
[
"ed064d299a17e86a"
]
]
},
{
"id": "ed064d299a17e86a",
"type": "function",
"z": "4c9f255573e89019",
"name": "Set up data",
"func": "msg.action = msg.payload;\n\nmsg.url = \"http://pvoutput.org/service/r2/addstatus.jsp\";\n\n\n\nreturn msg;\n\n",
"outputs": 1,
"noerr": 0,
"x": 1090,
"y": 720,
"wires": [
[
"6f68c015253b3261"
]
]
},
{
"id": "6f68c015253b3261",
"type": "http request",
"z": "4c9f255573e89019",
"name": "Post",
"method": "POST",
"ret": "txt",
"paytoqs": false,
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"x": 1270,
"y": 720,
"wires": [
[
"3749eb27153bd365"
]
]
},
{
"id": "3749eb27153bd365",
"type": "debug",
"z": "4c9f255573e89019",
"name": "headercheck",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1290,
"y": 780,
"wires": []
},
{
"id": "6b1e59e9c36465dd",
"type": "debug",
"z": "4c9f255573e89019",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 890,
"y": 580,
"wires": []
},
{
"id": "a4d36530bf0d95b1",
"type": "debug",
"z": "4c9f255573e89019",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 890,
"y": 640,
"wires": []
},
{
"id": "fb4543e971312205",
"type": "debug",
"z": "4c9f255573e89019",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 850,
"y": 780,
"wires": []
},
{
"id": "16dc6bc6e7313a27",
"type": "time-switch",
"z": "4c9f255573e89019",
"name": "Day Time switch",
"lat": "52.179281",
"lon": "5.606528",
"startTime": "sunrise",
"endTime": "sunset",
"startOffset": "-30",
"endOffset": "+30",
"x": 480,
"y": 500,
"wires": [
[
"a6399e43a4a46139"
],
[]
]
},
{
"id": "dfbc1db8562a1b2d",
"type": "moment",
"z": "4c9f255573e89019",
"name": "Date",
"topic": "d",
"input": "",
"inputType": "date",
"inTz": "Europe/Amsterdam",
"adjAmount": 0,
"adjType": "days",
"adjDir": "add",
"format": "YYYYMMDD",
"locale": "C",
"output": "payload",
"outputType": "msg",
"outTz": "Europe/Amsterdam",
"x": 450,
"y": 700,
"wires": [
[
"2fc002c2638d7336"
]
]
},
{
"id": "9a7747a2f6150e99",
"type": "moment",
"z": "4c9f255573e89019",
"name": "Time",
"topic": "t",
"input": "",
"inputType": "date",
"inTz": "Europe/Amsterdam",
"adjAmount": 0,
"adjType": "days",
"adjDir": "add",
"format": "HH:mm",
"locale": "C",
"output": "payload",
"outputType": "msg",
"outTz": "Europe/Amsterdam",
"x": 450,
"y": 740,
"wires": [
[
"2fc002c2638d7336"
]
]
},
{
"id": "f9f13036.e28b58",
"type": "mqtt-broker",
"name": "localhost",
"broker": "127.0.0.1",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
}
]
Let me know the result.