| Author |
Message |
|
jlhanson
Joined: Nov 12, 2008 Posts: 6
|
 Icon display problems with Wunderground Script
I am having problems getting the current condition icons to display on a control panel when using Weather Underground Query Script v2.3. I do not see that the script automatically created the "current.png" or "current+true.png" in the IndigoWebServer/images/controls/variables folder. I have setup "Wunderground_Icon" in the Variables List.
|
| Sun Mar 14, 2010 6:09 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Icon display problems with Wunderground Script
Did you place the icon files in ./IndigoWebBrowser/images/controls/Observation_Icons ? The script does not actually create the control files. Instead it copies the appropriate icon file from the Observation_Icons folder to current+true.png & current.png
|
| Sun Mar 14, 2010 8:35 pm |
|
 |
|
jlhanson
Joined: Nov 12, 2008 Posts: 6
|
 Re: Icon display problems with Wunderground Script
I did put the Observation_Icons folder in IndigoWebServer/images/controls/variables/Observation_Icons. Should I actually see "current.png" or "current+true.png" listed anywhere?
Also, how do you set the refresh interval for updating the weather data?
|
| Sun Mar 14, 2010 8:40 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Icon display problems with Wunderground Script
The "current.png" and "current+true.png" image files will be found in the controls/variables folder. You need to create a Time/Date action to call the script as often as you wish.
EDIT: Corrected path to image files.
Last edited by berkinet on Tue Aug 31, 2010 12:50 pm, edited 2 times in total.
|
| Mon Mar 15, 2010 1:41 am |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: Icon display problems with Wunderground Script
jlhanson wrote:I did put the Observation_Icons folder in IndigoWebServer/images/controls/variables/Observation_Icons. Should I actually see "current.png" or "current+true.png" listed anywhere?
Also, how do you set the refresh interval for updating the weather data?
I'm having the same issue myself. I checked the Observation_Icons folder that comes with the script and that is now installed in the proper location and there is no current.png file. Nor was these an existing one in ...images, controls/variables. Did you get this working yourself? The questions I have now pertain to the refresh rate and also including additional PWS stations. When I enter more than one PWS station am I suppose to see data from that station as well? I'm having a hard time finding reliable stations in my area, most pull up errors indicating, "getXMLfile: xxx try number xxx: Null Station ID in XML data(1). The one station that is closest to me does work and is pulling in data but when I replace it with others the errors result.
|
| Tue Aug 31, 2010 11:23 am |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Icon display problems with Wunderground Script
Q. Should I actually see "current.png" or "current+true.png" listed anywhere?The image files current.png and current+true.png will be created automatically in IndigoWebServer/images/controls/variables Q. Also, how do you set the refresh interval for updating the weather data?The Wunderground script does not run as an attachment. That is, it must be specifically started each time it is needed. Just create a Time/Date Action to run the script at whatever frequency you wish. Q. When I enter more than one PWS station am I supposed to see data from that station as well?The script will only use data for the first PWS it can successfully connect to. The management of PWS stations is described in the comments at the top of the script. However, I noticed a couple of typos in the instructions, so here is a corrected version... - Code: Select all
3) In Indigo use the Variable Window to enter the codes for the station(s) you have selected For PWSs create an Indigo variable _Wunderground_PWS_List and set the value to one or more PWS codes separated by commas. For example, KCAREDDI3,KCAREDDI2
Then, in the Description window of the AppleScript Editor... - Code: Select all
The way the script works is to, first, make up to 4 attempts to get data for an airport station, if one has been defined. Then it looks for the first PWS station in the PWS list. It will try each station in the list up to 4 times, reporting any errors, before giving up and trying the next station. If no stations are available it will report that error as well. Note that only the PWS data (not the airport data) is checked against the last receipt time stamp.
Let me know if this information resolves your questions.
Last edited by berkinet on Tue Aug 31, 2010 12:51 pm, edited 1 time in total.
|
| Tue Aug 31, 2010 12:19 pm |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: Icon display problems with Wunderground Script
Thanks for clarifying on the multiple stations, that certainly explains. Also for the information on the time/date action.
The only thing that doesn't seem to be working is the creation of the .png files. I've checked all my directories and the images are not being generated. Is there a setting that I'm skipping?
Thanks again for your help.
|
| Tue Aug 31, 2010 12:40 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Icon display problems with Wunderground Script
AlaskaDave wrote:...The only thing that doesn't seem to be working is the creation of the .png files. I've checked all my directories and the images are not being generated. Is there a setting that I'm skipping?
I corrected my last post, I was using the finder to check the path instead of the terminal window  The files current.png and current+2.png will be in controls/variables. Here are the instructions from the script. - Code: Select all
6) If you wish to use the weather icon feature, for example in a control page, put the icons folder, "Observation_Icons" into the Indigo variable images folder. Library-> Application Support-> Perceptive Automation-> Indigo 4-> IndigoWebServer-> images-> controls-> variables Then create the following Indigo variables: Wunderground_Condition Wunderground_Icon
You may use other images, but they must have the same names as the included files. If you do want to use icons in a control page, just display "Variable Value" for the variable "Wunderground_Icon" as image "current.png" If you don't want to use the icoms, you should change the runSetIcon property to false. Did you create the two Indigo variables (Wunderground_Condition & Wunderground_Icon)? If so, do their values correspond to what you see on the Wunderground web page? Also, make sure that the line: property runSetIcon : truein the script has not been changed to false.
|
| Tue Aug 31, 2010 12:58 pm |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: Icon display problems with Wunderground Script
It appears as my settings are all good, see attached screen shot.
1. property runSetIcon: true 2. Variables for Wunderground_Icon and Wunderground_Condition both set and pulling in data 3. Date/Time trigger set and action triggering Wunderground Update
Yet controls/variables folder does not contain current.png and current+true.png images.
Attachments:
File comment: Screen shot showing settings in script and Indigo.
IndigoSnapShot.jpg [ 77.02 KiB | Viewed 1509 times ]
|
| Tue Aug 31, 2010 1:19 pm |
|
 |
|
hamw
Joined: Mar 31, 2008 Posts: 739
|
 Re: Icon display problems with Wunderground Script
probably you've already stopped and restarted your server after making the changes to the script?
|
| Tue Aug 31, 2010 1:51 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Icon display problems with Wunderground Script
AlaskaDave wrote:...Yet controls/variables folder does not contain current.png and current+true.png images.
This may be a permissions problem. Execute the following commands from a terminal window and then re-run the script: - Code: Select all
touch /Library/Application\ Support/Perceptive\ Automation/Indigo\ 4/IndigoWebServer/images/controls/variables/current.png touch /Library/Application\ Support/Perceptive\ Automation/Indigo\ 4/IndigoWebServer/images/controls/variables/current+true.png
If that does not resolve the problem, execute the following command in a terminal window and paste the results back to this thread - Code: Select all
ls -la /Library/Application\ Support/Perceptive\ Automation/Indigo\ 4/IndigoWebServer/images/controls/variables
|
| Tue Aug 31, 2010 3:40 pm |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: Icon display problems with Wunderground Script
Permissions it was. The images are now showing up after running the script. Thanks for all the assistance!
|
| Tue Aug 31, 2010 4:01 pm |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: Icon display problems with Wunderground Script
Ah, spoke too soon. On a control page after setting a Variable Value Display for Wunderground_Icon as the current.png image I get a "image not found or unreadable (see screenshot. Could this be a permissions issue as well? My icons are in IndigoWebServer/images/controls/variables/Observation_Icons/
I ran the previous terminal line above only with .../variables/Observation_Icons/cloudy.png (being the current Wunderground_Icon in the value of my variable list but it seemed to have no effect.
Attachments:
IconScreenShot.jpg [ 43.67 KiB | Viewed 1489 times ]
|
| Tue Aug 31, 2010 4:31 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Icon display problems with Wunderground Script
AlaskaDave wrote:...after setting a Variable Value Display for Wunderground_Icon as the current.png image I get a "image not found or unreadable...
Did you re-run the script? The touch commands you ran just created two empty files owned by you. They still need to have the appropriate images copied to them by the script (and updated each time the script runs). FYI: this is the section of the script where the image files are updated for the current observation: set iconDir to "/Library/Application Support/Perceptive Automation/Indigo 4/IndigoWebServer/images/controls/variables/Observation_Icons" do shell script "cd " & quoted form of iconDir & ";" & "cp -f " & iconFile & " ../current.png; cp -f " & iconFile & " ../current+true.png" What happens is: We first set a variable (IconFile) to the appropriate name (this is not shown above) then we set IconDir to the directory where the image files are stored. Finally, we execute 3 shell commands to: 1) cd to the Observation_icons directory; 2&3) copy the appropriate icon file to the parent directory to current.png and current+true.png (the three shell commands are separated by a ;)
|
| Tue Aug 31, 2010 6:27 pm |
|
 |
|
AlaskaDave
Joined: Oct 16, 2008 Posts: 215 Location: Juneau, Alaksa
|
 Re: Icon display problems with Wunderground Script
The script is set up to run every 15 minutes and it does w/out any apparent issues yet the icon is still not displaying. I went into the script and verified the path and all is well there. Any other ideas?
When I run the command above in terminal I get:
total 344 drwxrwxr-x 28 root admin 952 Aug 31 14:19 . drwxrwxr-x 5 root admin 170 Jun 11 16:08 .. -rw-r--r--@ 1 KleinMini admin 6148 Aug 31 14:19 .DS_Store drwxr-xr-x@ 42 KleinMini admin 1428 Aug 31 14:19 Observation_Icons -rw-rw-r-- 1 root admin 12667 Sep 28 2009 PlainButton_large+true.png -rw-rw-r-- 1 root admin 12365 Sep 28 2009 PlainButton_large.png -rw-rw-r-- 1 root admin 4714 Sep 28 2009 PlainButton_med+true.png -rw-rw-r-- 1 root admin 4598 Sep 28 2009 PlainButton_med.png -rw-rw-r-- 1 root admin 1811 Sep 28 2009 PlainButton_small+true.png -rw-rw-r-- 1 root admin 1773 Sep 28 2009 PlainButton_small.png -rw-rw-r-- 1 root admin 18206 Sep 28 2009 PowerButton_large+true.png -rw-rw-r-- 1 root admin 17754 Sep 28 2009 PowerButton_large.png -rw-rw-r-- 1 root admin 6329 Sep 28 2009 PowerButton_med+true.png -rw-rw-r-- 1 root admin 6203 Sep 28 2009 PowerButton_med.png -rw-rw-r-- 1 root admin 2225 Sep 28 2009 PowerButton_small+true.png -rw-rw-r-- 1 root admin 2198 Sep 28 2009 PowerButton_small.png -rw-r--r-- 1 KleinMini admin 0 Aug 31 13:55 current+true.png -rw-r--r-- 1 KleinMini admin 0 Aug 31 13:54 current.png -rw-rw-r-- 1 root admin 727 Sep 28 2009 dot_large+true.png -rw-rw-r-- 1 root admin 694 Sep 28 2009 dot_large.png -rw-rw-r-- 1 root admin 507 Sep 28 2009 dot_small+true.png -rw-rw-r-- 1 root admin 473 Sep 28 2009 dot_small.png -rw-rw-r-- 1 root admin 1270 Sep 28 2009 iPhone_button_small_green+true.png -rw-rw-r-- 1 root admin 1288 Sep 28 2009 iPhone_button_small_green.png -rw-rw-r-- 1 root admin 1242 Sep 28 2009 iPhone_button_small_red+true.png -rw-rw-r-- 1 root admin 1288 Sep 28 2009 iPhone_button_small_red.png -rw-rw-r-- 1 root admin 4730 Sep 28 2009 iPhone_button_wide_green+true.png -rw-rw-r-- 1 root admin 1499 Sep 28 2009 iPhone_button_wide_green.png
|
| Wed Sep 01, 2010 2:01 pm |
|
|