AccuWeather Attachment Script

Posted on
Thu Oct 12, 2006 12:58 am
mric offline
Posts: 61
Joined: Sep 26, 2006
Location: Nîmes (France)

(No subject)

@lalit : can will you post it after ? , for little french :D

Mric

Posted on
Tue Oct 17, 2006 4:44 pm
Lalit offline
Posts: 71
Joined: Jul 05, 2006
Location: Paris (France)

(No subject)

czvi wrote:
THUNDERSTORM
Nothing else ?
Please I need the other state...

Posted on
Tue Oct 17, 2006 5:12 pm
Terry offline
Posts: 44
Joined: Apr 24, 2005
Location: Essex Junction, Vermont

(No subject)

Snow, sleet, icy rain, blizzard, whiteout. I live in Vermont.

Terry

I started off with nothing...I still have most of it left.

Posted on
Tue Oct 17, 2006 10:39 pm
Lalit offline
Posts: 71
Joined: Jul 05, 2006
Location: Paris (France)

(No subject)

Terry wrote:
Snow, sleet, icy rain, blizzard, whiteout. I live in Vermont.
Thanks Terry !
I need more weather state although I'm not afraid of a blizzard or whiteout in Paris !!! :lol:

Posted on
Mon Oct 30, 2006 8:50 pm
outlanderbz offline
Posts: 48
Joined: Dec 11, 2005
Location: Chicagoland

(No subject)

i can not get this to work in Indigo 2.0. what am I missing? I have tried everything, it is in my attachments folder and I have reloaded it.

the variable list does not list the items.

Posted on
Mon Oct 30, 2006 8:55 pm
macpro offline
User avatar
Posts: 765
Joined: Dec 29, 2005
Location: Third byte on the right

(No subject)

Does the log mention that the script is loaded when you reload the attachments?
What happens when you execute the time/date action immediately?

Posted on
Tue Oct 31, 2006 12:12 pm
outlanderbz offline
Posts: 48
Joined: Dec 11, 2005
Location: Chicagoland

(No subject)

my log file says

Loading attachments
"AccuWeather.scpt" script loaded
"device target attachment.scpt" script loaded
"group target attachment.scpt" script loaded
"iTunes attachment.scpt" script loaded
"scenes attachment.scpt" script loaded
"time stamp attachment.scpt" script loaded

but i am not getting any variables listed. I am going to look at it some more this afternoon maybe i was just having one of those nights, any suggestions on what I might be missing is appreciated, i am sure it is something simple

thank you

Posted on
Tue Oct 31, 2006 1:28 pm
czvi offline
Posts: 79
Joined: Jul 23, 2006

(No subject)

Are you running the embeded Applescript getAccuWeather() in a time trigger? I have a "fetch temp" time trigger execute every 15 minutes.

Posted on
Fri Nov 03, 2006 1:12 pm
outlanderbz offline
Posts: 48
Joined: Dec 11, 2005
Location: Chicagoland

(No subject)

czvi wrote:
Are you running the embeded Applescript getAccuWeather() in a time trigger? I have a "fetch temp" time trigger execute every 15 minutes.


yes i did, i finally got it working. I am still not sure what the problem was. I just kept troubleshooting and now it is working. I had it working before and now it is working again. Thanks for your help.

Posted on
Thu Jan 18, 2007 12:44 am
GeneArch offline
Posts: 65
Joined: Oct 23, 2003

(No subject)

Thanks for this! I finally got around to adding this to my control page.

Any chance we could get today's high & low? (likely the estimates as in the widget)

Posted on
Thu Jan 18, 2007 8:56 am
martinc offline
Posts: 83
Joined: Oct 27, 2005

(No subject)

Anyway to get this working with WeatherUnderground?

Posted on
Fri Jan 19, 2007 1:22 pm
macpro offline
User avatar
Posts: 765
Joined: Dec 29, 2005
Location: Third byte on the right

(No subject)

GeneArch wrote:
Any chance we could get today's high & low? (likely the estimates as in the widget)

There's a change of 100% if you upgrade to version 1.3 of the AccuWeather script. :wink:

AccuWeather Attachment 1.3

To update from prior versions to 1.3, the best thing to do is to copy the URL you use for the AccuWeather site from the old script and paste it into the new script.
Also don't forget to re-enable the extra info fields you use.
Then reload attachments and everything should be working again.

Posted on
Fri Jan 19, 2007 9:49 pm
GeneArch offline
Posts: 65
Joined: Oct 23, 2003

(No subject)

macpro wrote:
There's a change of 100% if you upgrade to version 1.3 of the AccuWeather script. :wink:


Awesome! Working great!

Posted on
Thu Feb 08, 2007 1:42 pm
macpro offline
User avatar
Posts: 765
Joined: Dec 29, 2005
Location: Third byte on the right

(No subject)

How to add the AccuWeather Icons to your control page

Tonight I tried to see if my tip for getting the AccuWeather icons into a control page would work.
The good news is: it works!
The bad news is: you'll be off the streets for about 1-2 hours... :wink:
Some other good news: here's a ZIP file with stuff I made today to get it working. But read the whole post before you use it!

These are the steps to follow:

1. Go to http://accunet.accuweather.com/wx/accun ... _icons.htm and download a ZIP file with the icons you want.

2. The ZIP file contains files with a name like 01.GIF. You'll have to change all these files to AWI01+true.png, where 01 offcourse is the corresponding file number. There are 44 files, so this is a nice time to start using Automator.
For each file: open it in Preview and save it in PNG format.
In my ZIP file, you'll find the results from option 1 in a folder named "sym3".

3. Move your PNG files to /Library/Application Support/Perceptive Automation/Indigo 2/IndigoWebServer/images/controls/variables.

4. From my ZIP file, select all AWInn.png files and move them also to the variables folder.

5. Open your copy of the AccuWeather attachment script and scroll down to the user choosen extra fields. Enable the WeatherIcon field.

6. Scroll down to the end of the extra fields list and add the following code:

Code: Select all
-- Only enable this portion when the WeatherIcon is used
tell application "IndigoServer"
  set theIcon to value of variable "AWWeatherIcon"
end tell
set i to 1
repeat while i < 45
  if i < 10 then
    set num to "0" & (i as string)
  else
    set num to (i as string)
  end if
  setVariable("AWI" & num, theIcon = num)
  set i to i + 1
end repeat


7. Save the AccuWeather attachment and reload the scripts in Indigo.

8. Here comes the rest of your evening:
Open an existing control page or define a new one.
Add an item to this page with the following properties:
Display: Variable Value
For: AWI01
As image: AWI01.png
Caption: <empty>

Repeat this for all 44 images... :(

The tricky part is that you will not see the images again in your control page. That is because Indigo shows the AWI01.png image for instance and this is an transparent image. But you can click on it to see it's size and to move it where you want it.

Place all 44 images exactly above each other, because the code you entered in step 6 will allways enabled 1 of the 44 images.

That's it! View your control page to see the result.

Now if you really don't like to add 44 variable values to your control page, you can try the following, but read this first:

CAUTION: if you perform the following step, it will be completely at your own risk. So only do it if you're sure you know what you are doing and you feel comfortable doing it.

It is possible to copy a predefined control page to your Indigo database. To do this, stop the Indigo Server process and make a backup copy of your Indigo database.
Check to see if you have made the backup of your database.
Verify that you have checked that you have made a backup of your database. :wink:
Open the database file in TextEditor.
Use the search function to find this element: </ControlPageList>

Include the contents from the file ControlPage sample.xml above the line where you found the </ControlPageList> element.
Save the database file and restart Indigo.

(Matt, if you don't like this advice, please feel free to moderate.)


[edit] Small bug in AppleScript code above fixed. [/edit]
Last edited by macpro on Sun Nov 18, 2007 2:33 pm, edited 2 times in total.

Posted on
Thu Feb 08, 2007 6:43 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

(No subject)

No problem on my end with hand-editing the XML database file. Just be sure to, as mentioned above several times above, backup your database (and quit the IndigoServer) first. If you add one extra bad character into the XML file by accident, then you can render the database unreadable by Indigo.

Regards,
Matt

Who is online

Users browsing this forum: No registered users and 24 guests