Author Topic: Script for collecting yesterday's extremes  (Read 16881 times)

Offline gabba

  • Financial Supporter
  • Hero Member
  • *****
  • Posts: 2153
  • Country: 00
  • Karma: 213
  • Gender: Male
    • Hutt Weather
  • Station: Vantage Vue, Weather Display, Webcam.
Script for collecting yesterday's extremes
« on: March 04, 2012, 04:06:29 PM »
Hi all

I've been using a script to collect up my daily extremes - then copying and pasting the data into the extremes thread. I've made some minor modifications to it, and am providing it for others to use. The key advantage of this approach is obviously that it is quick, and puts everything into the right order / format - making the job  to summarise the data alot easier.

Pre-requisites and instructions:
You will need to be running the weather scripts from Saratoga weather http://saratoga-weather.org/wxtemplates/Settings-config-World.php
You are most likely to need to run Weather Display - At some stage I will test it on Cumulus but right now I haven't
You will need to edit the file. Search for a string "Enter your station name, location here" and replace it with your station name and location
Upload the file. It needs to sit in the same directory as your testtags.php file (along with your Settings.php and common.php files)

Once you've uploaded it, access the file through your web browser. You should be able to see yesterdays stats immediately.

My thanks go to Ken True (SaratogaWX) for the core of this script and his wonderful set of weather scripts. If you wish to make modifications to the file please attach your version back here so we can all benefit from your knowledge

NOTE: Scroll down to the bottom of the thread to see the latest version of this file
« Last Edit: June 30, 2012, 09:49:48 AM by gabba »


Cheers, Andrew

Vantage Vue, Weather Display, Webcam.
www.huttweather.co.nz

Maungaraki, Lower Hutt, New Zealand

Offline gabba

  • Financial Supporter
  • Hero Member
  • *****
  • Posts: 2153
  • Country: 00
  • Karma: 213
  • Gender: Male
    • Hutt Weather
  • Station: Vantage Vue, Weather Display, Webcam.
Re: Script for collecting yesterday's extremes
« Reply #1 on: June 30, 2012, 09:46:51 AM »
I've updated the script to reflect the updated requirements for reporting. It now reports the following:

Maximum Temperature:
Minimum Temperature:
Rainfall Total Yesterday:
Month Rainfall Total so far:
Maximum Wind Gust:
Maximum Average Wind Speed:
Total Day’s Wind Run:
Maximum Pressure:
Minimum Pressure:

plus a few other metrics

Please update your older version with this version

Offline beteljuice

  • Full Member
  • ***
  • Posts: 172
  • Country: 00
  • Karma: 41
Re: Script for collecting yesterday's extremes
« Reply #2 on: June 30, 2012, 12:32:44 PM »
Minor omission - line 108
Code: [Select]
Month Rainfall Total so far = <?php echo unUnit($monthrn) . $uomRain?><br/No closing > at end of line.
Imagine what you will KNOW tomorrow

Offline OhauitiWeather

  • Hero Member
  • *****
  • Posts: 1977
  • Country: nz
  • Karma: 284
  • Gender: Male
    • Ohauiti Weather
Re: Script for collecting yesterday's extremes
« Reply #3 on: June 30, 2012, 01:15:06 PM »
Hi there Gabba

Thanks for your efforts.  Look forward to the results of your Cumulus Testing.

I presume that the output is UTF-8 compliant and all you need to do is copy/paste to a post in the Yesterdays Highs and Lows thread on the Forum?

Kind Regards
David Harris
Ohauiti Weather
WH1091 Wireless Weather Station
Ohauiti Weather :: Home  powered by Cumulus MX 3.0.0 b3041
"If it wasn't for the last minute nothing would ever get done"

Offline JennyLeez

  • Administrator
  • Hero Member
  • *****
  • Posts: 10086
  • Country: nz
  • Karma: 654
  • Gender: Female
  • Wairoa
    • Wairoa, Hawkes Bay Weather
  • Station: WS3085
Re: Script for collecting yesterday's extremes
« Reply #4 on: June 30, 2012, 01:27:59 PM »
Hi David,
It is made for Weather Display and those using the WX templates.
It does however grab half of the cumulus data if using the WX templates.
Cheers

Footnote:
Cumulus WX templates do not use testags.
They use a smaller version called CUtags.php

The script could be written to read in the correct values for cumulus WX web sites.
However script of no use for basic Cumulus users.
« Last Edit: June 30, 2012, 01:38:43 PM by JennyLeez »
Living in Wairoa, Northern Hawkes Bay
Website: wairoa.net/weather

Offline JennyLeez

  • Administrator
  • Hero Member
  • *****
  • Posts: 10086
  • Country: nz
  • Karma: 654
  • Gender: Female
  • Wairoa
    • Wairoa, Hawkes Bay Weather
  • Station: WS3085
Re: Script for collecting yesterday's extremes
« Reply #5 on: June 30, 2012, 01:35:07 PM »
Thinking along those lines for Basic Cumulus.
David you could make a page. Get Cumulus to process it.
Get Cumulus toolbox to upload it once a day.
I will talk with Te Puke. If interested I will send him mine :)
Cheers

Offline Weather Display

  • Hero Member
  • *****
  • Posts: 517
  • Karma: 77
  • Gender: Male
    • Weather Display
Re: Script for collecting yesterday's extremes
« Reply #6 on: June 30, 2012, 02:09:58 PM »
or
all your cumulus users switch to WD

hehehe
joke
hehehe



also make sure to have a properly shielded temperature sensor if you are to be submitting data to the extremes....
« Last Edit: June 30, 2012, 02:13:26 PM by Weather Display »

Brian
Awhitu, SW of Auckland

Offline JennyLeez

  • Administrator
  • Hero Member
  • *****
  • Posts: 10086
  • Country: nz
  • Karma: 654
  • Gender: Female
  • Wairoa
    • Wairoa, Hawkes Bay Weather
  • Station: WS3085
Re: Script for collecting yesterday's extremes
« Reply #7 on: June 30, 2012, 02:14:48 PM »

and I am soooooo  biting my tongue....lol

Offline gabba

  • Financial Supporter
  • Hero Member
  • *****
  • Posts: 2153
  • Country: 00
  • Karma: 213
  • Gender: Male
    • Hutt Weather
  • Station: Vantage Vue, Weather Display, Webcam.
Re: Script for collecting yesterday's extremes
« Reply #8 on: June 30, 2012, 02:36:27 PM »
Month Rainfall Total so far = <?php echo unUnit($monthrn) . $uomRain; ?><br/[/code]No closing > at end of line.

Bad Syntax. Naughty, naughty naughty! :)

Offline Derek

  • Hero Member
  • *****
  • Posts: 533
  • Karma: 119
  • Gender: Male
    • Waitakeres Weather
Re: Script for collecting yesterday's extremes
« Reply #9 on: June 30, 2012, 06:33:24 PM »
Yes, have seen plenty of false highs being reported in my time...

Also would comment that the use of a script to generate the data to do a quick copy and paste in to a thread is a great time saving method to use, but it can be tempting to do just that - cut and paste.  It pays to check the data first to make sure something screwy hasn't occurred and that an obviously wrong value hasn't been generated - I've seen it happen plenty of times. 

Good to always have the human interface involved too!  :D 
Derek
Davis Vantage Pro2 / Cumulus 1.9.4 / WXSIM
web: Waitakeres weather
twitter: @Waitakeres


Share via twitter

grin
WU-History Classic view php script Updates

Started by Wolfie33

1 Replies
4020 Views
Last post March 26, 2016, 07:03:40 PM
by Wolfie33
xx
More weather extremes for the US

Started by Te Puke Weather

2 Replies
2349 Views
Last post April 26, 2012, 06:16:13 PM
by Mark
smiley
NZLWN Wind Extremes for the 7th September.

Started by JennyLeez

4 Replies
3262 Views
Last post September 08, 2012, 08:32:12 PM
by JennyLeez
smiley
Last Weeks Extremes 16th May - 22nd of May 2016

Started by JennyLeez

0 Replies
1822 Views
Last post May 23, 2016, 03:40:09 PM
by JennyLeez
clip
Yesterday Photos

Started by Martin4Jay

4 Replies
3769 Views
Last post February 25, 2015, 11:01:54 PM
by Martin4Jay