New Weather version

Hi @frankps,
I don’t plan to add this specific provider, sorry.
The amount of changes required to adapt the old code to Open Meteo wasn’t trivial. Although I moved all the logic outside of the main BView and put it in the WSOpenMeteo class, I can’t say that Weather is ready for a real plug-in architecture where you can add whatever provider you wish.
Maybe in the future.
As of now, you can take the WSOpenMeteo class as an example and build your own wrapper for your preferred provider but I would not recommend it as the architecture may change and we need to discuss how to properly implement it. If it makes sense, at all.

2 Likes

I was working on a version of this application that uses the yr.no API in February.
It was pretty much working already,but with a lot stuff that could still be optimized.
I uploaded the source code of my current version for you here if you want to play with it: https://transfer.sh/QXLyLW/Weather.zip
Don’t expect more updates on that from me,however.
It was a fun time trying to get started with application programming,but I have a lot of web development stuff to do currently so that I simply don’t have the time to maintain this utility :frowning:

hi! Is there any specific reason why you chose yr.no over OpenMeteo or OpenWeather?

Is it just me? Every version linked to from this thread cannot change the location. A weather app for Menlo Park, CA is just not useful unless that is the weather you are interested in.

It’s just you. :smiley:
Nexus6’s fork lets you change location, no problem.

In my fork the hardcoded default location is San Francisco by the way, so I’m wondering what’s wrong here. Could you post a screenshot?

Please make sure you git clone from here:

It freezes here:
Bitmap

What city are you looking for? Also please try a different one

I looked for Coquille, OR, Coos Bay, OR, Bandon, OR and Menlo Park, CA. They all freeze at this point.

It seems a network issue as the geocoding API call fails. Definitely the app needs more robust error handling but I’m wondering how you got Menlo Park forecast if the geocoding fails.
Please try with just the name of the city without the state. Also please try Milan or Rome

That was the default in previous versions at least. Possibly there is an existing settings file that still points there?

Menlo Park, CA is the default location. If I use the city, it gives me a list to select from … missing the state and each listing gives me different weather. not very useful for citys that are located in different states or countries. Melan has one listing for Italy, one for columbia, and sevin for the United States. when selectred, it shows the city name and Country but not the state or province.
Milan

1 Like

I have plans to fix that. The OpenMeteo geocoding responds with other useful info like administrative areas and I need to capture and show them.
I may also put the search and result boxes in the same windows to implement live search as you type.

2 Likes

:slight_smile: Thanks for your effort!

Do other Milan even exist? :rofl: other than in Italy, I mean (just joking). Thanks for your feedback!

1 Like

Maybe but Weather now relies completely on longitude and latitude to query the geocoding API and load the city.
I’m not sure if it’s worth adding some checks and a migration procedure

It is known to more precise on weather forecast.

I live in Norway, bur I`ve been talking to people working in Kindergartens in Copenhagen using it to plan their work days and the same goes for farmers I met in my mom’s hometown in Hungary. All claiming it giving them better forecast.

Try it for a while and see for yourself :slight_smile:

Sure, I will compare OpenMeteo with the @nipos’ version. I’ll let you know

The main reason is that there was no working version of the Weather app when I started playing around with it,and someone recommended yr.no which looked good to me,so I went with that.
At OpenWeatherMap I dislike that they’re hosted on Google Cloud,I simply hate that disgusting data collection machine.
I’ve never heard of OpenMeteo before,don’t know if it is good.

1 Like

Open Meteo does not require authentication with an API token and that’s what I really liked.
Nevertheless, I’m open to other providers if they grant simplicity and stability.
When provider and application interfaces are fully decoupled, we may want to add as many providers as we want.