NOAA Weather Plus discussions
Re: NOAA Weather Plus discussions
Hi again.
That's odd. Have you tried restarting the Indigo server altogether? What is the current value of the high temperature forecast for today?
Though the error may have been precipitated by the plugin upgrade and associated change in state names, that error is clearly an Indigo client error that I don't think I can fix through plugin code change (AFAIK anyway). Matt or Jay may need to chime in on this one.
You may try creating an all new trigger that does the same thing as one of the the triggers causing the error to see if you get the same error again.
That's odd. Have you tried restarting the Indigo server altogether? What is the current value of the high temperature forecast for today?
Though the error may have been precipitated by the plugin upgrade and associated change in state names, that error is clearly an Indigo client error that I don't think I can fix through plugin code change (AFAIK anyway). Matt or Jay may need to chime in on this one.
You may try creating an all new trigger that does the same thing as one of the the triggers causing the error to see if you get the same error again.
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: NOAA Weather Plus discussions
I just updated the plugin to the new version, created a new trigger with that condition and it works/saves fine. My guess is that the state change has left something in a bad state. Things I'd try:
- Change the condition to "Always" and save it. Reopen and reselect the rule you want and save it again. See if it opens correctly.
- If that doesn't work, then it seems like the device has something wrong with it's device state list so you might want to create a new device and try it with that.
Re: NOAA Weather Plus discussions
That seems to have fixed the issuejay (support) wrote:...Change the condition to "Always" and save it. Reopen and reselect the rule you want and save it again.
On a related note, is there a way to copy/paste/duplicate a condition? If not can we add that to the feature list?
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: NOAA Weather Plus discussions
Not currently - I'll add it to the list. Note that if the condition is that complex it might be faster to just dup the trigger and change the firing part rather than recreating the condition. Just a thought.CraigM wrote:On a related note, is there a way to copy/paste/duplicate a condition? If not can we add that to the feature list?
-
ryanbuckner
- Posts: 1409
- Joined: Sat Oct 08, 2011 12:33 pm
- Location: Northern Virginia
- Contact:
Re: NOAA Weather Plus discussions
Awesome plugin. Funny enough I spent about 2 hours designing a Control Page on the 1.05 yesterday and had to rename them all today.
Is there any way to get the device states from the virtual device using Applescript?
Is there any way to get the device states from the virtual device using Applescript?
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: NOAA Weather Plus discussions
No - plugin devices aren't supported in AppleScript. If you script a lot (or even moderately), I highly recommend learning Python - it's really not hard and it's vastly superior to AppleScript in just about every way.
Re: NOAA Weather Plus discussions
What I do is use the "Insert Device State Into Variable" action in the Actions Collection plugin to insert the forecast condition into a variable when the condition changes, then use AppleScript to access the variable value.
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: NOAA Weather Plus discussions
Oh - I thought he wanted the list of states for a device (it is Sunday after all
). Definitely using the Insert Device State Into Variable action is a great option for getting a state value into AppleScript.
Still - I highly recommend Python for anyone doing a good amount of scripting...
Still - I highly recommend Python for anyone doing a good amount of scripting...
-
ryanbuckner
- Posts: 1409
- Joined: Sat Oct 08, 2011 12:33 pm
- Location: Northern Virginia
- Contact:
Re: NOAA Weather Plus discussions
you were both right. I did use the action collection solution. I'm curious how quickly the following actions will occur and if I'll have to build in a delay:
Trigger on device state change:
- step 1: collect state to variable
- step 2: SMS the value of that variable
Trigger on device state change:
- step 1: collect state to variable
- step 2: SMS the value of that variable
Re: NOAA Weather Plus discussions
I don't know for sure. Step 1 should happen almost instantly. Step 2 would depend on how fast your computer can send out an email to your carrier's email-to-SMS bridge and how long your carrier processed received messages. Note that NOAA Weather Plus clears most forecast states (blanks them out) before setting them to the new state. This is to ensure that old data in the device states that doesn't exist in the updated NOAA XML feed is cleared. However, since the state technically changes 2 times on the server (from old state, to blank, to new state), your trigger may or may not fire 2 times with the first SMS containing no data. If you encounter this, you might need to put a condition in your trigger to only fire if the state you're monitoring is not blank (i.e. not equal to (leave condition value field blank)).ryanbuckner wrote:you were both right. I did use the action collection solution. I'm curious how quickly the following actions will occur and if I'll have to build in a delay:
Trigger on device state change:
- step 1: collect state to variable
- step 2: SMS the value of that variable
Re: NOAA Weather Plus discussions
Nathan, found this in my log today:
Code: Select all
Aug 27, 2012 5:15:03 AM
Weather [NOAA Plus] Warning: Error while attempting to determine source for alternate NOAA data. local variable 'theCurrentObs' referenced before assignment
NOAA Weather Plus Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 159, in runConcurrentThread
File "plugin.py", line 367, in update
<type 'exceptions.UnboundLocalError'>: local variable 'theCurrentObs' referenced before assignment
NOAA Weather Plus Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Re: NOAA Weather Plus discussions
Thanks for the heads-up.
Yep, that's a bug. Though it's hard for me to test to be absolutely sure, I think I've fixed that bug in this version 1.1.1 update. Try installing the 1.1.1 version and let me know if you still see that error.
Yep, that's a bug. Though it's hard for me to test to be absolutely sure, I think I've fixed that bug in this version 1.1.1 update. Try installing the 1.1.1 version and let me know if you still see that error.
-
ryanbuckner
- Posts: 1409
- Joined: Sat Oct 08, 2011 12:33 pm
- Location: Northern Virginia
- Contact:
Re: NOAA Weather Plus discussions
Yep. I found that the trigger fires every 15 minutes regardless if the value of the variable changes. I'll look into the blank condition and prob split this into 2 triggers. One to update the variable (if not blank) and one to fire the SMS if the variable changes. That should do.nsheldon wrote:I don't know for sure. Step 1 should happen almost instantly. Step 2 would depend on how fast your computer can send out an email to your carrier's email-to-SMS bridge and how long your carrier processed received messages. Note that NOAA Weather Plus clears most forecast states (blanks them out) before setting them to the new state. This is to ensure that old data in the device states that doesn't exist in the updated NOAA XML feed is cleared. However, since the state technically changes 2 times on the server (from old state, to blank, to new state), your trigger may or may not fire 2 times with the first SMS containing no data. If you encounter this, you might need to put a condition in your trigger to only fire if the state you're monitoring is not blank (i.e. not equal to (leave condition value field blank)).ryanbuckner wrote:you were both right. I did use the action collection solution. I'm curious how quickly the following actions will occur and if I'll have to build in a delay:
Trigger on device state change:
- step 1: collect state to variable
- step 2: SMS the value of that variable
Re: NOAA Weather Plus discussions
Nathan, I'm getting this error every 15 minutes:
Code: Select all
Aug 30, 2012 1:59:53 PM
NOAA Weather Plus Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 164, in runConcurrentThread
File "plugin.py", line 1442, in update
File "plugin.py", line 1580, in updateDeviceState
<type 'exceptions.KeyError'>: 'key weatherAdvisory4Text not found in dict'
NOAA Weather Plus Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Re: NOAA Weather Plus discussions
Could you turn on debugging and reload the plugin then copy and paste the log into a post? I need to know what URL the plugin is using to get the data.