Today we have a little bit more sun than yesterday. I compared the results in the Test Pi with the production Pi, but did not record any difference.
So again no issues observed. Just upgraded to the latest beta (v15022)
I have both test and production set to " To Computed" and I do not believe that will influence your result.
Like you, I do not believe in a hardware bug.
You can compare the results with the flow below, which you can install on your Pi4.
This flow does not use any part of the Domoticz software. It reads the API and outputs data to Domoticz (MQTT) or a "Debug" Node.
The left Inject Node triggers the flow every 30 seconds. It is up to you to change it.
The next "Day Time Switch" opens the flow from 1 hour before sunrise until 1 hour after sunset.
The HTTP request node polls the API Envoy (Gateway).
1. URL. Use your own IP address
2. Username. In my case "Envoy"
3. Password. Last 6 digits of the Envoy (Gateway) serialnumber
The next node splits the data, so that we have one message per inverter.
You should do the mapping yourself.
Code: Select all
[
{
"id": "32228b5e.6bbbe4",
"type": "inject",
"z": "fa8c9e54db2d0f2a",
"name": "Timer ( 30 seconds)",
"props": [
{
"p": "payload"
}
],
"repeat": "30",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 220,
"y": 300,
"wires": [
[
"4709b3cb.376b2c"
]
]
},
{
"id": "4709b3cb.376b2c",
"type": "time-switch",
"z": "fa8c9e54db2d0f2a",
"name": "Day Time switch",
"lat": "52.179281",
"lon": "5.606528",
"startTime": "sunrise",
"endTime": "sunset",
"startOffset": "-60",
"endOffset": "+60",
"x": 460,
"y": 300,
"wires": [
[
"1bf22be8.529d6c"
],
[]
]
},
{
"id": "1bf22be8.529d6c",
"type": "http request",
"z": "fa8c9e54db2d0f2a",
"name": "Envoy-S Production/Inverter Request",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://192.168.10.40/api/v1/production/inverters",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "digest",
"senderr": false,
"headers": [],
"credentials": {},
"x": 750,
"y": 300,
"wires": [
[
"8bcd8e7e.695e68"
]
]
},
{
"id": "8bcd8e7e.695e68",
"type": "split",
"z": "fa8c9e54db2d0f2a",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 430,
"y": 400,
"wires": [
[
"86287b9b.69f7b8"
]
]
},
{
"id": "86287b9b.69f7b8",
"type": "function",
"z": "fa8c9e54db2d0f2a",
"name": "Solar Production Inverters to Domoticz",
"func": "switch (msg.payload.serialNumber) {\n\n case \"121851005629\": //Solar Panel 1\n if ((msg.payload.lastReportWatts) < 0) (msg.payload.lastReportWatts) = 0;\n msg.payload = {\"command\":\"udevice\",\"idx\":263,\"nvalue\":0,\"svalue\":((msg.payload.lastReportWatts).toString() + \";0\")};\n break;\n\n case \"121851003477\": //Solar Panel 2\n if ((msg.payload.lastReportWatts) < 0) (msg.payload.lastReportWatts) = 0;\n msg.payload = {\"command\":\"udevice\",\"idx\":264,\"nvalue\":0,\"svalue\":((msg.payload.lastReportWatts).toString() + \";0\")};\n break;\n\n case \"121834020289\": //Solar Panel 3\n if ((msg.payload.lastReportWatts) < 0) (msg.payload.lastReportWatts) = 0;\n msg.payload = {\"command\":\"udevice\",\"idx\":265,\"nvalue\":0,\"svalue\":((msg.payload.lastReportWatts).toString() + \";0\")};\n break;\n\n case \"121834020404\": //Solar Panel 4\n if ((msg.payload.lastReportWatts) < 0) (msg.payload.lastReportWatts) = 0;\n msg.payload = {\"command\":\"udevice\",\"idx\":266,\"nvalue\":0,\"svalue\":((msg.payload.lastReportWatts).toString() + \";0\")};\n break;\n\n case \"121834010561\": //Solar Panel 5\n if ((msg.payload.lastReportWatts) < 0) (msg.payload.lastReportWatts) = 0;\n msg.payload = {\"command\":\"udevice\",\"idx\":267,\"nvalue\":0,\"svalue\":((msg.payload.lastReportWatts).toString() + \";0\")};\n break;\n\n case \"121834019489\": //Solar Panel 6\n if ((msg.payload.lastReportWatts) < 0) (msg.payload.lastReportWatts) = 0;\n msg.payload = {\"command\":\"udevice\",\"idx\":268,\"nvalue\":0,\"svalue\":((msg.payload.lastReportWatts).toString() + \";0\")};\n break;\n\n case \"121851003159\": //Solar Panel 7\n if ((msg.payload.lastReportWatts) < 0) (msg.payload.lastReportWatts) = 0;\n msg.payload = {\"command\":\"udevice\",\"idx\":269,\"nvalue\":0,\"svalue\":((msg.payload.lastReportWatts).toString() + \";0\")};\n break;\n\n case \"121851009091\": //Solar Panel 8\n if ((msg.payload.lastReportWatts) < 0) (msg.payload.lastReportWatts) = 0;\n msg.payload = {\"command\":\"udevice\",\"idx\":270,\"nvalue\":0,\"svalue\":((msg.payload.lastReportWatts).toString() + \";0\")};\n break;\n}\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 700,
"y": 400,
"wires": [
[
"ded33082d29e4182"
]
]
},
{
"id": "df136f90.4190e",
"type": "mqtt out",
"z": "fa8c9e54db2d0f2a",
"name": "Domoticz In",
"topic": "domoticz/in",
"qos": "0",
"retain": "false",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "108bbff65a6cdbf3",
"x": 990,
"y": 460,
"wires": []
},
{
"id": "ded33082d29e4182",
"type": "debug",
"z": "fa8c9e54db2d0f2a",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 980,
"y": 400,
"wires": []
},
{
"id": "108bbff65a6cdbf3",
"type": "mqtt-broker",
"name": "",
"broker": "192.168.10.51",
"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": ""
}
]