We have moved at community.getvera.com

Author Topic: Weather Plugin  (Read 225971 times)

Offline madas

  • Full Member
  • ***
  • Posts: 180
  • Karma: +0/-0
Re: Plugin for Web: weather.com et al
« Reply #30 on: August 31, 2009, 11:00:24 pm »
guessed,

your zip worked on my box and I don't see the same as Chimpware.  I just have the temps without the additional "current temperature=" string.

Perhaps its something with the local zip?

G
Vera(1.0.958), Dongle(2.78), WDTC-20 Thermostat, HA02C Appliance Module, HA-04WD Outdoor Appliance Module, HA20C Dimmer, HA-07WD Remote, HSM100 Motion/Light/Temp, HA03C Lamp Module, HA02C Appliance Module, BE369 Schlage Deadbolt

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Plugin for Web: weather.com et al
« Reply #31 on: September 01, 2009, 05:53:07 pm »
For reference, the Weather Plugin uses the [unofficial] Google Weather feed for source data.

In more than a few cases, I've seen anomalies in the data.  Here are some examples, for a rather nice place to live...


The first two, by ZIP code, are "in sync" from the data they report.

The 3rd one, by Lat/Long, has different values for some reason.  The 4th is just there in case folks are dreaming about vacations, but represents what's "at" the Lat-Long presented for the ZIP...

The Weather plugin uses the Lat/Long values that are derived when you configure the Location in Vera.  Unfortunately there are times these differ from those presented for the ZIP code.

If anyone has a better [worldwide] feed, let me know and I'll make the changes.  For now it's probably "near enough" for most uses, except for the Humidity values, which seem to diverge a bit.

(Updated to use the correct LL parameters from the Google Maps URL for the 3rd URL per LibraSun's comments below)
« Last Edit: September 01, 2009, 06:47:15 pm by guessed »

Offline LibraSun

  • Hero Member
  • *****
  • Posts: 574
  • Karma: +2/-0
Re: Plugin for Web: weather.com et al
« Reply #32 on: September 01, 2009, 06:12:13 pm »
The first two URL's obviously point to East Hampton (NY).
[Edited] So does the third ... East Hampton's coordinates are 40°57′25″N 72°11′56″W.
« Last Edit: September 04, 2009, 06:16:45 am by LibraSun »
Vera Model I running UI4 (Firmware 1.1.1338), died in 2015
Vera Plus running UI7 (Firmware 1.7.2935)

Offline Chimpware

  • Sr. Member
  • ****
  • Posts: 426
  • Karma: +0/-0
Re: Plugin for Web: weather.com et al
« Reply #33 on: September 01, 2009, 06:35:09 pm »
If I modify your first URL for my zip code 08844, this humidity that is shown does not match the humidity that comes from your plugin.

(http://img.skitch.com/20090901-ixp5p5punfwrij1h18ruxp9gm.jpg)
(http://img.skitch.com/20090901-tchfrpea323u176bu2587ke856.jpg)



BTW, are you located on LI in the Hamptons?

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Plugin for Web: weather.com et al
« Reply #34 on: September 01, 2009, 07:02:55 pm »
What does the 3rd URL report if you change the LL parameters to match those for your ZIP code?

You can also check these against the current settings under Vera's Location tab, but you have to (Edit) to see them since it typically displays a formal/textual name, and not the components (including LL)

... I live in California, but chose "nice" random locations for most of my examples, so they're typically all over the map.  I've also corrected the 3rd example above, since I'd use the wrong LL pair from the Google Maps request (also changed)

Offline Chimpware

  • Sr. Member
  • ****
  • Posts: 426
  • Karma: +0/-0
Re: Plugin for Web: weather.com et al
« Reply #35 on: September 01, 2009, 07:58:02 pm »
Using 3rd URL and LL from Vera settings I get the same humidity data as I get substituting my zip code in the first URL.  Data in Vera still reports wrong humidity for me:

(http://img.skitch.com/20090901-5k3dr2yep42rb6nhpau66sa8e.jpg)

(http://img.skitch.com/20090901-m5ptsru71ama3fib8y8iyi4fj4.jpg)


(http://img.skitch.com/20090901-j3m1hpmbm1datpgmxcm74q83ra.jpg)

Current Temperature is however correct.  I scanned the data for an instance of 14 in the XML data and there was none, so not sure where Vera is getting Humidity Level data from.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Plugin for Web: weather.com et al
« Reply #36 on: September 02, 2009, 09:10:26 am »
Cool, thx!  I'll  run it through my parser tonight to ensure there are no parsing problems with extracting the Humidity values using your XML snippet (although I'll have to re-type it).  The service polls on ~30 min intervals, so there's also the chance that any of the values might change in between when you run it and when the plugin does, but most changes should be minimal.

Offline Chimpware

  • Sr. Member
  • ****
  • Posts: 426
  • Karma: +0/-0
Re: Plugin for Web: weather.com et al
« Reply #37 on: September 02, 2009, 11:50:44 am »
You can just click:

http://www.google.com/ig/api?weather=,,,40499500,-74629000

to regenerate it if you want to.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Plugin for Web: weather.com et al
« Reply #38 on: September 03, 2009, 12:37:05 am »
@Chimpware, If I hover over the "add to iGoogle link" in

   http://www.google.com/#hl=en&source=hp&q=weather+in+08844

it's reporting that 08844 is at:

    http://www.google.com/ig/api?weather=,,,40512504,-74663464

current humidity 62%, which is different from the one you gave, which is

    http://www.google.com/ig/api?weather=,,,40499500,-74629000

reporting current humidity of 93%.

How did you derive the Lat/Long values used in the link above?  Are these the ones that Vera auto-populated into the Location tab?


I'm beginning to feel like the Humidity stuff wont work correctly for people, in all geo-locations.  If the data is unreliable, then I'll need another source or I can pull out the capability.

@madas, is it reporting correctly for you?  I need a few extra install data points to work out if the Humidity values are systematically incorrect or not.

Offline Chimpware

  • Sr. Member
  • ****
  • Posts: 426
  • Karma: +0/-0
Re: Plugin for Web: weather.com et al
« Reply #39 on: September 04, 2009, 04:41:32 am »
LL data was taken from Vera auto population, but you have me thinking.  I checked the exact LL of my house on Google Maps and the coordinates Vera auto-populates with is less than 5 miles from my house according to Google maps (by road route).

It appears there is an issue with the humidity data interpolation that Google is using for weather as I get similar results to what you found using coordinates that are relatively close to one another with vastly differing humidity results.

Alas Vera will not let you input LL data directly, so my next choice was to put in a different town, close to where I live and I found a number that reported incorrect humidity data, but eventually found one that was correct.

Thanks for looking into this for me, it appears the data from Google has issues in some cases.  I think based on exploration that in some cases humidity is being reported as 100% and then the interpolation algorithm for locations near that data point report inaccurate results.




Offline LibraSun

  • Hero Member
  • *****
  • Posts: 574
  • Karma: +2/-0
Re: Plugin for Web: weather.com et al
« Reply #40 on: September 04, 2009, 06:13:44 am »
Chimpware, this is probably not germain to the issue at hand, but it bears noting:

When I first researched how to obtain weather information from National Weather Service using their URL-based facilities, it quickly became clear that their data points were limited to very specific "stations" throughout the U.S.

See: http://www.weather.gov/xml/current_obs/
for a list of stations by state.

The "current conditions" weather report for each station shows a specific Latitude & Longitude pair, and I later found that trying to submit random lat/lon-based queries through NWS' feed services failed ... the lat/lon HAD to be in their database to work properly.

Is it possible that Google is using NWS as a back-end and therefore has similar constraints?  I wonder if your plug-in might generate more reliable results if users were asked to first look up their nearest NWS-listed "weather station" lat/lon pair, and enter that instead of what Vera (or other source) tells them.

Again, just a thought...
Vera Model I running UI4 (Firmware 1.1.1338), died in 2015
Vera Plus running UI7 (Firmware 1.7.2935)

Offline LibraSun

  • Hero Member
  • *****
  • Posts: 574
  • Karma: +2/-0
Re: Plugin for Web: weather.com et al
« Reply #41 on: September 04, 2009, 06:31:30 am »
FYI, I pinged the following two URLs against Google's API and they produced vastly different weather reports, even though the geo-locations are mere miles apart:

Used random lat/lon pair "near New Orleans, Louisiana":
http://www.google.com/ig/api?weather=,,,30980465,-90212690

Used (rounded) lat/lon pair defined by NWS for "New Orleans Int'l Airport":
http://www.google.com/ig/api?weather=,,,29980000,-90250000

Results:
Temp_F = 67 vs 77
Humidity = 94 vs 84
Low Temp = 67 vs 72
Conditions = Clear vs Cloudy, etc.

Interesting (to me) how the deltas happened to be multiples of 5 deg. F.

Vera Model I running UI4 (Firmware 1.1.1338), died in 2015
Vera Plus running UI7 (Firmware 1.7.2935)

Offline LibraSun

  • Hero Member
  • *****
  • Posts: 574
  • Karma: +2/-0
Re: Plugin for Web: weather.com et al
« Reply #42 on: September 04, 2009, 06:46:58 am »
Final note for the morning...

Seems Google isn't the only weather-data service experiencing bogus data problems.

See: http://hunter.pairsite.com/wx-status.html

for copious notes about NWS' database issues (and its effect on this guy's software development) over the past two months.

Vera Model I running UI4 (Firmware 1.1.1338), died in 2015
Vera Plus running UI7 (Firmware 1.7.2935)

Offline Chimpware

  • Sr. Member
  • ****
  • Posts: 426
  • Karma: +0/-0
Re: Plugin for Web: weather.com et al
« Reply #43 on: September 05, 2009, 08:45:00 am »
Hey thanks for pointing out WX I am checking it out and it is pretty cool.

On weather data results, I checked around my area a bit with Google Weather and there are some towns with 100% RH reported around me so that is the culprit once interpolated.

Offline husky

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Plugin for Web: weather.com et al
« Reply #44 on: September 05, 2009, 01:34:19 pm »
I don't know what I'm doing wrong here, I installed the LUUP files. In my LUUP files I see there are 3 files called something like "C%3A%5CUsers%5Cadmin%5CDesktop%5CWeather%5CD_Weather.xml" and the other 2 files have the same format.

In devices -> LUUP plugins I added a device with "D_Weather.xml" called weatherstation.
But there is no output like you all have.

My FW is 899.

What am I doing wrong here? Do I need to rename the XML file into D_Weather.xml? How do I do that?

Thanx for you help!