rocksdanister / weather

Windows native weather app powered by DirectX12 animations
https://rocksdanister.com/weather
MIT License
393 stars 21 forks source link

New Weather Provider (Qweather.com) #68

Closed Livins1 closed 2 months ago

Livins1 commented 2 months ago

This provider uses the free subscription of Qweather.com and needs an API key.

First, only 24-hour hourly weather data can be provided. which means the hourly graph (e.g. temp, uv, aqi ...) can only work properly for the current day. Second, this is the only provider that can provide as much data as we need as possible in mainland China when it's free.

And I don't think we can merge data from multiple providers to this provider: regional specificity: network vpn blahblahblah... different provider means different API keys (there is no public(gov) service of weather in the China network), I don't think this is acceptable when I using just a weather app, because of that I need to input more than one API key.

Last, i don't know if this pull request is helpful.

There is also a problem need to be fix if we use this provider because of the lack of the hourly weather data: 图片

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

rocksdanister commented 2 months ago

Good work.. I Took a quick look and here is what I think:

  1. Graph being empty (template) for future days is fine but not sure why the icons appeared here? it should not as long as Hourly arrays are empty.

image

  1. Remove the changes in OpenMeteoWeatherClient.cs.
  2. For the weather provider name maybe we can say something like "Qweather (Chinese/China)" to let people know its best for Chinese region.
  3. Looking at the weather icon code and OpenWeatherMapCodeToWmo function its not mapping correctly ? For example:
    • In the docs 350 is Shower (as per translation) but Thunderstorm in the function.
    • In the docs 901 is Cold but Overcast here (since its missing on the WMO side this is fine for now.)
    • There is no 200 code in the docs.

The WMO code is important and care needs to be taken because it is used for all the effects and other core features.

Livins1 commented 2 months ago
  1. Check the change in src/Drizzle.UI.UWP/UserControls/DailyGraph.xaml.cs to see how I avoid these icons.but I don't know if this is the right way.
  2. done
  3. Qweather(CN) should be fine.
  4. Reworked.
rocksdanister commented 2 months ago

Revert the changes in DailyGraph.xaml.cs.. that does not seem right, I'll take a look at it later.

Rest looks fine but is the CLA a problem? noticed you haven't signed it.