Author Topic: [Release] LH_Weather (v1.30)  (Read 47934 times)

Triscopic

  • Moderator
  • Hero Member
  • *****
  • Posts: 729
  • ˙ǝıl ɐ sı ǝʞɐɔ ǝɥʇ
Re: [Release] LH_Weather (v1.1)
« Reply #15 on: 2010-11-04 08:55:00 »
Thx m8.
Think your right on the delay. But Greenland being Greenland, i take what i can get. ;) The forecast for day 1 and day 2 come on and off, again, Greenland might not be the ideal place for testing. ;)

Perhaps, but what do you mean about the forecast for 1&2 coming on and off? That doesn't sound right. The only delay should be when the plugin first loads data, e.g when changing the location or when lcdhost loads. After that it should always have data for all days... Are you saying the days data keeps reverting to the N/A items?

I think I know what's going on, and I think it's a bug. LCDHost shouldn't be saving all the entries, just the selected one, so it can match up that one on load if it exists.

It behaves as though it's saving the selected index. I don't know if that's what it does but that's how it behaves

Jarth

  • Newbie
  • *
  • Posts: 21
Re: [Release] LH_Weather (v1.1b)
« Reply #16 on: 2010-11-04 19:54:11 »
Today, i cant see the current weather either, chooses the N/A-icon i think. Also, the 5-day forecast, shows as the N/A Icons as well, yesterday, the 1. and 2. day showed a forecast, then reverted to N/A.

Uploading my setup, so you can compare the settings, might be something i chose wrong.
(Here is a copy of my log)

04-11-2010 16:50:50    DBG    "LCDHost version 0.0.12 (Qt 4.7.0, 32 bits)" build 786
04-11-2010 16:50:50    DBG    image formats ("bmp", "gif", "ico", "jpeg", "jpg", "mng", "pbm", "pgm", "png", "ppm", "tif", "tiff", "xbm", "xpm")
04-11-2010 16:50:50    DBG    executable "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/LCDHost.exe"
04-11-2010 16:50:50    DBG    currentDir "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha"
04-11-2010 16:50:50    DBG    libraryPaths ("C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins", "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha")
04-11-2010 16:50:50    DBG    binaries "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/"
04-11-2010 16:50:50    DBG    plugins "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/"
04-11-2010 16:50:50    DBG    data "C:\Users\Ulrik Larsen\Documents\LCDHost-Alpha/"
04-11-2010 16:50:50    DBG    "Windows 7 (64 bits), Qt 4.7.0"
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_Bar.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_CPU.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_Image.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_Decor.dll" loaded
04-11-2010 16:50:50    DBG    LH_Lua: running Lua 5.1 "embedded"
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_Network.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_QScript.dll" loaded
04-11-2010 16:50:50    WRN    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_Script.dll" : illegal class list entry
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_Script.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_Lua.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_Mailcount.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_SpeedFan.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_Text.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_Weather.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_WebKit.dll" loaded
04-11-2010 16:50:50    DBG    LH_Logitech: Already exists: Can't connect or open twice.
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_VirtualLCD.dll" loaded
04-11-2010 16:50:50    DBG    "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/plugins/LH_LgLcdMan.dll" loaded
04-11-2010 16:50:50    DBG    loading layout "C:/Users/Ulrik Larsen/Documents/LCDHost-Alpha/layouts/g19-default/g19-Jarth.xml"
04-11-2010 16:50:51    WRN    XML ERROR: 1 :  "Start tag expected."
04-11-2010 16:50:51    WRN    LH_WeatherConnector: Error during HTTP fetch: "Request aborted"
04-11-2010 16:50:51    WRN    XML ERROR: 1 :  "Start tag expected."
04-11-2010 16:50:51    WRN    LH_WeatherConnector: Error during HTTP fetch: "Request aborted"
04-11-2010 16:50:51    WRN    XML ERROR: 1 :  "Start tag expected."
04-11-2010 16:50:51    WRN    LH_WeatherConnector: Error during HTTP fetch: "Request aborted"
04-11-2010 16:50:52    DBG    LH_Lua: "Cairo version 1.10.0"
04-11-2010 16:50:52    DBG    LH_Lua: loaded SamplesLuaCairoTest from "lua/cairotest.lua"

Triscopic

  • Moderator
  • Hero Member
  • *****
  • Posts: 729
  • ˙ǝıl ɐ sı ǝʞɐɔ ǝɥʇ
Re: [Release] LH_Weather (v1.1b)
« Reply #17 on: 2010-11-04 23:48:40 »
Strange. I loaded your theme and it worked fine.

The important note in the log is "LH_WeatherConnector: Error during HTTP fetch: "Request aborted"" That strongly suggests your machine is unable (for some reason) to access the yahoo weather servers.

I've put together a debug build which will spit out some more info to the debug log. Please replacew your current lh_weather .dll with this one and let me know what it spits out into the log when you lead it.

If everything was working you'd see this:

LH_WeatherConnector: Fetch WOEID for:  "Nuuk, Greenland"  via  "http://where.yahooapis.com/v1/places.q('Nuuk,-Greenland')?appid=itP1aXDV34FW8OAAepdI2XJOKWWqJRUvV0NC_QaGlLwTryEZGw228CtxtzzYv9wceq73jDvqTYFhhA--"
LH_WeatherConnector: WOEID acquired:  "472856"  BEGIN FETCH (2Day)
LH_WeatherConnector: Fetch 2Day via  "http://weather.yahooapis.com/forecastrss?w=472856&u=c"
LH_WeatherConnector: Fetch 5Day via  "http://xml.weather.yahoo.com/forecastrss/GLXX0003_c.xml"

If it isn't working though, try opening those links in your browser and see what you get. I don't know what firefox does with RSS feeds, sp try opening them in IE (I know, I know, it hurts, but do it anyway; this way I know exactly what to expect if the feeds load correctly). The first one should appear as raw XML (there's no nice html formatting for this one as it's only meant for applications). This is probably the best test for whether you can get to the yahoo servers, but open the other two as well. One should be a very boring weather page for Nuuk, the other a similar page for Godthab (where the nearest actual weather station really is)

Let me know what happens.

SirReal

  • Administrator
  • Hero Member
  • *****
  • Posts: 735
    • linkdata.se
Re: [Release] LH_Weather (v1.1b)
« Reply #18 on: 2010-11-05 10:32:05 »
Jarth, you really need to clean up your LCDHost directory, there's a lot of really old stuff in there. I'd suggest uninstall, delete the directory and then reinstall. Taking care to preserve your own layouts and images, of course.

Jarth

  • Newbie
  • *
  • Posts: 21
Re: [Release] LH_Weather (v1.1b)
« Reply #19 on: 2010-11-06 18:25:05 »
Strange. I loaded your theme and it worked fine.

The important note in the log is "LH_WeatherConnector: Error during HTTP fetch: "Request aborted"" That strongly suggests your machine is unable (for some reason) to access the yahoo weather servers.

I've put together a debug build which will spit out some more info to the debug log. Please replacew your current lh_weather .dll with this one and let me know what it spits out into the log when you lead it.

If everything was working you'd see this:

LH_WeatherConnector: Fetch WOEID for:  "Nuuk, Greenland"  via  "http://where.yahooapis.com/v1/places.q('Nuuk,-Greenland')?appid=itP1aXDV34FW8OAAepdI2XJOKWWqJRUvV0NC_QaGlLwTryEZGw228CtxtzzYv9wceq73jDvqTYFhhA--"
LH_WeatherConnector: WOEID acquired:  "472856"  BEGIN FETCH (2Day)
LH_WeatherConnector: Fetch 2Day via  "http://weather.yahooapis.com/forecastrss?w=472856&u=c"
LH_WeatherConnector: Fetch 5Day via  "http://xml.weather.yahoo.com/forecastrss/GLXX0003_c.xml"

If it isn't working though, try opening those links in your browser and see what you get. I don't know what firefox does with RSS feeds, sp try opening them in IE (I know, I know, it hurts, but do it anyway; this way I know exactly what to expect if the feeds load correctly). The first one should appear as raw XML (there's no nice html formatting for this one as it's only meant for applications). This is probably the best test for whether you can get to the yahoo servers, but open the other two as well. One should be a very boring weather page for Nuuk, the other a similar page for Godthab (where the nearest actual weather station really is)

Let me know what happens.


I started by uninstalling LCD, delete the folders. Then reinstall it and the weather-app, then add the debug-file.

When opening the links manually, i get the right info.
(Nuuk = Greenlandish word, Godthaab (Old danish) = Danish word, for the same town. Wierd they use both to confuse though. ;) )

(Just to sum it up).
Generally, "Chill: factor", "City", "Humidity", "Wind", "Sun up/down", "Visibility" shows as intended.
Though "Temperatur", "Current..Description" and the weather-images don't always show.
And "Forecast Day 1+2", come once in a fullmoon, "Forecast Day 3+4" i have yeth to se.

..

Here is the Log: ( i changed the updater to 1 min).

06-11-2010 15:13:38    DBG    LH_WeatherConnector: Fetch WOEID for:  "Nuuk, Greenland"  via  "http://where.yahooapis.com/v1/places.q('Nuuk,-Greenland')?appid=itP1aXDV34FW8OAAepdI2XJOKWWqJRUvV0NC_QaGlLwTryEZGw228CtxtzzYv9wceq73jDvqTYFhhA--"
06-11-2010 15:13:38    DBG    LH_WeatherConnector: Units Changed: Update Weather (2Day)
06-11-2010 15:13:38    DBG    LH_WeatherConnector: Fetch 2Day via  "http://weather.yahooapis.com/forecastrss?w=472856&u=c"
06-11-2010 15:13:39    DBG    LH_WeatherConnector: Fetch 5Day via  "http://xml.weather.yahoo.com/forecastrss/GLXX0003_c.xml"
06-11-2010 15:13:39    WRN    LH_WeatherConnector: XML ERROR (2Day Parser): 1 :  "Start tag expected."
06-11-2010 15:13:39    WRN    LH_WeatherConnector: Error during HTTP (2Day) fetch: "Request aborted"
06-11-2010 15:13:39    DBG    LH_WeatherConnector: WOEID acquired:  "472856"  BEGIN FETCH (2Day)
06-11-2010 15:13:39    DBG    LH_WeatherConnector: Fetch 2Day via  "http://weather.yahooapis.com/forecastrss?w=472856&u=c"
06-11-2010 15:13:39    WRN    LH_WeatherConnector: XML ERROR (5Day Parser): 1 :  "Start tag expected."
06-11-2010 15:13:39    WRN    LH_WeatherConnector: Error during HTTP (5Day) fetch: "Request aborted"
06-11-2010 15:13:39    DBG    LH_WeatherConnector: Fetch 5Day via  "http://xml.weather.yahoo.com/forecastrss/GLXX0003_c.xml"
06-11-2010 15:13:39    WRN    LH_WeatherConnector: XML ERROR (2Day Parser): 1 :  "Start tag expected."
06-11-2010 15:13:39    WRN    LH_WeatherConnector: Error during HTTP (2Day) fetch: "Request aborted"
06-11-2010 15:13:39    WRN    LH_WeatherConnector: XML ERROR (5Day Parser): 1 :  "Start tag expected."
06-11-2010 15:13:39    WRN    LH_WeatherConnector: Error during HTTP (5Day) fetch: "Request aborted"
06-11-2010 15:13:40    DBG    LH_Lua: "Cairo version 1.10.0"
06-11-2010 15:13:40    DBG    LH_Lua: loaded SamplesLuaCairoTest from "lua/cairotest.lua"
06-11-2010 15:14:39    DBG    LH_WeatherConnector: Update Weather (2Day)
06-11-2010 15:14:39    DBG    LH_WeatherConnector: Fetch 2Day via  "http://weather.yahooapis.com/forecastrss?w=472856&u=c"
06-11-2010 15:14:40    DBG    LH_WeatherConnector: Fetch 5Day via  "http://xml.weather.yahoo.com/forecastrss/GLXX0003_c.xml"
06-11-2010 15:14:40    WRN    LH_WeatherConnector: XML ERROR (2Day Parser): 1 :  "Start tag expected."
06-11-2010 15:14:40    WRN    LH_WeatherConnector: Error during HTTP (2Day) fetch: "Request aborted"
06-11-2010 15:14:40    WRN    LH_WeatherConnector: XML ERROR (5Day Parser): 1 :  "Start tag expected."
06-11-2010 15:14:40    WRN    LH_WeatherConnector: Error during HTTP (5Day) fetch: "Request aborted"
06-11-2010 15:15:41    DBG    LH_WeatherConnector: Update Weather (2Day)
06-11-2010 15:15:41    DBG    LH_WeatherConnector: Fetch 2Day via  "http://weather.yahooapis.com/forecastrss?w=472856&u=c"
06-11-2010 15:15:41    DBG    LH_WeatherConnector: Fetch 5Day via  "http://xml.weather.yahoo.com/forecastrss/GLXX0003_c.xml"
06-11-2010 15:15:41    WRN    LH_WeatherConnector: XML ERROR (2Day Parser): 1 :  "Start tag expected."
06-11-2010 15:15:41    WRN    LH_WeatherConnector: Error during HTTP (2Day) fetch: "Request aborted"
06-11-2010 15:15:42    WRN    LH_WeatherConnector: XML ERROR (5Day Parser): 1 :  "Start tag expected."
06-11-2010 15:15:42    WRN    LH_WeatherConnector: Error during HTTP (5Day) fetch: "Request aborted"

Also.. Tried disabling my firewall, with the same result.

Triscopic

  • Moderator
  • Hero Member
  • *****
  • Posts: 729
  • ˙ǝıl ɐ sı ǝʞɐɔ ǝɥʇ
Re: [Release] LH_Weather (v1.1b)
« Reply #20 on: 2010-11-07 13:02:17 »
Well this is looking very very strange. Essentially it looks as though the the plugin is unable to download the same thing as you're getting in your browser. I'll put together another debug build in a bit to export exactly what plugin is actually receiving so we can see that, but usually the "Start tag expected" means it got a "page does not exist" message. Very strange.

SirReal

  • Administrator
  • Hero Member
  • *****
  • Posts: 735
    • linkdata.se
Re: [Release] LH_Weather (v1.1b)
« Reply #21 on: 2010-11-07 13:21:36 »
Make sure you set the User-Agent header to impersonate a known non-bot client, or many services will block the request.

Triscopic

  • Moderator
  • Hero Member
  • *****
  • Posts: 729
  • ˙ǝıl ɐ sı ǝʞɐɔ ǝɥʇ
Re: [Release] LH_Weather (v1.1b)
« Reply #22 on: 2010-11-07 15:08:09 »
Make sure you set the User-Agent header to impersonate a known non-bot client, or many services will block the request.
I've looked into this, but I'm not able to get this to work - it seems QHttp doesn't allow me to muck about with headers  unless I change to using .request() instead of .get(), but Yahoo! doesn't seem to like that at all (I just get error pages). Still, I doubt this is the issue, as the weather feeds work fine for me and if this were the problem I would expect Yahoo to be blocking the feeds for everyone (unless Nuuk is host to a legion of weather-minded bots ;-D)

Jarth, Attached is another debug build for the weather plugin. This one will actually save the downloaded .xml files in "C:\". There should be about three files (hopefully), one for WOEID, one for 2Day and one for 5Day. If you're running windows7 you'll need to run LCDHost as an administrator otherwise the files won't appear. Once you've got these files you'll want to disable or go back to the last version of the weather plugin so that you don't get a million xml files building up on your hard drive.

SirReal

  • Administrator
  • Hero Member
  • *****
  • Posts: 735
    • linkdata.se
Re: [Release] LH_Weather (v1.1b)
« Reply #23 on: 2010-11-07 15:51:44 »
Consider logging the response code if it's not 200.
myHttp->lastResponse().statusCode()

Triscopic

  • Moderator
  • Hero Member
  • *****
  • Posts: 729
  • ˙ǝıl ɐ sı ǝʞɐɔ ǝɥʇ
Re: [Release] LH_Weather (v1.1b)
« Reply #24 on: 2010-11-07 16:15:29 »
Good idea. I've added it to the debug code so if I need another debug build the status codes will be logged.

Jarth

  • Newbie
  • *
  • Posts: 21
Re: [Release] LH_Weather (v1.1b)
« Reply #25 on: 2010-11-07 16:17:29 »
Very strange. And good job m8. ;)

I think it might be the weather-devils of Greenland at work. ;)

I installed the newer debug, and got it working as intended right away.
When reverting back to the other debug-file, it stops working again.
(Gonna keep the newer debug-file installed, and run the host, as a non-admin. Se what happens).

Triscopic

  • Moderator
  • Hero Member
  • *****
  • Posts: 729
  • ˙ǝıl ɐ sı ǝʞɐɔ ǝɥʇ
Re: [Release] LH_Weather (v1.1b)
« Reply #26 on: 2010-11-07 16:47:35 »
Well, I did make a couple of changes to the code rather than just the exporting of the .xml files.

For SirReal's interest, the specific changes I made were removing the connection to the readyRead signal and relocating the readAll & the call to the XML parser to the requestFinished signal. Interestingly I only did this initially as I felt this was more appropriates as the QT documentation said:

Quote
[The readyRead] signal is useful if you want to process the data in chunks as soon as it becomes available. If you are only interested in the complete data, just connect to the requestFinished() signal and read the data then instead.

Anyway, I've rebuilt it without debugging enabled, so please download this version and see if it's still all fixed for you. If it does I'll do a full update. And I'll feel triumphant. ;-D

Jarth

  • Newbie
  • *
  • Posts: 21
Re: [Release] LH_Weather (v1.1b)
« Reply #27 on: 2010-11-07 17:12:11 »
There, still working.

(got this one error in the log, but shows and works as intended).
"07-11-2010 14:10:36    WRN    LH_WeatherConnector: Error during HTTP (2Day) fetch: "Request aborted" -1 "

Triscopic

  • Moderator
  • Hero Member
  • *****
  • Posts: 729
  • ˙ǝıl ɐ sı ǝʞɐɔ ǝɥʇ
Re: [Release] LH_Weather (v1.1b)
« Reply #28 on: 2010-11-07 17:16:52 »
That's to be expected and is normal. A couple of events occurred at the same time, and each one would normally cause the weather to be downloaded. Rather than allow both to occur, one of them gets aborted.

I'm glad it's finally working correctly for you. Thank you for being so swift to try my debug builds. It's made working on the issue a lot less frustrating than the process is usually.

Triscopic

  • Moderator
  • Hero Member
  • *****
  • Posts: 729
  • ˙ǝıl ɐ sı ǝʞɐɔ ǝɥʇ
Re: [Release] LH_Weather (v1.1c)
« Reply #29 on: 2010-11-07 17:22:40 »
Updated to v1.1c
Changes:
  • Changes to the way data is downloaded should improve compatibility.

 

anything