How Mixson's Web Weather Works
Some have expressed and interest in how my weather reporting on the web works.
Here's the scoop.
First, there are two weather systems available from which I mix and match functional
units. If a unit fails, it is replaced with a working device while a repair is initiated.
The two systems are basically identical although one is a WX-200 from Radio Shack and
the other is an Oregon Scientific WM918, available from numerous sources over the
internet.
There are data collection consoles to which 6 key sensors attach: temperature, humidity,
rain, barometric pressure, wind speed and wind direction. The WX-200/WM918 can operate
as stand alone units, with data read from the small console, and, they can attach
to a personal computer via one of the serial interfaces. For PC attachment, I chose
to discard the software provided and use a package called SBWeather, a shareware package
published by Scott B. Baker who resides in Arizona. SBWeather provides record keeping
and presentation functions on the local PC's.
Conditions are tracked both indoors and outdoors. Obviously, only the outside stuff is
of interest on the web.
Here's a picture of the weather station's virtual console as presented by SBWeather:
EXAMPLE
For a while, I posted the current console image on the web site, but, this requires
fairly constant updating and I try to minimize traffic. No one commented when
I discontinued this service, so, I gather, it's not of great interest.
For the heart of the weather information I do post, I've written software to reprocess
the data files from the SB weather software and dynamically build the HTML
coded file needed for posting a web page. The result is what you see when you
click on the link for "Near Real Time Weather Conditions". Recently, I've added
code to dynamically create a condensed summary of information. This is presented
as a table on the home page as well as on the Hilltown Woods weather start page.
Following are the "Current Conditions..." portion of the "local conditions" web page.
EXAMPLE
An "NA" means that data is normally available, but inappropriate under current conditions.
For example, the heat index makes no sense during cold weather and vice versa for
wind chill.
A very basic requirement of all this was that it be automatic. First, the WX-200/WM918
constantly monitor all conditions and send the data to a computer. SBWeather reads and
saves this information to a data file, which grows every second...thousands of data entries
per day. For example, the data file for 3 May 2002 has 17,206 entries, each
of which has 35 fields of information. This is a huge amount of data, even the parts
of interest. It would be nice to have it truly live, but the bandwidth required to
keep that much information flowing would not be reasonable, in my view. I concluded
that web updates occurring in the range of every 30 to 60 minutes would be OK, at least
during "normal" working/waking hours. No web updates are made between midnight and
5 AM.
To accomplish the periodic activity, I use the "Task Scheduler" function of Windows.
The processing of the raw data and the creation of the HTML pages for the web is done by
my software which is launched each 3 minutes, 24 hours per day.
The scheduler calls a batch file which in turn calls the data processing software.
This means the servers always have current pages of data for upload for which the data
are not older than 3 minutes. The actual upload is handled on a different schedule, which
can be viewed by clicking here. On this schedule, the FTP
client is called. (I use the shareware program CuteFTP) which then transfers the most
current data to my web host account. The "Network and Dial Up Connection" function of
Windows is used to establish the connection.
There are two PC's involved in the above activities. One machine is dedicated to processing
the weather station data. It is currently running Windows 98 Second Edition.
The second machine is currently running Windows 2000 Professional edition. This machine
is running the Internet Connection Services function and is the single machine which
provides internet access for my home network.
One of these days, I hope to convert all of my server activity to run under Linux.
This whole process is made more interesting by the fact that our household has multiple
PC's (6) all interconnected in a LAN environment. The WX-200/WM918 is physically attached
to a weather server machine which is running the first level of SBWeather software. The
processing of the data occurs on this machine. As it processes the data every three minutes,
it also transfers the completed HTML files to the internet server machine which is responsible
for the periodic updates to the web host.
Transferred through my ISP, all data is uploaded to my personal domain host machine and is
available for all to view. I think that host exists in West Palm Beach, FL, but one can
never be really sure where an internet entity physically exists.
Any machine in the network can take over the responsibility to process the data files and
accomplish the web upload at any time. The weather station itself can be switched to
another machine if need be. For backup purposes, the duplicate weather station hardware
is available. One of our machines is on standby to take over the gateway function,
if needed. Bottom line: Even in the case of catastrophic failure of one or more machines,
the operation could be back up and running in a short period of time.
Please provide your comments/suggestions/gripes. Click Here
jgm 21Aug1999; 24Aug1999; 29Aug1999; 17Sep1999; 28Jan2000; 20Mar2000; 21Apr2000; 16Aug2000
20May2001; 9May2002