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

Implementing open-meteo API #469

Merged
merged 28 commits into from
Feb 26, 2025
Merged

Conversation

davidusb-geek
Copy link
Owner

This is a first batch implementing thi API.

For now a weird error when fetching data:

    return packer_type.unpack_from(memoryview_type(buf), head)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: unpack_from requires a buffer of at least 1952671096 bytes for unpacking 4 bytes at offset 1952671092 (actual buffer size is 110)

@davidusb-geek
Copy link
Owner Author

Hi @GeoDerp, this is a first try on this.
For now failing with some buffer error that I wasn't able to solve yet...

@GeoDerp
Copy link
Contributor

GeoDerp commented Feb 22, 2025

Hi @GeoDerp, this is a first try on this.
For now failing with some buffer error that I wasn't able to solve yet...

I'll have a look if I have some time later today 😁

@davidusb-geek
Copy link
Owner Author

davidusb-geek commented Feb 22, 2025

Getting there @GeoDerp
So for now the caching is what is proposed directly by open-meteo.
You can implement the same approach that you did with Solcast if you can

@davidusb-geek
Copy link
Owner Author

This is on track @GeoDerp
It's finished on my side. I finally dropped the proposed open-meteo tool, it was a bit buggy. Using simple and plain request module. It works just fine but no retry or cache utility whatsoever.

@GeoDerp
Copy link
Contributor

GeoDerp commented Feb 23, 2025

This is on track @GeoDerp
It's finished on my side. I finally dropped the proposed open-meteo tool, it was a bit buggy. Using simple and plain request module. It works just fine but no retry or cache utility whatsoever.

Cool! Will look at it when I am available next 😁

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 55.45455% with 49 lines in your changes missing coverage. Please review.

Project coverage is 65.24%. Comparing base (ad36bb8) to head (ced5467).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/emhass/forecast.py 55.45% 49 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #469      +/-   ##
==========================================
- Coverage   65.87%   65.24%   -0.63%     
==========================================
  Files           8        8              
  Lines        3059     3070      +11     
==========================================
- Hits         2015     2003      -12     
- Misses       1044     1067      +23     

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

@davidusb-geek davidusb-geek merged commit aef6238 into master Feb 26, 2025
14 of 15 checks passed
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