Is there a way to add another update status readings to it? An example is my Fire Weather Index (FWI Calc) status.Component Status
Age hs Latest update time as of 07/16/2014 10:13am
Cumulus realtime Current 0:00:05 07/16/2014 10:12am
Cumulus FTP Current 0:02:50 07/16/2014 10:10am
Cumulus weather data Current 0:03:02 07/16/2014 10:10am
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Station Status question
Moderator: saratogaWX
- aznetcowboy
- Posts: 362
- Joined: Fri 04 Jan 2013 6:03 pm
- Weather Station: Davis 6153 Vantage Pro2
- Operating System: Windows 10 Home 64-bit
- Location: West Bend, WI USA
- Contact:
Station Status question
The normal station status readings are:
- saratogaWX
- Posts: 1211
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Station Status question
Easy to add. See the code in comments inside wxstatus.php
Code: Select all
<?php
############################################################################
#
# Add your custom checks below using the commented examples
#
# the do_check function has four arguments:
# do_check($text,$target,$maxtime,$checktype);
#
# where:
# $text is the text to display on the page.. always a good idea to run it
# through langtransstr($text) for multilanguage support
# $target is the item to be checked .. type of item is determined by $checktype
#
# $target = relative file location/name if $checktype = 'file'
# $target = unix timestamp (like from time() ) if $checktyp = 'application'
#
# $maxtime is number of SECONDS expected between updates .. always allow a cushion
# (extra time) to allow for delays in updates via FTP
#
# $checktype defaults to 'file' type, use 'application' for timestamp checking from
# applications.
#
#
############################################################################
/*
// example check for 'file' update time
$tDir = './';
if(file_exists($tDir.'somefile.ext')) {
do_check(langtransstr("Some File"),$tDir.'somefile.ext',10*60+15,'file');
}
// example check for 'application' update time (this WXSIM check is already in wxstatus.php)
if(isset($SITE['WXSIM']) and file_exists('plaintext.txt')) {
$doPrint = false;
include_once($SITE['WXSIMscript']);
print "<!-- wdate='$wdate' -->\n";
$lastWXSIM = strtotime($wdate);
// note: '6*60*60 + 2*60' is 6:02:00 hms
do_check(langtransstr("WXSIM forecast"),$lastWXSIM,6*60*60 + 2*60,'application');
}
*/
############################################################################
# start of custom checks (put your custom checks below)
# end of custom checks
############################################################################
?>
- aznetcowboy
- Posts: 362
- Joined: Fri 04 Jan 2013 6:03 pm
- Weather Station: Davis 6153 Vantage Pro2
- Operating System: Windows 10 Home 64-bit
- Location: West Bend, WI USA
- Contact:
Re: Station Status question
Me thinks I am missing the obvious. I am getting nothing. What I am looking for is the find out when/if the file "fwiweb.xml" was uploaded to the root of my domain. I made some guesses as to what the code should have been, but I am no where near close to getting this correct.
As of right now, the result I am getting is:
Fire Weather Index Data NOT Current 390479:53:22 > 6:00:00
The code I have is:
As of right now, the result I am getting is:
Fire Weather Index Data NOT Current 390479:53:22 > 6:00:00
The code I have is:
The file timestamp is 3:021:02. The time calculation (6*60*60) is confusing. I assume it is where the > 6:00:00 is coming from. I am at least getting something right now, but not what is correct.$tDir = './';
if(file_exists($tDir.'fwiweb.xml')) {
do_check(langtransstr("Fire Weather Index Data"),$tDir.'fwiweb.xml',6*60*60,'fwiweb.xml');
}
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Station Status question
Code: Select all
6*60*60 // 6 HOURS
/* I assume you want 6 minutes (and a 'buffer') 6*60+15
multiplication takes precedence so same as (6*60) +15
*/
......................Imagine, what you will KNOW tomorrow !
- aznetcowboy
- Posts: 362
- Joined: Fri 04 Jan 2013 6:03 pm
- Weather Station: Davis 6153 Vantage Pro2
- Operating System: Windows 10 Home 64-bit
- Location: West Bend, WI USA
- Contact:
Re: Station Status question
I have modified the timing so that the file gets uploaded every 30 minutes, need it or not. The status code is now:beteljuice wrote:Code: Select all
6*60*60 // 6 HOURS /* I assume you want 6 minutes (and a 'buffer') 6*60+15 multiplication takes precedence so same as (6*60) +15 */
$tDir = './';
if(file_exists($tDir.'fwiweb.xml')) {
do_check(langtransstr("Fire Weather Index Data"),$tDir.'fwiweb.xml',30*60+15,'fwiweb.xml');
}
The results are: Fire Weather Index Data NOT Current 390482:19:36 > 0:30:15
The last update to the fwi file was 20 minutes ago. BTW, what is the "390482:19:36:\" and the "> 0:30:15"?
- saratogaWX
- Posts: 1211
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Station Status question
Looking at the view-source of your wxstatus.php page shows
/GR3/KDMA_cr_0.jpg doesn't exist on your site.
Zip and attach your wxstatus.php page (or rename it to .txt and attach it here). I think your code shown in the above post is in a extended PHP comment (and is therefore not executed).
Best regards,
Ken
so the display is not 'Fire Weather Index Data' but the GRLevel3 Radar image data check, and<h1>Weather Station Status</h1>
<p> <br/><br/>
Station system up for <b>16 hours 14 minutes</b><br/>
Station system free memory <b>2289/4094 MB (free/total)</b><br/>
This website uses <b>Cumulus
(1.9.4-b1096)</b> for weather conditions reporting.<br/>
It was last started <b>1 hour 56 minutes</b>.<br/></p>
<table width="620" border="0" cellspacing="6" cellpadding="3" style="border-collapse:collapse">
<tr>
<th style="width: 40%" scope="col">Component</th>
<th style="width: 15%" scope="col" align="center">Status</th>
<th style="width: 10%" scope="col" align="right">Age<br />hs</th>
<th style="width: 35%" scope="col" align="right">Latest update time as of<br/> 07/18/2014 7:53pm</th>
</tr>
<!-- include-wxstatus.php - V1.05 - 06-Mar-2013 -->
<!-- ./realtime.txt age = 6 secs. 0:00:06 -->
<tr>
<td>Cumulus realtime</td>
<td align="center"><span style="color: green"><b>Current</b></span></td>
<td align="right">0:00:06</td>
<td align="right">07/18/2014 7:53pm </td>
</tr>
<!-- CUtags.php age = 217 secs. 0:03:37 -->
<tr>
<td>Cumulus FTP</td>
<td align="center"><span style="color: green"><b>Current</b></span></td>
<td align="right">0:03:37</td>
<td align="right">07/18/2014 7:50pm </td>
</tr>
<!-- CUtags.php internal update date time='7/18/2014 19:50' fixed='2014-07-18 19:50' -->
<!-- age = 229 secs. 0:03:49 -->
<tr>
<td>Cumulus weather data</td>
<td align="center"><span style="color: green"><b>Current</b></span></td>
<td align="right">0:03:49</td>
<td align="right">07/18/2014 7:50pm </td>
</tr>
<!-- GR3='/home/elghek00/domains/elgheko.us/public_html/GR3/KDMA_cr_0.jpg' -->
<!-- end include-wxstatus.php -->
<!-- age = 1405738429 secs. 390482:53:49 -->
<tr>
<td>Fire Weather Index Data</td>
<td align="center"><span style="color: red"><b>NOT Current</b></span></td>
<td align="right">390482:53:49</td>
<td align="right"> > 0:30:15 <br/><b></b></td>
</tr>
</table>
/GR3/KDMA_cr_0.jpg doesn't exist on your site.
Zip and attach your wxstatus.php page (or rename it to .txt and attach it here). I think your code shown in the above post is in a extended PHP comment (and is therefore not executed).
Best regards,
Ken
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Station Status question
It should be in the form of - Age hs Latest update time as of 07/16/2014 10:13am
but there is definately something odd going on.
What is the time/datestamp of your ./fwicalc.xml file ?
but there is definately something odd going on.
What is the time/datestamp of your ./fwicalc.xml file ?
Last edited by beteljuice on Sat 19 Jul 2014 3:47 am, edited 1 time in total.
......................Imagine, what you will KNOW tomorrow !
- aznetcowboy
- Posts: 362
- Joined: Fri 04 Jan 2013 6:03 pm
- Weather Station: Davis 6153 Vantage Pro2
- Operating System: Windows 10 Home 64-bit
- Location: West Bend, WI USA
- Contact:
Re: Station Status question
Ken,
Here it (wxstatus.zip) is as requested.
Tom
Here it (wxstatus.zip) is as requested.
Tom
You do not have the required permissions to view the files attached to this post.
- aznetcowboy
- Posts: 362
- Joined: Fri 04 Jan 2013 6:03 pm
- Weather Station: Davis 6153 Vantage Pro2
- Operating System: Windows 10 Home 64-bit
- Location: West Bend, WI USA
- Contact:
Re: Station Status question
beteljuice wrote:I should[/] be in the form of - Age hs Latest update time as of 07/16/2014 10:13am
but there is definately something odd going on.
What is the time/datestamp of your ./fwicalc.xml file ?
The current timestamp is 08:04:18 and my current time is 08:20:00. Hmmmm, this doesn't happen to operate on a 24 HR clock does it?
- saratogaWX
- Posts: 1211
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Station Status question
That timestamp of 1405738429 is essentially 'now'.
I just looked at wxstatus you posted, and your mod IS in the correct place.
If you're not running GRLevel3 radar, please change your Settings.php code to so the check for GR3 data (which is failing) should stop interfering with the display.
Then change your code from to
The last argument must be either 'file' or 'application' as values.. it doesn't understand the 'fwiweb.xml' 4th argument literal string.
Best regards,
Ken
I just looked at wxstatus you posted, and your mod IS in the correct place.
If you're not running GRLevel3 radar, please change your Settings.php code
Code: Select all
$SITE['GR3radar'] = 'KDMA'; // set to lower-case full name of NEXRAD radar site
$SITE['GR3DIR'] = '/GR3'; // set to directory for GRLevel3 images (or '.' for root directory
$SITE['GR3type'] = 'cr'; // radar image type 'cr','br','cr248','br1' etc.
$SITE['GR3img'] = 'jpg'; // GR3 image type 'jpg' or 'png'
$SITE['GR3cnt'] = 10; // number of images in series 10=(_0 ... _9 in name of file)
$SITE['GR3width'] = 512; // width of GR3 images
$SITE['GR3height'] = 512; // height of GR3 images
$SITE['showradarstatus'] = true; // set to false to suppress 'active' message by radar-status.php
Code: Select all
/*
$SITE['GR3radar'] = 'KDMA'; // set to lower-case full name of NEXRAD radar site
$SITE['GR3DIR'] = '/GR3'; // set to directory for GRLevel3 images (or '.' for root directory
$SITE['GR3type'] = 'cr'; // radar image type 'cr','br','cr248','br1' etc.
$SITE['GR3img'] = 'jpg'; // GR3 image type 'jpg' or 'png'
$SITE['GR3cnt'] = 10; // number of images in series 10=(_0 ... _9 in name of file)
$SITE['GR3width'] = 512; // width of GR3 images
$SITE['GR3height'] = 512; // height of GR3 images
$SITE['showradarstatus'] = true; // set to false to suppress 'active' message by radar-status.php
*/
Then change your code from
Code: Select all
$tDir = './';
if(file_exists($tDir.'fwiweb.xml')) {
do_check(langtransstr("Fire Weather Index Data"),$tDir.'fwiweb.xml',30*60+15,'fwiweb.xml');
}
Code: Select all
$tDir = './';
if(file_exists($tDir.'fwiweb.xml')) {
do_check(langtransstr("Fire Weather Index Data"),$tDir.'fwiweb.xml',30*60+15,'file');
}
Best regards,
Ken
- aznetcowboy
- Posts: 362
- Joined: Fri 04 Jan 2013 6:03 pm
- Weather Station: Davis 6153 Vantage Pro2
- Operating System: Windows 10 Home 64-bit
- Location: West Bend, WI USA
- Contact:
Re: Station Status question
Thank you Ken! I was wondering what that "file" meant. I blew that one, big time. Over the years I programmed in CA-Clipper and HTML, not PHP.saratogaWX wrote: <SNIP>
Then change your code fromtoCode: Select all
$tDir = './'; if(file_exists($tDir.'fwiweb.xml')) { do_check(langtransstr("Fire Weather Index Data"),$tDir.'fwiweb.xml',30*60+15,'fwiweb.xml'); }
The last argument must be either 'file' or 'application' as values.. it doesn't understand the 'fwiweb.xml' 4th argument literal string.Code: Select all
$tDir = './'; if(file_exists($tDir.'fwiweb.xml')) { do_check(langtransstr("Fire Weather Index Data"),$tDir.'fwiweb.xml',30*60+15,'file'); }
Best regards,
Ken
What has the GR3 got to do with it? That is one thing I've never been able to get working and I guess I forgot all about it over time.
Tom
- dazza1223
- Posts: 871
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: Station Status question
can i uses on my site cumulus mx or i need to use it with the template wxstatus.php???
- saratogaWX
- Posts: 1211
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Station Status question
The wxstatus.php (and include-wxstatus.php) do rely on having the Saratoga template installed for other parts that are used (Settings.php, Settings-weather.php, common.php).
The 'guts' of the page are handled in include-wxstatus.php -- you could replace all the $SITE['...'] variable calls with the appropriate data concerning your site, and use the basic code. A bit of a programming exercise, but doable, nonetheless.
The 'guts' of the page are handled in include-wxstatus.php -- you could replace all the $SITE['...'] variable calls with the appropriate data concerning your site, and use the basic code. A bit of a programming exercise, but doable, nonetheless.
- dazza1223
- Posts: 871
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: Station Status question
well im not very good with php and i dont think u got the time to help me to set something like this up
- saratogaWX
- Posts: 1211
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Station Status question
Generally, with PHP, you learn by doing. Having someone do it for you is not learning. This is a hobby.. enjoy it by learning