They're free, but use at your own risk
The scripts referenced here are used in the operation of this weather station, and may be freely copied and used to support your station. Please note that you use these scripts at your own risk. No warranty is expressed or implied. I accept no liability for any damages that may ensue from their use.
You will need to configure them for your own particular weather station website.
A RSS Feed is available to help keep you informed on updates to the scripts.
Many of these scripts are now available on GitHub at https://github.com/ktrue
A Version History is available -- check back from time to time to see if there are updates to scripts you have downloaded earlier.
Announcements of version updates and new scripts are made on
WXForum.net and
Weather-Watch forums
and saratogaWXPHP Twitter account as they become available.
Note: Twitter widget has been disabled 3-Jul-2023 since it no longer displays the recent update Tweets.
This page was updated
Saturday, 14-Jan-2012 10:48 AM
PHP/AJAX Website Template Set - Settings-weather.php - WSN-Plugin
The configuration for Settings-weather.php discussed here is for the WSN-Plugin.
Note: WeatherSnoop Version 2.1.1 or later is required in order to upload the weather.json file used for conditions display.
For WeatherSnoop Version 2.1.1:
- The weather.json file contains only current conditions and no historical data so
- no daily min/max temperature display on the ajax-dashboard or the thermometer graphic on the home page.
- The wxgraphs.php page will not show any station-created graphs as WeatherSnoop does not currently upload any image files.
<?php
#---------------------------------------------------------------------------
# required settings for WeatherSnoop software
#---------------------------------------------------------------------------
$SITE['WXtags'] = 'WSNtags.php'; // for weather variables
# --------------------------------------------------------------------------
# Optional realtime settings. Use if you are not using 30 sec or 1 minute uploads of the weather.json file
# comment next line (ajaxScript) to disable AJAX updates to your website.
$SITE['ajaxScript'] = 'ajaxWSNwx.js'; // for AJAX enabled display
# --------------------------------------------------------------------------
# Weather Station sensors and options for dashboard
$SITE['conditionsMETAR'] = 'KSJC'; // set to nearby METAR for current conditions icon/text
// comment out conditionsMETAR if no nearby METAR.. conditions icon/text will not be displayed
$SITE['DavisVP'] = true; // set to false if not a Davis VP weather station
$SITE['UV'] = true; // set to false if no UV sensor
$SITE['SOLAR'] = true; // set to false if no Solar sensor
##########################################################################
# end of configurable settings
#
?>
WeatherSnoop Configuration settings in Settings-weather.php
- $SITE['WXtags'] = 'WSNtags.php';
- This setting specifies the filename of the WeatherSnoop weather tags processing script. This script reads the WeatherSnoop weather.json file and loads the data in a $WX[] array with the WeatherSnoop tag names used as the key to access the data in the associative array.
Note: you may need to edit the WSNtags.php file to change the $JSONfile = './weather.json'; line to point to where you have WeatherSnoop upload the weather.json file if it is not the same directory as your website document root.
- $SITE['ajaxScript'] = 'ajaxWSNwx.js';
- This setting specifies the filename of the AJAX JavaScript that will read the WeatherSnoop weather.json file and update your pages with new data.
Comment out this setting (by placing either # or // in the front of this line) if you do not want AJAX updates active on your website pages.
- $SITE['conditionsMETAR'] = 'KSJC';
- This setting specifies the ICAO/name of the near-by METAR station that will be used to provide current conditions (weather/sky cover) for the ajax-dashboard and ajax-gizmo.
A list of nearby METAR names can be found using the find METAR query script.
- $$SITE['DavisVP'] = true;
- This setting specifies whether you have a Davis VP/Vue station.
= true means you have a Davis VP/Vue station
= false means you do not have a Davis VW/Vue station and the display of the VP forecast on the ajax-dashboard is suppressed.
- $SITE['UV'] = true;
- This setting specifies whether your station has a UV sensor.
= true means your station has a UV sensor.
= false means your station does not have a UV sensor which will result in the ajax-dashboard displaying a UV forecast in that area instead of the UV sensor value.
- $SITE['SOLAR'] = true;
- This setting specifies whether your station has a Solar sensor.
= true means your station has a Solar Radiation sensor.
= false means your station does not have a Solar Radiation sensor which will result in the ajax-dashboard displaying a UV forecast in that area instead of the Solar sensor value.