Re: enphase envoy with (HTTP) interface
Posted: Tuesday 29 November 2022 11:01
Open source Home Automation System
https://forum.domoticz.com/
So in the response is a direct relation of the "serialNumber" and the "lastReportWatts"{
"serialNumber": "121851003477",
"lastReportDate": 1675347243,
"devType": 1,
"lastReportWatts": 6,
"maxReportWatts": 122
},
Code: Select all
http://192.168.10.40/api/v1/production/inverters
Which is precisely what I do see!FireWizard wrote: ↑Thursday 02 February 2023 16:02 You should check whether the indication in the Domoticz widget is identical to what is shown in the browser, if you go to:
Only if you see a difference between, what is shown in your browser and what is shown in Domoticz, you can conclude that there is something wrong.Code: Select all
http://192.168.10.40/api/v1/production/inverters
How many devices are polling the Enphase Envoy (Gateway)? Are the 2 Pi Zero the only two devices?I have the latest beta installed on two Pi Zeros
Where is Node-RED running, also on the Pi Zero?The incorrect pi zero is pushing all inverters over MQTT to NodeRed
I only mentioned the orientation of the panels because if all panels faced the same way I would not know anything was wrong. At the time I took the screenshots in github:FireWizard wrote: ↑Thursday 02 February 2023 18:31 Hello @SumDum
This explains a lot more, but I do not believe, it has something to do with the orientation of the panels.
If, it is true, it may happen randomly.
Yep, careful notes were kept when the installations were done. I know they are right because I did all the installation myself. Enphase inverters have peel off serial number labels on them and they provide a plan so that it is very easy to keep track. I can post .PDFs of the installation maps.FireWizard wrote: ↑Thursday 02 February 2023 18:31 You do have a clear picture of the panel lay-out and know exactly where each panel (serial number) has been installed?
Now there are two Pis and an occasional manually refreshed browser tab. When I first suspected a problem there was only one Pi Zero. B+ (see below)FireWizard wrote: ↑Thursday 02 February 2023 18:31 How many devices are polling the Enphase Envoy (Gateway)? Are the 2 Pi Zero the only two devices?
Keep in mind that polling the Enphase Envoy to frequent with two many devices, this may crash the Gateway.
In my opinion 1 poll per 30 seconds is enough.
Ah no, I made a mistake here. The original Pi reports:FireWizard wrote: ↑Thursday 02 February 2023 18:31 Are the two Pi zero's identical? Obviously 1 Pi Zero functions correct and the other show a failure, You also said:
Code: Select all
Model : Raspberry Pi Model B Plus Rev 1.2
Code: Select all
Model : Raspberry Pi Zero W Rev 1.1
No, that's on a Pi 4 totally separate.
The Pi B+ has one DS18B20 attached, plus the Enphase stuff.
Really because that looked complicated, I never found the time to work through it. Then the beta turned up & made it so much simplerFireWizard wrote: ↑Thursday 02 February 2023 18:31 Why don't you connect your Node-RED to the Enphase Gateway and push a MQTT value to a virtual sensor in Domoticz on the Pi Zero.
I do that already for many years and had never any issue.
See: viewtopic.php?t=29331
Code: Select all
14969 20230117 Enphase Setting inverter device types to computed
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": ""
}
]
How far is it fixed.What I can do is use the last digits of the serials as the ID, the first seems to be fixed
Code: Select all
2023-02-27 11:53:47.146 Status: enphase: Worker started...
2023-02-27 11:53:51.262 Status: enphase: Connected, serial: 121831009724, software: R5.0.55
2023-02-27 11:53:51.262 Status: enphase: Unsupported software version! Please contact us for support!
2023-02-27 11:53:52.717 enphase: General/kWh (Zonnepanelen Productie)
2023-02-27 11:53:52.740 enphase: General/kWh (Enphase kWh Consumption)
2023-02-27 11:53:52.837 enphase: General/kWh (Enphase kWh Net Consumption)