I have linked my Enphase system to homey. The connection is working en it is reporting values. The Energiemeter value seems to be correct. But the reported Energie value is not.
I have checked the enphase api. It seems the summary api you use is not reporting correct values for current_power.
This is not only on my system. Also other system have the same problem.
See:
https://developer.enphase.com/forum/topics/summary-current_power-reliable
As replacement for the summery api you could use the stats api. This seems to reporting correct values.
This is reporting the power in intervals of 5 minutes.
Without any filtering it is reporting all intervals for the current day (adding a filter can make the result smaller and faster to process).
You can then take the last interval.
If the last interval is too old (system is not reporting intervals when system is not generating power) then 0 can be used for the energie value.
This also solves the problem that current_power never gets to 0 in the summery api.
Sample of a stats call:
https://api.enphaseenergy.com/api/v2/systems/1234567/stats?key=&user_id=&datetime_format=iso8601
Sample output (most intervals removed):
{
system_id: 1234567,
total_devices: 8,
intervals: [
{
end_at: "2019-02-04T08:00:00+01:00",
devices_reporting: 2,
powr: 0,
enwh: 0
},
{
end_at: "2019-02-04T08:05:00+01:00",
devices_reporting: 8,
powr: 2,
enwh: 0
},
.
.
.
{
end_at: "2019-02-04T17:00:00+01:00",
devices_reporting: 8,
powr: 37,
enwh: 3
},
{
end_at: "2019-02-04T17:05:00+01:00",
devices_reporting: 8,
powr: 33,
enwh: 3
}
],
meta: {
status: "normal",
last_report_at: "2019-02-04T17:52:52+01:00",
last_energy_at: "2019-02-04T17:05:41+01:00",
operational_at: "2019-01-31T13:18:16+01:00"
}
}