! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Plugin has to be updated or will soon stop working
Status:
RESOLVED: FIXED
Product:
Xfce4-weather-plugin
Component:
General

Comments

Description fmccormick 2014-05-28 05:16:54 CEST
 
Comment 1 fmccormick 2014-05-28 05:18:58 CEST
(wrapper:23148): weather-WARNING **: Met.no LocationforecastLTS API states that this version of the webservice is deprecated, and the plugin needs to be adapted to use a newer version, or it will stop working within a few month. Please file a bug on https://bugzilla.xfce.org if no one else has done so yet.
weather-Message: getting http://api.yr.no/weatherapi/locationforecastlts/1.1/?lat=45.500000;lon=-73.583298;msl=82
Comment 2 guy.b 2014-05-28 14:35:09 CEST
The same here on xubuntu 12.04 LTS seens 3 days.
Comment 3 Harald Judt 2014-05-28 14:47:44 CEST
Thanks for reporting. If I haven't missed anything, a patch will be quite trivial, as there are not many API changes. Probably simply changing the URL will suffice. I'll try and test soon.
Comment 4 guy.b 2014-05-28 15:01:52 CEST
Thanks Harald,

I think too that's only a url problem. Let us know...

Cheers.
Comment 5 Harald Judt 2014-05-28 20:51:42 CEST
Simply using the new URL will not help.

The updated API version uses CamelCase symbol names instead of UPPERCASE
ones and has added some new names (like 'Drizzle'), which unfortunately
have not been documented (yet?).

What's more, the typo 'celcius' has been replaced by the fixed 'celsius',
which has not been documented too, but luckily the plugin will not be affected by that change.

Making symbol names uppercase is trivial, and very probably I can map the new symbol names to existing ones so they can be represented by existing icon themes. I have contacted met.no for more information so I can work on those patches.
Comment 6 Harald Judt 2014-06-03 20:30:30 CEST
Created attachment 5509 
make-plugin-ready-for-met.no-locationforecast-1.2-API.patch

I have not received any replies from met.no yet, and though not much time has passed, I'm not very convinced I will. Nevertheless, I have created patches to deal with this problem, it would be great if someone could try them and verify that the results look sane.

The first one prepares the plugin for the new API 1.2, but still uses the old version 1.1. After applying this patch, you should see no differences to an unpatched plugin.

The second patch then switches to the new API 1.2. If you do an immediate comparison, you will probably notice differences in the forecasts, because the new API seems to produce different results than 1.1. If not, you will at least find that the WARNING no longer appears.

While I have tried to match the symbols as good as possible and these patches should keep the 0.8.3 plugin going for some while longer, I have decided to switch to openweathermap for the next feature release. Openweathermap has many benefits, many other clients use it and it has good documentation, especially in comparison to met.no.

At the moment, it is not advised to compile and use current git because there are problems with the update code, noticeable in sunrise/sunset values after 24 hours usage, though there should be no other issues and no crashes. I'm not sure if I will ever fix this, since I'll have to throw away code for openweathermap. Maybe I'll release a stable 0.8.4 (basically 0.8.3 with bug fixes but without new features) if I get to it before working on the provider switch, but I can't promise that.
Comment 7 Harald Judt 2014-06-03 20:31:57 CEST
Created attachment 5510 
switch-to-met.no-locationforecastlts-1.2-api.patch

Only usable after applying patch #5509.
Comment 8 guy.b 2014-06-04 07:41:16 CEST
Thank you Harald for your work and patches. I would like to try them but I don't know how to patch them. If you could explain it shortly I will do it.
Comment 9 Harald Judt 2014-06-04 20:34:18 CEST
In short, you would have to build the plugin yourself, applying the patches before compiling. I won't have time to help you with this, but if you're interested you can find instructions in the README. However, if you haven't done this before, you will probably need to seek help elsewhere.

Meanwhile I have got an answer from met.no. They have documented the new symbols on another of their many web pages, so I will create a new, more complete patch soon, making attachment #5509  obsolete. They have also told me they will fix the other issues that they haven't been aware of until now.
Comment 10 Harald Judt 2014-06-09 19:50:22 CEST
Updated patch pushed to git. The previous patch was almost complete.
Please use these patches instead of the ones attached here:

http://git.xfce.org/panel-plugins/xfce4-weather-plugin/commit/?id=1ff71669644a0b824a8a5ba9b40771ee4fb8a76b
http://git.xfce.org/panel-plugins/xfce4-weather-plugin/commit/?id=7df303bc5fa649299e18efeb5d4b801614030488
Comment 11 Harald Judt 2014-06-09 19:51:05 CEST
Leaving this bug report open until a new version has been released.
Comment 12 guy.b 2014-06-11 08:40:55 CEST
Created attachment 5525 
Screenshot
Comment 13 guy.b 2014-06-11 08:48:24 CEST
Comment on attachment 5525 
Screenshot

Does it mean that you will do an 8.4 version ? 

I take the opportunity to say that the forecasts window doesn't enlarge enough to see all the informations (font), the size is 14 here.
Comment 14 Harald Judt 2014-06-11 10:58:36 CEST
guy.b@bluewin.ch: Please do not hijack bug reports.
Comment 15 mikejani 2014-07-01 17:32:08 CEST
(In reply to Harald Judt from comment #6)
> it would be great if someone could try them and verify that
> the results look sane.

Harald, I built the 0.8.3 source from http://archive.xfce.org/src/panel-plugins/xfce4-weather-plugin/0.8/ with the two patches you supplied for the 1.2 API.  Both patches applied successfully, however the patches were all offset by quite a few lines.

I've been using the newly built plugin for several days now and have noticed no adverse behavior.  The prior warnings about met.no versions are gone and all features appear to be working properly.
Comment 16 Sean Davis editbugs 2014-10-05 13:10:09 CEST
I can also verify that these patches work as expected.
Comment 17 Evangelos Foutras 2014-10-09 19:07:03 CEST
Just noting that the old API version was disabled a couple of days ago so a new release would be great.
Comment 18 Prodigal 2014-10-10 21:20:58 CEST
One can download the 0.8.3-2 version deb or rpm file from:

http://pkgs.org/download/xfce4-weather-plugin

It works fine on 14.04 of Xubuntu, which is all I have tried it on.
Comment 19 John Thompson 2014-10-12 17:41:39 CEST
Is there a patched source tarball available someplace? The binary packages for 0.8.3.2 have unresolved dependencies on my Ubuntu-12.0.4 and Centos-6.3 machines.
Comment 20 stef 2014-10-13 14:58:50 CEST
@JohnThompson

You can download the latest source codewith this command on terminal:

git clone git://git.xfce.org/panel-plugins/xfce4-weather-plugin

then 

cd xfce4-weather-plugin

sh autogen.sh

Even if it says to type 'make', I suggest to type:

./configure --prefix=/usr 

bacause its default prefix is /usr/local. If your XFCE installation is 
in /usr/local dont' need to run configure

I compiled it today 2014-10-13 on Salckware 14.1 because it stopped to work (no data error). 

Now it works again. Thanks developers for patching it.
Comment 21 John Thompson 2014-10-13 17:55:54 CEST
Thanks... I found a src.rpm on the Fedora "Koji" site, used rpmbuild to patch the source tree and build my Centos rpm, then "make distclean" to clean out the binaries from the patched source tree, tarred up the patched sources and copied to my Ubuntu machine. Then "./configure --prefix=/usr" and "checkinstall -D" to build a Debian package. Installed the new package and all is well again...
Comment 22 Harald Judt 2014-10-13 21:36:22 CEST
Please beware that the current git version still has a bug in the update routine, I've already mentioned that above. Nothing too bad, it won't make anything crash, but the sunrise/sunset dates and therefore night time status will not be updated correctly (which you might only notice after a day, and then probably not every time). Refreshing the data manually via the context menu or a middle-click on the panel widget might solve this too.

I've only noticed a few moments ago there have already been a lot of changes since 0.8.3. I'm currently investigating into this bug, but debugging and testing takes time due to the nature of the bug. I'm not sure I will find a clean solution quickly, but if I can work around my bad design of the update routine, then I'll do a dirty fix and release 0.8.4. Could take a week, or maybe even a month, depending on what other stuff steals my time...

BTW: If you look at the README and the goodies homepage, you'll find detailed instructions on how to download the source and build the plugin. You can simply apply the two patches from this bug report on 0.8.3, and this way you won't have to care about the update bug at all.
Comment 23 Joe Zeff 2014-10-17 23:03:01 CEST
Sometimes, right-clicking on the applet and telling it to Refresh works; sometimes you just have to wait.  It's getting less and less reliable, now, day by day.  If it isn't updated soon, it will become completely useless.
Comment 24 sales@wexfordpress.com 2014-10-18 18:25:39 CEST
I did the git command, autogen.sh. .\configure make make install, rebooted, still doesn't work. 

What is the executable called and were should it reside?

Any additional suggestions? I use slackware 14.1

John Culleton
Comment 25 stef 2014-10-18 19:10:28 CEST
I use Salckware 14.1 too, 32 bit.

The command is:

./configure --prefix=/usr 

make

make install

but *first* you *must* remove old package xfce-weather-plugin for not messing things.

As root do:

cd /var/log/packages

then 

removepkg xfce4-weather-plugin*

When you removed the old package compile the git source. I built the 32 bit 
package for Slackware 14.1. If you have a 32 bit system I can email you the package.
Comment 26 Harald Judt 2014-10-19 18:38:12 CEST
The night/day update bug should be fixed in git now.
Comment 27 stef 2014-10-19 18:44:11 CEST
Thank you, Harald. I noticed the night/day bug this morning for the first time.
Comment 28 Harald Judt 2014-10-19 19:24:21 CEST
(In reply to stef from comment #27)
> Thank you, Harald. I noticed the night/day bug this morning for the first
> time.

Please test then if you can still reproduce it with current HEAD. Either leave the machine running over night (the bug should be visible at 00:00 the next day, but it might be more easily visible after sunrise because of the icon), or suspend/hibernate and then resume the next day. Use more than one plugin instance if possible, choosing different locations in settings. I've tested it on two machines and it looks good now, but I had already thought I had fixed it in the past and was proven wrong.
Comment 29 Andrew 2014-10-20 00:07:07 CEST
Hello Harald, thenaks for your work on this.

I've compiled the git copy today due to the stock Xubuntu version of the weather plugin not functioning at all. I compiled at ~1200 on Oct 19th, 2014 but am experiencing the moon being shown despite it still being day here in NYC.

Refreshes and such don't seem to be doing enough to correct the icons, but if there are any compile options or anything you'd like me to do to facilitate fixing this, feel free to ask.
Comment 30 Harald Judt 2014-10-20 09:33:29 CEST
(In reply to Andrew from comment #29)
> Hello Harald, thenaks for your work on this.
> 
> I've compiled the git copy today due to the stock Xubuntu version of the
> weather plugin not functioning at all. I compiled at ~1200 on Oct 19th, 2014
> but am experiencing the moon being shown despite it still being day here in
> NYC.

http://git.xfce.org/panel-plugins/xfce4-weather-plugin/commit/?id=8517e7c6b62fd932a89c9470ae27e3a837d74938

Please verify you have this commit using git log. If you don't, pull the latest changes and recompile, reinstall and restart the panel (or do that anyway and try again, just to be sure).

A weather icon set that always shows day/night for every symbol will be helpful, try this: http://schizo-ri.deviantart.com/art/Flat-Circle-Weather-Icons-466542065
Comment 31 stef 2014-10-20 10:03:49 CEST
@Harald

>Please test then if you can still reproduce it with current HEAD. Either leave >the machine running over night (the bug should be visible at 00:00 the next >day, but it might be more easily visible after sunrise because of the icon), or >suspend/hibernate and then resume the next day.

Hello Harald.

I tested the latest git version of plugin. I set up 3 different instances, 3 different locations and hibernated the PC around 23:00, when icons showed moon. 
This morning I resumed from hibernation and icons showed sun and data were correctly updated. It seems that the night/day bug was gone. Anyway, if it will happen again I will report.
Comment 32 Harald Judt 2014-10-20 11:09:22 CEST
Thanks for your report.

I have detected another problem that occurs when setting up or changing a location that is in a different timezone; seems to have something to do with the timezone setting. Only xfce4-panel -r helps here.
Comment 33 Harald Judt 2014-10-23 13:22:19 CEST
Pushed a few commits which should solve the update problems and other bugs. If someone here can, please pull and test if everything works fine now.
Comment 34 mikejani 2014-10-23 13:59:21 CEST
(In reply to Harald Judt from comment #33)
> Pushed a few commits which should solve the update problems and other bugs.
> If someone here can, please pull and test if everything works fine now.

Harald, I just did a git clone to a Slackware 14.1 x86_64 system and built from source into a package with no issues.  The new plugin went into a panel with no problems and configuration worked well.  Everything seems to be operational but I'll give it at least 24 hours to see if any strange behavior arises.

-- Mike
Comment 35 stef 2014-10-24 10:18:19 CEST
(In reply to Harald Judt from comment #33)
> Pushed a few commits which should solve the update problems and other bugs.
> If someone here can, please pull and test if everything works fine now.

I tested latest git. Hibernated PC around 23:00, two locations, Italy and Australia. Resumed PC in the morning, data and icons updated correctly for both istances. Running weather plugin on Slackware 14.1, 32 bit. 

Thanks for the work you've done.
Comment 36 Harald Judt 2014-10-24 10:22:04 CEST
(In reply to stef from comment #35)
> (In reply to Harald Judt from comment #33)
> > Pushed a few commits which should solve the update problems and other bugs.
> > If someone here can, please pull and test if everything works fine now.
> 
> I tested latest git. Hibernated PC around 23:00, two locations, Italy and
> Australia. Resumed PC in the morning, data and icons updated correctly for
> both istances. Running weather plugin on Slackware 14.1, 32 bit. 
> 
> Thanks for the work you've done.

Thanks for reporting. I've done my own tests with 5 locations on two machines, seems to be ok now. Let's see if there are other small or severe bugs left to fix. If not, 0.8.4 will be released soon (need to coordinate that with translators).
Comment 37 Harald Judt 2014-10-29 19:05:01 CET
*** Bug 11257 has been marked as a duplicate of this bug. ***
Comment 38 vferrando 2014-10-30 08:38:21 CET
Hi,
Thank you so much Judt for the patch

Plugin stopped working ("no data"), I pulled from git and recompiled as stef 2014-10-13 14:58:50 CEST suggested

And sorry for the duplicate bu request

It is a very clean plugin

Thanks!


Vittorio, GMT+1, Italy, Opensuse 13.1
Comment 39 Dieter 2014-11-02 18:22:38 CET
Thank you very much for fixing the xfce weatherforecast!
Dieter.
Comment 40 Harald Judt 2014-11-03 07:51:59 CET
0.8.4 has been released with the fix.
Comment 41 Nandakishore Krishna 2016-01-29 05:29:25 CET
I'm using 0.8.6. But still details tab has this - 
"Met.no sunrise API states that this version of the webservice
is deprecated, and the plugin needs to be adapted to use
a newer version, or it will stop working within a few months.
Please file a bug on https://bugzilla.xfce.org if no one
else has done so yet.".

Bug #10916

Reported by:
fmccormick
Reported on: 2014-05-28
Last modified on: 2016-01-29
Duplicates (1):

People

Assignee:
Harald Judt
CC List:
16 users

Version

Version:
unspecified

Attachments

Additional information