Open Joshuaharry120 opened 1 year ago
I will have to create a new version of the application that does more logging so we can see the raw values that we get form FoxEss and the values that we send to PVOutput. With that information it should be possible to figure out why you see charging as generation. I imagine it must have something to do with a wrong interpretation of the FoxEss data while mapping it to PVOutput format. My own FoxEss inverter (F4600) is probably different from yours since I have no charging capabilities...
I will report back to you once the new version with extra logging is available.
this done yet?
Yes! I've completed it this morning. You should be able to configure the loglevel in the appsettings.json and set the Default loglevel to Trace. I've also added a DryRun option to the PVOutput section that can be enabled to prevent the application sending any data to PVOutput while you letting it run to gather the logs.
The configuration in the appsettings.json should look something like this (i've left some pieces out for brevity):
{
"Logging": {
"Console": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Warning",
"System": "Information"
},
...
}
},
"FoxEssCloud": {
...
},
"PVOutput": {
"ApiKey": "key",
"SystemId": 12345,
"DryRun": true
}
}
With the loglevel set to trace you will see something similar as the following appear in the logs:
{
"errno": 0,
"result": [
{
"variable": "generationPower",
"unit": "kW",
"name": "Output Power",
"data": [
{
"time": "2024-02-10 11:00:19 CET\u002B0100",
"value": 0.513,
"parsedTime": "2024-02-10T11:00:19+01:00"
},
{
"time": "2024-02-10 11:04:49 CET\u002B0100",
"value": 0.429,
"parsedTime": "2024-02-10T11:04:49+01:00"
}
]
},
{
"variable": "invTemperation",
"unit": "\u2103",
"name": "InvTemperation",
"data": [
{
"time": "2024-02-10 11:00:19 CET\u002B0100",
"value": 27,
"parsedTime": "2024-02-10T11:00:19+01:00"
},
{
"time": "2024-02-10 11:04:49 CET\u002B0100",
"value": 28,
"parsedTime": "2024-02-10T11:04:49+01:00"
}
]
},
{
"variable": "pv1Volt",
"unit": "V",
"name": "PV1Volt",
"data": [
{
"time": "2024-02-10 11:00:19 CET\u002B0100",
"value": 176.4,
"parsedTime": "2024-02-10T11:00:19+01:00"
},
{
"time": "2024-02-10 11:04:49 CET\u002B0100",
"value": 42.3,
"parsedTime": "2024-02-10T11:04:49+01:00"
}
]
},
{
"variable": "pv2Volt",
"unit": "V",
"name": "PV2Volt",
"data": [
{
"time": "2024-02-10 11:00:19 CET\u002B0100",
"value": 214.3,
"parsedTime": "2024-02-10T11:00:19+01:00"
},
{
"time": "2024-02-10 11:04:49 CET\u002B0100",
"value": 200.4,
"parsedTime": "2024-02-10T11:04:49+01:00"
}
]
},
{
"variable": "pv3Volt",
"unit": "V",
"name": "PV3Volt",
"data": [
{
"time": "2024-02-10 11:00:19 CET\u002B0100",
"value": 0,
"parsedTime": "2024-02-10T11:00:19+01:00"
},
{
"time": "2024-02-10 11:04:49 CET\u002B0100",
"value": 0,
"parsedTime": "2024-02-10T11:04:49+01:00"
}
]
},
{
"variable": "pv4Volt",
"unit": "V",
"name": "PV4Volt",
"data": [
{
"time": "2024-02-10 11:00:19 CET\u002B0100",
"value": 0,
"parsedTime": "2024-02-10T11:00:19+01:00"
},
{
"time": "2024-02-10 11:04:49 CET\u002B0100",
"value": 0,
"parsedTime": "2024-02-10T11:04:49+01:00"
}
]
}
]
}
depending on how far the current hour has past you will get more entries in the data arrays (approx. one every 3 minutes). The example shown here is from my own inverter. There are a load of other variables available but the application only requests these 6:
If you want to see what else FoxESS has logged, you should use their website (https://www.foxesscloud.com/bus/device/inverter) and click on the "view" icon right of the inverter information. Then scroll down and use the dropdown in the last pane that says "Please Select".
These values are used to create a new measurement on PVOutput. In the logs, below the first trace, you should be able to find the data that is sent to PVOutput. It looks like this:
2024-02-10 11:41:08.687 trce: FoxEssCloudPoller.DataPoller[0]
Final measurements that are passed down to the handler (e.g. sent to PVOutput):
Measurements: {
"Timestamp": "2024-02-10T11:37:49+01:00",
"GeneratedPower": 707.000,
"InverterTemperature": 29,
"P1Volt": 174,
"P2Volt": 211.5,
"P3Volt": 0,
"P4Volt": 0
}
A few lines below this you can see what is actually sent to PVOutput.org:
2024-02-10 11:41:08.690 info: FoxEssCloudPoller.SendMeasurmentsToPVOutputHandler[0]
02/10/2024 11:37:49 -> 02/10/2024 11:40:00 | 707.000W 29C 174V 211.5V 0V 0V
2024-02-10 11:41:08.693 info: FoxEssCloudPoller.PVOutputClient[0]
DryRun mode is enabled. Not posting data to PVOutput.org.
https://pvoutput.org/service/r2/addstatus.jsp?d=20240210&t=11%3A37&v2=707.000&v5=29&v6=385.5
The first log entry from this example shows you the values that are being used, The kW is converted to W (e.g. 707kW = 707.000W) and you can also see the time is being rouned to the nearest 5 minute interval.
If DryRun
is enabled in the configuration you will also see the uri that would be used to post these values to the PVOutput API.
I would love to hear from you, and look at the logs you are able to collect to figure this thing out.
Hi mate.
When drawing power from grid, EG, charging at low rate it shows as generation to pvoutput, can this be looked into my chance?