Author Topic: Storm Data from VantagePro2  (Read 3276 times)

HappyNerd

  • Calm
  • *
  • Posts: 4
    • KMNFARMI22
  • Station Details: Davis Vantage Pro2
Storm Data from VantagePro2
« on: January 12, 2023, 08:54:44 PM »
Hi -

I have been using the WeatherTracker app for a long time and I have decided to move away from it. Also there are some features that I like in WC that WeatherTracker doesn't have. I want to give WC a try and see how it goes. Since I am newbies with the WeatherCat app, I try to read the manual and forum as much as possible. I do have a couple of questions.

How do I capture the data for 'Storm Rain' and 'Storm Rain Date' using AppleScript from WT that connects with Davis VantagePro2?

Is this the right way to do it? I keep getting 0.0 for the results. I don't think I am doing this correctly.

Code: [Select]
tell application "WeatherCat"
set Query to "STAT$RS$"
set Storm_Rain to QueryResultString
set Query to "STAT$RSD$"
set Storm_Rain_Date to QueryResult
end tell

Let me know. Thank you.
TIM

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6661
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
STAT$ tag for rain storm. (Re: Storm Data from VantagePro2)
« Reply #1 on: January 12, 2023, 11:46:57 PM »
Dear Tim, and WeatherCat tinkerers,

Since you are a newcomer to WeatherCat and this is your first posting, let me welcome you to the WeatherCat forum! 

I have been using the WeatherTracker app for a long time and I have decided to move away from it. Also there are some features that I like in WC that WeatherTracker doesn't have. I want to give WC a try and see how it goes.

Since I am newbies with the WeatherCat app, I try to read the manual and forum as much as possible. I do have a couple of questions.

You have definitely come to the right place for your questions!

How do I capture the data for 'Storm Rain' and 'Storm Rain Date' using AppleScript from WT that connects with Davis VantagePro2?

Unfortunately - you can't!  However, WeatherCat has an alternative which is fairly close.  What you need to use is the STAT$ tag which is described starting on page 209 of the current WeatherCat manual.  The other key ingredient is the RAINSTORM period which is also described in that section.  Here is some AppleScript code to return the total amount of rain that fell during the storm period.

Code: [Select]
set RainStormTotal to 0
tell application "WeatherCat"
set Query to "STAT$RAIN:TOTAL:RAINSTORM$"
set RainStormTotal to QueryResultString
end tell
RainStormTotal

Unfortunately, I haven't been able to find a way to get the date and time when the storm started. 

You can get other statistics about the storm using the STAT$  I created a Custom Text Window with relevant statistics that you can simply download and add to your WeatherCat installation.  You should be able to download it from this posting:

https://athena.trixology.com/index.php?topic=2689.msg26014#msg26014

As noted in the manual, WeatherCat doesn't keep track of a storm in the same way as the Vantage Pro-2, but usually the results closely match up.

Let us know if you have any other questions!

Cheers, Edouard

The Grand Poohbah

  • Gale
  • ****
  • Posts: 396
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: Storm Data from VantagePro2
« Reply #2 on: January 13, 2023, 01:22:49 AM »
WeatherCatRCP for the iPhone can also report rain storm information using the same queries:

Rain storm started STAT$RAIN:MAX:RAINSTORM:TIME$
Rain storm value is STAT$RAIN:MAX:RAINSTORM$

Go to Reports and add the above lines to one of the four reports.

There are over 100 additional weather items that you can report.
The Reports/Tags tab lists them. Tap the desired tag to copy it and then paste it into the report.

HappyNerd

  • Calm
  • *
  • Posts: 4
    • KMNFARMI22
  • Station Details: Davis Vantage Pro2
Re: Storm Data from VantagePro2
« Reply #3 on: January 13, 2023, 03:52:43 PM »
Thanks so much. I got that working now. One more thing...how do I retrieve 'Forecast' from Davis?

Also I didn't know there is an app for iPhone user, WeatherCatRCP, it would be fun for me to explore that, too.

I have lot to learn on how to handle the weather data.
Thanks.
TIM

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6661
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Two mistakes and more info. (Re: Storm Data from VantagePro2)
« Reply #4 on: January 13, 2023, 10:54:14 PM »
Dear Tim, Grand, and WeatherCat DIY types,

Thanks so much. I got that working now.

Sorry to report, but I goofed in my last posting.  I should have used TOTAL instead of MAX in my examples.  So the correct code to get the total rainfall is this:

Code: [Select]
set RainStormTotal to 0
tell application "WeatherCat"
set Query to "STAT$RAIN:TOTAL:RAINSTORM$"
set RainStormTotal to QueryResultString
end tell
RainStormTotal

More seriously, I cannot find any way to get the date and time of when the storm starts.  The tag I gave:

STAT$RAIN:MAX:RAINSTORM:TIME$

Actually reports the date and time for the highest rainfall rate.  I'll keep looking but so far every combination I've tried doesn't give the date and time of the start of the storm.


One more thing...how do I retrieve 'Forecast' from Davis?

There are 2 web tags that you can use to retrieve the forecast.  They are described on page 201 of the WeatherCat manual.  The tags are:

Current forecast: CF$

Current short forecast: CSF$


Also I didn't know there is an app for iPhone user, WeatherCatRCP, it would be fun for me to explore that, too.

Grand is the developer of the WeatherCatRCP application.  There is a thread on forum with more information about the app:

https://athena.trixology.com/index.php?topic=2751.0

Here is link onto the iOS App Store for WeatherCatRCP:

https://itunes.apple.com/us/app/weathercatrcp/id1218064724?mt=8

Enjoy exploring WeatherCat!

Cheers, Edouard

P.S. I updated my previous posting with the corrections.

The Grand Poohbah

  • Gale
  • ****
  • Posts: 396
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: Two mistakes and more info. (Re: Storm Data from VantagePro2)
« Reply #5 on: January 14, 2023, 08:04:17 PM »
More seriously, I cannot find any way to get the date and time of when the storm starts.  The tag I gave:

STAT$RAIN:MAX:RAINSTORM:TIME$

Actually reports the date and time for the highest rainfall rate.  I'll keep looking but so far every combination I've tried doesn't give the date and time of the start of the storm.


Here are some more tags from WeatherCatRCP/Reports/Tags that may be helpful:

Code: [Select]
RLD for last rain date
RS for rain storm value
RSD for date of rain storm start

Here's an example of usage:
Code: [Select]
Rain storm started RS$

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6661
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Answer for original question! (Re: Storm Data from VantagePro2)
« Reply #6 on: January 14, 2023, 09:53:47 PM »
Dear Grand and WeatherCat seekers of knowledge,

Here are some more tags from WeatherCatRCP/Reports/Tags that may be helpful:

Code: [Select]
RLD for ast rain date
RS for rain storm value
RSD for date of rain storm start

Here's an example of usage:
Code: [Select]
Rain storm started RS$

Okay, mea culpa!  I didn't know these tags existed!  They turn out to be allowing you to access your Davis Vantage Pro or Vue console definitions of a storm.  The tags are documented on page 202 of the current WeatherCat manual.  Yes, they work with WeatherCatRCP and can be used in web pages.  However, you cannot look these values up in either an AppleScript or a Custom Text Box.  Still, it is very good to know!  Thanks Grand for pointing this out!

Cheers, Edouard

xairbusdriver

  • Storm
  • *****
  • Posts: 3131
Re: Storm Data from VantagePro2
« Reply #7 on: January 14, 2023, 11:01:12 PM »
"RLD for ast rain date" 🤔 Might that "ast" actually be "last"? Inquiring mindz... cmu:-)

Sew for, eye've knot maid mor then to erors a daye!
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system

The Grand Poohbah

  • Gale
  • ****
  • Posts: 396
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: Storm Data from VantagePro2
« Reply #8 on: January 15, 2023, 02:07:00 AM »
"RLD for ast rain date" 🤔 Might that "ast" actually be "last"? Inquiring mindz... cmu:-)

That's an "l" of a good catch! I ixed it.

Blicj11

  • Storm
  • *****
  • Posts: 4061
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Sonoma 14.8.3 | WeatherCat 3.3 | Supportive Wife
Re: Storm Data from VantagePro2
« Reply #9 on: January 16, 2023, 05:23:02 PM »
That's an "l" of a good catch! I ixed it.

Hahahaha! Hope you are getting some of this atmospheric river at your place, Grand!
Blick


The Grand Poohbah

  • Gale
  • ****
  • Posts: 396
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: Storm Data from VantagePro2
« Reply #10 on: January 16, 2023, 06:50:08 PM »
That's an "l" of a good catch! I ixed it.

Hahahaha! Hope you are getting some of this atmospheric river at your place, Grand!

Since Christmas, we have had 7 atmospheric rivers yielding a total rainfall of 18.5 inches.

Our pasture looks like a rice paddy. Fortunately, there has been little local damage or flooding.