WangDaYeeeeee / GeometricWeather

A Material Design Weather Application
GNU Lesser General Public License v3.0
2.44k stars 186 forks source link

OpenWeatherMap provider bugs #266

Open ghost opened 3 years ago

ghost commented 3 years ago

On the provider OpenWeatherMap, in the assembled application from sources, there are the following problems:

Time Zone and alerts: TimeZoneAndAlerts

Visibility: Visibility

ghost commented 3 years ago

I fixed 2 problems for me by replacing "UTC" with "Europe/Moscow" and dividing visibility by 1000 in OwmResultConverter.java file. But this solution is not suitable for people who live in another time zone and I didn't check visibility with units of measurements other than "kilometers".

You can download pre-built APKs from my repository here. Keep in mind they will not install on top of an already installed app, as they have a different signature.

papjul commented 3 years ago

Hi, I developed the OpenWeatherMap module, could you tell me which issues are specific to this provider and not reproduceable with other providers? I will look into it. Thanks!

ghost commented 3 years ago

All of the above problems are specific only for the OpenWeatherMap provider and do not occur on the AccuWeather provider or in other applications using OpenWeatherMap (e.g. Pluvia Weather) You can reproduce these problems by selecting the Russian language of the app and Moscow as the location, on the compiled latest version of the app or by downloading the APK from my repository.

ghost commented 3 years ago

There are also a few minor problems that are NOT on the AccuWeather provider:

ghost commented 3 years ago

Another problem we have on the OpenWeatherMap provider:

papjul commented 3 years ago
  • visibility is not displayed correctly (it is 1000 more than it is)
  • time zone definition does not work (it is always UTC) I fixed 2 problems for me by replacing "UTC" with "Europe/Moscow" and dividing visibility by 1000 in OwmResultConverter.java file. But this solution is not suitable for people who live in another time zone and I didn't check visibility with units of measurements other than "kilometers".

Regarding visibility, it should always be the same unit in input, then it is converted by Geometric Weather in other units, so dividing by 1000 is a good solution, I will include it in a future fix.

The issue with timezone is completely different. Geometric Weather needs to have the timezone information from the location search, which the location API is not providing so I'm defaulting to "UTC". The OneCall API is providing the timezone but it's already too late. It's an architectural issue that I'm not able to solve on my own.

  • forecast of precipitation probability does not work
  • alerts about weather events are duplicated in two languages (original and translation)
  • No translation of the weather conditions on the hourly forecast, although the current and daily forecasts have it

I will check these three once I'm able to access the OWM API.

Edit: Alerts duplication looks like a duplicate of #261

  • No display of sunny hours, they are always equal (it looks like they are not provided by OpenWeatherMap itself, then you can use sunrise to sunset time or use data from AccuWeather)

Yes, currently it is mandatory so I'm inputting 0.0f by default. It should be non-mandatory (nullable) and not displayed if null.

  • There is no translation of the short name of the wind direction

I can reproduce this issue in Pluvia (in French, W is used for West instead of O for Ouest). Wind direction short names are provided by the weather providers, and OWM is providing them in English even if you asked for another language.

As it should be in the AccuWeather provider example

AccuWeather is providing the translation.

A sum up is available in #267

darksidecorrales commented 3 years ago

Hi! The weather forecast through the openweather provider does not work for me, the app tells me "the request for weather data failed". I don't know what the problem will be, it doesn't allow me to write my API either, it only offers some default options, none of which works. Thanks for the app, I hope the project is not abandoned. All the best.

papjul commented 3 years ago

Hi! The weather forecast through the openweather provider does not work for me, the app tells me "the request for weather data failed". I don't know what the problem will be, it doesn't allow me to write my API either, it only offers some default options, none of which works. Thanks for the app, I hope the project is not abandoned. All the best.

It's a different issue that is already solved (or rather workarounded). See #222 for example

darksidecorrales commented 3 years ago

Hi! The weather forecast through the openweather provider does not work for me, the app tells me "the request for weather data failed". I don't know what the problem will be, it doesn't allow me to write my API either, it only offers some default options, none of which works. Thanks for the app, I hope the project is not abandoned. All the best.

It's a different issue that is already solved (or rather workarounded). See #222 for example

If it is already solved, why not update the weather with openweather? Or is there some other version that I don't know about? I apologize for my level of English, maybe I am not understanding something. Thanks.

papjul commented 3 years ago

Hi! The weather forecast through the openweather provider does not work for me, the app tells me "the request for weather data failed". I don't know what the problem will be, it doesn't allow me to write my API either, it only offers some default options, none of which works. Thanks for the app, I hope the project is not abandoned. All the best.

It's a different issue that is already solved (or rather workarounded). See #222 for example

If it is already solved, why not update the weather with openweather? Or is there some other version that I don't know about? I apologize for my level of English, maybe I am not understanding something. Thanks.

You will need two things:

darksidecorrales commented 3 years ago

Hi! The weather forecast through the openweather provider does not work for me, the app tells me "the request for weather data failed". I don't know what the problem will be, it doesn't allow me to write my API either, it only offers some default options, none of which works. Thanks for the app, I hope the project is not abandoned. All the best.

It's a different issue that is already solved (or rather workarounded). See #222 for example

If it is already solved, why not update the weather with openweather? Or is there some other version that I don't know about? I apologize for my level of English, maybe I am not understanding something. Thanks.

You will need two things:

  • Build the app from source since the fix is not yet part of a release
  • Sign up for a free API key and put it in advanced settings of weather providers https://openweathermap.org/price

Ok, thank you!!

ad3m3r5 commented 2 years ago

Hi! The weather forecast through the openweather provider does not work for me, the app tells me "the request for weather data failed". I don't know what the problem will be, it doesn't allow me to write my API either, it only offers some default options, none of which works. Thanks for the app, I hope the project is not abandoned. All the best.

It's a different issue that is already solved (or rather workarounded). See #222 for example

If it is already solved, why not update the weather with openweather? Or is there some other version that I don't know about? I apologize for my level of English, maybe I am not understanding something. Thanks.

You will need two things:

  • Build the app from source since the fix is not yet part of a release
  • Sign up for a free API key and put it in advanced settings of weather providers https://openweathermap.org/price

Hey @papjul, I've tried building from source every way possible, including customizing the API key in the gradle.properties, but nothing works. I also don't see any "advanced settings" in the app or anywhere else. Am I doing something wrong or is there no actual way to solve this? I also tried building from your fork, as you had mentioned it in another issue, but that also didn't solve anything.

I don't mind hard-coding the API key into the app when building, but it doesn't seem to actually work either way. For building the app, I've tried gradlew build and gradlew bundleRelease. Is there a specific command I should be using? Also, when the build is complete, what path is the correct apk at? I have tried using the apks found at app/build/outputs/apk, release/3.013/, and release/3.013/outputs/.

Thanks