Open2300 - Open WS Description

Open2300 - Description

Open2300 is a package of software tools that reads (and writes) data from a Lacrosse WS2300/WS2305/WS2310/WS2315 Weather Station. It includes a function library for your own programs and a number of small programs for PHP webpage, Weather Underground and Citizen Weather. Most of Open2300 is written in standard C.

Open2300 has existed as an open source project since April 2003. It was registered on Sourceforge in February 2004.

Open2300 is named like this because it is Open Source and the software is targeted for a specific family of Weather Stations from the company Lacrosse called WS2300, WS2305, WS2310 and WS2315. Lacrosse provides a Windows only software. A number of 3rd party programs exists but most are not open source (Weather Display being the most popular).

The program was originally for Linux only and distributed as source only with very detailed documentation of how to use the programs. But since then it has been extended to also build well on FreeBSD and Windows. Since version 1.2 the package is distributed with binary executable Windows .exe files. Most of the source files are common to the platforms. Platform specific code has been placed in linux.c (also for FreeBSD) and windows.c.

The library rw2300 is very heavily commented and easy to use.

All the tools are command line type of tools. There is no graphical user interface. The whole idea is to keep the tools slim and command line based so that most of them can run in the background and fetch and process data. On Linux/FreeBSD you would typically use them in a cron job (e.g. log2300, histlog2300, mysql2300). On Windows as a scheduled job. Some tools are good as part of a webserver cgi or PHP/ASP program (fetch2300, xml2300).

Important Note:

With open2300 you can read and write to and from a WS-2300 weather station. You do anything - maybe even harm the station or bring it into a mode it never comes out of again. It is your choice if you want to take the risk. The author takes no responsibility for any damage the use of this program may cause. This is the list of tools.

dump2300

is a special tool which will dump a range of memory into a file AND to the screen. This makes is possible to easily see what has changed in an area larger than 15 bytes and even use a file comparison tool to spot the changes. Note that the WS-2300 operates with addresses of 4-bit nibbles.

When you specify an odd number of addresses the program will always add one as it always fetches bytes from the station and displays these bytes.

If you only want a file and no display output just run it as:

dump2300 filename start end > /dev/null

If you only want to display and not create a file run:

dump2300 /dev/null start end

bin2300

does the same as dump2300 except the data is written in binary format to the file. It is not byte for byte. Each nibble from the station is saved as one byte in the file (always value from 00 to 0F). The advantage of this is that when you look with a binary file viewer and you started from address 0 the addresses fit 1:1.

history2300

reads out a selected range of the history records as raw data to both screen and file. Output is human readable.

log2300

It reads all the current data from the station and append the data to a log file with a time stamp. The file format is human readable text but without any labels - only with single space between each value and a newline for each record. This makes it easy to pick up the data using e.g. Perl or PHP for presentation on the web.

fetch2300

This tool reads all current values from the station incl min/max data and dates and output them in a simple format to standard out. The idea is that you can call this program from a Perl or PHP page and load the data in an array ready for display. To load the data into php place this example code in the page.

 <?php exec("/usr/local/bin/fetch2300",$fetcharray); foreach ($fetcharray as $value) { list($parameter,$parvalue)=explode(" ", $value); $ws["$parameter"]=$parvalue; } ?> 

You can let the rest be pure HTML and just put in for example <?=$ws["To"]?> to show outdoor temperature.

wu2300

This is a development of fetch2300 which fetches the weather station data used by Weather Underground (http://www.wunderground.com) and it uploads your data to your personal weather station page at Weather Underground. For this to work you need to register your station at Weather Underground. You will then receive an ID and a password. This ID and password must be added to the config file (open2300.conf) before the program is used.

cw2300

This again is a version of fetch2300 which fetches current data from the weather station and sends it to the Citizen Weather Observation Program via the APRSWXNET (Automatic Positioning Reporting System Weather Network) but using one of the Internet APRS servers.

I received the original version from Randy Miller (radio ham N6ABM). It was fully working and a great piece of work. I had to completely rewrite it to fit my new library rw2300 and to make it compatible with Windows. Thanks to Randy for a significant contribution.

Here are some URLs if you want to know more

xml2300

It is another example of work derived from fetch2300. Again it collects data from the weather station and stores the data in an XML file.

I originally received this program from Matt Woodward. I have re-written it completely to work with the new rw2300 function library. I also changed the XML coding for the fun of it.

It is very easy to modify the source to any XML coding you like.

mysql2300

is based on a contribution from Thomas Grieder. It works like log2300 but instead of writing to a flat file it stores the weather data in a MySQL database. The program requires that MySQL client library and header files are installed.

I have not yet built a version on Windows. But with the right MySQL things installed and some tweaks in the Makefile it should compile also on Windows.

pgsql2300

is based on a contribution from Przemyslaw Sztoch. It works like log2300 but instead of writing to a flat file it stores the weather data in a PostgresSQL database.

The program requires that PostgresSQL client library and header files are installed.

This is only available for Linux for the moment.

light2300

It is a small tool that can turn the LCD backlight on and off

histlog2300

It does a similar job to log2300.c but instead of reading the current data it read the history data stored in the weather station. Windchill and dewpoint are calculated values based on the other measurements.

It checks the log file for the last record written and read all the new records and add them to the log file.

interval2300

This is a small tool set can set and read the interval at which the weather station saves the history datasets.

minmax2300.c

It is a new tool using the new rw2300 reset functions to reset min/max for all measurements and resetting rain counters.

rw2300.c / rw2300.h

This is the common function library. This has been extended from version 1.2 so that now you can read actual weather data using these functions without having to think about decoding the data from the weather station.

linux2300.c / linux2300.h

This is part of the common function library and contains all the platform unique functions.

These files contains the functions that are special for Linux.

The function that connects to the APRS server is built on code partly writen by Randy Miller.

win2300.c / win2300.h

This is part of the common function library and contains all the platform unique functions. These files contains the functions that are special for Windows. The most important new part is the code that handles the serial port. This function is written by Matt Woodward.

As long as a windows C compiler defines a variable called WIN32 the compiler will choose to the win2300.c and .h files when compiling.

I have used the MingW32 compiler on Windows. This is a free open source compiler that uses the gcc compiler and makefiles.

The Windows programs have been tested on Windows XP.

memory_map_2300.txt

is a very useful information file that tells all the currently known positions of data inside the weather station.

The information in this file may not be accurate. It is gathered by people mainly from the German language Weather Station Forum http://www.wetterstationsforum.de/phpBB/viewforum.php?forum=28&403 by hours of experiments. None of the information has come from the manufacturer of the station. If you find something new please send email to the me (email address below).

Using the memory map and the rw2300 library is it pretty easy to create your own Linux driven interface for your weather station.

-- KennethLavrsen - 02 Jul 2005
Topic revision: r3 - 13 Sep 2011, MariaThuroczy
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.