linuxmint / cinnamon-spices-applets

Applets for the Cinnamon desktop
http://cinnamon-spices.linuxmint.com
GNU General Public License v2.0
610 stars 513 forks source link

Could you add Wheather Underground to the provider list ? wheather@mockturtl #4426

Closed pzim-devdata closed 2 years ago

pzim-devdata commented 2 years ago
 * Version 3.2.7 (2022-08-09 09:09:27)
 * Cinnamon 4.8.6
 * Debian Bullseye

Notify author of applet @mockturtl @Gr3q

Other information Could you add "Wheather Underground" to the list of data providers? https://www.wunderground.com In my area it is the best data provider, the data they provide is the most reliable. They provide a free API. That would be really good. Thanks

Gr3q commented 2 years ago

The free API is only available to those who own and connect a weather station to WU (which I have concerns with, but that's not the issue here), so I don't have access to their API.

I need access to test and validate the integration otherwise I can't release it as a provider. I can write the integration based on documentation (tbh I don't know if I even have access to that), but it's not guaranteed to work.

pzim-devdata commented 2 years ago

To have access to the API, just add a Raspberry Pi as a device for the choice of the weather station even if you don't have one and it works. Wheather Underground is really excellent and it is really worth it.

API documentation is there : https://docs.google.com/document/d/1eKCnKXI9xnoMGRRzOL1xPCBihNV2rOet08qpE_gArAY/edit

For a 5 days forercast : https://docs.google.com/document/d/1_Zte7-SdOjnzBttb1-Y9e0Wgl0_3tah9dSwXUyEA3-c/edit#

For current conditions : https://docs.google.com/document/d/1KGb8bTVYRsNgljnNH67AMhckY8AQT2FVwZ9urj8SWBs/edit

You can try the main website to test it with a choosen city. The data is very reliable

Gr3q commented 2 years ago

I implemented it almost completely. Note that since I started implementing it I could not find an PWS that returned content via the Current Conditions API.

So basically all you will have is forecast and that is not good enough for current observations.

pzim-devdata commented 2 years ago

Great ! Thank you so much, you are awesome !

https://api.weather.com/v2/pws/observations/current?stationId=yourSTATIONID&format=json&units=m&apiKey=yourApiKey

For me it works like this, I don't know if it's helps.

Documentation for current observation is there : https://docs.google.com/document/d/1KGb8bTVYRsNgljnNH67AMhckY8AQT2FVwZ9urj8SWBs/edit

https://api.weather.com/v3/location/search?query=paris&locationType=city&language=fr-FR&format=json&apiKey=yourApiKey

yourSTATIONID is the result of the line "pwsId" ( IPARIS18203 )

Documentation for localisation : Documentation : https://docs.google.com/document/d/1xSpijI9MgWWfHaFX4wo_tB0GjtNeHZqGyp3XVOaAPl4/edit

I hope it will help. All documentation is there : https://docs.google.com/document/d/1eKCnKXI9xnoMGRRzOL1xPCBihNV2rOet08qpE_gArAY/edit

Thanks

Gr3q commented 2 years ago

Could you write up the Readme section for Weather Underground, like the other ones here?

If you could add it as a comment here it would be greatly appreciated as I have very little time nowadays. With that, the PR will be ready, as far as I tested it should be fine.

pzim-devdata commented 2 years ago

Thank you so much for your work. I really appreciate ;-) Here is the comment for the Readme section :

Weather Providers : Weather Underground Needs API key : Yes Maximum Forecast Days : 10 Maximum Forecast Hours : 360 ? Other information : Need to register a personal weather station to get an API key but it can be bypassed (read the info below). -- | -- | -- | -- | -- Weather Underground Weather Underground is a privately owned, web-based weather information company. It provides weather observations and forecasts in a large number of locations around the world. It was founded by Jeff Masters in 1995 with headquarters in Ann Arbor United States. Weather Underground website. Read more about the service here.

I hope it will help. Thank you

Gr3q commented 2 years ago

So that your are not disappointed, the API only provider 5 forecast days and and no hourly forecasts

pzim-devdata commented 2 years ago

Sorry, I didn't know that. Thanks ;-)