Enphase auto uploading and Average Power.
The Enphase API will report average power in two possible formats - depending on the level of communication with the microinverters.
The most common format is average power is equal to Power. Thus PVOUTPUT correct takes that average power and divides it by the time interval (usually 15 mins) to get the correct kWh. This is the vast majority of Enphase systems.
If your Envoy is has excellent communication with the microinverters (as in 5 bars of communication strength - not common), then the real average power for that time interval is reported. This average power is already adjusted for the time interval. PVOUTPUT then incorrect divides that already adjusted value by the time interval (usually 15 mins) and you end up with a dramatically lower daily output - almost 4x too low.
Solution 1. Manual. Add option to ignore the average power as reported by Enphase and compute it yourself. This is not the same as the option to ignore the average power on the chart, pvoutput still uses that reported output to compute the kWh. PVOUTPUT needs to compute average power itself and completely ignore the Enphase API average power value.
Solution 2: Automatic. This would required some parameter validation. If the reported average power value is outside of some valid range as compared to the instantaneous power output (for example less than 1/2 if the time interval is 15 mins for example) then use the average power as that value for that time interval and do not adjust it for the time interval. Otherwise do what you already do.
Suggestion: Solution 1 would allows those of us that have 5 bars of communication strength to simply tell PVOUTPUT to compute the value itself and ignore that Enphase API supplied value since the value has two possible interpretations and there is no way via the API to know which values is being reported.
You may look at my data for examples. I recently discovered this after going though a great deal of work to get the Envoy to have 5 bars of communication to every microinverter.
https://pvoutput.org/intraday.jsp?id=49477&sid=45049&dt=20170613
https://enlighten.enphaseenergy.com/pv/public_systems/BJ9X1094133/overview?preview=1
You can see the recent PVOUTPUT daily energy value is dramatically low compared to what Enphase is reporting:
Edit: Appear that if you set the Enphase polling interval to 5 minutes, then you get the correct values. Any other time frame and the Average Power value is far too low. Very strange…