pywws.LogData

Salva i dati della stazione meteo nel 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.

La sincronizzazione con la stazione meteo è realizzata in attesa di un cambiamento nei dati attuali. Ci sono due livelli di sincronizzazione, impostate nel file weather.ini la sezione [config] l’opzione logdata sync =. Il livello 0 è più veloce, ma è poco preciso scarta circa dodici secondi. Livello 1 attende dalla stazione meteo che memorizza un nuovo record di dati e ottiene il timestamp accurato di un paio di secondi. Si noti che questo potrebbe richiedere molto tempo, se l’intervallo di registrazione supera i cinque minuti consigliati.

Dettagli API

Funzioni

main([argv])

Classi

DataLogger(params, status, raw_data)
class pywws.LogData.DataLogger(params, status, raw_data)[sorgente]
check_fixed_block()[sorgente]
catchup(last_date, last_ptr)[sorgente]
log_data(sync=None, clear=False)[sorgente]
live_data(logged_only=False)[sorgente]
pywws.LogData.main(argv=None)[sorgente]

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