View unanswered posts | View active topics It is currently Fri May 24, 2013 5:41 pm



Reply to topic  [ 55 posts ]  Go to page: Previous  1, 2, 3, 4
 Icon display problems with Wunderground Script 
Author Message

Joined: Mar 23, 2010
Posts: 13
Post Re: Icon display problems with Wunderground Script
Hi everyone... read below... new issue.


Last edited by macman2010 on Mon Jul 11, 2011 12:13 am, edited 1 time in total.



Sun Jul 10, 2011 11:54 pm
Profile

Joined: Mar 23, 2010
Posts: 13
Post Re: [RESOLVED]: Icon display problems with Wunderground Scri
berkinet wrote:Ok, after working with AlaskaDave offline I can report the Icon Display problem has been resolved. Here is what caused it, and how to fix it if you are having the same issue:

First, here is a bit of the output from ls -l -@ for one of the packages icon image files contained in the images/controls/variables/Observation_Icons directory:
Code: Select all
-rw-r--r--@  1 rdp   rdp    2362 Mar  1  2009 clear.png
   com.apple.FinderInfo     32
   com.apple.ResourceFork   40548

Now, here is the output from same command for the current.png file when an empty file was created using the touch command:
Code: Select all
-rw-r--r--   1 rdp   admin     0 Mar  9 14:03 test.png

Notice the extended attribute keys and sizes (the -@ option) are missing from the file created by using touch.

When the Wunderground script runs, it copies files like the one shown in the first listing to current.png and current+true.png in the images/controls/variables directory. For the image copy the script calls the -f option in cp. According to the man page for cp, this option means: If the destination file cannot be opened, remove it and create a new file, without prompting for confirmation regardless of its permissions.

But, it seems that there may be a bug in cp in OS X. When the source file contains extended attributes and the target file exists, the copy fails. I will report this to Apple (as if they actually cared).

Until I get around to changing the script to use dynamic image names, the fix for this problem is to simply copy any of the packaged image files to the images/controls/variables directory (use the finder or the terminal) and the rename it to current.png. Finally copy that file to the same directory and name it current+true.png. You could probably also create current+true.png as a link to current.png.

EDIT: Note that the problem with cp seems unique to calling it from within a do shell script command in an AppleScript.


Apparently I am not getting it... I don't understand the "fix"... I have followed everything and just cannot get the image to show??? please help. Can you maybe dumb down the fix directions? What is the "packaged image files"... Does that mean just copy one of the images like "clear" and rename it? i tried that and it did not work.. it would display the image but just the "clear" no matter what the true conditions were...

thanks.


Mon Jul 11, 2011 12:13 am
Profile

Joined: Mar 23, 2010
Posts: 13
Post Re: Icon display problems with Wunderground Script
BUMP?? Anyone?


Wed Jul 13, 2011 10:41 pm
Profile
User avatar

Joined: Nov 18, 2008
Posts: 1721
Location: Berkeley, CA
Post Re: [RESOLVED]: Icon display problems with Wunderground Scri
macman2010 wrote:...Apparently I am not getting it... I don't understand the "fix"... I have followed everything and just cannot get the image to show??? please help. Can you maybe dumb down the fix directions? What is the "packaged image files"... Does that mean just copy one of the images like "clear" and rename it? i tried that and it did not work.. it would display the image but just the "clear" no matter what the true conditions were...


The "packaged image files are contained in a directory in the code distribution. I am not really sure where you are having problems... is it the initial installation on Indigo 4, the previous fix for Indigo 4, or the problem identified with Indigo 5?

Please provide more information.


Thu Jul 14, 2011 2:30 am
Profile

Joined: Oct 17, 2004
Posts: 1116
Location: Rochester, Ny
Post Re: Icon display problems with Wunderground Script
macman2010 wrote:BUMP?? Anyone?


I'll be a little evil here, but have you seen the same problems with any other Weather scripts?

For example, the Weather Conditions script? (http://dl.dropbox.com/u/241415/Indigo%2 ... 0v0981.zip )

_________________
------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33


Thu Jul 14, 2011 5:48 am
Profile WWW

Joined: Mar 23, 2010
Posts: 13
Post Re: Icon display problems with Wunderground Script
I am having the same issue as the original poster. I installed the script with no problem and the variables all work fine.. the issue is I cannot get the images (icons) to show up on the control page like the original poster...

What I don't understand is how the "Fix" works.

I have indigo 4 (not 5 yet)... I have the script installed fine, it pulls the info needed, the images do not show? I can take screen shots but its exactly like this original poster... same exact issue.

I just need someone to dumb down the "FIX" instructions. Not sure I follow...

And, yes, I can get the other scripts to work. I was wanting to use this one to display the images on a control pages.


Thu Jul 14, 2011 8:39 pm
Profile
User avatar

Joined: Nov 18, 2008
Posts: 1721
Location: Berkeley, CA
Post Re: Icon display problems with Wunderground Script
This is about as simple as I know how to make it...

Put a copy any png image file into the the folder images/controls/variables inside of the Indigo4 server folder. (use can use the finder or the terminal). Then change the name of the copied file to current.png. Finally copy (ie duplicate) that file (in the same directory) and name the duplicate current+true.png.

Note: if there are already files named current.png or current+true.png in the iimages/controls/variables folder, delete them before performing the steps described above.


Thu Jul 14, 2011 9:57 pm
Profile

Joined: Mar 23, 2010
Posts: 13
Post Re: Icon display problems with Wunderground Script
Thank you... This is what I have tried a couple of times... However when I do that there are still issues...

so what I did is just took duplicates of the "clear" image and placed it in the folder you said... I deleted the current.png and renamed that copied (clear.png) png file to current.png... Now all that displays is the "clear" image (the sunny clear icon). It's 11:17 at night? Shouldn't the moon, clear be displayed?


Thu Jul 14, 2011 10:19 pm
Profile
User avatar

Joined: Oct 16, 2008
Posts: 215
Location: Juneau, Alaksa
Post Re: Icon display problems with Wunderground Script
This is the original poster who found a solution. I'm trying to remember exactly what we did other than the generation of the images and the only thing that comes to mind is changing of a variable in the script from true to false that by default was true. I believe this was saveHighLow property. I could be wrong, but I believe that was it. The icon has been working since making those changes.

What has not been working seems to be with WeatherUnderground. In my area I can't seem to find a reliable PWS. The NOAA station which is reliable is near the airport and it experiences weather much different from my location. I guess this is a reason for starting my own PWS? It seems that no matter which PWS I choose I get "Null Station ID in XML Data" in my event log along with no variables resulting.

I use to have two URL's for checking .xml data coming from Weather Underground (PWS and APT). Does anyone know what those are?


Fri Jul 15, 2011 3:57 pm
Profile
User avatar

Joined: Nov 18, 2008
Posts: 1721
Location: Berkeley, CA
Post Re: Icon display problems with Wunderground Script
macman2010 wrote:...so what I did is just took duplicates of the "clear" image and placed it in the folder you said... I deleted the current.png and renamed that copied (clear.png) png file to current.png...

Did you also create a copy of the image and name it current+true.png?


Sat Jul 16, 2011 2:57 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 55 posts ]  Go to page: Previous  1, 2, 3, 4

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.