pywws.logdata

Save weather station history to file

usage: python -m pywws.logdata [options] data_dir
options are:
 -h   | --help     display this help
 -c   | --clear    clear weather station's memory full indicator
 -s n | --sync n   set quality of synchronisation to weather station (0 or 1)
 -v   | --verbose  increase number of informative messages
data_dir is the root directory of the weather data

This module gets data from the weather station’s memory and stores it to file. Each time it is run it fetches all data that is newer than the last stored data, so it only needs to be run every hour or so. As the weather station typically stores two weeks’ readings (depending on the logging interval), pywws.logdata could be run quite infrequently if you don’t need up-to-date data.

There is no date or time information in the raw weather station data, so pywws.logdata creates a time stamp for each reading. It uses the computer’s clock, rather than the weather station clock which can not be read accurately by the computer. A networked computer should have its clock set accurately by ntp.

Synchronisation with the weather station is achieved by waiting for a change in the current data. There are two levels of synchronisation, set by the config file or a command line option. Level 0 is quicker, but is only accurate to around twelve seconds. Level 1 waits until the weather station stores a new logged record, and gets time stamps accurate to a couple of seconds. Note that this could take a long time, if the logging interval is greater than the recommended five minutes.

Detailed API

Functions

main([argv])

Classes

DataLogger(context)


Comments or questions? Please subscribe to the pywws mailing list http://groups.google.com/group/pywws and let us know.