Trixology
WeatherCat => WeatherCat Integration => Topic started by: elagache on April 26, 2012, 10:59:44 PM
-
Dear WeatherCat AppleScript fans,
Randall bravely became the second guinea pig to install the "WeatherCat-ized" versions of my AppleScripts. He was able to make them work without too much pain, so the time has come to let them loose upon you'all. Now they work fine in three places but they are still *BETA* - don't get confused by how well Stu manages to keep bugs away from us. I try really hard but am not nearly as well equipped to hunt bugs. (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/angry_spider.gif)
The collection has a new (admittedly uninspired) name of WeatherCat Scripts. You can download the collection here:
http://www.canebas.org/WeatherCat/AppleScripts/WeatherCat%20Scripts%202012-04-26.zip (http://www.canebas.org/WeatherCat/AppleScripts/WeatherCat%20Scripts%202012-04-26.zip)
There are functionally the same but you will immediately notice some big changes.
First, everything is stored in one large and busy folder. The advantage of this is now they can be placed anywhere on your hard drive - even in your Applications folder. I have been using the ~/Applications folder (i.e. the one inside your home folder) simply because it is less crowded and somehow scripts don't feel "lofty" enough to me to be in the main Applications folder. However, there is a cost to this - the arrangement inside this folder must be left alone. The scripts rely on finding things within the WeatherCat Scripts folder as they are presently arranged. So don't rearrange stuff inside the WeatherCat Scripts folder.
Second, each script now as a separate preference file. These are mini AppleScript files that the main scripts load to get their settings. They are stored in:
WeatherCat Scripts/WeatherCat Script Library/WeatherCat Script Prefs
The format is slightly different, so look at the Quickstart file for details. So to use these new scripts, you'll need to transfer your setting that were inside of the the old LWC AppleScript Applications into these AppleScript preference files. There are two big advantages. First, you don't have to worry about every fussing with saving Applications that was such a pain. Second, you won't ever have to copy the preferences over for an upgrade. To upgrade, simply replace the AppleScript Application file with the newer one. It will read the same preferences file. So this is the last time of cuttin' 'n' pastin' settings to upgrade. These AppleScript applications should run as is on anyone's system. Just launch them as you would launch any Mac Application.
Third, every script that has some sort of state to save, saves that data in a separate file. So from now on, you won't lose any data by upgrading, restarting, rebooting or any sort of crash (sort of a hard drive crash.) Most scripts save periodically with a minimum save period of 10 minutes and some as frequently as every minute.
Four, you'll see some significant improvements. It is now possible to use the venerable command-line browser lynx (http://lynx.isc.org/) instead of curl to submit data to UK Met Office WoW, PWS-Weather, and WeatherBug. This allows for shorter and clearer error messages. There is now a separate configuration file to handle all emailing for the scripts that use email. In addition to using OS-X's Mail.app, you can use the included MtcMail to avoid having to run Mail all the time. WC Storm Monitor now keeps track of local barometric pressure maximums and minimums. WC ET Reporter will generate a spreadsheet import file of soil moisture and temperature data (if you are lucky enough to have a station with those sensors.) Some of the psuedo web tags have changed. There are some test programs for email and Twitter uploads. Make sure to go through the Quickstart documentation to see all the details.
Oh, inside the busy WeatherCat Scripts folder is a folder called:
Documentation
I think you can guess what you'll find there!! ;D
and a folder called:
Support tools and templates
That has for the moment the web templates associated with WC Zambretti Forecaster and WC Status Growler.
So, AppleScript fans, take a look and see if you can get these new and improved AppleScripts to behave on your system! [computer]
Cheers, Edouard [cheers1]
-
Thank you very much, Edouard!
I've been using all of these scripts for about a month now without any problems at all. I've had a few system crashes due to power outages, and the scripts didn't have any problems handling them.
John, here's what you need to get those pages up and running we were PMing about!
Thanks,
Steve
-
Hi Edouard
Many thanks for all your hard work on these, [cheers1] but don't go to sleep yet, I've got to try and get a couple of the scripts working yet ! [computer] [lol2]
Can I just say, in the documentation for the web uploader there is this instruction: The logical variable MetricUnits enables conversions from metric to inches which are expected in the upload format for all three services. This preference is not in the script.
I've got messages that growler and web data uploader have started over 30 minutes ago but nought else, so as usual I've probably broken something already :) [lol2]
JC
-
Hi JC and WeatherCat AppleScript fans, [cat]
Many thanks for all your hard work on these, [cheers1] but don't go to sleep yet, I've got to try and get a couple of the scripts working yet ! [computer]
Glad you were able to get them working!! [tup]
Can I just say, in the documentation for the web uploader there is this instruction: The logical variable MetricUnits enables conversions from metric to inches which are expected in the upload format for all three services. This preference is not in the script.
I'm afraid the documentation will be the weakest link in the package. I revised things very quickly and as you'all know . . . they are somewhat "ponderous." [biggrin]
However, the error is strictly in the documentation. Thanks to WeatherCat allowing me access to the data in metric format no matter what the user has selected, I don't need this setting anymore. The script does the right thing no matter what your display units are.
This is one of the main reasons I gave up on trying to support LWC. It is a small change, but it really simplified the scripts.
So expect a documentation update in the not too distant future!!
Glad nothing more serious has shown up so far!
Cheers, Edouard [cheers1]
-
Dear WeatherCat AppleScript fans,
Randall just send me an email with a question that might be interesting to you all so I'm going answer it here:
Is there any way to stop the FTP connection failed notification I get alot of these with my Satellite Internet in the old Status Growler I figured it out but didn't want try it on the new stuff didn't want to screw it up since I have it working now ot is there a way to have the stickies remove them self after so long of a period or set sticky to false
Anyone could get in a situation where one error becomes particularly annoying for some reason. Fortunately, Growl is pretty sophisticated. You can not only control which applications are allowed to send growls, but even which notifications are displayed. In this case the annoying Growl notification is: "WC FTP Problem." If you go to the Growl preference pane, you can select any application that uses growl and control its behavior by selecting the Applications tab at the top and scrolling down until you find the application you want to tweak. Once you select the application there is a second tab in the middle that splits between Application Settings and Notifications (see example) below. Select Notifications and then use the pop-up menu to see all the notifications associated the application. In this case WC Status Growler has . . . . quite a few notifications!! ;D
Find your way to the offending notification and then uncheck the Enabled button as shown below:
(https://img.skitch.com/20120427-c5qy67c1epe52912ttreg4hycp.jpg)
From now on (and until you check that box again) that notification will no longer be displayed.
So if you are getting an annoying notification - here is your way to learn' the varmit!
Cheers, Edouard [cheers1]
P.S. Alternatively, you could use this to make a "sticky" notification stop "sticking." To check that, instead change the value for Stay on Screen to the value you prefer.
-
Hi Edouard, [bounce]
Finally worked out what I did wrong with the station status script so it's working now. Also got PWS receiving data as well as WOW, I had misspelt the station name ! [banghead]. As far as I can tell, Growler, Tags processor, Zambretti and data uploader are running ok here.
[cheers1]
JC
-
Hi JC and WeatherCat AppleScript adventurers . . .
Finally worked out what I did wrong with the station status script so it's working now. Also got PWS receiving data as well as WOW, I had misspelt the station name ! [banghead]. As far as I can tell, Growler, Tags processor, Zambretti and data uploader are running ok here.
Glad all is working for you!! [bounce]
There is a bit sage computer wisdom in your predicament. It is *so* easy to make a typo in anything that is text. I learned a long time ago, from variable names to people's names - cut'n'paste is your friend. Don't retype anything unless you absolutely have to!
Cheers, Edouard [cheers1]
-
Dear WeatherCat AppleScript explorers,
I've bellyached about California's drought too much as it is, but yesterday's Blaney-Criddle estimate of evapotranspiration was . . . shall we say - excessive!!
(https://img.skitch.com/20120428-k3dtmw3ya4h2b1d6amcnyj8rft.jpg)
However, the calculation's seem correct. The only problem is that my temperature probe seems to have made a quick visit to . . . the edge of the sun or something. The high temperature used in the calculation was over 1000˚ C!! :o
This morning things were better . . . only 267˚ C!! I manually corrected the data in the files that store these values and so far everything looks okay. However, a careful examination of the code and . . . . sure beats me. The temperature comes from WeatherCat and is not transformed at all. The high and low values are replaced when current temperature exceeds either previous extreme. So I'm rather stumped here.
Could folks running WC ET Reporter let me know if they see anything like this? Definitely need a little more data to understand what is happening here.
Thanks!
Cheers, Edouard [cheers1]
-
Hi Edouard
Just those gremlins playing in your weather station again [biggrin]
[cheers1]
All is working great here [tup]
-
Hi Randall and WeatherCat fans,
Just those gremlins playing in your weather station again [biggrin]
I dunno' . . . . you just might be right! (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/gremlin_emoticon.png)
Anybody got a good recommendation for gremlin repellant? [lol2]
All is working great here [tup]
I've only see this twice. The first time I was fussing with the scripts so much that I figured it had to be that. However, this time I wasn't messin' with them at all - honest! (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/innocent.gif)
Just to be safe, I've added a test for unreasonable temperatures and will log them. I wonder if there could be "hiccup" in the AppleScript interface somehow. The trouble is that if an unreasonable value ever is registered for high or low, it will definitely ruin that day's calculations.
Oh well, I'll keep an eye out for them gremlins!! (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/gremlin_emoticon.png)
Cheers, Edouard [cheers1]
-
Dear WeatherCat AppleScript fans,
Randall was "victimized" by a divide by 0 error in WC Storm Monitor. I think the problem was caused by some older code before I swallowed my pride and implemented a signum function that AppleScript lacks. ::) I've got the fix running now and would like to give it some time to run before releasing it.
If any of you are also victimized in this way, here it the way to get the script running again. If it hasn't quit all by itself, make sure to quit first (force-quit if necessary.) Next you need to "erase" any memory the script has so the error won't come back. You can do this by deleting the file: Storm Monitor State Data.txt. You can find it the following spot starting from WeatherCat Scripts folder.
WeatherCat Scripts/WeatherCat Script Library/WeatherCat Script Data Backups/Storm Monitor State Data.txt
Once you've deleted that file, you can start up WC Storm Monitor again. Odds of it happening seem quite low since it never happened to me. So it should be okay to run the script in its broken state until I issue an update which I hope to do soon.
I've fixed some of the documentation bugaboos that JC spotted. I've got the check so that WC ET Reporter won't compute evapotranspiration for the solar corona anymore. I finally sat down and wrote two AppleScripts to start and stop the collection. I was wrong, it only took about 15 minutes!! ::)
However, I've got to create some more documentation . . . ??? and a few other things. So it will be a couple days before the next revision becomes available for you'all to play with.
Cheers, Edouard [cheers1]
-
Thanks for that Edouard, it shut down at midnight my time, came down to the computer to find many many Growl alerts filling the screen [interesting]
[cheers1]
JC
-
Hi JC and WeatherCat fans,
Thanks for that Edouard, it shut down at midnight my time, came down to the computer to find many many Growl alerts filling the screen [interesting]
Sorry, it's been a busy day thus far. Hopefully things will quiet down a bit and I'll be able finish up that revision soon.
Cheers, Edouard [cheers1]
-
Edouard,
After much delay, I am up to date with the latest released AppleScripts. All are working great, and I've added the start/stop scripts to WeatherCat and removed the individual scripts from DelayedLauncher.
Thanks,
Steve
-
Howdy Steve and WeatherCat fans,
After much delay, I am up to date with the latest released AppleScripts. All are working great, and I've added the start/stop scripts to WeatherCat and removed the individual scripts from DelayedLauncher.
Glad to hear it! Everything has been working fine for me. Now I just need to find the time to make the changes so that they will work properly with Growl 1.3 . . . . [banghead]
Oh well, grin and bear it time . . . .
Cheers, Edouard
-
Hi Edouard,
After seeing an "end of the day" Twitter discussion over on the Weather Display forum, I got to thinking. And I think by now you know that that is both painful and dangerous. ;)
Could I make a second instance if the Twitter AppleScript, rename it, and set the delay to 24 hours. Then launch it at, say, 11:00 PM like the evening news. And create new conversions in the Tag Processor AppleScript to come up with Daily Hi, Low, precipitation, wind speed, etc?
I'm not asking for you to do this, just if it sounds reasonably feasible. If so, I'll give it a go and see if I can learn a bit more about AppleScript by the tried and true method of trial and error. :).
Any suggestions from everyone what might be a good daily summary for the general public? I was thinking along the lines of:
News at 11: Avon-Weather.com daily summary. Temperature Max 77 F, Min 51 F; Precipitation .13 in; Average Wind 13 MPH, Highest Gust 23 MPH
That's 138 characters, so throw a couple minus signs in there and I'd be maxed out. Thoughts?
Thanks,
Steve
-
Howdy Steve and WeatherCat AppleScript fans,
Unfortunately the situation around here has gone from bad to worse, so unfortunately I don't know if I could offer you much help, but . . .
Could I make a second instance if the Twitter AppleScript, rename it, and set the delay to 24 hours. Then launch it at, say, 11:00 PM like the evening news. And create new conversions in the Tag Processor AppleScript to come up with Daily Hi, Low, precipitation, wind speed, etc?
Just thinking it over, I think it will indeed work. The only thing I'm not sure of is how the authentication would be handled. I think you would have to give this second version of the script permission to access your Twitter account and then everything would be the same.
So sure, give it a try. Seems plausible enough.
Cheers, Edouard [cheers1]
-
Thanks Edoaurd,
Whatever's up at home, don't concern yourself with us. I'm sure I'm not alone in hoping things are OK or as best as can be, and we're sending best wishes your way.
Take care,
Steve
-
Howdy Steve and WeatherCat fans,
Whatever's up at home, don't concern yourself with us. I'm sure I'm not alone in hoping things are OK or as best as can be, and we're sending best wishes
Well the "little mishap" turned out not to be so little after all. My sister who lives in the house was surprised 2 weeks ago by a skunk in the predawn darkness. She was so startled that she tripped and fell on her back which was already hurting her. Basically it has taken two weeks for the doctors to finally realize that she has a broken vertebrate that will never heal properly on its own. So she is finally scheduled for an operation. But that operation cannot happen until December. Until then, she is really cripple and is on some heavy duty pain medications.
So indeed my time is really getting stomped on these days. I'll do what I can, but life is plenty complicated these days.
Cheers, Edouard
-
Sorry to hear about your sister Edouard, sounds really painful! Hope everything works out OK.
Cheers,
Stu.
-
Ouch! I can see why you've been otherwise occupied. I hope your sister has a full recovery without any complications.
Steve
-
Hi Edouard
Sorry about your sister blew 2 in my lower back 3 years ago never had any thing hurt so bad wouldn't wish that pain on my worst enemy hope she gets better family first
[cheers1]
-
Dear Stu, Steve, Randall, and WeatherCat fans,
Thanks for your support! [tup]
Afraid it is just one day at a time around here. December sure seems like a long, long time to wait for a problem like this. But, . . . what can ya' do? (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/confused_do_no.gif)
Thanks again,
Edouard
-
A question for you, Stu,
As noted in the first post of this thread, I've taken Edouard's Twitter script, duplicated it into a Summary script and the preference file, revised any links so that it points to my new Summary script, and tested with just the basic scripts. But now that I go to enter the AppleScript tags for my daily summary information, I find that there isn't an AppleScript equivalent of the day's max/min temp or max wind gust. Nothing in WeatherCat's AppleScript library or working channels or the manual to indicate that something like this exists. I know I could add tags to Edouard's Tag Processor, but that only converts for web tags, not something I can use in AppleScript.
Am I missing somewhere that I can call out daily temp max/min and wind gusts?
Thanks,
Steve
-
Hi Steve,
Correct, it isn't possible to run a query through the AppleScript interface at the moment. It is possible via the native SDK and there are plans to extend it to AppleScript in later releases.
Stu.
-
Stu,
Thanks for that info. I'll wait until AppleScript can handle that and then modify Edouard's existing Twitter AppleScript.
Thanks,
Steve