Looking for a c++ weather app that uses openweathermap api

I know we got folks looking at the Haiku weather app, and I have built meteo-qt on Beta 3, however I think it doesn’t make a lot of sense to have a qt and python weather app on haiku. Anyone have any suggestions? Thanks in advance!

Here’s a screenshot of meteo-qt.

screenshot1

2 Likes

There is a native C++ weather app for Haiku already: https://github.com/HaikuArchives/Weather
I think it doesn’t work currently as Yahoo discontinued the API it used but there are people working on replacing the Yahoo API with another one.
OpenWeatherMap was also discussed as a possible source but I think it wasn’t suitable for some reason.
There’s a topic in the issues about that: https://github.com/HaikuArchives/Weather/issues/73
Maybe this isn’t that helpful currently but I don’t think there’s another native Weather app for Haiku and it also doesn’t make much sense to create one when we only need a new API for the existing one.
If you do some programming,I’m sure that help with getting it to work again is welcome.

4 Likes

fy0k4qe
screenshot1

I have a really old app called DeskbarWeather that I toy around with sometimes and recently converted to using the openweathermap API. It has some known issues that I haven’t gotten around to fixing and the code is not my best work(i.e. it’s crap). I can upload the project to github if you’d like.

11 Likes

That would be perfect if you could upload it on github! Thank You!

Ok, it’s been put on github, but you’ve been warned about the quality of it. :stuck_out_tongue_winking_eye:

Hopefully I’ll find some time to improve the code and documentation. I’d like to fix at least one problem which causes Deskbar to crash unless you remove the DeskbarWeather executable. Only seems to happen rarely when there is no networking at app startup.

At one point in the past the app allowed manually specifying a location but I haven’t added that back in since the switch to openweathermap. It’s currently geolookup only for the location.

Edit: I may have just found that bug and fixed it.

4 Likes

Wow, this looks amazing! Hopefully we can get this on HaikuDepot too once you iron out the bugs.

1 Like

Hopefully yr.no can be used instead. I would love to see it happen!

Fairly new and unfinished: NIMBUS

They seem to provide a JSON API for free so that should be quite easy to implement: https://hjelp.yr.no/hc/en-us/articles/360001940793-Free-weather-data-service-from-Yr
If you can write code,you can do it yourself and send a pull requests to the original repository.
Otherwise,I may use this opportunity for a small first work with C++ but be warned that I’m currently very busy with reallife stuff and it may take months…

Hmm, this seems like a good project for someone to work on during the upcoming Haiku coding sprint:

Task: Make or improve a weather app for Haiku

Hmmm, maybe a good app for a tutoria?
Paladin, C++, Jason, or python?
Lokks small and easy app!?
Maybe I am wrong

I’m not a developer and only hope some one will do it… feel free! Would be great to see a local weather forecast :grinning:

1 Like

I’m currently looking into it just for fun but be warned: I’m a web developer and I have zero previous experience with C++.
I may be able to produce something that somehow works by editing the existing code (if I understand enough of it) or I may completely fail,we’ll see…

3 Likes

I’m at a difficult point already without even touching the source.
Some private headers have been moved around in the Haiku source.
It first complains that it can’t find UrlProtocolListener which was quite easy to fix.
Now it throws dozens of errors and I don’t see what’s wrong with it (I haven’t touched anything here,it’s still the original old code): .. XrMb2.net ImageHost ..
Can anyone help with that?

For make you can use this (SYSTEM_INCLUDE_PATHS). Calendar/Makefile at master · HaikuArchives/Calendar (github.com)

I think you are missing more include path (I think).

I’ve just compiled it, it looks quite nice, but the manual lookup is disabled? also the forecast window is too big for a 1024x768 resolution, and it also crashes when you click on Refresh Now.

1 Like

Yes, manual location lookup is disabled until I find time to add that feature back in. I can probably make the forecast window shorter but I don’t know if I want to make it more narrow. I don’t use the “Refresh Now” feature all that often but I thought it was working. I’ll have to see if I can reproduce that problem.

Edit: I’ve created an issue at the github page to remind me to add a compact forecast window setting which will allow me to cut down the size in both directions for those who want to enable it.

The network services API has changed recently, so the code dealing with the http requests has to be updated to reflect that. I’ve checked the pull request that is still open and it is also still with the old API. I’m not yet familiar with the new network services API but I can take a look at the code and rework it over the next few days (no exact promise when :wink: )

3 Likes

This would be a great help,thank you.

@Lrrr, I got home a bit late tonight from work, but I was able to build Deskbar Weather with GEOlocation disable. I modified the settings for the default location and the longitude and latitude in WeatherSettings.cpp and then built it. It’s been working fine with no hiccups.

Also, I haven’t had any issues with it crashing when I manually “refresh” the data, and it also stays in the deskbar and starts right up when I reboot the machine.

I won’t have a chance to really look at things until Sunday, but I thought I’d give an update.

screenshot2

screenshot1

9 Likes