New Weather version

yr.no also works without API tokens, they only require sending contact information of the app developer in the user agent.
I’m not totally sure but I think that’s one of the things still left to do in my WIP weather app version.
I also think that it’s a good idea to add multiple providers so that the app isn’t completely broken again when one discontinues the service.

3 Likes

I have just merged my fork with the main branch on HaikuArchives. From now on please use the repo available here:

And please open issues for bugs or improvements there.

Thanks for your support!
Davide

8 Likes

Looks like this hasn’t been tested on 32bit, missing path for UrlProtocolListener.h, after inserting that, parse errors in the build (with gcc2).

Building with gcc11 (secondary architecture) ends up in:

Source/WSOpenMeteo.cpp: In member function 'void WSOpenMeteo::_ProcessWeatherData(bool)':
Source/WSOpenMeteo.cpp:165:118: error: invalid conversion from 'int*' to 'int32*' {aka 'long int*'} [-fpermissive]
  165 |                                         for (int32 tDay = 0; dayMessage.GetInfo(B_DOUBLE_TYPE, tDay, &tName, &tType, &tCount) == B_OK && tDay < maxDaysForecast; tDay++) {
      |                                                                                                                      ^~~~~~~
      |                                                                                                                      |
      |                                                                                                                      int*
In file included from /system/develop/headers/private/shared/Json.h:12,
                 from Source/WSOpenMeteo.cpp:7:
/boot/system/develop/headers/os/app/Message.h:70:80: note:   initializing argument 5 of 'status_t BMessage::GetInfo(type_code, int32, char**, type_code*, int32*) const'
   70 |                                                                         int32* countFound = NULL) const;
      |                                                                                ^
Source/WSOpenMeteo.cpp:183:119: error: invalid conversion from 'int*' to 'int32*' {aka 'long int*'} [-fpermissive]
  183 |                                         for (int32 tDay = 0; tempMessage.GetInfo(B_DOUBLE_TYPE, tDay, &tName, &tType, &tCount) == B_OK && tDay < maxDaysForecast; tDay++) {
      |                                                                                                                       ^~~~~~~
      |                                                                                                                       |
      |                                                                                                                       int*
In file included from /system/develop/headers/private/shared/Json.h:12,
                 from Source/WSOpenMeteo.cpp:7:
/boot/system/develop/headers/os/app/Message.h:70:80: note:   initializing argument 5 of 'status_t BMessage::GetInfo(type_code, int32, char**, type_code*, int32*) const'
   70 |                                                                         int32* countFound = NULL) const;
      |                                                                                ^
Source/WSOpenMeteo.cpp:201:119: error: invalid conversion from 'int*' to 'int32*' {aka 'long int*'} [-fpermissive]
  201 |                                         for (int32 tDay = 0; tempMessage.GetInfo(B_DOUBLE_TYPE, tDay, &tName, &tType, &tCount) == B_OK && tDay < maxDaysForecast; tDay++) {
      |                                                                                                                       ^~~~~~~
      |                                                                                                                       |
      |                                                                                                                       int*
In file included from /system/develop/headers/private/shared/Json.h:12,
                 from Source/WSOpenMeteo.cpp:7:
/boot/system/develop/headers/os/app/Message.h:70:80: note:   initializing argument 5 of 'status_t BMessage::GetInfo(type_code, int32, char**, type_code*, int32*) const'
   70 |                                                                         int32* countFound = NULL) const;
      |                                                                                ^
Source/WSOpenMeteo.cpp:219:119: error: invalid conversion from 'int*' to 'int32*' {aka 'long int*'} [-fpermissive]
  219 |                                         for (int32 tDay = 0; codeMessage.GetInfo(B_DOUBLE_TYPE, tDay, &tName, &tType, &tCount) == B_OK && tDay < maxDaysForecast; tDay++) {
      |                                                                                                                       ^~~~~~~
      |                                                                                                                       |
      |                                                                                                                       int*
In file included from /system/develop/headers/private/shared/Json.h:12,
                 from Source/WSOpenMeteo.cpp:7:
/boot/system/develop/headers/os/app/Message.h:70:80: note:   initializing argument 5 of 'status_t BMessage::GetInfo(type_code, int32, char**, type_code*, int32*) const'
   70 |                                                                         int32* countFound = NULL) const;
      |                                                                                ^
/boot/system/develop/etc/makefile-engine:300: recipe for target 'objects/WSOpenMeteo.o' failed

EDIT PR created upstream: https://github.com/HaikuArchives/Weather/pull/85

4 Likes

Thanks to @Nexus-6 efforts on the backend, a working version of Weather is now available at HaikuDepot. Enjoy!

18 Likes

Thank you @humdinger!

4 Likes

You did the hard work @Nexus-6 :ok_hand: Thanks!

3 Likes

Thank you very much Nexus-6 for a working weather app.

screenshot2

9 Likes

I’m moving to Germany! Your forecast looks better then mine (Belgium, and not that far from the German border) :slight_smile: (34.39.27.25.27 for the 5 days displayed atm) :slight_smile:

39 in BE? CRAZY!

1 Like

You are welcome :-). Miss BeGeistert

2 Likes

Missing the good old days too :wink:

Moving on though :smiley:

I like the option of defining my own units - people in some places have preferences different to the local default.

I have an issue in the AEST time-zone, whereby the day shown first in the 5-day forecast is a day behind. Today is Wednesday (2pm) but Tuesday is the first day in the list. I am not sure if Tuesday is showing me today’s forecast, or yesterday’s… Also agree that state should be shown on the location selector - we have a number of suburbs/towns with the same name across AU states too. (A symptom of being an ex colony!)

Love this app tho! Thanks @Nexus-6 for giving ‘Weather’ some love!

I recently tried their website at openmeteo.com and it showed all 5 Waterville towns in the US country code. There was no place to enter the state of Minnesota. It only needs the latitude and longitude. Where I ran into trouble was the units being ISO instead of ANSI and noplace to change it to English language on the website.

I’m now running the Android app for yr.no as mentioned earlier on this thread and it correctly identified my location as “Crams Point” named after my great-grandparents, who started the family farm over 100 years ago. I wonder what map software they used to identify that with.

1 Like

This is a known misbehaviour as the time zone is currently hardcoded to CEST (Berlin). We need to use the System settings to get the time zone and other info.
Rest assured that the first day shown is the current day.
I have plans to fix a number of things with a late Summer release of Weather.

6 Likes