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

Weather underground free api keys going away #31

Open
stevejbauer opened this issue May 30, 2018 · 9 comments
Open

Weather underground free api keys going away #31

stevejbauer opened this issue May 30, 2018 · 9 comments

Comments

@stevejbauer
Copy link
Contributor

As can be seen here, https://www.wunderground.com/weather/api/, the free api keys are going away. This will affect the weather base water level adjust.

@Dan-in-CA
Copy link
Owner

I figured that would happen sooner or later.
Some folks are moving to OpenWeatherMap.:
https://www.openweathermap.org/api

The original authors of the SIP weather plugins are no longer active but It may be possible to make the change without too much trouble.

@stevejbauer
Copy link
Contributor Author

I have seen others moving to the darksky api: https://darksky.net/dev as well which is free for the first 1000 requests.

@Dan-in-CA
Copy link
Owner

See this post:
Dan-in-CA/SIP#205

@stevejbauer
Copy link
Contributor Author

If I can find some time, I will take a look at getting the open weather map stuff going. I just have a lot of other irons in the fire so to speak so it will take some time and currently using weather underground is still working as long as one doesn't have to get a new key.

@stevejbauer
Copy link
Contributor Author

Any other options to look at? After looking closer at open weather map, the only station one can use is the what they have published or ones own weather station that is being uploaded to the service. It doesn't appear as if one can use say a neighbors weather station data that is uploaded unless one has a the api key that was used to upload the data.

@Dan-in-CA
Copy link
Owner

Dan-in-CA commented Jun 20, 2018

Bummer!
Well... if you are in the U.S. you might take a look at the NOAA API:
https://www.ncdc.noaa.gov/cdo-web/token

There is some Python code on the internet for doing this, for example:
https://pythonhosted.org/get-weather-data/noaaweb.html

Since the weather plugins are set up to use alternate data sources it might be necessary to add ones for different parts of the world.

@DavidLaidlaw
Copy link

I looked a bit into the openweathermap. I am pretty sure that it can provide forecast data similar to what wunderground was providing. It is necessary to have an appid, and my take is that each user will need to have their own. Current and 5-day forecast (3-hour periods) data is free. Historical data is not, and is quite expensive. Saving the current data on the RPi is probably going to be important.

An example of current conditions and a forecast are at the bottom of this message.

I've looked through the weather_level_adj code. I think it would take me quite some time to retrofit it to replace the wunderground calls, because I don't understand how it calculates things, what the wunderground queries and responses looked like, or what is saved where (both in the running program and on disk). So I thought that summarizing some openweathermap info like this might be helpful.

Here is an example of output for a "weather" query using my US zip code (02806) and my api key:

{"coord":{"lon":-71.31,"lat":41.74},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"base":"stations","main":{"temp":303.99,"pressure":1026,"humidity":46,"temp_min":301.15,"temp_max":307.15},"visibility":16093,"wind":{"speed":3.6,"deg":150},"clouds":{"all":40},"dt":1530731700,"sys":{"type":1,"id":2390,"message":0.0041,"country":"US","sunrise":1530695790,"sunset":1530750175},"id":420032876,"name":"East Providence","cod":200}

and here is the query I used:
http://api.openweathermap.org/data/2.5/weather?zip=02806&appid=XXXX
(with the appid removed)

Here is what a forecast query looks like:
http://api.openweathermap.org/data/2.5/forecast?zip=02806&appid=XXXX

and the result:
{"cod":"200","message":0.0083,"cnt":40,"list":[{"dt":1530738000,"main":{"temp":303.89,"temp_min":303.89,"temp_max":304.241,"pressure":1029.3,"sea_level":1038.4,"grnd_level":1029.3,"humidity":54,"temp_kf":-0.35},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.46,"deg":62.0002},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-04 21:00:00"},{"dt":1530748800,"main":{"temp":300.9,"temp_min":300.9,"temp_max":301.163,"pressure":1029.64,"sea_level":1038.72,"grnd_level":1029.64,"humidity":66,"temp_kf":-0.26},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":1.04,"deg":94.5003},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-05 00:00:00"},{"dt":1530759600,"main":{"temp":297.51,"temp_min":297.51,"temp_max":297.683,"pressure":1030.62,"sea_level":1039.69,"grnd_level":1030.62,"humidity":87,"temp_kf":-0.18},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":1.28,"deg":175.004},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-05 03:00:00"},{"dt":1530770400,"main":{"temp":296.38,"temp_min":296.38,"temp_max":296.464,"pressure":1030.2,"sea_level":1039.3,"grnd_level":1030.2,"humidity":91,"temp_kf":-0.09},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"02n"}],"clouds":{"all":8},"wind":{"speed":1.46,"deg":218.001},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-05 06:00:00"},{"dt":1530781200,"main":{"temp":295.471,"temp_min":295.471,"temp_max":295.471,"pressure":1030.19,"sea_level":1039.17,"grnd_level":1030.19,"humidity":93,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"02n"}],"clouds":{"all":8},"wind":{"speed":1.02,"deg":220.001},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-05 09:00:00"},{"dt":1530792000,"main":{"temp":299.458,"temp_min":299.458,"temp_max":299.458,"pressure":1030.55,"sea_level":1039.6,"grnd_level":1030.55,"humidity":79,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.51,"deg":223.002},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-05 12:00:00"},{"dt":1530802800,"main":{"temp":303.806,"temp_min":303.806,"temp_max":303.806,"pressure":1029.64,"sea_level":1038.62,"grnd_level":1029.64,"humidity":64,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.65,"deg":211.506},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-05 15:00:00"},{"dt":1530813600,"main":{"temp":305.266,"temp_min":305.266,"temp_max":305.266,"pressure":1027.87,"sea_level":1036.82,"grnd_level":1027.87,"humidity":55,"temp_kf":0},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"clouds":{"all":20},"wind":{"speed":2.56,"deg":196.503},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-05 18:00:00"},{"dt":1530824400,"main":{"temp":304.614,"temp_min":304.614,"temp_max":304.614,"pressure":1026.09,"sea_level":1035.12,"grnd_level":1026.09,"humidity":55,"temp_kf":0},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"clouds":{"all":20},"wind":{"speed":3.38,"deg":205.5},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-05 21:00:00"},{"dt":1530835200,"main":{"temp":301.62,"temp_min":301.62,"temp_max":301.62,"pressure":1025.53,"sea_level":1034.45,"grnd_level":1025.53,"humidity":60,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":20},"wind":{"speed":3.66,"deg":212.002},"rain":{"3h":0.0024999999999999},"sys":{"pod":"n"},"dt_txt":"2018-07-06 00:00:00"},{"dt":1530846000,"main":{"temp":299.205,"temp_min":299.205,"temp_max":299.205,"pressure":1025.15,"sea_level":1034.17,"grnd_level":1025.15,"humidity":71,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"02n"}],"clouds":{"all":8},"wind":{"speed":3.71,"deg":217.002},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-06 03:00:00"},{"dt":1530856800,"main":{"temp":298.47,"temp_min":298.47,"temp_max":298.47,"pressure":1023.66,"sea_level":1032.49,"grnd_level":1023.66,"humidity":77,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":44},"wind":{"speed":3.82,"deg":223.505},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-06 06:00:00"},{"dt":1530867600,"main":{"temp":298.402,"temp_min":298.402,"temp_max":298.402,"pressure":1021.9,"sea_level":1030.77,"grnd_level":1021.9,"humidity":76,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":56},"wind":{"speed":3.91,"deg":222.506},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-06 09:00:00"},{"dt":1530878400,"main":{"temp":299.492,"temp_min":299.492,"temp_max":299.492,"pressure":1020.48,"sea_level":1029.31,"grnd_level":1020.48,"humidity":73,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":88},"wind":{"speed":4.46,"deg":222.503},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-06 12:00:00"},{"dt":1530889200,"main":{"temp":300.901,"temp_min":300.901,"temp_max":300.901,"pressure":1018.74,"sea_level":1027.66,"grnd_level":1018.74,"humidity":69,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":92},"wind":{"speed":5.03,"deg":229.001},"rain":{"3h":0.02},"sys":{"pod":"d"},"dt_txt":"2018-07-06 15:00:00"},{"dt":1530900000,"main":{"temp":300.038,"temp_min":300.038,"temp_max":300.038,"pressure":1017.3,"sea_level":1026.19,"grnd_level":1017.3,"humidity":77,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":92},"wind":{"speed":4.22,"deg":236.501},"rain":{"3h":0.95},"sys":{"pod":"d"},"dt_txt":"2018-07-06 18:00:00"},{"dt":1530910800,"main":{"temp":295.432,"temp_min":295.432,"temp_max":295.432,"pressure":1016.97,"sea_level":1025.89,"grnd_level":1016.97,"humidity":99,"temp_kf":0},"weather":[{"id":502,"main":"Rain","description":"heavy intensity rain","icon":"10d"}],"clouds":{"all":92},"wind":{"speed":2.23,"deg":238.002},"rain":{"3h":13.42},"sys":{"pod":"d"},"dt_txt":"2018-07-06 21:00:00"},{"dt":1530921600,"main":{"temp":293.777,"temp_min":293.777,"temp_max":293.777,"pressure":1017.83,"sea_level":1026.45,"grnd_level":1017.83,"humidity":100,"temp_kf":0},"weather":[{"id":502,"main":"Rain","description":"heavy intensity rain","icon":"10n"}],"clouds":{"all":92},"wind":{"speed":2.28,"deg":330},"rain":{"3h":27.57},"sys":{"pod":"n"},"dt_txt":"2018-07-07 00:00:00"},{"dt":1530932400,"main":{"temp":293.727,"temp_min":293.727,"temp_max":293.727,"pressure":1019.81,"sea_level":1028.74,"grnd_level":1019.81,"humidity":91,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":92},"wind":{"speed":2.83,"deg":351.501},"rain":{"3h":2.87},"sys":{"pod":"n"},"dt_txt":"2018-07-07 03:00:00"},{"dt":1530943200,"main":{"temp":290.404,"temp_min":290.404,"temp_max":290.404,"pressure":1021.7,"sea_level":1030.8,"grnd_level":1021.7,"humidity":78,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":92},"wind":{"speed":3.38,"deg":354.004},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-07 06:00:00"},{"dt":1530954000,"main":{"temp":288.647,"temp_min":288.647,"temp_max":288.647,"pressure":1023.86,"sea_level":1032.91,"grnd_level":1023.86,"humidity":77,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":76},"wind":{"speed":3.54,"deg":0.504272},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-07 09:00:00"},{"dt":1530964800,"main":{"temp":288.262,"temp_min":288.262,"temp_max":288.262,"pressure":1026.24,"sea_level":1035.32,"grnd_level":1026.24,"humidity":73,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":56},"wind":{"speed":3.41,"deg":8.50143},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-07 12:00:00"},{"dt":1530975600,"main":{"temp":291.144,"temp_min":291.144,"temp_max":291.144,"pressure":1027.58,"sea_level":1036.68,"grnd_level":1027.58,"humidity":66,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":2.92,"deg":21.5003},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-07 15:00:00"},{"dt":1530986400,"main":{"temp":293.425,"temp_min":293.425,"temp_max":293.425,"pressure":1026.88,"sea_level":1036,"grnd_level":1026.88,"humidity":63,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":2.25,"deg":21.5008},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-07 18:00:00"},{"dt":1530997200,"main":{"temp":294.283,"temp_min":294.283,"temp_max":294.283,"pressure":1026.45,"sea_level":1035.51,"grnd_level":1026.45,"humidity":62,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.76,"deg":18.501},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-07 21:00:00"},{"dt":1531008000,"main":{"temp":292.042,"temp_min":292.042,"temp_max":292.042,"pressure":1026.61,"sea_level":1035.75,"grnd_level":1026.61,"humidity":74,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":1.01,"deg":40.0002},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-08 00:00:00"},{"dt":1531018800,"main":{"temp":287.681,"temp_min":287.681,"temp_max":287.681,"pressure":1028.05,"sea_level":1037.21,"grnd_level":1028.05,"humidity":78,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":1.51,"deg":114.002},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-08 03:00:00"},{"dt":1531029600,"main":{"temp":285.323,"temp_min":285.323,"temp_max":285.323,"pressure":1028.34,"sea_level":1037.48,"grnd_level":1028.34,"humidity":90,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":1.01,"deg":283.506},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-08 06:00:00"},{"dt":1531040400,"main":{"temp":284.529,"temp_min":284.529,"temp_max":284.529,"pressure":1028.82,"sea_level":1038.04,"grnd_level":1028.82,"humidity":85,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":1.66,"deg":336.503},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-08 09:00:00"},{"dt":1531051200,"main":{"temp":290.787,"temp_min":290.787,"temp_max":290.787,"pressure":1030.84,"sea_level":1039.9,"grnd_level":1030.84,"humidity":69,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.5,"deg":355.003},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-08 12:00:00"},{"dt":1531062000,"main":{"temp":296.029,"temp_min":296.029,"temp_max":296.029,"pressure":1031.38,"sea_level":1040.48,"grnd_level":1031.38,"humidity":61,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.5,"deg":17.5036},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-08 15:00:00"},{"dt":1531072800,"main":{"temp":298.75,"temp_min":298.75,"temp_max":298.75,"pressure":1030.11,"sea_level":1039.14,"grnd_level":1030.11,"humidity":45,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.05,"deg":30.0016},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-08 18:00:00"},{"dt":1531083600,"main":{"temp":299.19,"temp_min":299.19,"temp_max":299.19,"pressure":1029.38,"sea_level":1038.44,"grnd_level":1029.38,"humidity":43,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":1.41,"deg":253.505},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-08 21:00:00"},{"dt":1531094400,"main":{"temp":295.466,"temp_min":295.466,"temp_max":295.466,"pressure":1028.51,"sea_level":1037.69,"grnd_level":1028.51,"humidity":53,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":1.32,"deg":209.501},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-09 00:00:00"},{"dt":1531105200,"main":{"temp":291.554,"temp_min":291.554,"temp_max":291.554,"pressure":1028.86,"sea_level":1037.87,"grnd_level":1028.86,"humidity":56,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":2.77,"deg":215.5},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-09 03:00:00"},{"dt":1531116000,"main":{"temp":290.877,"temp_min":290.877,"temp_max":290.877,"pressure":1027.53,"sea_level":1036.61,"grnd_level":1027.53,"humidity":60,"temp_kf":0},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02n"}],"clouds":{"all":12},"wind":{"speed":2.72,"deg":234.001},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-09 06:00:00"},{"dt":1531126800,"main":{"temp":290.535,"temp_min":290.535,"temp_max":290.535,"pressure":1026.66,"sea_level":1035.7,"grnd_level":1026.66,"humidity":63,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"02n"}],"clouds":{"all":8},"wind":{"speed":2.76,"deg":245.5},"rain":{},"sys":{"pod":"n"},"dt_txt":"2018-07-09 09:00:00"},{"dt":1531137600,"main":{"temp":293.712,"temp_min":293.712,"temp_max":293.712,"pressure":1025.72,"sea_level":1034.68,"grnd_level":1025.72,"humidity":60,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":2.66,"deg":247.502},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-09 12:00:00"},{"dt":1531148400,"main":{"temp":299.36,"temp_min":299.36,"temp_max":299.36,"pressure":1023.6,"sea_level":1032.46,"grnd_level":1023.6,"humidity":49,"temp_kf":0},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":3.11,"deg":256.502},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-09 15:00:00"},{"dt":1531159200,"main":{"temp":302.045,"temp_min":302.045,"temp_max":302.045,"pressure":1020.44,"sea_level":1029.37,"grnd_level":1020.44,"humidity":42,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":56},"wind":{"speed":3.66,"deg":257.502},"rain":{},"sys":{"pod":"d"},"dt_txt":"2018-07-09 18:00:00"}],"city":{"id":420032876,"name":"East Providence","coord":{"lat":41.7408,"lon":-71.3085},"country":"US"}}

@stevejbauer
Copy link
Contributor Author

stevejbauer commented Jul 5, 2018 via email

@mw46d
Copy link

mw46d commented Jul 16, 2018

https://www.weatherbit.io/api seems to give some historical data even in the free level. But not sure, how accurate?!
WU has/had a huge number of local stations. Not sure, iff there is anything else out there with a similar coverage:-(

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

4 participants