ThingPulse / esp8266-weather-station

ESP8266 Weather Station library supporting OpenWeatherMap, Aeris and other sources
MIT License
1.06k stars 359 forks source link

Support OpenWeatherMap One Call API #182

Closed c-klinger closed 3 years ago

c-klinger commented 4 years ago

Missing feature

OpenWeatherMap offers a new API Endpoint called One Call API which is also available to free plans. The response includes current data, hourly and daily forecast.

https://openweather.co.uk/blog/post/new-one-call-api-essential-weather-data

Justification

In comparison to existing implementations (Current and 5d/3h Endpoints) we get some additional data like the UV Index or dew point, longer forecast period (7 days insted of 5 days) and hourly forecast for next 48h hours.

Workarounds

You can still use existing Implementations but there is no "easy" workaround to get for example the UV Index.

AndrewsBrewing commented 3 years ago

Hello Chris, this is a great add to the already wonderful library. Do you happen to have an example for OpenWeatherMapOneCall.h?

marcelstoer commented 3 years ago

Do you happen to have an example for OpenWeatherMapOneCall.h?

That was one of things I asked for in the review at https://github.com/ThingPulse/esp8266-weather-station/pull/183#issuecomment-623130626

c-klinger commented 3 years ago

Hi guys, sorry Marcel, as i'm not working on my project over the last month your review feedback got lost in my inbox...

I added a simple example in commit 36615a8. Hope that helps @AndrewsBrewing.

I also like your idea of refactoring the APIs under a common umbrella @marcelstoer. Unfortunately for the next weeks/month i'm not having enough time to do such bigger change ... maybe in winter month.

AndrewsBrewing commented 3 years ago

It works great! I can see the things that I was doing wrong. Thank you!

marcelstoer commented 3 years ago

Unfortunately for the next weeks/month i'm not having enough time to do such bigger change ... maybe in winter month.

You're welcome anytime 😉