NOAA Weather Plus discussions

Plug-ins, scripts, and other software to improve your home automation experience.
peterbh
Posts: 21
Joined: Sat Apr 20, 2013 8:35 pm

List of variables with formatting tips

Post by peterbh »

Hello. While I've been using Indigo for some time, I'm just now trying to extend its capabilities a little more and I have a quick basic question.

Is there a list of all of the variables for the NOAA Weather+ plug in, sort of like the Applescript dictionary? (If there is, can a link be added to the main plug in page or the main forum announcement page?)
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

Hi.

No, there's no list published anywhere, but the plugin announcement thread with the download link can be found here.
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: NOAA Weather Plus discussions

Post by ckeyes888 »

Just tried updating to 1.1.6 from a 1.0 version and see a lot of changes. I lost all my CP displayed states
and also seeing a lot of missing info like the 6th and 7th day high and low temps.

Is an older version of the plugin still available, any one before the major changes?
The reason I tried the upgrade was to try to get the 7th day low temp to show something
other than "data unavailable".

Thanks,

Carl
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

Hi Carl.

Yes. There were major changes from the 1.0 to the 1.1 version. Almost all device states were replaced with ones that made more sense. That's why the states don't show up in your control pages any longer with 1.1.16. I'd recommend using the latest version, though it will require you to update anything that references the old device states so that they point to the new states. You can view all changes with each release on the main NOAA Weather Plus announcement thread.

Yes, all previous versions remain available. You can download the latest version prior to the 1.1 changes (version 1.0.5) here.

Hope that helps.
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: NOAA Weather Plus discussions

Post by ckeyes888 »

Thanks Nathan. Got it all worked out. That pesky 6th day low temp just won't
seem to populate. Anyone else seeing that?

Carl
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

Glad you got it worked out.

The 6th day low may end up populating sometime after 12:00 today or after 6:00 PM today. The NWS seems to update their extended forecasts about every 6 hours. Not sure about that one though.
CraigM
Posts: 677
Joined: Sun Oct 28, 2007 7:01 pm

Re: NOAA Weather Plus discussions

Post by CraigM »

Hello Nathan,

I don't know if this has been discussed, but I have been getting these errors consistently.

Code: Select all

NOAA Weather Plus Error         Unknown error getting weather for coordinates 33.6267, -116.1594: <urlopen error timed out>
  NOAA Weather Plus Error         Unknown error getting weather for coordinates 33.6267, -116.1594: <urlopen error timed out>

Code: Select all

NOAA Weather Plus Error         Error in plugin execution runConcurrentThread:

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

  NOAA Weather Plus Error         plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
My "current temp" is reading " ", and current humidity "NA". Current Icon is ok, as are the forecasts temps for "this afternoon, tonight, and weekly"
I'm running 1.1.16
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

Hi Craig.

It looks like one of the NOAA servers might not be returning data. Try reloading the plugin (Plugins menu -> NOAA Weather Plus -> Reload). If you still see this error, enable debug logging (in Plugins menu -> NOAA Weather Plus -> Configure...) then reload the plugin again and paste the log results into your reply. (You can then disable debug logging, of course).
CraigM
Posts: 677
Joined: Sun Oct 28, 2007 7:01 pm

Re: NOAA Weather Plus discussions

Post by CraigM »

That seems to have solved it :D

Is there a way for the plugin to detect an error, or no data, and reload itself?
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

Good! Glad that helped.

I've seen that once or twice before myself. I'm not sure what causes it.

Is there a way to detect it and automatically reload? Yea, kinda. Coding that would be a bit difficult though. Given the amount of time needed to code that and the relative infrequency of the problem (and rather simple workaround), I'm not sure I'm willing to dedicate the time to figure out how to do that. If it becomes a major issue though, I'll look into it more.
CraigM
Posts: 677
Joined: Sun Oct 28, 2007 7:01 pm

Re: NOAA Weather Plus discussions

Post by CraigM »

What about this:

TRIGGER
- Device state changed
- NOAA Plus
- Temperature (ºF)
- Has any change

CONDITION
- if device
- NOAA Plus
- Current Temperature (ºF)
- is equal to " "

ACTION
Execute Action Group (server action)

Code: Select all

plugin = indigo.server.getPlugin("com.nathansheldon.indigoplugin.NOAAWeatherPlus")
if plugin.isEnabled():
   plugin.restart()
Unfortunately when the Humidity goes offline it reports "NA", and the conditions won't accept "is equal to NA", it wants numbers or blank like the temp.
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

CraigM wrote:Unfortunately when the Humidity goes offline it reports "NA", and the conditions won't accept "is equal to NA", it wants numbers or blank like the temp.
If the humidity is showing "NA", that's because NOAA is putting "NA" in the humidity field and the NOAA Weather Plus plugin is simply inserting that value into the humidity state. I didn't program the plugin to insert "NA" in any of the states.

Unfortunately, I've seen this happen with other states too. NOAA's XML output seems to be a bit inconsistent from location to location. In some locations, if the humidity is unavailable, they'll put "NA" for the current humidity filed in the XML. In other locations, they'll put "NULL", or put a blank space " ", or leave the field blank altogether. I've seen this with most of the current condition values and some of the forecast values as well. The values vary from geographic location to location. At some point, I should probably go through the NOAA Weather Plus plugin code and add a check for each of those values for every one of the recognized XML fields. But because there are so many XML fields that are put into device states (and because this was my first plugin programming attempt, resulting in less-than-efficient coding practices), that'll take a while.

But, in your case, a humidity value of "NA" doesn't mean the plugin's crashed or that it can't contact NOAA. It means it DID contact NOAA, and the XML NOAA provided said that the humidity was "NA". So you wouldn't want to reload the plugin based on that anyway, since reloading wouldn't fix NOAA's XML feed. :-)
russg
Posts: 46
Joined: Thu Oct 02, 2014 8:42 pm

Re: NOAA Weather Plus discussions - state names?

Post by russg »

I'm still new to Indigo, and I'm trying to figure out how to address the NOAA Weather Plus states from Python. Besides random examples (temperatureF') I can't find a list.

Specifically, I'm looking for 'Weather Advisory 1', and the obvious concatenations don't work (error 'key xxx not found in dict').

We live in the boonies and being able to react to weather advisories is a bit critical, and so far I love the plug-in. Any suggestions?

-russg
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

Hi russg.

You can view the complete list of device states for any device within the Mac OS X Indigo client by first clicking once on the device in your device list then dragging the information pane at the bottom of the device list up (see red circle in attached image). This will reveal all device state IDs and values in alphabetic order (based on state ID). For quick Python scripting, you can right-click any state in the list and choose "Copy Python Reference" from the pop-up menu that appears. That reference can then be pasted into any text editor or Indigo embedded Python script.

The specific weather advisory state IDs you're looking for are "weatherAdvisory1Text" as well as the start and stop times in "weatherAdvisory1StartTime" and "weatherAdvisory1EndTime". If there are no weather advisories in effect, those states will be blank.

Hope that helped.
Attachments
weather advisory.png
weather advisory.png (64.28 KiB) Viewed 5687 times
Krikee
Posts: 25
Joined: Fri Jan 03, 2014 1:48 pm

Re: NOAA Weather Plus discussions

Post by Krikee »

Hi Nathan,
I have been using the plugin successfully for a number of months now. However with in the last couple of weeks it has stopped updating the data for the device.
I reloaded the plugin, ran the installer for it again, and also ran the installer for Indigo proper. I checked the logs and I get the following entries related to the plugin:

2014-11-17 19:45:10.907 Application Enabling plugin "NOAA Weather Plus 1.1.16"
2014-11-17 19:45:10.940 Application Starting plugin "NOAA Weather Plus 1.1.16" (pid 95361)
2014-11-17 19:45:12.474 Application Started plugin "NOAA Weather Plus 1.1.16"
2014-11-17 19:45:37.593 NOAA Weather Plus Error exception in deviceStartComm(MyWeather): local variable 'e' referenced before assignment

It continues to run but it never updates the values of the various states. I can post a debug log if you think it would help.

I am running latest versions of the plugin and indigo, OS 10.7.5

Any thoughts?
Post Reply

Return to “Nathan Sheldon Software”