Fox Reporting - TonyM1958/FoxESS-Cloud GitHub Wiki

This page contains additional information about Fox energy reporting, also referred to as Stats.

Variables

The API supports the following variables:

  • generation (Generation) - this is the energy output from the inverter (different to solar generation).
  • feedin (Grid Export) - this is the energy sent back to the grid as measured by the CT clamp or meter.
  • loads (Consumption) - this is the energy consumed by the house.
  • gridConsumption (Grid Import) - this is the energy taken from the grid as measured by the CT clamp or meter.
  • chargeEnergyTotal (Battery Charge) - this is the energy sent to the battery by the inverter (measured at the inverter Bat output).
  • dischargeEnergyTotal (Battery Discharge) - this is the energy taken from the battery by the inverter (measured at the inverter Bat input).
  • PVEnergyTotal (PV Yield) - this is the energy received by the inverter from the PV inputs.

Energy Counters

Each of the variables corresponds to an energy counter maintained by the inverter. For solar inverters, the only counter is Generation. For hybrid inverters, there is a full set of counters.

There are 2 sets of counters - today and total. The today counters reset to 0 at midnight each day, while the total counters start at 0 when the inverter is installed (or the counters are manually reset). They count up in increments of 0.1kWh.

You can access all of these counters via Modbus (where available).

Fox Cloud Processing

Fox cloud records the values of the total energy counters every 5 minutes and uses these values to derrive the energy stats available via the API and shown in their app and web site. Queries for this data can span various intervals:

  • day - the API returns 24 values, one for each hour of the day.
  • month - the API returns up to 31 values, one for each day of the month.
  • year - the API returns 12 values, one for each month of the year.

In addition to this, this library supports query by week - this returns and summarises the data over 7 days, using the days of the month.

Accuracy

The inverter energy counters are reasonably accurate. They may differ from Smart Meter readings because they integrate pulses of power in a slightly different way but you should find they roughly correspond. They may be significantly different if, for example, you have an EV charger that is hidden from your inverter as only your Smart Meter will record energy taken from the grid to charge the EV.

The problem with accuracy occurs within the Fox cloud processing. When derriving values, the Fox data queries take the first and last inverter energy counter value within the specified interval and subtract these. This results in systematic errors in the values returned:

  • day - the data returned is for each hour but each hour uses the first and last counter values WITHIN the hour and this results in an error of 5 minutes for each 60 minutes. Over the day, this means the counters omimt 2 hours out of 24 hours, or read around 92% of the correct value. The degree of error depends on how active the counters are. For example, if solar generation is 0 for 12 out of 24 hours, the error is 1 hour in 24 or 95%.
  • month - the data returned uses the first and last counter value for each day so the error is 5 minutes in each 24 hours or 99.6% of the correct value.
  • year - the data uses the first and last counter value for each month so the error is 5 minutes per month.

The way this manifests is, if you query the energy data for a day and sum the hour values, the result will be less than the value you get by querying the energy data for the month and getting the corresponding day.

This library compensates for this when reporting values. When you query by day, it returns the values provided by Fox and gives a 'sum' of these values. However, when query summary is enabled, it also queries the values by month and returns the value for the day as 'total'.

Load Accuracy

If you have more than 1 inverter (such as a solar inverter in addition to a hybrid inverter), then load power calculated by the inverter is not accurate. To fix this, you need to connect CT2 to monitor the output of the second inverter. When you do this, your load power is recalculated in the Fox cloud. However, as the load energy counter on the inverter does not record this, the load energy returned by the reporting API is incorrect.

This library compensates for this, when calculating load energy by re-integrating the corrected load power when calculating data for upload to pvoutput. This is controlled by the setting f.integrate_load_power.

PV Energy Accuracy

Fox has recently added reports for the PV Energy / PV Yield in the API and apps. This appears to be accurate for most of 2025 but the historic data does not seem correct. Why the older data is not accurate or when it becomes accurate has not been worked out at this time.

At present, this library integrates the PV Power values for each day to obtain reasonably accurate historic solar generation data.