NAME

Ws2300::ReadWrite - Perl extension for ws-2300 weather station.


SYNOPSIS

  use Ws2300::ReadWrite;
  $gotIt=wsSendValue("read",0x527,3);
  if ($gotIt) {
    do something with @wsTampon
  }


ABSTRACT

  This module allows you to read most data from ws-2300 weather station.
  You can also write data to reset Min Max, and set or unset a bit
  at one address.
  Alarms setting is not yet implemented.
  This is a very alpha release (but it runs under my linux box evry minutes since 
  end of January 2003).


DESCRIPTION

WARNING:

Using this module void your ws-2300 warranty.

Using this module could damage your ws-2300 weather station. Use it at your own risks.

This module imports:

IO::File;

Device::SerialPort (0.12);

You need to install theses modules before installing this package. Look at CPAN. Also usefull but optional, for other scripts:

Bit-Vector-6.3 Date-Calc-5.3 TermReadKey-2.1

This module has been created under SuSE Linux 8.0, (i386) using perl 5.8.0 built for i686-linux Not tested with any other configuration.

using with perl 5.6

        To use with perl 5.6.1 change use 5.008 to use 5.006
        in first lines of Makefile.PL and of ws2300.pm , it should works.
        Now headers are for perl 5.6 and you should have nothing to do

INSTALL

    First copy then edit the file config.txt to your working directory.
    Chose your RS232 port, the path, the name of your lockfile.
    
    Install needed modules.
    
    Then
        perl Makefile.PL
        make
        make test
        make install
    See README file.

EXPORT

wsSendValues($$$;$)

    is the main function. you should not use it directly.
    It takes four arguments, last optional
        1- command is a string among "read", "write", "setbit", "unsetbit".
        2- address ex: 0x527
        3- lg is a number whose meaning changes upon command        
            a- with read command it is the nb of byte to read           
            b- with write command it is the length of string to write           
            c- with setbit or unsetbit it is the bit to change from 0 to 3.             
        4  st is the string to write:       
            exemple for a date string "0301231435"
            is for date yy 03 mm 01 dd 23 hh 14 MM 35           
            it could be an actual read value to reset a Min or Max
            It is used only with write action.  
                
        Arguments are not verifyed for now.      
        If sendValues() fails somewhere, it returns false, true otherwhise.

@wsTampon

    is an array of bytes where read datas + checksum are returned as they are in ws-2300 station.

@wsWPath

    you may read (don't change here) your working path as defined in config.txt file.

NEXT ARE NOT YET IMPLEMENTED

They could be in another module as Ws2300::HighLevel.

%wsReadAdr


        is a hash for each usefull addresses.

wsReadAdr($)

        returns the data string as stored in the station at address $wsReadAdr{}

%wsMinMax

        is a hash array for each usefull min max and their dates.

wsResetMinMax($)

        returns true or false after reseting min or max in $wxMinMax{};


SEE ALSO

IO::File;

Device::SerialPort ;

The excellent news group:


http://www.wetterfreaks.de/phpBB/viewforum.php?forum=28&372

My web site: http://perso.wanadoo.fr/claude.ocquidant/

perl.


AUTHOR

Claude Ocquidant, <claude.ocquidant@wanadoo.fr>

http://perso.wanadoo.fr/claude.ocquidant/


COPYRIGHT AND LICENSE

Copyright 2003 by Claude Ocquidant

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.