Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Applets | Applets Weather applet location problem
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Applets | Applets

Subjects Author Language Messages Last message
[Resolved] Weather applet location problem
Page : 1 2
ravan English 21 Guest [Read]
07 November 2017 à 10:03

ravan, Wednesday 03 December 2008 à 12:43 | Quote


Subscription date : 25 May 2008
Messages : 22
Hi,

When I search these forums for weather, I get an error message (am I the only one??) so this question might have been answered already. If so, sorry to bother you guys and could you please point me to the right thread?

I have found that when I right-click the icon, then weather > search for your location and then enter my location (Désaignes, France) I get the responce "I couldn't get the info. Is connexion alive?" (should be "connection" ) but if I search for Valence, it finds the location code FRXX0102 for me. However, even though Valence is only 40 km away, it has usually COMPLETELY different weather (because of the height difference and location relative to the Massiv Central) ...

I have looked on http://fr.weather.com and found the same location code for Valence (FRXX0102) but also the MUCH closer (and more relevant) location FRXX2533 but if I enter that manually in the applet configuration, I get no weather

Is there a way to find my true location code or at least a working closer one?

Thanks!

fabounet, Wednesday 03 December 2008 à 14:19 | Quote


Subscription date : 30 November 2007
Messages : 17118
oh you're living in France ?
well MeteoFrance would be a better solution, but I didn't have time to check their xml files.
maybe it can be possible to adapt weather
if someone is volunteer ...

I don't know either for weather.com sorry. entering the code by hand should work, it's strange it doesn't
is it working on their site ?

ravan, Thursday 04 December 2008 à 13:18 | Quote


Subscription date : 25 May 2008
Messages : 22
yes, living in france but my french in not good enough for technical conversations (yet)... sorry

i think i found the 'problem'. i hope i can explain this properly...

i found the code FRXX0102 by searching for Valence (NOT close enough) on http://fr.weather.com in the URL:
http://fr.weather.com/weather/today-Valence-FRXX0102
if i use that code on the american site, i get the same weather info:
http://www.weather.com/outlook/travel/businesstraveler/local/FRXX0102

i also found the code FRXX2533 by searching for Saint-Agrève (close enough) on http://fr.weather.com in the URL:
http://fr.weather.com/weather/tomorrow-Saint-Agr%C3%A8ve-FRXX2533
but now, if i use that code on the american site, i get a 'no items found / search' page:
http://www.weather.com/outlook/travel/businesstraveler/local/FRXX2533

this would explain the fact that this last code does not work in the weather applet ? so, if the french version fr.weather.com syndicates info using the same xml format, would it be difficult to make the applet use that local stream instead of the american one ?

fabounet, Friday 05 December 2008 à 09:47 | Quote


Subscription date : 30 November 2007
Messages : 17118
so weather.com and fr.weather.com do not have the same information ?
not nice
if I let the user choose his URL, it may solve the problem I guess ?

ravan, Friday 05 December 2008 à 21:39 | Quote


Subscription date : 25 May 2008
Messages : 22
that would be my guess too

can we find out by me testing a little bit, somehow? you tell me what i need to edit to switch from weather.com to fr.weather.com and i will tell you if it works, ok?

fabounet, Monday 08 December 2008 à 12:30 | Quote


Subscription date : 30 November 2007
Messages : 17118
well, just edit the weather sources, and replace weather.com with fr.weather.com to start with
I think it should be enough. I'll add an option if it works

RavanH, Monday 08 December 2008 à 20:15 | Quote


Subscription date : 25 May 2008
Messages : 12
Ok, sure ... eeeehmmmm ... but where

The gnome-search-tool tells me that weather.com can be found in libcd-weather.so... Is that where i should change it to fr.weather.com ? If so, HOW do I edit the .so file?

nochka85, Monday 08 December 2008 à 21:00 | Quote


Subscription date : 29 November 2007
Messages : 7408
~/Cairo-dock-SVN/plug-ins/weather/src$ grep weather.com *.c
applet-read-data.c:    gchar *cCommand = g_strdup_printf ("wget \"http://xoap.weather.com/search/search?where=%s\" -O %s -o /dev/null -t 2 -T 2", cLocation, cLocationFilePath);
applet-read-data.c:        cCommand = g_strdup_printf ("wget \"http://xoap.weather.com/weather/local/%s?cc=*%s\" -O %s -o /dev/null -t 3 -T 5", myConfig.cLocationCode, (myConfig.bISUnits ? "&unit=m" : ""), myData.cCCDataFilePath); // ?=xoap&par=1048871467&key=12daac2f3a67cb39
applet-read-data.c:        cCommand = g_strdup_printf ("wget \"http://xoap.weather.com/weather/local/%s?dayf=%d%s\" -O %s -o /dev/null -t 3 -T 5", myConfig.cLocationCode, myConfig.iNbDays, (myConfig.bISUnits ? "&unit=m" : ""), myData.cForecastDataFilePath); // ?=xoap&par=1048871467&key=12daac2f3a67cb39
applet-read-data.c:        g_set_error (erreur, 1, 1, "xml file '%s' is not well formed (weather.com may have changed its data format)", cDataFilePath);


-> Donc, c'est dans applet-read-data.c (à 4 endroits) <- Du moins je crois ! ... Penses à faire une sauvegarde

RavanH, Tuesday 09 December 2008 à 01:23 | Quote


Subscription date : 25 May 2008
Messages : 12
Merci nochka85,

So thats in the source then... I am using a regular deb package install so do not have that. Sorry.

RavanH, Tuesday 09 December 2008 à 01:23 | Quote


Subscription date : 25 May 2008
Messages : 12
Merci nochka85,

So thats in the source then... I am using a regular deb package install so do not have that. Sorry.

nochka85, Tuesday 09 December 2008 à 08:28 | Quote


Subscription date : 29 November 2007
Messages : 7408
Sorry -> I forgot it was in english

fabounet, Tuesday 09 December 2008 à 09:38 | Quote


Subscription date : 30 November 2007
Messages : 17118
I can make a temporary patch in the SVN, but then I would need you to test it.

Mav, Tuesday 09 December 2008 à 10:17 | Quote


Subscription date : 29 November 2007
Messages : 3146
I will test it if you give me the location code

fabounet, Thursday 11 December 2008 à 09:42 | Quote


Subscription date : 30 November 2007
Messages : 17118
I have a problem with it :
the URL is xoap.weather.com, not weather.com or fr.weather.com, and it gives back an XML description. so I don't see how I could include the country in the URL.
please let me know if you find a way to do it.

RavanH, Saturday 13 December 2008 à 01:32 | Quote


Subscription date : 25 May 2008
Messages : 12
Can you give me for example the full URL to the XML file that would be used for a location like Valence? It has code FRXX0102 and should be available via xoap.weather.com

I will have a look if the European counterparts (UK, FR, DE, ES but also BR) have similar syndication...

fabounet, Saturday 13 December 2008 à 01:39 | Quote


Subscription date : 30 November 2007
Messages : 17118
here it is
location :
http://xoap.weather.com/search/search?where=location
current conditions :
http://xoap.weather.com/weather/local/location_code?cc=*

RavanH, Sunday 14 December 2008 à 15:40 | Quote


Subscription date : 25 May 2008
Messages : 12
@Mav

An example of a location code that is recognized both on http://www.weather.com AND http://fr.weather.com is FRXX0102 for Valence, France. Now what I am looking for is how to get the weather info for another location Saint-Agrève (close to Valence) with code FRXX2533 which is recognized on http://fr.weather.com (and even http://uk.weather.com , http//:espanol.weather.com and even http://br.weather.com) but NOT on http://www.weather.com

I cannot find any XML feeds that can be used by the Weather Applet that will recognize that second location code. But if you can...

ravan, Tuesday 03 February 2009 à 15:57 | Quote


Subscription date : 25 May 2008
Messages : 22
Hurray!

Looking into the possibility to convert this plugin to use weather.yahoo.com (where a XML feed for my location is available on http://weather.yahooapis.com/forecastrss?p=FRXX2533&u=f), I noticed today that the location I was looking for (Saint-Agreve, FRXX2533) now works on weather.com too! The URL http://xoap.weather.com/weather/local/FRXX2533?cc=* is valid now and the applet gives me all the info I want

Maybe it could be considered to select Yahoo as an alternative source but for this thread, it is no longer needed... Topic solved, thread closed.

Thanks, guys, for responding - and thanks to weather.com for updating

fabounet, Tuesday 03 February 2009 à 18:38 | Quote


Subscription date : 30 November 2007
Messages : 17118
nice !
but your suggestion is full of wisdom the applet should be able to switch to another link, just in case.
are there any difference between both weather cast ?

ravan, Thursday 05 February 2009 à 21:56 | Quote


Subscription date : 25 May 2008
Messages : 22
Alas... Weather.com seems to have decided to take my location offline again after three days. Now http://xoap.weather.com/weather/local/FRXX2533?cc=* shows me a <err type="2">Invalid location provided.</err> again.

So if the weather data provider is not very reliable, indeed being able to switch might make at least this great plugin more reliable

I'll have a look at the differences between the XML streams and come back here later!

Applets | Applets

Subjects Author Language Messages Last message
[Resolved] Weather applet location problem
Page : 1 2
ravan English 21 Guest [Read]
07 November 2017 à 10:03

Post a message

Anti-spam filter 2 (*) times (*) 7 =
            
Did you know ? You can easily create a link to a wikipedia file by using the tag: [[wikipedia:FILE]]


Glx-Dock / Cairo-Dock List of forums Applets | Applets Weather applet location problem Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.