Overview
The 1-Wire Weather Service for Java collects data from the Dallas 1-Wire weather instrument and related 1-Wire sensors
using the Dallas 1-Wire API for Java SDK. The WxMonitor allows you to view and control the 1-Wire Weather Service for Java. It displays wind speed and direction,
temperature, dew point, humidity, air pressure and rainfall.
This is the most reliable 1-Wire Weather software available, featuring extreme fault tolerance on the 1-Wire MicroLan
-- even in high RF environments. Also features laboratory grade precision, with extensive configuration capability, to
support a wide variety of data recording and reporting modes. A modular architecture provides the ability to support new sensor
types as they become available, or on request as the need arises. With a fully documented API, you can even code support for
new devices yourself if you have Java coding skills.
|
The WxMonitor Splash Screen |
Since this software is written in the cross-platform Java language, it should run on any platform for which 1-Wire drivers
are available -- now with 64-bit support. It is known to run on Windows XP, Windows Vista and Linux. Please contact me if you would be interested in testing on other platforms.
I have been working on this project as a hobby in my spare time over the past couple of years. I have been interested
in the weather ever since I built my first weather station for a science fair in the seventh grade. This project integrates
my interest in weather with my interests in electronics and software.
Download
To install on Windows systems, extract the file into the Program Files directory. On non-Windows systems, extract the
file into the directory you want to use as the root for the application. After extracting the software, please refer to the
readme.html file contained in the wxservice directory for detailed setup and operating instructions.
On Windows Vista, you might have problems unpacking with zero length files using Windows compressed folders. You might
try WinZip. Furthermore, you might wish to avoid the Program Files directory. I haven't decided yet how I want to deal with
the Vista Program Files restrictions.
Latest Updates
I post update notices on the site blog along with the latest news and tech notes about the 1-Wire Weather Service for Java. You can subscribe to the RSS feed for
automatic update notifications.
Specifications
The 1-Wire Weather Service for Java works with the following sensors, technologies and platforms:
Weather Instrument Cluster
|
|
|
|
|
|
|
|
|
|
|
|
Publishing Weather History
|
|
|
WxMonitor, local or remote real-time display (see below)
|
The WxService
The 1-Wire Weather Service for Java collects data from the Dallas 1-Wire weather instrument and related 1-Wire sensors
using the Dallas 1-Wire API for Java SDK. WxService can run in two modes: As a Windows service or Unix daemon, or embedded in an application.
WxService can post the following data to Weather Underground Data Exchange (rapid fire every five seconds, or regular every ten minutes). Units, posting interval and averaging window are all separately
configurable. These are the standard defaults:
- Wind Speed -- Average value over the previous two minutes (regular), or current value (rapid fire)
- Wind Gust -- Peak value over the previous ten minutes
- Wind Direction -- Consensus averaging over the previous two minutes
- Temperature -- Average value over the previous two minutes
- Dew Point -- Average value over the previous two minutes
- Humidity -- Average value over the previous two minutes
- Barometer -- Average value over the previous two minutes
- Rainfall -- Rate per hour and accumulated since midnight
WxService can post the following data to APRS Citizen Weather Observer Program (CWOP) every thirteen minutes. Units, posting interval and averaging window are all separately configurable. These are the standard
defaults:
- Wind Speed -- Average value over the previous two minutes
- Wind Gust -- Peak value over the previous ten minutes
- Wind Direction -- Consensus averaging over the previous two minutes
- Temperature -- Average value over the previous two minutes
- Humidity -- Average value over the previous two minutes
- Barometer -- Average value over the previous two minutes
- Rainfall -- Rate per hour and accumulated since midnight
WxService can post the following data to a local history text file in comma separated values (CSV) format every
ten minutes. Units, posting interval and averaging window are all separately configurable. These are the standard defaults:
- Wind Speed -- Average value over the previous two minutes
- Wind Gust -- Peak value over the previous ten minutes
- Wind Direction -- Consensus averaging over the previous two minutes
- Temperature -- Average value over the previous two minutes
- Temperature 1 -- Average value over the previous two minutes
- Temperature 2 -- Average value over the previous two minutes
- Humidity -- Average value over the previous two minutes
- Dew Point -- Average value over the previous two minutes
- Barometer -- Average value over the previous two minutes
- Rainfall -- Rate per hour and accumulated since midnight
WxService provides access to real time weather data by publishing a SOAP web service. WxMonitor can connect to this web
service to display the data in real time from anywhere on the Internet.
The WxMonitor
The monitor allows you to view and control the 1-Wire Weather Service for Java. It displays wind speed and direction,
temperature, dew point, humidity, air pressure and rainfall.
Monitor for the 1-Wire Weather Service for Java |
|
WxMonitor Application Screen Shot |
The Wind Vector display, instead of the usual dials, dominates this program's user interface. There is a lot of information
at a glance here. The outer ring shows wind direction, the line emanating from the center of the chart graphically indicates
current speed and direction. The longer the line, the higher the wind. The blue lines represent the 10-minute average wind
speed (configurable). They remain on the chart for 24 hours (configurable), so by default you can see a 1-day history of the
wind activity.
I plot the wind speed on a logarithmic scale, so that it isn't necessary to rescale the chart when the wind changes.
The logarithmic characteristic magnifies light air, but has enough dynamic range to show strong winds in excess of 200 mph.
Below the wind vector chart, I placed a table containing miscellaneous wind data, including average speed in numerical
format, the maximum peak wind since the last reset, Beaufort wind index, the direction in degrees and the compass heading.
The reset button at the bottom sets the gust and lull values to the current value.
The rest of the indicators are standard linear sliders, calibrated to show the full range of data, like a "real" thermometer.
The table at the bottom contains a summary of the data in numerical format. The reset button at the bottom sets the maximum
and minimum data to the current value for each associated sensor.
The sampling and averaging intervals are configurable. The defaults are typical for METAR style observations:
- Wind Speed -- Average value over the previous two minutes
- Wind Gust -- Peak value over the previous ten minutes
- Wind Direction -- Consensus averaging over the previous two minutes
- Temperature -- Average value over the previous two minutes
- Dew Point -- Average value over the previous two minutes
- Humidity -- Average value over the previous two minutes
- Barometer -- Average value over the previous two minutes
- Rainfall -- Rate per hour and accumulated since midnight
WxService Operational Configurations WxService can run in two modes:
WxMonitor Operational Configurations
WxMonitor can run in two modes:
- A web service client of WxService - Connect to WxService via the web service anywhere on your local network or on the
Internet.
- A stand-alone application - WxMonitor can directly instantiate WxService without remoting, but requires local access to
the 1-Wire MicroLan and TMEX drivers.
Extreme Fault Tolerance Although one would like a 1-Wire network to be relatively error free, that
is often not the case. Even implementing all of the recommendations in Guidelines for Reliable 1-Wire Networks, I have found my 1-Wire network to be extremely unreliable. It is very susceptible to slight configuration changes. Reliability
seems to change with the phase of the moon. You might expect that a 50KW AM station within a mile of my network would cause
problems, and it does. During the day when they’re on full power, several sensors fail more often than not. Even at
night, when interference is less, 1-Wire network error rates are still very high.
The 1-Wire protocol was originally designed to extend a few inches. People stretched it to hundreds of feet – far
beyond the original design parameters. To expect this thing to be unconditionally reliable is simply not reasonable. The only
way to make a reliable system is to compensate, in software, for failures in the hardware. Fortunately, the 1-Wire Network
devices provide fairly good error detection using Cyclic Redundancy Checking (CRC). This is where extreme fault tolerance
comes in.
WxService retries every sensor access operation up to 100 times before giving up and reporting an error. If the first few
attempts are successful, then that's great – the system will have excellent performance. On the other hand, if it takes
dozens of retries to obtain a reading, the weather conditions will be recorded on schedule, and no readings will be missed.
The system will have poor performance, but it will keep working (degrade gracefully). The design is thread-friendly, so if
one sensor requires many retries, it will allow other sensors to run between retries. It will not hog the 1-Wire network during
the retries.
For optimal performance, the goal is to tune the network to keep retries to a minimum. To allow you to evaluate 1-Wire
network health, WxService logs 1-Wire network errors at different verbosity levels. WxService logs sensor initialization failures
at the “severe” logging level to indicate that a sensor failed to initialize after 100 retries. WxService logs
read access failures after 100 retries at the “warning” logging level. Sensors that fail to read will run again
at the next scheduled time. WxService logs individual retries at the “fine” logging level, to indicate whether
a sensor is having trouble initializing or running.
Event Logging WxService writes logs to daily log files. There are seven logging "severity" levels:
FINEST, FINER, FINE, CONFIG, INFO, WARNING and SEVERE.
As you might expect, FINEST, FINER, and FINE are for detailed tracing and debugging, and may be very verbose. CONFIG
is for tracking configuration changes. WxService uses INFO to log informational events, such as starting and stopping the
Service and its tasks. WARNING is used to track events that might result in data loss or failure to post to a weather logging
service. 1-Wire retry failures, value errors, connection refused to a URL are all WARNINGs. SEVERE is reserved for sensor
initialization failures, or situations that would result in termination of the Service, such as out of memory, stack overflow,
division by zero or null pointer errors. These are either unexpected or unrecoverable errors.
Software Status
The software is code complete. I make occasional improvements and publish them to the FTP site. Check the blog on the
main page for breaking news of updates.
For More Information
You can use the form below to request additional information about WxService.
|