Trixology
WeatherCat => WeatherCat General Discussion => Topic started by: monymony on August 28, 2013, 10:09:44 PM
-
Hello,
One of the things I like that my Davis Vantage Pro 2 does is I am able to trigger a "Flash Flood" alarm if a certain amount of rain falls within 15 minutes. Is there a way to create a custom alert in WC if for example 0.50 inches of rain falls in less than 15 minutes. I do not see a way to do this but maybe I am missing something.
Thanks!
Jay
-
Not possible I'm afraid - the closest would an alert based on the rain rate.
Cheers,
Stu.
-
I had a feeling. Oh well, by no means a show-stopper.
Jay
-
Hi Jay and WeatherCat fans,
One of the things I like that my Davis Vantage Pro 2 does is I am able to trigger a "Flash Flood" alarm if a certain amount of rain falls within 15 minutes. Is there a way to create a custom alert in WC if for example 0.50 inches of rain falls in less than 15 minutes. I do not see a way to do this but maybe I am missing something.
If you are willing to do some AppleScript tinkering, you might try my WC Storm Monitor AppleScript. You can get more information on it here:
http://athena.trixology.com/index.php?topic=235.0 (http://athena.trixology.com/index.php?topic=235.0)
It doesn't do exactly what you are asking for, but instead monitors the rainfall rate and gives Growl notifications and/or emails when the rainfall rate goes above a user-configured rate and gives additional warnings if the rate continues to climb. It also provides statistics so that you can decide if you are in a potential flood situation.
I wrote the script because this house has had flooding problems in the past, so you might find it usable for your own concerns.
Sorry, it isn't exactly user-friendly to setup and configure. But there is a lot of documentation.
Cheers, Edouard [cheers1]
-
Hi Edouard,
I knew there were AppleScripts out there but I had not done much investigating into what they could do. Looking at some of the documentation I got all kinds of ideas on how I could use these scripts. Now to find the time to do everything I want... might be a while before I get to start using these but I certainly will be putting these scripts to use.
Thanks for letting me know!
Jay
-
Hi Jay and WeatherCat fans,
I knew there were AppleScripts out there but I had not done much investigating into what they could do. Looking at some of the documentation I got all kinds of ideas on how I could use these scripts.
Glad you found them interesting. It isn't hard to write small AppleScripts based on what I have done. So If you need some very precise like how much rain has fallen in 15 minutes you could probably whip up an AppleScript for yourself to do it.
Now to find the time to do everything I want...
You and me both!!
Cheers, Edouard [cheers1]
-
Hi Edourard,
I actually tried your scripts and most of them fail for some reason on my machine (OSX 10.8.4). When I try and run most scripts I am getting an error (i.e WC Status Growler.app):
<<script>> doesn't understand the setPreferenceValues Message.
I have tried to recompile without success.
Any ideas?
Also let me know if you want me to post this in another forum where it might make more sense.
Thanks!
Jay
-
Hi Jay and brave WeatherCat AppleScript explorers,
I actually tried your scripts and most of them fail for some reason on my machine (OSX 10.8.4). When I try and run most scripts I am getting an error (i.e WC Status Growler.app):
<<script>> doesn't understand the setPreferenceValues Message.
That error is coming from the point where the AppleScripts are trying to load the file that contains all the preferences for the scripts. By my convention, those preference files should be in this folder:
~/Applications/WeatherCat Scripts/WeatherCat Script Library/WeatherCat Script Prefs
Are you sure you have the preference files where they belong?
Cheers, Edouard [cheers1]
P.S. Yes, it would probably be a good idea to either start a new thread if you continue to have struggles.
-
Hi Edouard,
I have those preference files located in "/Users/jay/Applications/WeatherCat Scripts/WeatherCat Script Library". Maybe I am missing something obvious. When I have time I will open a new thread this afternoon.
Thanks!
Jay
-
Hi Jay and WeatherCat AppleScript users,
I have those preference files located in "/Users/jay/Applications/WeatherCat Scripts/WeatherCat Script Library". Maybe I am missing something obvious.
Does that include the final folder? The full path should be:
'/Users/jay/Applications/WeatherCat Scripts/WeatherCat Script Library/WeatherCat Script Prefs'
There should be 10 preference files in there.
Cheers, Edouard [cheers1]
-
Hi Edouard,
Does that include the final folder? The full path should be:
'/Users/jay/Applications/WeatherCat Scripts/WeatherCat Script Library/WeatherCat Script Prefs'
Apparently I have not mastered basic copy/paste [banghead]
Yes, my directory does include the final folder and the 10 "scpt" files.
/Users/jay/Applications/WeatherCat Scripts/WeatherCat Script Library/WeatherCat Script Prefs
Sorry for the confusion.
Jay
-
Hi Jay and WeatherCat AppleScript explorers,
Yes, my directory does include the final folder and the 10 "scpt" files.
/Users/jay/Applications/WeatherCat Scripts/WeatherCat Script Library/WeatherCat Script Prefs
My apologies but the the code that is giving the error is as simple as can be:
set appHomeFolder to getContainingFolder()
-- Load user preferences from external preference file.
set prefPath to appHomeFolder & "WeatherCat Script Library:WeatherCat Script Prefs:WC Status Growler prefs.scpt"
set myPrefs to load script file prefPath
tell myPrefs to setPreferenceValues()
The first line gets the path to the application (in this case WC Status Growler) as a string. The next line appends the rest of the path to the preference file. The third line has AppleScript load the contents of the preference file which is the procedure: setPreferenceValues. If AppleScript doesn't understand setPreferenceValues, it is because the preference file didn't get loaded. The only way that could happen is if somehow there is a problem accessing the file. Have you tried opening WC Status Growler prefs.scpt with the AppleScript editor to make sure it is accessible and not corrupted somehow? Could there be a permissions issue here?
If nothing else works, try deleting the collection of AppleScripts and start over. This really should work.
Sorry, that's all my thinking leads to.
Cheers, Edouard [cheers1]
-
I agree this should work. I did add a line for display dialog "Path: " & prefPath which returned the path I would expect. I am going to completely delete and reinstall. I will ask this question though...
In my USERS directory there was no APPLICATIONS folder which I had to manually create. Is there any specific permissions that should be added (or potentially would be missing) that would explain this behavior?
-
Hi Jay and WeatherCat AppleScript users,
I will ask this question though...
In my USERS directory there was no APPLICATIONS folder which I had to manually create. Is there any specific permissions that should be added (or potentially would be missing) that would explain this behavior?
I just checked and my folders don't have any unusual permissions and I'm the owner of the folders. So nothing special is needed.
Definitely puzzled that you had this problem. (http://www.canebas.org/Weather/LWC_forum/Custom_emoticons/scratch_head.gif)
Cheers, Edouard [cheers1]