##################################################################### # # WARRANTY for your entire ws-2300 station voided using this program # ##################################################################### this program is actually only my way to acces informations in my ws-2300 station. It is not sure it is correct or it works for you. This prog uses the way i understood and is far from complete. I started from info i got from news groups. ##################################################################### # # PROTOCOL in this program MAY NOT BE PUBLISHED # ##################################################################### # It does not use the official protocol and # the protocol in this program MAY NOT BE PUBLISHED since the official is not yet # without any authorisation from La Crosse Technology. # So DO keep this prog for private uses as soon as someone can read it. # ### NEW ### Now protocol is almost public on news group see refs with man Ws2300::ReadWrite # # see Licence GPL for modifying the program itself. # Version Alpha 0.02 # This is a very alpha stage of perl tools for ws-2300 meteo station. # most of this this prog should be used with cron # except lit-XY.pl and lit-res2plot.pl (lit means read) ################### # Warnings ################### # You could damage your weather station !!! # use theses scripts at your own risk !!! # Be specialy carefull with the locking scheme of module Device::SerialPort # under cron (/var/lock/ttyS0serialPort) # so many writes don't happen at same time. # The only prog that write into the ws-2300 station is st-raz.pl ################### *NEW* the protocol is much well known now, for more informations: http://www.wetterfreaks.de/phpBB/viewtopic.php?topic=1715&forum=28 http://www.wetterfreaks.de/phpBB/viewforum.php?forum=28&372 *NEW* This prog runs every min 24h a day since end of January 2003, and you know what, my ws-2300 is still working. # # perl modules you need: # # # IO::File; is usually with std lib # Term::Cap; is usually with std lib # Time::Local; is usually with std lib # # these two next could be found at CPAN # # Device::SerialPort; # Term::ReadKey; if you have 2 pc and want to use pc-st-stop.pl # The RS232 port used by these scripts is under Linux /dev/ttyS0 (COM1) edit all the config.txt file and put it in your working dir if your port has another name. Then create the .config file needed by module Device::SerialPort with perl runme-1st.pl started in your working dir. #-NEW Now (v0.02) a module called Ws2300 is provided so the size of other # And Now with Ws2300::ReadWrite # and Ws2300::Decode progs are smaller and run faster. They are in dir pm, 5.6 (tar.gz.) Install them first. so most of progs are now in pm/autresprog/ pm/decode/ and now they use these Ws2300:: modules. When installed have a glance at "man Ws2300::ReadWrite" man Ws2300::Decode. #- The 1st prog is st-inter-cron.pl which is better to use with cron. It read actual (not saved) datas from ws-2300 and write them to a file as they are in binary format but each field is marked by the name he has in the progs. #- a best version is st-cron-raz-v.pl. its works as st-inter-cron.pl but resets wind speed max every times (after a disk write) so you get better wind accuracy. and should not miss anything ! #- st-sauve.pl allows you to save to disk st-2300 memory saved results (with calculated dates) also in the binary format they have in the station mem. ## NEW Decoding found by Kenneth. See historyplot.pl #- st-raz.pl allow you to reset each Min Max. You also can set delay between recording time by the station only in minutes for now but make a backup of the station before, all you data will be lost ! This is the only prog that write to the station. Read Warning at top !! start it with perl st-raz.pl for full info. #-Resetting Rain Maxs needs set to zero Rain values BEFORE. If not Maxs take current values again ! #- st-get-date.pl read time from the station and set your computer date with a shell command "date -s". Edit it according your Time Zone and use it as root. #- lit-resXY.pl is like a front-end to display the file you get with st-inter-cron.pl in an human meaning form and character mode. Make a sh script with something like: tail -c 501 -s 15 -f result.cron | perl lit-resXY.pl. There is a file called XY.lang you should edit to show results in your language. Please send me yours if your language is not with this release. #- lit-res-2plot.pl translate the file you get with st-inter-cron.pl (result.cron) in ascii, a record by line. Then you can use gnuplot. #-WARNING NEW FORMAT more simple #- pc-st-stop.pl is a tool to redirect data from a linux pc with theses scripts to another pc via rs232 by a null modem wire. If you hit the 'a' key (not 'A') you can stop exchanges, enter text to remember what you where doing, what where results displayed etc. Hit any key twice to restart exchange. use pc-st-stop.pl > afilename to save exchanges you see. Two other files are created, one for incomming from wx station, one for incomming data from other pc. # About units: For now this prog read ws-2300 with Pressure in hPa Degrees in C Wind speed in km/h Rain in mm. I have not tested if displaying with other units changes adresses where data can be read. I think it should do. To display to screen or to plot files some multiplying factors will have to be adjusted. I think i will not do that before i finish with alarms. # What you get a lot (:=)) of bugs may be, these scripts has been running for only a couple of weeks. Reports are wellcome, please. *NEW* (Humm for now since end of January 2003, every day, every minutes, and my ws-2300 is still proudly working (:==))) More acuretely a way to start to explore your ws-2300 station, automatically save all data, at official Meteo times reset min max. begin to draw graph or the hability to write interfaces with other tools like www ones. *NEW* be very carefull with this (very undocumented) you can now put the backlight pannel off with AC power on and get more accuracy indoor values. Nice isn'it ? # What you dont see yet: a way to set reset alarms. I don't understand very well the mechanism! a way to understand saved data, for know i don't need, I have more in result.cron. *** NOW FOUND by Kenneth (please see my web site for his full references) a full explanation of protocol. (see at top) . progs display every command and data received and sent with station adresses (wich are in hexa in the scripts) so you can read and save examples.. **Now if you set $DEBUG=1 # Please give me any advice using these progs Any idea of what kind of processor is in the station, the adressing, memory mapping etc. may be it would be a way to do what can only be done with ws-2300 keys. # TODO rewrite this readme in true English continue to explore the protocol for yourself: WS-2300 weather station is FULLY OPEN and FULLY UNDOCUMENTED !!!. clean the scripts, sorry I am not a programmer rewrite in "client-server" mode to run as a demon and have for wind more frequent reads. write a X front-end may be if you like.... Try using it under Windows. perl and gnuplot exists for Windows. cron could be simulated. # as it is an alpha version, any comment would be nice, thanks. //-------------------------------- //claude.ocquidant@wanadoo.fr //--------------------------------