[?] Does weather still work??

If you need any help with XBMC4XBOX, such as installing or using the software, please post it in here.
sketch2k278
Posts: 24
Joined: Wed Nov 18, 2015 3:28 pm
Has thanked: 7 times
Been thanked: 5 times

[?] Does weather still work??

Post by sketch2k278 »

Every time I try to update the weather with my location it just hangs, causing me to reboot xbmc4xbox (in some cases restart my xbox)
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

[?] Does weather still work??

Post by Dom DXecutioner »

Works fine for me, I'm in the US and have set up 3 cities with no issues.

You might need to upload a debug log somewhere and provide a link so someone can take a look at what's going on, otherwise we're unable to speculate.

http://www.xbmc4xbox.org.uk/forum/viewtopic.php?t=65
Image
NOTTHESAME
Posts: 532
Joined: Thu Aug 02, 2012 7:46 am
Has thanked: 82 times
Been thanked: 61 times

Re: [?] Does weather still work??

Post by NOTTHESAME »

I was gonna post tgis thought it was only me i also need to reboot the xbox, my search for location hangs
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

Re: [?] Does weather still work??

Post by Dom DXecutioner »

Again, no debug log, no way to tell... Shouldn't be a hard concept to grasp.
Image
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

Re: [?] Does weather still work??

Post by Dom DXecutioner »

So, i decided to check for myself (since it seems people want everything to be spoon fed with a golden spoon), while it fetches the data for locations that have already been setup, the search functionality no longer works at the weather.com because they have deactivated their service...

Try pasting the link below, which is how xbmc fetches locations, and you'll see the resulting page...

Code: Select all

http://xoap.weather.com/search/search?where=92555
Sooo, i guess we're out of luck!

Dom DXecutioner
Image
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: [?] Does weather still work??

Post by r32crazy01 »

Looks like the next best option now the above has been retired is the Yahoo weather API.

Code: Select all

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text%3D%22Auckland%22&format=xml
tim619
Posts: 204
Joined: Sun Mar 10, 2013 10:22 am
Has thanked: 25 times
Been thanked: 59 times

Re: [?] Does weather still work??

Post by tim619 »

If I understood correct, the service for finding locations of weather.com was shut down, the actual weather service still works.
A quick sniff yields:

Code: Select all

http://dsx.weather.com/x/v2/web/loc/gm%5E/%28CITY_NAME%29
Where CITY_NAME needs to be quoted e.g. urllib.quote('CITY_NAME')

For example:
http://dsx.weather.com/x/v2/web/loc/gm% ... Angeles%29

For results in different language:
http://dsx.weather.com/x/v2/web/loc/de_ ... Angeles%29

Nevertheless I prefer OpenWeatherMap as a service. If I find some time the next month, I'll have a look at it.
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: [?] Does weather still work??

Post by r32crazy01 »

Does it return the results in XML? So the TinyXML library can parse it.
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

Re: [?] Does weather still work??

Post by Dom DXecutioner »

r32crazy01 wrote:Does it return the results in XML? So the TinyXML library can parse it.
After checking it out, the results are return in json format...
Image
r32crazy01
Posts: 92
Joined: Sat May 04, 2013 12:29 pm
Location: New Zealand
Has thanked: 38 times
Been thanked: 35 times

Re: [?] Does weather still work??

Post by r32crazy01 »

Maybe there is a argument for the output format in the address parameters available?
tim619
Posts: 204
Joined: Sun Mar 10, 2013 10:22 am
Has thanked: 25 times
Been thanked: 59 times

Re: [?] Does weather still work??

Post by tim619 »

Weather.com closed all (or will close all) xml services on their site because traffic was too high.
Now that I read only xml is valid for xbmc4xbox I would say there are only these options:
-Switch to an other weather host which supports xml (like openweathermap, check free option here)
-Setup a php script on a server that opens the url I mentioned and returns equivalent xml. (If Python could be fired up from the xbox side before of course Python could do it, too.)
-Implement a python based way like Nuka suggested.
User avatar
byron
Posts: 582
Joined: Wed Jul 04, 2012 9:26 pm
Location: Illinois
Has thanked: 27 times
Been thanked: 96 times

Re: [?] Does weather still work??

Post by byron »

Maybe look at porting this?

http://forum.kodi.tv/showthread.php?tid=207110

I've made several attempts to get it running, but my python skills are only so-so. One thing I noticed when DanDare helped me get wunderground running a couple of years ago was that there will need to be some work done in our source code as well I think (grabbing locations should come from the addon and ours comes from xbmc4xbox if I'm not mistaken...something like that). I'd be more than happy to help here ;)
User avatar
BuZz
Site Admin
Posts: 1890
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 65 times
Been thanked: 422 times
Contact:

Re: [?] Does weather still work??

Post by BuZz »

Or get a modern HTPC with Kodi /me hides
User avatar
Dom DXecutioner
Posts: 585
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 219 times
Contact:

Re: [?] Does weather still work??

Post by Dom DXecutioner »

BuZz wrote:Or get a modern HTPC with Kodi /me hides
WTF?!!! :/
Image
User avatar
BuZz
Site Admin
Posts: 1890
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 65 times
Been thanked: 422 times
Contact:

Re: [?] Does weather still work??

Post by BuZz »

:lol:

:)
User avatar
RoyalX
Posts: 251
Joined: Wed Jul 04, 2012 6:12 am
Has thanked: 2 times
Been thanked: 9 times

Re: [?] Does weather still work??

Post by RoyalX »

Buzz, your kid must be older now and holding an Amiga 1200 in his hands instead of the C64.
User avatar
BuZz
Site Admin
Posts: 1890
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 65 times
Been thanked: 422 times
Contact:

Re: [?] Does weather still work??

Post by BuZz »

She is 6 now, I just like this photo :)

Was taken on a Holiday in Cornwall. It often rains, so I thought I would take a screen and a C64 along with me. What a nerd! :D

Recently I have been losing to her at Mario Kart on the Wii.
sketch2k278
Posts: 24
Joined: Wed Nov 18, 2015 3:28 pm
Has thanked: 7 times
Been thanked: 5 times

Re: [?] Does weather still work??

Post by sketch2k278 »

I think I was able to config the weather to my location...
simply by editing the guisettings in notepad++
just replace the current weather code with your location code and name, much easier thank I thought it would be
tim619
Posts: 204
Joined: Sun Mar 10, 2013 10:22 am
Has thanked: 25 times
Been thanked: 59 times

Re: [?] Does weather still work??

Post by tim619 »

Here is code that will most likely fix the weather problem. Unfortunately I don't have xdk installed. If no one can compile it I'll have to install it later :)

Changelog:
- Fixed location url, fixed weather api url
- Removed API Keys

Btw:
When changing dayf=7 to dayf=10 we could get some extra days forecast.
tim619
Posts: 204
Joined: Sun Mar 10, 2013 10:22 am
Has thanked: 25 times
Been thanked: 59 times

Re: [?] Does weather still work??

Post by tim619 »

I now compiled and tested it and can confirm that it works flawless.
Here is a testing build (33010) including weather fix and (I think) also scraper fixes.

Image

In the picture you can see that getting location is working again, I also found a displaying bug marked in the picture.

What I said about the number of days is valid but the gui design seems to allow only ~5 days.
Post Reply