Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetches live Enphase data at the moment it is called #66

Merged
merged 5 commits into from
Mar 4, 2024
Merged

fetches live Enphase data at the moment it is called #66

merged 5 commits into from
Mar 4, 2024

Conversation

aryanbhosale
Copy link
Member

@aryanbhosale aryanbhosale commented Feb 28, 2024

replace 'user_enphase_api_key' and 'user_enphase_user_id' with the actual Enphase API key and user ID. The make_pv_data function now fetches live data from the Enphase API and combines it with the existing fake PV data This "may" not be from the time of interference, do i add make use of timestamps to enable it?

Pull Request

Description

I have updated the comments to encapsulate what's updated

Please delete the italicised instruction text!
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration

  • Yes

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

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

replace 'user_enphase_api_key' and 'user_enphase_user_id' with the actual Enphase API key and user ID. The make_pv_data function now fetches live data from the Enphase API and combines it with the existing fake PV data
This "may" not be from the time of interference, do i add make use of timestamps to enable it?
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.83%. Comparing base (b1bb4cd) to head (bdb181b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #66   +/-   ##
=======================================
  Coverage   80.83%   80.83%           
=======================================
  Files          11       11           
  Lines         334      334           
=======================================
  Hits          270      270           
  Misses         64       64           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@peterdudfield
Copy link
Contributor

Thanks so much for this @aryanbhosale . This links with #59.
Did you test this with any real data? I think I can get you some credientials and then we should try it out.

I think it would be good for the user to have an option, to either use live pv data from enphase or not. This would mean that by default it works without this data. This is becasue only some users will have pv data from an enphase inverter

@aryanbhosale
Copy link
Member Author

Thanks so much for this @aryanbhosale . This links with #59. Did you test this with any real data? I think I can get you some credientials and then we should try it out.

I think it would be good for the user to have an option, to either use live pv data from enphase or not. This would mean that by default it works without this data. This is becasue only some users will have pv data from an enphase inverter

No @peterdudfield I haven't yet tried it with real data because of the limitation of credentials. But since you can get some credentials to work with, I could do it this week.
I also liked the idea of giving the user an option to choose the default values or the live ones, I will work on implementing that first.
Thank you for the opportunity @peterdudfield !

Now the user will have an option whether to use live enphase data or the default data
@aryanbhosale
Copy link
Member Author

Thanks so much for this @aryanbhosale . This links with #59. Did you test this with any real data? I think I can get you some credientials and then we should try it out.

I think it would be good for the user to have an option, to either use live pv data from enphase or not. This would mean that by default it works without this data. This is becasue only some users will have pv data from an enphase inverter

I've made a new PR for giving user an option to choose whether to use enphase live data or the default one

@aryanbhosale
Copy link
Member Author

aryanbhosale commented Feb 29, 2024

@peterdudfield could you please review my PR for issue #36 and give suggestions on how I could make it better/feature rich
Thank you

@aryanbhosale
Copy link
Member Author

Hi @peterdudfield , could you please review my code?

@aryanbhosale aryanbhosale mentioned this pull request Mar 3, 2024

ssl._create_default_https_context = ssl._create_unverified_context

# User needs to add their Enphase API details
ENPHASE_API_KEY = 'user_enphase_api_key'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we make this envionrment variables?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we make this envionrment variables?

Sure, will make the required change and add a .env.example file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we make this envionrment variables?

Should i add a .env file in /Open-Source-Quartz-Solar-Forecast/quartz_solar_forecast
or simply in /Open-Source-Quartz-Solar-Forecast

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we make this envionrment variables?

I have added the changes in my PR for environment variables, please review it. Thank you

@peterdudfield
Copy link
Contributor

One small change, and lets then gets this merged.
Things to add later on would be

  • test with real enphase details
  • add example code, on how to use this

@aryanbhosale
Copy link
Member Author

One small change, and lets then gets this merged. Things to add later on would be

  • test with real enphase details
  • add example code, on how to use this

Will do!

@peterdudfield peterdudfield merged commit 6a09e4c into openclimatefix:main Mar 4, 2024
4 checks passed
@peterdudfield peterdudfield mentioned this pull request Mar 4, 2024
peterdudfield added a commit that referenced this pull request Mar 4, 2024
* Bump version: 1.0.9 → 1.0.10 [skip ci]

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* Bump version: 1.0.10 → 1.0.11 [skip ci]

* Replace H with h inside pandas' floor function (#64)

Thanks @0xFrama for this

* Bump version: 1.0.11 → 1.0.12 [skip ci]

* Added Contribution Guide (#65)

* added contribution guide

* added reference to coding style

* Bump version: 1.0.12 → 1.0.13 [skip ci]

* docs: add roshnaeem as a contributor for doc (#67)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* Test set analysis (#60)

* test set analysis

* added link to nbviewer in notebook

* deleted checkpoints

* Delete checkpoints

* delete metadata.csv

* using metadata from hugging face

* remove unused import

* Bump version: 1.0.13 → 1.0.14 [skip ci]

* docs: add bikramb98 as a contributor for code (#68)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* fetches live Enphase data at the moment it is called (#66)

* fetches live Enphase data at the moment it is called

replace 'user_enphase_api_key' and 'user_enphase_user_id' with the actual Enphase API key and user ID. The make_pv_data function now fetches live data from the Enphase API and combines it with the existing fake PV data
This "may" not be from the time of interference, do i add make use of timestamps to enable it?

* Added Flag indicating whether to use live Enphase data or not

Now the user will have an option whether to use live enphase data or the default data

* Updated site object to accomodate is_inverter option + created /inverters/enphase.py file

* added environment variables

* Bump version: 1.0.14 → 1.0.15 [skip ci]

* added init.py in invertors directory

* fixed the import of enphase_data

---------

Co-authored-by: BumpVersion Action <bumpversion@github-actions>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Peter Dudfield <[email protected]>
Co-authored-by: Francesco <[email protected]>
Co-authored-by: Bikram Baruah <[email protected]>
Co-authored-by: Aryan Bhosale <[email protected]>
peterdudfield added a commit that referenced this pull request Mar 4, 2024
* Bump version: 1.0.9 → 1.0.10 [skip ci]

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* Bump version: 1.0.10 → 1.0.11 [skip ci]

* Replace H with h inside pandas' floor function (#64)

Thanks @0xFrama for this

* Bump version: 1.0.11 → 1.0.12 [skip ci]

* Added Contribution Guide (#65)

* added contribution guide

* added reference to coding style

* Bump version: 1.0.12 → 1.0.13 [skip ci]

* docs: add roshnaeem as a contributor for doc (#67)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------



* Test set analysis (#60)

* test set analysis

* added link to nbviewer in notebook

* deleted checkpoints

* Delete checkpoints

* delete metadata.csv

* using metadata from hugging face

* remove unused import

* Bump version: 1.0.13 → 1.0.14 [skip ci]

* docs: add bikramb98 as a contributor for code (#68)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------



* fetches live Enphase data at the moment it is called (#66)

* fetches live Enphase data at the moment it is called

replace 'user_enphase_api_key' and 'user_enphase_user_id' with the actual Enphase API key and user ID. The make_pv_data function now fetches live data from the Enphase API and combines it with the existing fake PV data
This "may" not be from the time of interference, do i add make use of timestamps to enable it?

* Added Flag indicating whether to use live Enphase data or not

Now the user will have an option whether to use live enphase data or the default data

* Updated site object to accomodate is_inverter option + created /inverters/enphase.py file

* added environment variables

* Bump version: 1.0.14 → 1.0.15 [skip ci]

* added init.py in invertors directory

* fixed the import of enphase_data

---------

Co-authored-by: Rosheen Naeem <[email protected]>
Co-authored-by: BumpVersion Action <bumpversion@github-actions>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Francesco <[email protected]>
Co-authored-by: Bikram Baruah <[email protected]>
Co-authored-by: Aryan Bhosale <[email protected]>
@aryanbhosale
Copy link
Member Author

Hi @peterdudfield ,what are the next steps for this project? I would like to dive deeper and solve more issues on this topic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants