The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => Weather Plugin => Topic started by: Gringokarlos on January 17, 2015, 09:26:21 am

Title: Not getting data from weather underground
Post by: Gringokarlos on January 17, 2015, 09:26:21 am
Hi All - I'm a new veralite owner.  U/I 5, Version 1.6.641.  I've installed the weather underground app, have entered my WU code, and also manually set the location (the code for the closest airport) and polling (900).  I did not upload any .zip files because I really didn't understand where or what needed to be uploaded.
Title: Re: Not getting data from weather underground
Post by: Gringokarlos on January 17, 2015, 09:30:52 am
Here's the app settings.  I am unable to select the auto update box.
Title: Re: Not getting data from weather underground
Post by: dzmiller on January 17, 2015, 09:43:46 am
The auto update field doesn't seem to work. Did you put location under the advance tab? Are the capital letters in your key correct?  When you log into WU, you see the key you entered in Vera?
If you showed your actual key in the gifs above, you will want to generate a new key and not make it publicly available..
Title: Re: Not getting data from weather underground
Post by: Gringokarlos on January 17, 2015, 09:50:00 am
Hi dz.  Yes and yes.  see attached from WU
Title: Re: Not getting data from weather underground
Post by: dzmiller on January 17, 2015, 09:52:41 am
Your key is not you location code. You get a unique key from the WU developer site.

http://www.wunderground.com/weather/api/d/login.html
Title: Re: Not getting data from weather underground
Post by: Gringokarlos on January 18, 2015, 01:22:14 am
Hi dz - created and account with WU and entered the key that they provided.  thats a different field.  my key is KMEPORTL22.  Am i missing or misunderstanding something?
Title: Re: Not getting data from weather underground
Post by: RichardTSchaefer on January 18, 2015, 05:51:22 am
KMEPORTL22 looks like a PWS (Personal Weather Station) identifier.

A key will look like an arbitrary hex encoded string about 16 characters long.

A hex encoded string uses the numbers 0-9 and the letters a-f.

Title: Re: Not getting data from weather underground
Post by: dzmiller on January 18, 2015, 09:20:43 am
Yes, the first screen shot you provided show the weather station code in the provider key field - a reference to Kamembe airport , I believe. As Richard points out that's not your unique, random user key provided by WU.
WU uses your unique key to make sure you don't hit their server too often from a free developer account.
Title: Re: Not getting data from weather underground
Post by: Gringokarlos on January 18, 2015, 10:15:40 am
Oh - you're right.  I guess that I am confused about obtaining the key from WU.  I did establish an account, but I guess that I didn't understand how/where to generate the key.
Title: Re: Not getting data from weather underground
Post by: JoeyD on January 18, 2015, 11:36:17 am
If you're not sure what your key is, go to :

http://www.wunderground.com/weather/api

And sign in with your account....click on Key Settings and you'll see your key.
Title: Re: Not getting data from weather underground
Post by: Gringokarlos on January 18, 2015, 01:02:21 pm
Awesome!  Thanks, Joey.  I got it set up.  The WU site isn't very easy to navigate.  I spent quite a bit of time looking around for the key issue function.  Your link worked like a charm.
Title: Re: Not getting data from weather underground
Post by: tedp on January 24, 2015, 09:01:01 pm
Hello -- I must be daft or something, but I do not see a "key management" link at http://www.wunderground.com/weather/api

There's the option to purchase a key (of which the basic version is free). Is this what I need to do in order to obtain one?

I've attached a screengrab from the website in case I'm missing something obvious.

Thx
Title: Re: Not getting data from weather underground
Post by: tomtcom on January 24, 2015, 10:04:50 pm
You "purchase" the free api giving you 500 calls a day.
Title: Re: Not getting data from weather underground
Post by: fabstar81 on May 21, 2015, 08:25:44 am
Sorry to hijack this thread. But in the Weather Underground plugin I get the following error, which probably has its origins in a setting in vera I cannot access.

WUIWeather : Location not established in MiOS Preferences/Toolbox, Latitude and Longitude required for Plugin to work.

Obviously I tried to override the mios settings in the plugin, by putting the longitude, latitude, nearest by weather station, even country codes and all, but I keep getting this error.

In vera the location tab does say my.location, but I think I miss the tab where you can enter your latitude and longitude settings. Also the current cost per kWh I cannot submit anymore.

I did a factory reset (soft) last month and built up from scratch. Since then I have this error. Previously, I had no issues at all using the plug-in.
Title: Re: Not getting data from weather underground
Post by: akbooer on May 21, 2015, 09:02:52 am
I don't know why this is happening, but you could manually set your latitude and longitude by running a couple of lines of Lua in the test code window...

Code: [Select]
luup.attr_set ("longitude", -1.234)
luup.attr_set ("latitude", 54.321)

...using the right numbers, of course!
Title: Re: Not getting data from weather underground
Post by: breedm on June 01, 2015, 04:46:21 pm
See this post: http://forum.micasaverde.com/index.php/topic,31328.msg228961.html#msg228961 (http://forum.micasaverde.com/index.php/topic,31328.msg228961.html#msg228961)

Check/update your settings in Setup > Location.
Title: Re: Not getting data from weather underground
Post by: Scoutmedic on August 12, 2015, 08:57:38 pm
I realize that this post is 2 months old, but I battled for several days trying to get this darn app to work. Being a newb and this my first app contributed to my ignorance when it comes to setting things up.

I logged in to Weather Underground (WU), navigated to the web developer API link, and signed up for  free account. I copied the 16 digit key for later use. I backed out and made sure Weather Underground knew where my home city was. I also searched for the nearest personal weather station (pws) to me and jotted down its station ID number.

In Vera UI7, I verified my location settings were correct. I opened the app, clicked on details, and selected the device. I went to settings, copy/pasted my API key into the provider key space, and clicked on set. For the location, I entered "pws:XXXXXXXXX", where XXX was the weather station ID from WU, and clicked set. I also set the polling for 900 so it would update every 15 min.

With these things figured out, I was able to get the plugin to work.
Title: Re: Not getting data from weather underground
Post by: DeltaNu1142 on December 23, 2015, 07:23:42 am
Exhuming this thread to express thanks to @Scoutmedic. I installed this plugin yesterday & it wasn't updating, but following the steps in your post got it up & running.
Title: Re: Not getting data from weather underground
Post by: gniknalu on June 13, 2017, 03:06:34 pm
I realize that this post is 2 months old, but I battled for several days trying to get this darn app to work. Being a newb and this my first app contributed to my ignorance when it comes to setting things up.

I logged in to Weather Underground (WU), navigated to the web developer API link, and signed up for  free account. I copied the 16 digit key for later use. I backed out and made sure Weather Underground knew where my home city was. I also searched for the nearest personal weather station (pws) to me and jotted down its station ID number.

In Vera UI7, I verified my location settings were correct. I opened the app, clicked on details, and selected the device. I went to settings, copy/pasted my API key into the provider key space, and clicked on set. For the location, I entered "pws:XXXXXXXXX", where XXX was the weather station ID from WU, and clicked set. I also set the polling for 900 so it would update every 15 min.

With these things figured out, I was able to get the plugin to work.

I couldn't get it to update or even look decent in UI7. Prior to your post, I tried the same things but it still isn't usable. . . .
Title: Re: Not getting data from weather underground
Post by: Don Phillips on June 13, 2017, 08:11:17 pm
The real value in this plug-in is integrating it with PLEG to give you even more control.  For instance, I use conditions to turn on/off the exterior lights.  If clear, on at sunset, off at sunrise.  If overcast, on 15 min before sunset, and off 15 min after sunset. Rain, 30 minutes. Otherwise, if I need to see the conditions, I look out the window  ;D

Edit: I forgot I also use the exterior temperature to switch heating/cooling mode. If outside temp < 60, switch to heat. If > 65, switch to cool. Because the weather station is less than a mile from my house, it is (slightly) more accurate than the MIOS temperature, which is probably measured at the airport about 15 miles away.