openclimatefix / Open-Source-Quartz-Solar-Forecast

Open Source Solar Site Level Forecast
MIT License
43 stars 40 forks source link

add live data integration #129

Closed aryanbhosale closed 2 weeks ago

aryanbhosale commented 3 weeks ago

Pull Request

Description

Building on #47 and integrating it with the Enphase code, this PR successfully follows the auth grant flow and fetches the last 30min data from an enphase system(you should know the system ID of the system and the HO should give you access to the system)

The following image is a comparison curve: image

Fixes #120

How Has This Been Tested?

Tested this with @peterdudfield 's enphase system and compared the live generation with the fake data

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?

Checklist:

Sukh-P commented 3 weeks ago

Great work @aryanbhosale very cool to see the forecast working and taking in actual PV generation data!

I think this is almost there just a few small things to check given my comments and for me this feels like it's missing a test, either at the highest level a test that the forecast runs when you have some inverter data (could add some mock/fake data that is returned when calling the get_enphase_data function to test that everything works) or a test on the make_pv_data function with again some fake data returned when calling the get_enphase_data function

aryanbhosale commented 3 weeks ago

Great work @aryanbhosale very cool to see the forecast working and taking in actual PV generation data!

I think this is almost there just a few small things to check given my comments and for me this feels like it's missing a test, either at the highest level a test that the forecast runs when you have some inverter data (could add some mock/fake data that is returned when calling the get_enphase_data function to test that everything works) or a test on the make_pv_data function with again some fake data returned when calling the get_enphase_data function

Yeah that sounds good, I think adding it to the make_pv_data function makes more sense since it's more specific and we'd know where to look when something's wrong