Author Topic: Create Custom Alert - Total Rain in 15 minutes  (Read 9485 times)

monymony

  • Strong Breeze
  • ***
  • Posts: 174
  • CoCoRaHS - MD-CC-16
    • EW3643
    • KMDELKTO10
    • Cecil County Maryland Weather
  • Station Details: Davis Vantage Pro 2
Create Custom Alert - Total Rain in 15 minutes
« 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



WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2987
    • CW9739
    • IIBSTO2
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, extra temp stations, no U.V. WeatherLinkLive.
Re: Create Custom Alert - Total Rain in 15 minutes
« Reply #1 on: August 29, 2013, 05:05:00 PM »
Not possible I'm afraid - the closest would an alert based on the rain rate.

Cheers,
Stu.

monymony

  • Strong Breeze
  • ***
  • Posts: 174
  • CoCoRaHS - MD-CC-16
    • EW3643
    • KMDELKTO10
    • Cecil County Maryland Weather
  • Station Details: Davis Vantage Pro 2
Re: Create Custom Alert - Total Rain in 15 minutes
« Reply #2 on: August 29, 2013, 07:07:53 PM »
I had a feeling.  Oh well, by no means a show-stopper.

Jay



elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Try WC Storm Monitor AppleScript. (Re: Total Rain in 15 minutes)
« Reply #3 on: August 29, 2013, 07:39:47 PM »
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

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]

monymony

  • Strong Breeze
  • ***
  • Posts: 174
  • CoCoRaHS - MD-CC-16
    • EW3643
    • KMDELKTO10
    • Cecil County Maryland Weather
  • Station Details: Davis Vantage Pro 2
Re: Create Custom Alert - Total Rain in 15 minutes
« Reply #4 on: August 31, 2013, 02:47:04 AM »
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



elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Hope you find them helpful. (Re: Create Custom Alert)
« Reply #5 on: August 31, 2013, 09:03:41 PM »
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]

monymony

  • Strong Breeze
  • ***
  • Posts: 174
  • CoCoRaHS - MD-CC-16
    • EW3643
    • KMDELKTO10
    • Cecil County Maryland Weather
  • Station Details: Davis Vantage Pro 2
Re: Create Custom Alert - Total Rain in 15 minutes
« Reply #6 on: September 02, 2013, 07:11:16 PM »
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



elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Preferences files correctly located? (Re: Create Custom Alert)
« Reply #7 on: September 02, 2013, 11:12:49 PM »
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.

monymony

  • Strong Breeze
  • ***
  • Posts: 174
  • CoCoRaHS - MD-CC-16
    • EW3643
    • KMDELKTO10
    • Cecil County Maryland Weather
  • Station Details: Davis Vantage Pro 2
Re: Create Custom Alert - Total Rain in 15 minutes
« Reply #8 on: September 04, 2013, 12:59:10 PM »
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



elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Also have 'WeatherCat Script Prefs' ? (Re: Create Custom Alert)
« Reply #9 on: September 04, 2013, 08:13:17 PM »
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]

monymony

  • Strong Breeze
  • ***
  • Posts: 174
  • CoCoRaHS - MD-CC-16
    • EW3643
    • KMDELKTO10
    • Cecil County Maryland Weather
  • Station Details: Davis Vantage Pro 2
Re: Create Custom Alert - Total Rain in 15 minutes
« Reply #10 on: September 04, 2013, 08:22:26 PM »
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



elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Got to be some sort of file access issue (Re: Create Custom Alert)
« Reply #11 on: September 05, 2013, 07:31:30 PM »
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:

Code: [Select]
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]

monymony

  • Strong Breeze
  • ***
  • Posts: 174
  • CoCoRaHS - MD-CC-16
    • EW3643
    • KMDELKTO10
    • Cecil County Maryland Weather
  • Station Details: Davis Vantage Pro 2
Re: Create Custom Alert - Total Rain in 15 minutes
« Reply #12 on: September 06, 2013, 03:14:17 PM »
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?



elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6686
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Normal folder permissions (Re: Create Custom Alert)
« Reply #13 on: September 06, 2013, 09:58:01 PM »
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. 

Cheers, Edouard  [cheers1]