Weather Underground Plugin

Posted on
Fri May 02, 2014 4:03 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Weather Underground Plugin

colinpartridge wrote:
DaveL17 wrote:
@Colin:

Please do me a favor and inspect the custom states for one of your weather devices--do you see blocks of states for:

alertDescription[1-4]
alertExpires[1-4]
alertMessage[1-4]
alertStatus[1-4]

Thanks,
Dave


HI Dave,
Yes I do. Obviously I don't see the errors if I turn off debugging, sorry I forgot to mention that.

Colin

Hmmm. I can't reproduce the error, so I'm going to have to do a bit more digging. According to the WU docs, there are somewhat different calls that must be made for European alerts--and apparently I'm not calling them quite right.

http://www.wunderground.com/weather/api/d/docs?d=data/alerts

Let me do a deeper dive on this. Please stay tuned.

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 02, 2014 4:13 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Weather Underground Plugin

haavarda wrote:
DaveL17 wrote:
@haavarda - I have figured out what was causing the celcius forecast to come through as fahrenheit. The plugin was downloading the metric forecast properly, but this value was then being instantly overwritten with fahrenheit values.

This will be fixed in v0.3.5.

Sorry for the trouble.
Dave


It works now. Thank your for the update. My HI/LOW are now presented in C.
Can you or someone else point me in the right direction on how to show weather icons with data from Wunderground?

regards

Glad that did the trick. Amazing what a misplaced tab will do...

Sorry that I completely glossed over your question about the icons. The plugin handles the icon value in two ways: The first is Icon All Day which retains the icon name that WU sends. The second is Proper Icon Name which prepends a flag to the icon name to indicate whether it is day or night (see above in this thread for an example of day/night icons.)

Clear = 'Clear' (all day)
Clear = 'Clear' or 'nt_Clear' (proper)

To use the icon name, follow the instructions found on the Wiki for Custom Images:
Code: Select all
http://www.perceptiveautomation.com/wiki/doku.php?id=cp_custom_images&s[]=control&s[]=page

Hope that helps.
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Fri May 02, 2014 6:51 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: Weather Underground Plugin

Thank you for your feedback.
I think I am a bit slow here, but I don't understand how these variable images should be added. I have read the wiki that you link to, but I don't understand if I should change image names etc...??

Should I select "variable value" CP editor? I have all the different icons listed there, but I can not find something called Icon All Day or Proper Icon Name.

regrads

Håvard

Posted on
Fri May 02, 2014 12:03 pm
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Weather Underground Plugin

haavarda wrote:
Thank you for your feedback.
I think I am a bit slow here, but I don't understand how these variable images should be added. I have read the wiki that you link to, but I don't understand if I should change image names etc...??

Should I select "variable value" CP editor? I have all the different icons listed there, but I can not find something called Icon All Day or Proper Icon Name.

regrads

No worries.

Under the Indigo tree, look for a folder named 'IndigoWebServer/images/controls/devices'. Within that (and other folders too depending on the thing you're linking to) are images for control pages. The names of the images are linked to what the control pages will display. In this case, you'll link to:

Device State -> Your Weather Device -> Current Conditions - Icon (All Day) or Current Conditions - Icon (Day/Night)

(properIconName and properIconNameAllDay are the actual device states)

For your custom images, name them whatever you want, using the following conventions:

IMAGE_NAME.png
IMAGE_NAME+Clear.png
IMAGE_NAME+nt_Clear.png (for night)
etc.

The actual names of the conditions that Weather Underground sends can be found on the developers site where you got your API key (look for documentation.) The icon name could include any of these depending on your area.

EDIT: here a link to the API documentation: http://www.wunderground.com/weather/api ... e-glossary

Hope this helps,
Dave
Last edited by DaveL17 on Sat May 03, 2014 5:25 am, edited 1 time in total.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat May 03, 2014 5:02 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: Weather Underground Plugin

Thank you for your instructions.
I managed to set it up now!

regards

Håvard

Posted on
Sat May 03, 2014 5:24 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Weather Underground Plugin

haavarda wrote:
Thank you for your instructions.
I managed to set it up now!

regards

Glad to hear that you were able to make it work. Have fun!

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon May 12, 2014 7:17 pm
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Weather Underground Plugin

Now Available: Wunderground Plugin v0.3.6 -- This version adds what I hope will be much more stable handling of alert information. This update should also be stable for both U.S. and European alerts. Due to limitations with multi-line strings, I am presently printing the long form of the alert to the log.

In order to upgrade successfully, after installing the new version, open each weather device, select "Edit Device Settings", and select Save. Alternatively, you can delete existing devices and create new ones.

As always, post questions and bug reports here.

Cheers,
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue May 13, 2014 1:43 am
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Weather Underground Plugin

Hi Dave,
Have just updated to the latest version and am now getting the following error messages..
Code: Select all
Wunderground Error              Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 339, in runConcurrentThread
<type 'exceptions.UnboundLocalError'>: local variable 'alertArray' referenced before assignment

  Wunderground Error              plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)


I wonder if this is related to the European Alert messages you referred to earlier.

cheers

Colin

Posted on
Tue May 13, 2014 4:44 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Weather Underground Plugin

Dang. Sorry about that. Please try this version and see if it's better.

https://dl.dropboxusercontent.com/u/2796881/Wunderground.indigoPlugin.zip
Last edited by DaveL17 on Tue May 13, 2014 7:21 am, edited 1 time in total.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue May 13, 2014 4:56 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: Weather Underground Plugin

Hi,
I am getting that error message as well. I am unable to install your fix because I am only prompted to enable the plugin. Because it is the same version?

regards

Håvard

Posted on
Tue May 13, 2014 5:04 am
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Weather Underground Plugin

Thanks Dave,
Have installed that version and not getting errors. Haavarda, I downgraded to a previous version and then upgraded to the current version, or you could just delete the Wunderground plugin before reinstalling it.

Colin

Posted on
Tue May 13, 2014 5:28 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Weather Underground Plugin

Thanks Colin. Please let me know if the error comes back (it shouldn't.)

haavarda - Colin's advice should work for you. I'll renumber the patch ASAP.

EDIT: The version number has been updated. Should be okay now.
Last edited by DaveL17 on Tue May 13, 2014 7:21 am, edited 2 times in total.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue May 13, 2014 5:30 am
haavarda offline
User avatar
Posts: 702
Joined: Aug 18, 2012
Location: Norway

Re: Weather Underground Plugin

That worked. Thanks for the tips

Håvard

Posted on
Tue May 13, 2014 5:38 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Weather Underground Plugin

Good. Sorry for he hassle. That's what I get for posting a patch before the morning coffee kicks in...

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue May 13, 2014 10:48 am
Korey offline
User avatar
Posts: 813
Joined: Jun 04, 2008
Location: Henderson, NV

Re: Weather Underground Plugin

Seeing errors every time I try to start the plugin, API key is correct and so are device settings..

I've tried zip codes and PWS setting in the device config.

Deleted pulgin and devices and started from scratch..

still no joy.


:?:


Code: Select all
 Reloading plugin "Wunderground 0.3.6"
  Stopping plugin "Wunderground 0.3.6" (pid 18787)
  Stopped plugin "Wunderground 0.3.6"
  Starting plugin "Wunderground 0.3.6" (pid 18803)
  Started plugin "Wunderground 0.3.6"
  Wunderground                    Weather Underground: 89117
  Wunderground Error              Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 477, in runConcurrentThread
<type 'exceptions.UnboundLocalError'>: local variable 'alertArray' referenced before assignment

  Wunderground Error              plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

May 13, 2014 9:43:53 AM
  Wunderground                    Weather Underground: 89117
  Wunderground Error              Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 477, in runConcurrentThread
<type 'exceptions.UnboundLocalError'>: local variable 'alertArray' referenced before assignment

  Wunderground Error              plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  Trigger                         Pool Temp Update Variable
  Wunderground                    Weather Underground: 89117
  Wunderground Error              Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 477, in runConcurrentThread
<type 'exceptions.UnboundLocalError'>: local variable 'alertArray' referenced before assignment

  Wunderground Error              plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

May 13, 2014 9:44:23 AM
  Wunderground                    Weather Underground: 89117
  Wunderground Error              Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 477, in runConcurrentThread
<type 'exceptions.UnboundLocalError'>: local variable 'alertArray' referenced before assignment

  Wunderground Error              plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  Trigger                         Spa Temp Update Variable
  Wunderground                    Weather Underground: 89117
  Wunderground Error              Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 477, in runConcurrentThread
<type 'exceptions.UnboundLocalError'>: local variable 'alertArray' referenced before assignment

  Wunderground Error              plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)



With debugging enabled:
Code: Select all
Started plugin "Wunderground 0.3.6"
  Wunderground Debug              runConcurrentThread initiated.
  Wunderground                    Weather Underground: 89117
  Wunderground Debug              pressSym() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Error              Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 477, in runConcurrentThread
<type 'exceptions.UnboundLocalError'>: local variable 'alertArray' referenced before assignment

  Wunderground Error              plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  Wunderground Debug              runConcurrentThread initiated.
  Wunderground                    Weather Underground: 89117
  Wunderground Debug              pressSym() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Debug              convStr() method called.
  Wunderground Error              Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 477, in runConcurrentThread
<type 'exceptions.UnboundLocalError'>: local variable 'alertArray' referenced before assignment

  Wunderground Error              plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

--
Korey

Page 5 of 56 1, 2, 3, 4, 5, 6, 7, 8 ... 56

Who is online

Users browsing this forum: No registered users and 4 guests