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

Dark Sky API should be replaced #40

Open
franksnl opened this issue Jun 11, 2020 · 13 comments
Open

Dark Sky API should be replaced #40

franksnl opened this issue Jun 11, 2020 · 13 comments

Comments

@franksnl
Copy link

Dark Sky has joined Apple and does not accept new API signups.

"Our API service for existing customers is not changing today, but we will no longer accept new signups. The API will continue to function through the end of 2021."

https://blog.darksky.net/dark-sky-has-a-new-home/

@eNeRGy164
Copy link
Contributor

I was already afraid this topic would come up. :)

I really like the Dark Sky API, but that's probably also the reason why Apple bought them.

Does anyone have suggestions for a replacement API?

@franksnl
Copy link
Author

I guess most accurate will be your own or a nearby Netatmo weatherstation https://dev.netatmo.com/apidocumentation/weather

@markruys
Copy link
Owner

Netatmo looks promising. You need to create a free account and an app. Then we can use https://pypi.org/project/netatmo/ to query a weather station. I don't know yet how you can get such an id nearby your PV.

@franksnl
Copy link
Author

https://dev.netatmo.com/apidocumentation/weather#getpublicdata
The response based on square lat/lon of your area contains nearby id's.

Looks like function getmeasure required both device_id and module_id.

@markruys
Copy link
Owner

Yes, I was thinking in the same direction. Pick a square area, enlarge it until you find weather stations and then pick the closest. With a command line option to overrule this selection mechanism and use a fixed device id.

I don't think we need to set a module id, we get all sensor data and filter out the temperature.

BTW, there are a few more Python packages implementing the Netamo API, so we should pick the best/most mature.

markruys pushed a commit that referenced this issue Jun 30, 2020
Dark Sky API should be replaced (#40) as it's being closed down. Netatmo is a reasonable alternative.
@markruys
Copy link
Owner

I've create a feature branch with a first attempt: https://github.com/markruys/gw2pvo/tree/feature/netatmo. It supports only public Netamo weather stations, so it won't work to obtain historical temperature readings. Please let me know how it works for you.

@sam-utr
Copy link

sam-utr commented Jul 1, 2020

Didnt try the netatmo branch yet but another option could be openweather. See https://openweathermap.org/darksky-openweather

Will also try out the new feature branch in the meanwhile.

@franksnl
Copy link
Author

franksnl commented Jul 2, 2020

I've tested the feature branch and works like expected! Leaving device-id empty uses a public weatherstation close to my location. Looks like my own device is excluded from the getpublicdata response. Using the MAC address at device-id works for using my own device.

@markruys
Copy link
Owner

markruys commented Jul 5, 2020

But I've merged the Netatmo into trunk and released it as 1.3.5. You can try it like:

sudo pip3 install gw2pvo==1.3.5

@willlllzy
Copy link

willlllzy commented Oct 30, 2020

I just added Netatmo to the config, it looks like the keys are correct and connection established to the API however the log is showing error and it doesn't upload to PVoutput:

INFO Normal, 794.0 W now, 21.9 kWh today, 83.2 kWh all time, 243.7 V grid, 617.8 V PV
ERROR 'city'

Edit: all goods, extracted the device id from the log and added to config files. Works now!

@L-four
Copy link

L-four commented Oct 30, 2020

My inverter reports it's own temperature I have been logging that: L-four@74d4640

@ThinkPadNL
Copy link

Why is a weather API needed for gw2pvo needed in the first place? PVOutput already supports this by itself.
Just create an API-key at OpenWeatherMap and fill it in at the PVOutput system settings.

@eNeRGy164
Copy link
Contributor

Why is a weather API needed for gw2pvo needed in the first place? PVOutput already supports this by itself.
Just create an API-key at OpenWeatherMap and fill it in at the PVOutput system settings.

Because this was built a year before PVOutput started supporting OpenWeatherMap?

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

No branches or pull requests

7 participants