mirror of
https://github.com/weewx/weewx.git
synced 2026-04-19 00:56:54 -04:00
4130 lines
197 KiB
HTML
4130 lines
197 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<!-- $Id$ -->
|
|
<head>
|
|
<meta content="en-us" http-equiv="Content-Language" />
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
<title>weewx: User's Guide</title>
|
|
<link href="css/ui-lightness/jquery-ui-1.10.4.custom.min.css" rel="stylesheet" />
|
|
<link href="css/jquery.tocify.css" rel="stylesheet" />
|
|
<link href="css/weewx_docs.css" rel="stylesheet" />
|
|
<script src="js/jquery-1.11.1.min.js" type="text/javascript"></script>
|
|
<script src="js/jquery-ui-1.10.4.custom.min.js"></script>
|
|
<script src="js/jquery.tocify-1.9.0.min.js"></script>
|
|
<script src="js/weewx.js"></script>
|
|
<script>
|
|
$(function() {
|
|
var level = get_default_level();
|
|
create_toc_control(level);
|
|
generate_toc(level);
|
|
})
|
|
|
|
$(window).scroll(function(){
|
|
$('#toc_controls').css({
|
|
'left': 8 - $(this).scrollLeft()
|
|
});
|
|
$('#toc').css({
|
|
'left': 8 - $(this).scrollLeft()
|
|
});
|
|
});
|
|
</script>
|
|
<script>
|
|
function showtab(tab,id) {
|
|
document.getElementById(tab+'-deb').style.display = 'none';
|
|
document.getElementById(tab+'-rpm').style.display = 'none';
|
|
document.getElementById(tab+'-setup').style.display = 'none';
|
|
document.getElementById(tab+'-'+id).style.display = 'block';
|
|
|
|
document.getElementById(tab+'-tab-deb').className = 'tab';
|
|
document.getElementById(tab+'-tab-rpm').className = 'tab';
|
|
document.getElementById(tab+'-tab-setup').className = 'tab';
|
|
document.getElementById(tab+'-tab-'+id).className = 'tab selected';
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="toc_parent">
|
|
<div id="toc_controls">
|
|
</div>
|
|
<div id="toc">
|
|
<!-- The table of contents will get injected here -->
|
|
</div>
|
|
</div>
|
|
|
|
<div id="technical_content">
|
|
|
|
<a href='http://weewx.com'>
|
|
<img src='images/logo-weewx.png' class='logo' align='right' />
|
|
</a>
|
|
<h1 class="title">User's Guide to the weewx Weather System<br />
|
|
<span class='version'>
|
|
Version: 3.0.0b1
|
|
</span>
|
|
</h1>
|
|
|
|
<p>
|
|
This is the complete guide to installing and configuring <span class="code">weewx</span>.
|
|
</p>
|
|
|
|
<h1 id="about">About <span class="code">weewx</span></h1>
|
|
<p><span class="code"><a href="http://www.weewx.com">weewx</a></span> is
|
|
software, written in <a href="http://www.python.org">Python</a>, that
|
|
interacts with a weather station to produce plots, reports, and HTML
|
|
pages. It can optionally upload the reports to a remote Web server as
|
|
well as publish to weather services such as
|
|
<a href="http://www.wunderground.com">WeatherUnderground</a>,
|
|
<a href="http://wxqa.com">CWOP</a>, or
|
|
<a href="http://www.pwsweather.com/">PWSweather.com</a>.</p>
|
|
<p>Initial development began in the winter of 2008-2009, with the first
|
|
release in 2009. The SourceForge project was registered in October of
|
|
2009.</p>
|
|
<p><span class="code">weewx</span> is about 8,000 lines of code, plus
|
|
another 8,000 for the many drivers used by the supported hardware. </p>
|
|
|
|
<h1 id="hardware">Supported hardware</h1>
|
|
<p>
|
|
Many types of station hardware are supported. In addition to hardware
|
|
support, <span class="code">weewx</span> comes with a software
|
|
simulator, useful for testing and evaluation.
|
|
</p>
|
|
|
|
<p>The following table enumerates many of the weather stations that
|
|
are known to work with <span class='code'>weewx</span>. If your
|
|
station is not in the table, check the pictures at the
|
|
<a href="http://weewx.com/hardware.html">supported hardware page</a> —
|
|
it could be a variation of one of the supported models. You can also
|
|
check the <a href="http://weewx.com/hwcmp.html">station comparison</a>
|
|
table — sometimes new models use the same communication protocols
|
|
as older hardware.
|
|
</p>
|
|
<p>The maturity column indicates the degree of confidence in the
|
|
driver. For stations marked <span class="code">Tested</span>,
|
|
the station is routinely tested as part of the release process
|
|
and should work as documented. For stations not marked at all,
|
|
they are "known to work" using the indicated driver, but are not
|
|
routinely tested. For stations marked
|
|
<span class="code">Experimental</span>, we are still working
|
|
on the driver. There can be problems.
|
|
</p>
|
|
|
|
<table class="indent">
|
|
<caption>Weather hardware supported by <span class='code'>weewx</span></caption>
|
|
<tr class="first_row">
|
|
<td>Vendor</td>
|
|
<td>Model</td>
|
|
<td>Hardware<br/>Interface</td>
|
|
<td>Required<br/>Package</td>
|
|
<td>Station<br/>Driver</td>
|
|
<td>Maturity</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">Argent Data Systems</td>
|
|
<td>WS1</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WS1<sup><a href='#ads'>9</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="2">Aercus</td>
|
|
<td>WS2083</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WS3083</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="5">Ambient Weather</td>
|
|
<td>WS1090</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td>Tested</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WS2080</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td>Tested</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WS2080A</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td>Tested</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WS2090</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WS2095</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="2">Cresta</td>
|
|
<td>WRX815</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>PWS720</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="3">Davis</td>
|
|
<td>VantagePro2</td>
|
|
<td>Serial or USB</td>
|
|
<td class="code">pyserial</td>
|
|
<td>Vantage<sup><a href='#vantage'>1</a></sup></td>
|
|
<td>Tested</td>
|
|
</tr>
|
|
<tr>
|
|
<td>VantagePro2</td>
|
|
<td>WeatherLink IP</td>
|
|
<td class="code"> </td>
|
|
<td>Vantage<sup><a href='#vantage'>1</a></sup></td>
|
|
<td>Tested</td>
|
|
</tr>
|
|
<tr>
|
|
<td>VantageVue</td>
|
|
<td>Serial or USB</td>
|
|
<td class="code">pyserial</td>
|
|
<td>Vantage<sup><a href='#vantage'>1</a></sup></td>
|
|
<td>Tested</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="2">Elecsa</td>
|
|
<td>6975</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>6976</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="11">Fine Offset</td>
|
|
<td>WH1080</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WH1081</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WH1091</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WH1090</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WS1080</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WA2080</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WA2081</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WH2080</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WH2081</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WH3080</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WH3081</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">General Tools</td>
|
|
<td>WS831DL</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="5">Hideki</td>
|
|
<td>DV928</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TE821</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TE827</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TE831</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TE923</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">Huger</td>
|
|
<td>WM918</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>WMR9x8<sup><a href='#wmr9x8'>4</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">IROX</td>
|
|
<td>Pro X</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="3">La Crosse</td>
|
|
<td>C86234</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WS28xx<sup><a href='#ws28xx'>7</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WS-23XX</td>
|
|
<td>Serial</td>
|
|
<td class="code">fcntl/select</td>
|
|
<td>WS23xx<sup><a href='#ws23xx'>6</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WS-28XX</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WS28xx<sup><a href='#ws28xx'>7</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="2">Maplin</td>
|
|
<td>N96GY</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>N96FY</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="3">Meade</td>
|
|
<td>TE923W</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TE923W-M</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>TE924W</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">Mebus</td>
|
|
<td>TE923</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">National Geographic</td>
|
|
<td>265</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="9">Oregon Scientific</td>
|
|
<td>WMR88</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WMR100<sup><a href='#wmr100'>2</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WMR100</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WMR100<sup><a href='#wmr100'>2</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WMR100N</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WMR100<sup><a href='#wmr100'>2</a></sup></td>
|
|
<td>Tested</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WMR180</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WMR100<sup><a href='#wmr100'>2</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WMRS200</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WMR100<sup><a href='#wmr100'>2</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WMR200</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WMR200<sup><a href="#wmr200">3</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WMR918</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>WMR9x8<sup><a href='#wmr9x8'>4</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WMR928N</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>WMR9x8<sup><a href='#wmr9x8'>4</a></sup></td>
|
|
<td>Tested</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WMR968</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>WMR9x8<sup><a href='#wmr9x8'>4</a></sup></td>
|
|
<td>Tested</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="4">PeetBros</td>
|
|
<td>Ultimeter 100</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>Ultimeter<sup><a href='#peetbros'>10</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Ultimeter 800</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>Ultimeter<sup><a href='#peetbros'>10</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Ultimeter 2000</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>Ultimeter<sup><a href='#peetbros'>10</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Ultimeter 2100</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>Ultimeter<sup><a href='#peetbros'>10</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="2">RainWise</td>
|
|
<td>Mark III</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>CC3000<sup><a href='#cc3000'>11</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>CC3000</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>CC3000<sup><a href="#cc3000">11</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="3">Radio Shack</td>
|
|
<td>63-256</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WMR100<sup><a href='#wmr100'>2</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WX200</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WMR200<sup><a href="#wmr200">3</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>63-1016</td>
|
|
<td>Serial</td>
|
|
<td class="code">pyserial</td>
|
|
<td>WMR9x8<sup><a href='#wmr9x8'>4</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="2">Sinometer</td>
|
|
<td>WS1080 / WS1081</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WS3100 / WS3101</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan='2'>TechnoLine</td>
|
|
<td>WS-2300</td>
|
|
<td>Serial</td>
|
|
<td class="code">fcntl/select</td>
|
|
<td>WS23xx<sup><a href='#ws23xx'>6</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WS-2350</td>
|
|
<td>Serial</td>
|
|
<td class="code">fcntl/select</td>
|
|
<td>WS23xx<sup><a href='#ws23xx'>6</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan='5'>TFA</td>
|
|
<td>Matrix</td>
|
|
<td>Serial</td>
|
|
<td class="code">fcntl/select</td>
|
|
<td>WS23xx<sup><a href='#ws23xx'>6</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Nexus</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Opus</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WS28xx<sup><a href='#ws28xx'>7</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Primus</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>WS28xx<sup><a href='#ws28xx'>7</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Sinus</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">Tycon</td>
|
|
<td>TP1080WC</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="2">Watson</td>
|
|
<td>W-8681</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td>WX-2008</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">Velleman</td>
|
|
<td>WS3080</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>FineOffsetUSB<sup><a href='#fousb'>5</a></sup></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight" rowspan="2">Ventus</td>
|
|
<td>W831</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
<tr>
|
|
<td>W928</td>
|
|
<td>USB</td>
|
|
<td class="code">pyusb</td>
|
|
<td>TE923<sup><a href='#te923'>8</a></sup></td>
|
|
<td>Experimental</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<ol>
|
|
<li><a id="vantage">Davis "Vantage" series</a> of weather
|
|
stations, including the
|
|
<a href="http://www.davisnet.com/weather/products/vantage-pro-professional-weather-stations.asp">VantagePro2</a>™ and
|
|
<a href="http://www.vantagevue.com/">VantageVue</a>™,
|
|
using serial, USB, or
|
|
<a href="http://www.davisnet.com/weather/products/weather_product.asp?pnum=06555">WeatherLinkIP</a>™
|
|
connections. Both the "Rev A" (firmware dated before
|
|
22 April 2002) and "Rev B" versions are supported.
|
|
</li>
|
|
<li><a id="wmr100">Oregon Scientific WMR-100 stations.</a> Tested on the
|
|
<a href="http://us.oregonscientific.com/cat-Weather-sub-Professional-Weather-Stations-prod-Pro-Wireless-Weather-Station.html">Oregon Scientific WMR100N</a>.</li>
|
|
<li><a id="wmr200">Oregon Scientific WMR-200 stations.</a> Tested on the
|
|
<a href="http://www.oregonscientificstore.com/Oregon-Scientific-WMR200-Bundle-Complete-Weather-Bundle.data">Oregon Scientific WMR200</a>.
|
|
</li>
|
|
<li><a id="wmr9x8">Oregon Scientific WMR-9x8 stations.</a> Tested on the
|
|
<a href="http://www.oregonscientificstore.com/oregon_scientific/product.asp?itmky=659831">Oregon Scientific WMR968</a>.
|
|
</li>
|
|
<li><a id="fousb">Fine Offset 10xx, 20xx, and 30xx stations.</a>
|
|
Tested on the
|
|
<a href="http://www.ambientweather.com/amws2080.html">Ambient Weather WS2080</a>.
|
|
</li>
|
|
<li><a id="ws23xx">La Crosse WS-23xx stations.</a> Tested on the
|
|
<a href="http://lacrossetechnologies.com/2317/">La Crosse 2317</a>.
|
|
</li>
|
|
<li><a id="ws28xx">La Crosse WS-28xx stations.</a> Tested on the
|
|
<a href="http://lacrossetechnologies.com/2814/">La Crosse C86234</a>.
|
|
</li>
|
|
<li><a id="te923">Hideki Professional Weather Stations.</a> Tested on the
|
|
<a href="http://www.ambientweather.com/hotewiwest.html">Meade TE923</a>.
|
|
</li>
|
|
<li><a id="ads">ADS WS1 Stations.</a> Tested on the
|
|
<a href="http://www.argentdata.com/catalog/product_info.php?products_id=135">WS1</a>.
|
|
</li>
|
|
<li><a id="peetbros">PeetBros Ultimeter Stations.</a> Tested on the
|
|
<a href="http://www.peetbros.com/">Ultimeter 2000</a>.
|
|
</li>
|
|
<li><a id="rainwise">RainWise Mark III Stations.</a> Tested on the
|
|
<a href="http://www.rainwise.com/">CC3000 Data Logger</a>.
|
|
</li>
|
|
</ol>
|
|
|
|
<h1 id="prerequisites">System requirements</h1>
|
|
|
|
<h2>Hardware</h2>
|
|
<p>Weewx is written in Python, so it has the overhead associated with that
|
|
language. Nevertheless, it is "fast enough" on just about any hardware. It
|
|
has been run on everything from an early MacBook to a router!</p>
|
|
<p>I run <span class="code">weewx</span> on a Fit-PC with a 500 MHz AMD
|
|
Geode processor and 512 MB of memory. Configured this way, it
|
|
consumes about 5% of the CPU, 80 MB of virtual memory,
|
|
and 20 MB of real memory. </p>
|
|
<p>Weewx also runs great on a Raspberry Pi, although report generation will take longer.
|
|
For example, the 12 "To Date" templates take about 5.1 seconds on the RPi,
|
|
compared to 3.0 seconds on my Fit-PC, and a mere 0.9 seconds on my vintage
|
|
Dell Optiplex 745.</p>
|
|
|
|
<h2>Time</h2>
|
|
<p> You should run a <a href="http://www.ntp.org/">NTP</a> daemon on your
|
|
server to ensure that it is synchronized with the correct time. Doing so
|
|
will greatly reduce errors, especially if you send data to services such
|
|
as the Weather Underground. </p>
|
|
<p>The time on some stations is automatically synchronized with the
|
|
<span class="code">weewx</span> server nominally every four hours.
|
|
The synchronization frequency can be adjusted in the
|
|
<span class='code'>weewx</span> configuration.</p>
|
|
|
|
<h2>Python</h2>
|
|
<p>Python 2.5, 2.6, or 2.7 is required. Python 3 will not work.</p>
|
|
|
|
<h1 id="installing">Installing <span class="code">weewx</span></h1>
|
|
|
|
<h2>Required skills</h2>
|
|
<p>
|
|
In the world of open-source hobbyist software,
|
|
<span class="code"> weewx</span> is pretty easy to install and
|
|
configure. There are not many package dependencies, the
|
|
configuration is simple, and this guide includes extensive
|
|
instructions.
|
|
There are thousands of people who have successfully done an
|
|
install. However, there is no "point-and-click" interface, so
|
|
you will have to do some manual configuring.
|
|
</p>
|
|
<p>You should have the following skills:</p>
|
|
<ul>
|
|
<li>The patience to read and follow this guide;</li>
|
|
<li>Willingness and ability to edit a configuration file;</li>
|
|
<li>Some familiarity with Linux or other Unix derivatives;</li>
|
|
<li>Ability to do simple Unix tasks such as changing file
|
|
permissions and running commands;</li>
|
|
<li>No programming experience is necessary unless you wish
|
|
to extend weewx. In this case, you should have some
|
|
familiarity with Python.</li>
|
|
</ul>
|
|
<p>If you get stuck, there is a very active
|
|
<a href="https://groups.google.com/forum/#!forum/weewx-user">User's Group</a> to
|
|
help, but, please, try to solve the problem yourself before posting.
|
|
</p>
|
|
|
|
<h2>Installation methods</h2>
|
|
<p>
|
|
<span class='code'>weewx</span> can be installed using the standard
|
|
Python utility <span class='code'>setup.py</span> or it can be installed
|
|
from a DEB or RPM package.
|
|
</p>
|
|
<p>
|
|
Installation using <span class="code">setup.py</span> is the recommended
|
|
method for those who plan to write custom services and reports for
|
|
<span class='code'>weewx</span>.
|
|
It will put everything in a single directory, making it easier to modify.
|
|
If the user installing <span class='code'>weewx</span> has permission
|
|
to write to the directory, root privileges will not be required to
|
|
install, run, or modify <span class='code'>weewx</span>.</p>
|
|
<p>
|
|
By contrast, the package approach is somewhat simpler, but it requires
|
|
root privileges, and will install the bits and pieces of
|
|
<span class="code">weewx</span> in standard operating system
|
|
locations across the file system instead of in a single directory.
|
|
The net effect is that configuration files, templates, and code will
|
|
all be installed in separate locations, most of which will require
|
|
root privileges to modify.</p>
|
|
<p>
|
|
When installing using <span class='code'>setup.py</span>, the
|
|
installation location is specified by the <span class='code'>home</span>
|
|
parameter in the <span class='code'>setup.cfg</span> file. This file is
|
|
not used by the other installation methods.</p>
|
|
<p>
|
|
Here is a summary of the layout for the different install methods, along
|
|
with the symbolic names used for each role. These names are used
|
|
throughout the documentation. </p>
|
|
|
|
<div id='dir-layout-table' class='tabs' style='padding-top:1em'>
|
|
<div id='layout-tab-deb' class='tab selected' onclick="showtab('layout','deb')">Debian <img src='images/logo-debian.png' class='thumbnail' /> <img src='images/logo-ubuntu.png' class='thumbnail' /> <img src='images/logo-mint.png' class='thumbnail' /></div>
|
|
<div id='layout-tab-rpm' class='tab' onclick="showtab('layout','rpm')">Redhat <img src='images/logo-redhat.png' class='thumbnail' /> <img src='images/logo-centos.png' class='thumbnail' /> <img src='images/logo-fedora.png' class='thumbnail' /></div>
|
|
<div id='layout-tab-setup' class='tab' onclick="showtab('layout','setup')">setup.py</div>
|
|
</div>
|
|
|
|
<div id='layout' style='clear:both; width: 60%;'>
|
|
<div id='layout-deb'>
|
|
<table class='locations' width='100%'>
|
|
<tr class='selected'>
|
|
<td colspan='3' class='locations_banner'>Application layout for install using DEB package</td>
|
|
</tr>
|
|
<tr class="first_row" style="background-color: inherit">
|
|
<td>Role</td>
|
|
<td>Symbolic Name</td>
|
|
<td>Nominal Location</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Executables</td>
|
|
<td class="symcode">$BIN_ROOT</td>
|
|
<td class='tty'>/usr/share/weewx/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Configuration directory</td>
|
|
<td class="symcode">$CONFIG_ROOT</td>
|
|
<td class='tty'>/etc/weewx/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Skins and templates</td>
|
|
<td class="symcode">$SKIN_ROOT</td>
|
|
<td class='tty'>/etc/weewx/skins/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SQLite databases</td>
|
|
<td class="symcode">$SQLITE_ROOT</td>
|
|
<td class='tty'>/var/lib/weewx/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Web pages and images</td>
|
|
<td class="symcode">$HTML_ROOT</td>
|
|
<td class='tty'>/var/www/weewx/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Documentation</td>
|
|
<td class="symcode">$DOC_ROOT</td>
|
|
<td class='tty'>/usr/share/doc/weewx/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>PID file</td>
|
|
<td class="symcode"></td>
|
|
<td class='tty'>/var/run/weewx.pid</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Log file</td>
|
|
<td class="symcode"></td>
|
|
<td class='tty'>/var/log/syslog</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id='layout-rpm' style='display:none'>
|
|
<table class='locations' width='100%'>
|
|
<tr class='selected'>
|
|
<td colspan='3' class='locations_banner'>Application layout for install using RPM package</td>
|
|
</tr>
|
|
<tr class="first_row" style="background-color: inherit">
|
|
<td>Role</td>
|
|
<td>Symbolic Name</td>
|
|
<td>Nominal Location</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Executables</td>
|
|
<td class="symcode">$BIN_ROOT</td>
|
|
<td class='tty'>/usr/share/weewx/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Configuration directory</td>
|
|
<td class="symcode">$CONFIG_ROOT</td>
|
|
<td class='tty'>/etc/weewx</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Skins and templates</td>
|
|
<td class="symcode">$SKIN_ROOT</td>
|
|
<td class='tty'>/etc/weewx/skins/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SQLite databases</td>
|
|
<td class="symcode">$SQLITE_ROOT</td>
|
|
<td class='tty'>/var/lib/weewx/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Web pages and images</td>
|
|
<td class="symcode">$HTML_ROOT</td>
|
|
<td class='tty'>/var/www/html/weewx/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Documentation</td>
|
|
<td class="symcode">$DOC_ROOT</td>
|
|
<td class='tty'>/usr/share/doc/weewx-x.y.z/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>PID file</td>
|
|
<td class="symcode"></td>
|
|
<td class='tty'>/var/run/weewx.pid</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Log file</td>
|
|
<td class="symcode"></td>
|
|
<td class='tty'>/var/log/messages</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id='layout-setup' style='display:none'>
|
|
<table class='locations' width='100%'>
|
|
<tr class='selected'>
|
|
<td colspan='3' class='locations_banner'>Application layout for install using <span class='code'>setup.py</span></td>
|
|
</tr>
|
|
<tr class="first_row" style="background-color: inherit">
|
|
<td>Role</td>
|
|
<td>Symbolic Name</td>
|
|
<td>Nominal Location</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class='code'>weewx</span> root directory</td>
|
|
<td class="symcode">$WEEWX_ROOT</td>
|
|
<td class="tty">/home/weewx</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Executables</td>
|
|
<td class="symcode">$BIN_ROOT</td>
|
|
<td class='tty'>/home/weewx/bin/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Configuration directory</td>
|
|
<td class="symcode">$CONFIG_ROOT</td>
|
|
<td class='tty'>/home/weewx/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Skins and templates</td>
|
|
<td class="symcode">$SKIN_ROOT</td>
|
|
<td class='tty'>/home/weewx/skins/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SQLite databases</td>
|
|
<td class="symcode">$SQLITE_ROOT</td>
|
|
<td class='tty'>/home/weewx/archive</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Web pages and images</td>
|
|
<td class="symcode">$HTML_ROOT</td>
|
|
<td class='tty'>/home/weewx/public_html/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Documentation</td>
|
|
<td class="symcode">$DOC_ROOT</td>
|
|
<td class='tty'>/home/weewx/docs/</td>
|
|
</tr>
|
|
<tr>
|
|
<td>PID file</td>
|
|
<td class="symcode"></td>
|
|
<td class='tty'>/var/run/weewx.pid</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Log file</td>
|
|
<td class="symcode"></td>
|
|
<td class='tty'>/var/log/syslog</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<h2><a href='debian.htm'>Installing from DEB package</a></h2>
|
|
<p>For Debian, Ubuntu, Mint, and Raspian operating systems, follow the
|
|
<a href='debian.htm'>instructions for Debian-based systems</a>.</p>
|
|
|
|
<h2><a href='redhat.htm'>Installing from Redhat RPM package</a></h2>
|
|
<p>For Redhat, CentOS, Fedora operating systems, follow the
|
|
the <a href='redhat.htm'>instructions for Redhat-based systems</a>.</p>
|
|
|
|
<h2><a href='suse.htm'>Installing from SuSE RPM package</a></h2>
|
|
<p>For SuSE and OpenSUSE, follow the
|
|
<a href='suse.htm'>instructions for SuSE-based systems</a>.</p>
|
|
|
|
<h2><a href='setup.htm'>Installing using the Python tool setup.py</a></h2>
|
|
<p>For all operating systems, follow the
|
|
<a href='setup.htm'><span class="code">setup.py</span> instructions</a>.
|
|
</p>
|
|
|
|
<h1 id="configuring">Configuring <span class="code">weewx</span></h1>
|
|
|
|
<p>This section covers configuring <span class="code">weewx</span>, in particular the
|
|
configuration file <a href="#" id="config-root-description-target">
|
|
<span class="symcode">$CONFIG_ROOT</span></a><span class="code"><em>/weewx.conf</em></span>.</p>
|
|
|
|
<div id="config-root-description" title="$CONFIG_ROOT" style='display:none' class='popup-note'>
|
|
<p>We have used the notation
|
|
<span class='code'>$CONFIG_ROOT</span> to
|
|
symbolically indicate the directory where this file is located. The
|
|
exact location will depend on your installation method and operating
|
|
system. For example, if you used the
|
|
<span class='code'>setup.py</span>
|
|
method, then the symbol <span class='code'>$CONFIG_ROOT</span> will
|
|
represent <span class='code'>/home/weewx</span>, and so your
|
|
configuration file will be located in
|
|
<span class='code'>/home/weewx/weewx.conf</span>. For other
|
|
configurations, consult the
|
|
<a href="#dir-layout-table">application layout table</a> in the
|
|
'Installation methods' section.</p>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$("#config-root-description-target").click(
|
|
function () {
|
|
$("#config-root-description").dialog({position: {my:"left top", at:"right bottom", of: "#config-root-description-target" }});
|
|
return false; // Ensures that the "link" isn't followed
|
|
});
|
|
</script>
|
|
|
|
<p class='note'>There is another configuration file, <span class="code">skin.conf</span>,
|
|
for presentation-specific options. It is described in the
|
|
<a href="customizing.htm">Customizing Guide</a>, under section <em>
|
|
<a href="customizing.htm#standard_skin">The Standard <span class="code">skin.conf</span></a></em>.</p>
|
|
<p>This section is the definitive guide to the configuration options
|
|
available in <span class='code'>weewx.conf</span>. <em>It documents
|
|
way more options than you are likely to need!</em> —
|
|
you can safely ignore most of them. The truly important ones, the ones
|
|
you are likely to have to customize for your station, are
|
|
<span class="config_important">highlighted</span>.</p>
|
|
<p>Default values are provided for many options, meaning that if they are
|
|
not listed in the configuration file <em>at all</em>,
|
|
<span class="code">weewx</span> will pick sensible values. When the
|
|
documentation below gives a "default value" this is what it
|
|
means.</p>
|
|
|
|
<p>What follows is organized by the different sections of the
|
|
configuration file. </p>
|
|
|
|
<h2>General</h2>
|
|
<p>The options declared at the top are not actually part of any section.</p>
|
|
<p class="config_option">debug </p>
|
|
<p>Set to 1 to have the program perform extra debug checks, as well as
|
|
emit extra information in the log file. This is strongly recommended
|
|
if you are having trouble. Otherwise, set to 0. Default
|
|
is 0 (no debug).
|
|
</p>
|
|
<p class="config_option">WEEWX_ROOT </p>
|
|
<p>Set to the root directory of the <span class="code">weewx</span> file
|
|
hierarchy for this station. Normally, this is set automatically by the
|
|
installation process. Required. No default.
|
|
</p>
|
|
<p class="config_option">socket_timeout </p>
|
|
<p>Set to how long to wait before declaring a socket time out. This is
|
|
used when using FTP to send data to a web server or when sending data
|
|
to the Weather Underground. Twenty (20) seconds is reasonable. Default
|
|
is 20. </p>
|
|
<p class='config_option'>gc_interval</p>
|
|
<p>Set to how often garbage collection should be performed by the Python
|
|
runtime engine. Default is every 10,800 seconds (3 hours).</p>
|
|
|
|
<h2 class="config_section">[Station]</h2>
|
|
<p>This section covers options relating to your weather station setup. </p>
|
|
<p class="config_important">location </p>
|
|
<p>The station location should be a UTF-8 string that describes the
|
|
geography of where your weather station is located. Required.
|
|
No default.</p>
|
|
<pre class="tty">location = "A small ranch in Kentucky"</pre>
|
|
<p class="config_important">latitude <br />
|
|
longitude </p>
|
|
<p>The lat/lon should be set in decimal degrees, negative for southern and
|
|
western hemispheres, respectively. Required. No default. </p>
|
|
<pre class="tty">latitude = 38.8977
|
|
longitude = -77.0366</pre>
|
|
<p class="config_option"><span class="config_important">altitude</span></p>
|
|
<p>Normally the station altitude is downloaded from your hardware, but not
|
|
all stations support this. Set to the altitude of the station and the
|
|
unit used for the altitude. Example: </p>
|
|
<pre class="tty">altitude = 700, foot</pre>
|
|
<p>An example in meters:</p>
|
|
<pre class="tty">altitude = 220, meter</pre>
|
|
<p class="config_important">station_type </p>
|
|
<p>Set to the type of hardware you are using.</p>
|
|
<pre class="tty">station_type = Simulator</pre>
|
|
<p>Valid options include:</p>
|
|
<table class="indent">
|
|
<tr class="first_row">
|
|
<td>Option</td>
|
|
<td>Description</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">Simulator</td>
|
|
<td>A software weather station simulator. Useful for testing and
|
|
debugging.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">CC3000</td>
|
|
<td>RainWise CC3000 data logger</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">FineOffsetUSB</td>
|
|
<td>Fine Offset 10xx, 20xx, and 30xx stations</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">TE923</td>
|
|
<td>Hideki TE923 stations</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">Ultimeter</td>
|
|
<td>PeetBros Ultimeter stations</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">Vantage</td>
|
|
<td>Davis Vantage weather stations</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">WMR100</td>
|
|
<td>Oregon Scientific WMR100 series stations</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">WMR200</td>
|
|
<td>Oregon Scientific WMR200 series stations</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">WMR9x8</td>
|
|
<td>Oregon Scientific WMR-918/968 series stations</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">WS1</td>
|
|
<td>Argent Data Systems WS1 stations</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">WS23xx</td>
|
|
<td>La Crosse 23xx stations</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code first_col">WS28xx</td>
|
|
<td>La Crosse 28xx stations</td>
|
|
</tr>
|
|
</table>
|
|
<p id="station_url" class="config_option"><span class="config_important">station_url</span></p>
|
|
<p>If you have a website, you may optionally specify an URL for
|
|
its HTML server. It will be included in the RSS file generated
|
|
by weewx and, if you choose to opt into the <a href="#station_registry">station
|
|
registry</a>, it will also be included in the
|
|
<a href="http://weewx.com/stations.html">map of weewx stations</a>.</p>
|
|
<p>Example:</p>
|
|
<pre class="tty">station_url = http://www.mywebsite.com</pre>
|
|
<p class="config_option" id="rain_year_start">rain_year_start
|
|
</p>
|
|
<p>Normally the start of the rain year is downloaded from your hardware,
|
|
but not all stations support this. Set to the start of your rain year,
|
|
for example, 10, if your rain year starts in October (as mine does).
|
|
Default is 1. </p>
|
|
<pre class="tty">rain_year_start = 1</pre>
|
|
<p class="config_option" id="week_start">week_start </p>
|
|
<p>Start of the week. 0=Monday, 1= Tuesday, ... , 6 = Sunday. Default is 6 (Sunday)
|
|
</p>
|
|
<pre class="tty">week_start = 0</pre>
|
|
|
|
<h3 class="config_section">[Simulator]</h3>
|
|
<p>This section is for options relating to the software weather station simulator
|
|
that comes with <span class="code">weewx</span>.</p>
|
|
<p class="config_option">loop_interval</p>
|
|
<p>The time (in seconds) between emitting loop packets. Default is 2.5</p>
|
|
<p class="config_option">mode</p>
|
|
<p>One of either <span class='code'>simulator</span> or <span class='code'>generator</span>. Default is <span class='code'>simulator</span>.</p>
|
|
<table class="indent">
|
|
<tr>
|
|
<td class="code">simulator</td>
|
|
<td>Real-time simulator. It will sleep between emitting packets.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code">generator</td>
|
|
<td>Emit packets as fast as it can. Useful for testing.</td>
|
|
</tr>
|
|
</table>
|
|
<p class="config_option">start</p>
|
|
<p>The start time for the generator in the format <span class="code">YYYY-MM-DD
|
|
hh:mm</span>. Optional. Default is the present time.</p>
|
|
|
|
<h3 class="config_section">[CC3000]</h3>
|
|
<p>This section is for options relating to the RainWise Mark III weather
|
|
stations and CC3000 data logger.</p>
|
|
<p class="config_important">port</p>
|
|
<p>The serial port, e.g., <span class='code'>/dev/ttyS0</span>. When using
|
|
a USB-Serial converter, the port will be something like
|
|
<span class='code'>/dev/ttyUSB0</span>. Default is
|
|
<span class='code'>/dev/ttyUSB0</span></p>
|
|
<p class='config_option'>polling_interval</p>
|
|
<p>The <span class="code">polling_interval</span> determines how often
|
|
<span class="code">weewx</span> will query the station for data. The
|
|
default is 1 second.
|
|
</p>
|
|
|
|
<h3 class="config_section">[FineOffsetUSB]</h3>
|
|
<p>This section is for options relating to the Fine Offset series of
|
|
weather stations with USB connectors.</p>
|
|
<p class="config_important">model</p>
|
|
<p>Set to the station model. For example, WH1080, WS2080, WH3081, etc. </p>
|
|
<p class='config_option'>polling_mode</p>
|
|
<p>One of <span class='code'>PERIODIC</span> or
|
|
<span class='code'>ADAPTIVE</span>. In
|
|
<span class='code'>PERIODIC</span> mode,
|
|
<span class='code'>weewx</span> queries the console at regular intervals
|
|
determined by the <span class='code'>polling_interval</span>.
|
|
In <span class='code'>ADAPTIVE</span> mode,
|
|
<span class='code'>weewx</span> attempts to query the
|
|
console at times when it is not reading data from the sensors or writing
|
|
data to memory. See the section <a href="#polling_mode_and_the_polling_interval">
|
|
Polling Mode and the Polling Interval</a>
|
|
for details. The default is <span class='code'>PERIODIC</span>.</p>
|
|
<p class='config_option'>polling_interval</p>
|
|
<p>The frequency, in seconds, at which <span class='code'>weewx</span> will
|
|
poll the console for data. Default is 60. This setting applies only
|
|
when the <span class='code'>polling_mode</span> is
|
|
<span class='code'>PERIODIC</span>.</p>
|
|
|
|
<h3 class="config_section">[TE923]</h3>
|
|
<p>This section is for options relating to the Hideki TE923 series of
|
|
weather stations.</p>
|
|
<p class="config_important">model</p>
|
|
<p>Set to the station model. For example, Meade TE923W or TFA Nexus.
|
|
Default is "TE923".</p>
|
|
<p class="config_option">sensor_map</p>
|
|
<p>This option defines the mapping between temperature/humidity values in
|
|
the database and the remote sensors. Up to 5 remote sensors are
|
|
supported. A switch on each sensor determines which of 5 channels that
|
|
sensor will use. For example, if the switch on the sensor is set to 3,
|
|
the temperature from that sensor will be t_3 and the humidity from that
|
|
sensor will be h_3.
|
|
</p>
|
|
<p>The default mapping is:
|
|
</p>
|
|
<pre class="tty">[[sensor_map]]
|
|
outTemp = t_1
|
|
outHumidity = h_1
|
|
extraTemp1 = t_2
|
|
extraHumid1 = h_2
|
|
extraTemp2 = t_3
|
|
extraHumid2 = h_3
|
|
extraTemp3 = t_4
|
|
extraHumid3 = h_4
|
|
extraTemp4 = t_5
|
|
extraHumid4 = h_5</pre>
|
|
<p class="config_option">battery_map</p>
|
|
<p>This option defines the mapping between battery status values in
|
|
the database and the remote sensors. The default mapping is:
|
|
</p>
|
|
<pre class="tty">[[battery_map]]
|
|
txBatteryStatus = batteryUV
|
|
windBatteryStatus = batteryWind
|
|
rainBatteryStatus = batteryRain
|
|
outTempBatteryStatus = battery1
|
|
extraBatteryStatus1 = battery2
|
|
extraBatteryStatus2 = battery3
|
|
extraBatteryStatus3 = battery4
|
|
extraBatteryStatus4 = battery5</pre>
|
|
|
|
<h3 class="config_section">[Ultimeter]</h3>
|
|
<p>This section is for options relating to the PeetBros Ultimeter weather
|
|
stations.</p>
|
|
<p class="config_important">port</p>
|
|
<p>The serial port, e.g., <span class='code'>/dev/ttyS0</span>. When using
|
|
a USB-Serial converter, the port will be something like
|
|
<span class='code'>/dev/ttyUSB0</span>. Default is
|
|
<span class='code'>/dev/ttyUSB0</span></p>
|
|
<p class="config_important">model</p>
|
|
<p>Set to the station model. For example, Ultimeter 2000 or Ultimeter 800.
|
|
Default is "Ultimeter".</p>
|
|
|
|
<h3 class="config_section">[Vantage]</h3>
|
|
<p>This section is for options relating to the Davis Vantage series of hardware
|
|
(<em>VantagePro, VantagePro2</em> or <em>VantageVue</em>).</p>
|
|
<p class="config_important">type </p>
|
|
<p>Set to either <span class="code">serial</span>, for a serial or USB
|
|
connection to the VantagePro (by far the most common), or to
|
|
<span class="code">ethernet</span> for the WeatherLinkIP. No default.</p>
|
|
<p class="config_important">port </p>
|
|
<p>If you chose <span class="code">serial</span>, for <span class='code'>type</span>,
|
|
then set to the serial port name used by the station. For example,
|
|
<span class="code">/dev/ttyUSB0</span> is a common location for USB
|
|
ports, <span class="code">/dev/ttyS0</span> for serial ports. Otherwise,
|
|
not required. No default. </p>
|
|
<p class="config_important">host </p>
|
|
<p>If you chose <span class="code">ethernet</span>, then specify either
|
|
the IP address (<em>e.g.</em>, <span class="code">192.168.0.1</span>)
|
|
or hostname (<em>e.g.</em>, <span class="code">console.mydomain.com</span>)
|
|
to the console. Otherwise, not required. No default. </p>
|
|
<p class="config_option">baudrate </p>
|
|
<p>Set to the baudrate of the station. The default is 19200. </p>
|
|
<p class="config_option">tcp_port </p>
|
|
<p>The port where WeatherLinkIP will be listening. Default is 22222.
|
|
</p>
|
|
<p class="config_option">tcp_send_delay </p>
|
|
<p>How long to block after sending a socket packet to the WeatherLinkIP.
|
|
Default is 1 second. </p>
|
|
<p class="config_option">iss_id </p>
|
|
<p>Set to the ID number of the Integrated Sensor Suite (ISS). This is used
|
|
in the formula to calculate reception quality for wireless stations.
|
|
Default is 1. </p>
|
|
<p class="config_option">timeout </p>
|
|
<p>How many seconds to wait for a response from the station before giving
|
|
up. Default is 5 seconds. </p>
|
|
<p class="config_option">wait_before_retry </p>
|
|
<p>How many seconds to wait before retrying. Unless you have a good reason
|
|
to change it, this value should be left at the default, as it is long
|
|
enough for the station to offer new data, but not so long as to go into
|
|
a new loop packet (which arrive every 2 seconds). Default is 1.2
|
|
seconds. </p>
|
|
<p class="config_option">max_tries </p>
|
|
<p>How many times to try again before giving up. Default is 4. </p>
|
|
|
|
<h3 class="config_section">[WMR100]</h3>
|
|
<p>This section is for options relating to the Oregon Scientific WMR100
|
|
series of weather stations with USB connectors.</p>
|
|
<p class="config_important">model</p>
|
|
<p>Set to the station model. For example, WMR100 or WMRS200.</p>
|
|
<p class="config_option">stale_wind</p>
|
|
<p>How long a wind record can be used to calculate wind chill (in seconds).
|
|
Default is 30.</p>
|
|
|
|
<h3 class="config_section">[WMR200]</h3>
|
|
<p>This section is for options relating to the Oregon Scientific WMR200
|
|
series of weather stations with USB connectors.</p>
|
|
<p class="config_important">model</p>
|
|
<p>Set to the station model. For example, WMR200 or WMR200A.</p>
|
|
<p class="config_option">use_pc_time</p>
|
|
<p>If True, use the computer time, otherwise use the station time. Default
|
|
is True.</p>
|
|
<p class="config_option">archive_interval</p>
|
|
<p>Set the wmr200 archive interval in seconds. Default is 60 seconds.</p>
|
|
<p>The wmr200 hardware records archive data at an immutable rate of 60
|
|
seconds. This field may be set to a higher value enabling the weewx
|
|
engine to coalesce live data packets. However, when the wmr200 is not
|
|
connected to a system via USB or if the weewx software is not running,
|
|
the wmr200 console will continue to store weather data in onboard
|
|
console memory at a fixed rate of 60 seconds.</p>
|
|
<p class="config_option">erase_archive</p>
|
|
<p>If True, erase onboard console memory archive on startup. Default is
|
|
False.</p>
|
|
<p class="config_option">archive_startup</p>
|
|
<p>When retrieving archive data packets from the wmr200 onboard console
|
|
memory, there is no explicit indication that all the data has been
|
|
drained. This field specifies when to transition from archive mode to
|
|
live mode. This transition occurs when no archive packets are detected
|
|
within this time interval. Default is 120 seconds.<p>
|
|
<p class="config_option">archive_threshold</p>
|
|
<p>Occasionally when retrieving archive packets from the wmr200 onboard
|
|
memory a stale data packet will be detected. The archive packets are
|
|
presented in sequential order typically timestamped 60 seconds apart.
|
|
However, there is no guarantee the archive packets are exactly 60
|
|
seconds apart. Should an incoming archive data packet timestamp exceed
|
|
the previous archive data packet one by the amount in this field it will
|
|
be dropped. Default is 1512000 seconds (1 week).</p>
|
|
<p class="config_option">sensor_status</p>
|
|
<p>If True, emit sensor faults and failures to log. Default is True.</p>
|
|
|
|
<h3 class="config_section">[WMR9x8]</h3>
|
|
<p>This section is for options relating to the Oregon Scientific WMR-918/968
|
|
series of weather stations with serial connectors.</p>
|
|
<p class="config_important">type</p>
|
|
<p>For the moment, only <span class="code">serial</span> is supported.</p>
|
|
<p class="config_important">port </p>
|
|
<p>Along with the <span class="code">serial</span> option above, you
|
|
must set the serial port name used by the station. For example,
|
|
<span class="code">/dev/ttyUSB0</span> is a common location for USB
|
|
ports, <span class="code">/dev/ttyS0</span> for serial ports.
|
|
No default. </p>
|
|
<p class="config_important">model</p>
|
|
<p>Set to the station model. For example, WMR968 or WMR918.</p>
|
|
|
|
<h3 class="config_section">[WS1]</h3>
|
|
<p>This section is for options relating to the Argent Data Systems WS1
|
|
weather stations.</p>
|
|
<p class="config_important">port</p>
|
|
<p>The serial port, e.g., <span class='code'>/dev/ttyS0</span>. When using
|
|
a USB-Serial converter, the port will be something like
|
|
<span class='code'>/dev/ttyUSB0</span>. Default is
|
|
<span class='code'>/dev/ttyUSB0</span></p>
|
|
<p class='config_option'>polling_interval</p>
|
|
<p>The <span class="code">polling_interval</span> determines how often
|
|
<span class="code">weewx</span> will query the station for data. The
|
|
default is 1 second.
|
|
</p>
|
|
|
|
<h3 class="config_section">[WS23xx]</h3>
|
|
<p>This section is for options relating to the La Crosse WS-23xx series of
|
|
weather stations.</p>
|
|
<p class="config_important">port</p>
|
|
<p>The serial port, e.g., <span class='code'>/dev/ttyS0</span>. When using
|
|
a USB-Serial converter, the port will be something like
|
|
<span class='code'>/dev/ttyUSB0</span>. Default is
|
|
<span class='code'>/dev/ttyUSB0</span></p>
|
|
<p class="config_important">model</p>
|
|
<p>Set to the station model. For example, WS-2315, LaCrosse WS2317,
|
|
etc. Default is "LaCrosse WS23xx".</p>
|
|
<p class='config_option'>polling_interval</p>
|
|
<p>The <span class="code">polling_interval</span> determines how often
|
|
<span class="code">weewx</span> will query the station for data. If no
|
|
<span class="code">polling_interval</span> is specified (the default),
|
|
<span class="code">weewx</span> will automatically use a polling interval
|
|
based on the type of connection between the station and the sensors
|
|
(wired or wireless). When connected with a wire, the console updates
|
|
sensor data every 8 seconds. When connected wirelessly, the console
|
|
updates from 16 to 128 seconds, depending on sensor activity.
|
|
</p>
|
|
|
|
<h3 class='config_section'>[WS28xx]</h3>
|
|
<p>This section is for options relating to the La Crosse WS-28xx series of
|
|
weather stations.</p>
|
|
<p class="config_important">transceiver_frequency</p>
|
|
<p>Radio frequency to use between USB transceiver and console. Specify
|
|
either US or EU. US uses 915 MHz, EU uses 868.3 MHz. Default is US.
|
|
</p>
|
|
<p class="config_important">model</p>
|
|
<p>Set to the station model. For example, LaCrosse WS2810, TFA Primus,
|
|
etc. Default is "LaCrosse WS28xx".</p>
|
|
|
|
<h2 class="config_section">[StdRESTful]</h2>
|
|
<p>This section is for configuring the <span class="code">StdRESTful</span>
|
|
services, which upload to simple
|
|
<a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">RESTful</a>
|
|
servers such as the <a href="http://www.wunderground.com/">Weather Underground</a>,
|
|
<a href="http://www.pwsweather.com/">PWSweather.com</a>, or
|
|
<a href="http://www.wxqa.com/">CWOP</a>. </p>
|
|
|
|
<h3 class="config_section" id="station_registry">[[StationRegistry]]</h3>
|
|
<p> A registry of <span class="code">weewx</span> weather stations
|
|
is maintained at <span class="code">weewx.com</span>. Stations are
|
|
displayed on a map and a list at
|
|
<a href="http://weewx.com/stations.html">http://weewx.com/stations.html</a>
|
|
</p>
|
|
|
|
<p>How does the registry work? Individual weather stations
|
|
periodically contact the registry. Each station provides a URL to
|
|
identify itself, plus other information such as the station type and
|
|
<span class="code">weewx</span> version. No personal information, nor
|
|
any meteorological data, is sent.</p>
|
|
|
|
<p>To add your station to this list, you must do two things:</p>
|
|
<ol>
|
|
<li>Enable the StationRegistry in <span class="code">weewx.conf</span>
|
|
by setting the option <span class="code">register_this_station</span>
|
|
to <span class="code">True</span>. Your station will contact the
|
|
registry once per week. If your station does not contact the
|
|
registry for about a month, it will be removed from the list.
|
|
</li>
|
|
<li>Provide a <span class="code">station_url</span>, either in section
|
|
<a href="#station_url"><span class='code'>[Station]</span></a>, or
|
|
in the <span class='code'>[[StationRegistry]]</span> section.
|
|
</li>
|
|
</ol>
|
|
<p>The <span class='code'>station_url</span> is used to uniquely identify
|
|
each station, so choose it carefully before you set
|
|
<span class='code'>register_this_station</span> to
|
|
<span class='code'>True</span>.</p>
|
|
<pre class="tty">[StdRestful]
|
|
[[StationRegistry]]
|
|
register_this_station = True</pre>
|
|
<p class="config_important">register_this_station</p>
|
|
<p>Set this to <span class="code">True</span> to register the weather station.</p>
|
|
<p class="config_option">description</p>
|
|
<p>
|
|
A description of the station. If no description is specified, the
|
|
<span class="config_option">location</span> from the <span
|
|
class="code">[Station]</span> section will be used.
|
|
</p>
|
|
<p class="config_option">station_url</p>
|
|
<p>
|
|
The URL to the weather station. If no URL is specified, the <span
|
|
class="config_option">station_url</span> from the <span
|
|
class="code">[Station]</span> section will be used.
|
|
</p>
|
|
<p class='config_option'>log_success</p>
|
|
<p>In case of success, make a note in the system log. This is the default.</p>
|
|
<p class='config_option'>log_failure</p>
|
|
<p>In case of failure, make a note in the system log. This is the default.</p>
|
|
|
|
<h3 class="config_section">[[Wunderground]]</h3>
|
|
<p>
|
|
<span class="code">Weewx</span> can send your current data to the
|
|
<a href="http://www.wunderground.com/">Weather Underground</a>. If
|
|
you do not wish to do this, leave the option
|
|
<span class='code'>station</span> commented.
|
|
</p>
|
|
<pre class="tty">[StdRestful]
|
|
[[Wunderground]]
|
|
station = 12345678 # Replace with your station number
|
|
password = xxxxx # Replace with your password
|
|
rapidfire = False</pre>
|
|
<p class="config_important">station</p>
|
|
<p>
|
|
Set to your Weather Underground station ID (<em>e.g.</em>, <span
|
|
class="code">KORHOODR3</span>). Required.
|
|
</p>
|
|
<p class="config_important">password</p>
|
|
<p>Set to your Weather Underground password. Required.</p>
|
|
<p class="config_option">rapidfire</p>
|
|
<p>
|
|
Set to <span class="code">True</span> to have <span class="code">weewx</span>
|
|
post using the <a href="http://www.wunderground.com/weatherstation/rapidfirehelp.asp">Weather Underground's "Rapidfire" protocol</a>.
|
|
This will send a post to the
|
|
WU site with every LOOP packet, which can be as often as every 2.5
|
|
seconds in the case of the Vantage instruments. Not all instruments
|
|
support this. Optional. Default is <span class="code">False</span>.
|
|
</p>
|
|
<p class="config_option">archive_post</p>
|
|
<p>
|
|
This option tells <span class="code">weewx</span> to post on every
|
|
archive record, which is the normal "PWS" mode for the Weather
|
|
Underground. Because they prefer that you either use their
|
|
"Rapidfire" protocol, or their PWS mode, but not both, the default
|
|
for this option is the opposite for whatever you choose above for
|
|
option <span class="code">rapidfire</span>. However, if for some
|
|
reason you want to do both, then you may set both options to <span
|
|
class="code">True</span>.
|
|
</p>
|
|
<p class='config_option'>log_success</p>
|
|
<p>In case of success, make a note in the system log. The default is
|
|
<span class='code'>False</span> for Rapidfire mode, True for PWS
|
|
mode.</p>
|
|
<p class='config_option'>log_failure</p>
|
|
<p>In case of failure, make a note in the system log. The default is
|
|
<span class='code'>False</span> for Rapidfire mode, True for PWS
|
|
mode.</p>
|
|
|
|
<h3 class="config_section">[[PWSweather]]</h3>
|
|
<p><span class="code">Weewx </span>can send your current data to the
|
|
<a href="http://www.pwsweather.com/">PWSweather.com</a> service. If you
|
|
do not wish to do this, leave the option
|
|
<span class='code'>station</span> commented.</p>
|
|
<pre class="tty">[StdRestful]
|
|
[[PWSweather]]
|
|
station = 12345678 # Replace with your station number
|
|
password = xxxxx # Replace with your password</pre>
|
|
<p class="config_important">station </p>
|
|
<p>Set to your PWSweather station ID. Required. </p>
|
|
<p class="config_important">password </p>
|
|
<p>Set to your PWSweather password. Required. </p>
|
|
<p class='config_option'>log_success</p>
|
|
<p>In case of success, make a note in the system log. This is the default.</p>
|
|
<p class='config_option'>log_failure</p>
|
|
<p>In case of failure, make a note in the system log. This is the default.</p>
|
|
|
|
<h3 class="config_section">[[CWOP]]</h3>
|
|
<p><span class="code">Weewx</span> can send your data to the
|
|
<a href="http://www.wxqa.com/">Citizen Weather Observer Program</a>. If
|
|
you do not wish to do this, leave the <span class="code">station</span>
|
|
commented. </p>
|
|
<pre class="tty">[StdRestful]
|
|
[[CWOP]]
|
|
station = 12345678 # Replace with your station number
|
|
passcode = xxxxx # Replace with your passcode (APRS stations only)
|
|
post_interval = 600</pre>
|
|
<p class="config_important">station </p>
|
|
<p>Set to your CWOP station ID (<em>e.g.</em>, <span class="code">CW1234</span>). Required.
|
|
</p>
|
|
<p class="config_important">passcode </p>
|
|
<p>This is used for APRS (amateur radio) stations only. Set to the
|
|
passcode given to you by the CWOP operators. Otherwise, leave this
|
|
option commented. Required for APRS stations, ignored for others.</p>
|
|
<p class="config_option">post_interval </p>
|
|
<p>The interval in seconds between posts. Because CWOP is heavily used, the
|
|
operators discourage very frequent posts. Every 5 minutes (300 seconds)
|
|
is fine, but they prefer every 10 minutes (600 s) or even longer. Setting
|
|
this value to zero will cause every archive record to be posted.
|
|
Optional. Default is zero.</p>
|
|
<p class="config_option">stale</p>
|
|
<p>How old a record can be before it will not be used for a catch up. CWOP
|
|
does not use the timestamp on a posted record. Instead, they use the wall
|
|
clock time that it came in. This means that if your station is off the
|
|
air for a long period of time, then when <span class="code">weewx</span>
|
|
attempts a catch up, old data could be interpreted as the current
|
|
conditions. Optional. Default is 1800 seconds.</p>
|
|
<p class="config_option">server_list</p>
|
|
<p>A comma-delimited list of the servers that should be tried for
|
|
uploading data.
|
|
Optional. Default is: cwop.aprs.net:14580, cwop.aprs.net:23</p>
|
|
<p class='config_option'>log_success</p>
|
|
<p>In case of success, make a note in the system log. This is the default.</p>
|
|
<p class='config_option'>log_failure</p>
|
|
<p>In case of failure, make a note in the system log. This is the default.</p>
|
|
|
|
<h3 class="config_section">[[WOW]]</h3>
|
|
<p class="config_section"><span class="code">Weewx</span> can send your
|
|
current data to the <a href="http://wow.metoffice.gov.uk/">British
|
|
Weather Observations Website (WOW)</a> service. If you do not wish
|
|
to do this, leave the <span class='code'>station</span> option
|
|
commented.</p>
|
|
<pre class="tty">[StdRestful]
|
|
[[WOW]]
|
|
station = 12345678 # Replace with your site ID
|
|
password = xxxxx # Replace with your site authentication key</pre>
|
|
<p class="config_important">station</p>
|
|
<p>Set to your WOW station ID. Required.</p>
|
|
<p class="config_important">password</p>
|
|
<p>Set to your WOW password. Required.</p>
|
|
<p class='config_option'>log_success</p>
|
|
<p>In case of success, make a note in the system log. This is the default.</p>
|
|
<p class='config_option'>log_failure</p>
|
|
<p>In case of failure, make a note in the system log. This is the default.</p>
|
|
|
|
<h3 class="config_section">[[AWEKAS]]</h3>
|
|
<p class="config_section"><span class="code">Weewx</span> can send your
|
|
current data to the <a href="http://www.awekas.at/">Automatisches
|
|
Wetterkarten System</a> (AWEKAS). If you do not wish
|
|
to do this, leave the <span class='code'>username</span> option
|
|
commented.</p>
|
|
<pre class="tty">[StdRestful]
|
|
[[AWEKAS]]
|
|
username = joeuser # Replace with your awekas username
|
|
password = xxxxx # Replace with your awekas password</pre>
|
|
<p class="config_important">username</p>
|
|
<p>Set to your AWEKAS username. Required.</p>
|
|
<p class="config_important">password</p>
|
|
<p>Set to your AWEKAS password. Required.</p>
|
|
<p class="config_option">language</p>
|
|
<p>Set to your preferred language. Default is <span class='code'>en</span>.</p>
|
|
<p class='config_option'>log_success</p>
|
|
<p>In case of success, make a note in the system log. This is the default.</p>
|
|
<p class='config_option'>log_failure</p>
|
|
<p>In case of failure, make a note in the system log. This is the default.</p>
|
|
|
|
|
|
<h2 class="config_section">[StdReport]</h2>
|
|
<p>This section is for configuring the <span class="code">StdReport</span> service,
|
|
which controls which reports are to be generated. While it can be highly customized
|
|
for your individual situation, this documentation describes the section as shipped
|
|
in the standard distribution. </p>
|
|
<p>Each report is represented by a sub-section, marked with double brackets
|
|
(<em>e.g.</em>, <span class="code">[[MyReport]]</span>). Any options for the
|
|
report should be placed under it. The standard report service will go through
|
|
the sections, running each report in order. Hence, normally the report
|
|
<span class="code">[[StandardReport]]</span> will be run first, then report
|
|
<span class="code">[[FTP]]</span> (which actually optionally uploads the results
|
|
to a remote web server). Details for how to customize reports are in the section
|
|
<em><a href="customizing.htm#customizing_reports">Customizing reports</a></em>, in the
|
|
<a href="customizing.htm">Customizing Guide</a>.
|
|
</p>
|
|
<p class="config_option">SKIN_ROOT </p>
|
|
<p>The directory where the skins live. A relative path is relative to
|
|
<span class="symcode">$WEEWX_ROOT</span>.</p>
|
|
<p class="config_option">HTML_ROOT </p>
|
|
<p>The target directory for the generated files. A relative path is
|
|
relative to <span class="symcode">$WEEWX_ROOT</span>. Generated
|
|
files and images will be put here. </p>
|
|
<p class="config_option">data_binding</p>
|
|
<p>
|
|
The data source to be used for the reports. It should match a
|
|
binding given in section <a href="#DataBindings"><span
|
|
class="code">[DataBindings]</span></a> below. The binding can be overridden in
|
|
individual reports. Optional. Default is <span class="code">wx_binding</span>.
|
|
</p>
|
|
|
|
<h3 class="config_section">[[StandardReport]]</h3>
|
|
<p>This is the standard report that will be run on every archiving interval.
|
|
It uses the skin "<span class="code">Standard</span>", which generates
|
|
four HTML pages ("day", "week", "month", and "year"
|
|
observations), plot graphs for same, an RSS feed, and NOAA monthly and yearly
|
|
reports. The default configuration uses US Customary Units and puts the results
|
|
in <span class="code">public_html</span> and subdirectory <span class="code">
|
|
public_html/NOAA</span>. </p>
|
|
<h3 class="config_section">[[FTP]]</h3>
|
|
<p>While this "report" does not actually generate anything, it
|
|
uses the report machinery to upload files from directory <span class="symcode">
|
|
$HTML_ROOT</span> to a remote webserver. It does an incremental update,
|
|
that is, it only FTPs any files that have changed, saving the outgoing bandwidth
|
|
of your Internet connection. </p>
|
|
<p>If you do not use such a server, comment out the first four options below.
|
|
</p>
|
|
<p class="config_important">user </p>
|
|
<p>Set to the username you use for your FTP connection to your web server. Required.
|
|
No default. </p>
|
|
<p class="config_important">password </p>
|
|
<p>Set to the password you use for your FTP connection to your web server. Required.
|
|
No default. </p>
|
|
<p class="config_important">server </p>
|
|
<p>Set to the name of your web server (<em>e.g.</em>, <span class="code">www.threefools.org</span>,
|
|
in my case). Required. No default </p>
|
|
<p class="config_important">path </p>
|
|
<p>Set to the path where the weather data will be stored on your webserver (<em>e.g.</em>, <span class="code">/weather</span>).
|
|
NB: some FTP servers require a leading slash ('<span class="code">/</span>'),
|
|
some do not. Required. No default. </p>
|
|
<p class="config_option">port</p>
|
|
<p>Set to the port ID of your FTP server. Default is <span class="code">21</span>.</p>
|
|
<p class="config_option">passive</p>
|
|
<p>Set to 1 if you wish to use the more modern, FTP passive mode, 0 if you wish
|
|
to use active mode. Passive mode generally works better through firewalls, but
|
|
not all FTP servers do a good job of supporting it. See
|
|
<a href="http://slacksite.com/other/ftp.html">Active FTP vs. Passive FTP, a
|
|
Definitive Explanation</a> for a good explanation of the difference. Default
|
|
is 1 (passive mode). </p>
|
|
<p class="config_option">max_tries </p>
|
|
<p><span class="code">Weewx</span> will try up to this many times to FTP a file
|
|
up to your server before giving up. Default is 3. </p>
|
|
<h3 class="config_section">[[RSYNC]]</h3>
|
|
<p>While this "report" does not actually generate anything, it
|
|
uses the report machinery to upload files from directory <span class="symcode">
|
|
$HTML_ROOT</span> to a remote webserver. It does an incremental update,
|
|
that is, it only synchronizes those files that have changed, saving the outgoing
|
|
bandwidth of your Internet connection. </p>
|
|
<p>If you do not use such a server, comment out the options below. </p>
|
|
<p class="config_important">server </p>
|
|
<p>Set to the name of your web server (<em>e.g.</em>,
|
|
<a href="http://www.threefools.org">www.threefools.org</a>, in my case). Required.
|
|
No default </p>
|
|
<p class="config_important">user </p>
|
|
<p>Set to the ssh username you use for your rsync connection to your web server.
|
|
The local user that <span class="code">weewx</span> runs as must have passwordless ssh configured for
|
|
user@server. Required. No default. </p>
|
|
<p class="config_important">path </p>
|
|
<p>Set to the path where the weather data will be stored on your webserver (<em>e.g.</em>, <span class="code">/weather</span>).
|
|
Required. No default. </p>
|
|
<p class="config_important">delete </p>
|
|
<p>Files that don't exist in the local report are removed from the remote location.
|
|
<em>USE WITH CAUTION:</em> If you make a mistake in setting the
|
|
<span class="code">path</span>, this can cause unexpected files to be deleted
|
|
on the remote server. Valid values are 1 to enable and 0 to disable. Required.
|
|
Default is 0.</p>
|
|
<h2 class="config_section" id="StdConvert">[StdConvert]</h2>
|
|
<p>This section is for configuring
|
|
the <span class="code">StdConvert</span> service. This service
|
|
acts as a filter, converting the unit system coming off your
|
|
hardware to a target output unit system. All downstream
|
|
services, including the archiving service, will then see this
|
|
unit system. Hence, your data will be stored in the database
|
|
using whatever unit system you specify here. </p>
|
|
<p><em>Once chosen, it cannot be changed!</em> Weewx does not allow you to
|
|
mix unit systems within the databases. You must chose a unit system
|
|
and then stick with it. This means that users coming from wview (which
|
|
uses US Customary) should not change the default setting. Having said
|
|
this, there is a way of reconfiguring the database to use another unit
|
|
system. See the section
|
|
<a href="customizing.htm#Changing_the_unit_system">Changing the unit system</a>
|
|
in the Customizing Guide.</p>
|
|
<p class='note'><strong>Note!</strong><br/> This service only
|
|
affects the units used in the <i>databases</i>. In particular,
|
|
it has nothing to do with what units are displayed in plots or
|
|
files. Those units are specified in the skin configuration
|
|
file, <span class="code">skin.conf</span>, as described in
|
|
the <a href="customizing.htm">Customizing Guide</a>, under
|
|
section
|
|
<em><a href="customizing.htm#Changing_options">Changing
|
|
options</a></em>. Because of this, unless you have a special
|
|
purpose application, there is really no good reason to change
|
|
from the default, which is <span class="code">US</span>.</p>
|
|
<p class="warning"><strong>Warning!</strong><br />
|
|
If, despite these precautions, you do decide to change the units of data
|
|
stored in the database, be sure to read the sections
|
|
<span class="code"><a href="#StdCalibrate">[StdCalibrate]</a></span> and
|
|
<span class="code"><a href="#StdQC">[StdQC]</a></span>, and change the
|
|
units there as well!</p>
|
|
|
|
<p class="config_option" id="option_target_unit">target_unit</p>
|
|
<p>Set to either <span class="code">US</span>, <span class="code">METRICWX</span>,
|
|
or <span class="code">METRIC</span>. The difference between
|
|
<span class="code">METRICWX</span>, and <span class="code">METRIC</span> is that
|
|
the former uses <span class="code">mm</span> instead of <span class="code">cm</span>
|
|
for rain, and <span class="code">m/s</span> instead of
|
|
<span class="code">km/hr</span> for wind speed. See the Appendix <a href="customizing.htm#units">
|
|
Units</a> in the Customizing Guide for the exact differences beween
|
|
these three choices.
|
|
Default is <span class="code">US</span>.</p>
|
|
|
|
<h2 class="config_section" id="StdCalibrate">[StdCalibrate]</h2>
|
|
<p>This section is for configuring the <span class="code">StdCalibrate</span>
|
|
service. This service offers an opportunity to correct for any calibration errors
|
|
in your instruments. It is very general and flexible. </p>
|
|
<p>Because this service is normally run after <span class="code">StdConvert</span>,
|
|
the units to be used should be the same as the target unit system chosen in
|
|
<a href="#StdConvert"><span class="code">StdConvert</span></a> above. It is
|
|
also important that this service be run before the archiving service
|
|
<span class="code">StdArchive</span>, so that it is the corrected data that
|
|
are stored. </p>
|
|
<h3 class="config_section">[[Corrections]]</h3>
|
|
<p>In this section you list all <em>correction expressions</em>. For example,
|
|
say that you know your outside thermometer reads high by 0.2°F. You could add
|
|
the expression: </p>
|
|
<p class='tty'>outTemp = outTemp - 0.2</p>
|
|
<p>Perhaps you need a linear correction around a reference temperature of 68°F:
|
|
</p>
|
|
<p class='tty'>outTemp = outTemp + (outTemp-68) * 0.02</p>
|
|
<p>It is even possible to do corrections involving more than one variable. Suppose
|
|
you have a temperature sensitive barometer: </p>
|
|
<p class='tty'>barometer = barometer + (outTemp-32) * 0.0091</p>
|
|
<p>All correction expressions are run in the order given. </p>
|
|
<p>Both LOOP data and archive data will be corrected. </p>
|
|
<p>If you are using a Davis Vantage instrument and all you require is a simple
|
|
correction offset, this can also be done in the hardware. See your manual for
|
|
instructions. </p>
|
|
<h2 class="config_section" id="StdQC">[StdQC]</h2>
|
|
<p>This section is for configuring the <span class="code">StdQC</span> service.
|
|
This service offers a very simple <em>Quality Control</em> that only checks
|
|
that values are within a minimum and maximum range.</p>
|
|
<p>Because this service is normally run after <span class="code">StdConvert</span>,
|
|
the units to be used should be the same as the target unit system chosen in
|
|
<a href="#StdConvert"><span class="code">StdConvert</span></a>. It is also
|
|
important that it be run after the calibration service, <span class="code">StdCalibrate
|
|
</span>and before the archiving service <span class="code">StdArchive</span>,
|
|
so that it is the calibrated and corrected data that are stored. </p>
|
|
<h3 class="config_section">[[MinMax]]</h3>
|
|
<p>In this section you list the observation types you wish to have checked,
|
|
along with their minimum and maximum values. If not specified, the units
|
|
should are in <em>the same unit system as specified in section
|
|
<span class="code"><a href="#StdConvert">StdConvert</a></span></em>.
|
|
</p>
|
|
<p>For example, </p>
|
|
<pre class="tty">[[MinMax]]
|
|
outTemp = -40, 120
|
|
barometer = 28, 32.5
|
|
outHumidity = 0, 100 </pre>
|
|
<p>With <span class='code'>target_unit = US</span> (the default), if a
|
|
temperature should fall outside of the inclusive
|
|
range -40 °F through 120 °F, then it will be set to the null
|
|
value, <span class="code">None</span>, and ignored. In a similar manner,
|
|
the acceptable values for barometric pressure would be 28 through 32.5
|
|
inHg, for humidity 0 through 100%. </p>
|
|
<p>You can also specify units.</p>
|
|
<p>For example, </p>
|
|
<pre class="tty">[[MinMax]]
|
|
outTemp = -40, 60, degree_C
|
|
barometer = 28, 32.5, inHg</pre>
|
|
<p>In this example, if a temperature should fall outside of the inclusive
|
|
range -40 °C through 60 °C, then it will be set to the null
|
|
value, <span class="code">None</span>, and ignored. In a similar manner,
|
|
the acceptable values for barometric pressure would be 28 through 32.5
|
|
inHg. Since the units are specified, these values apply no matter what
|
|
the <span class='code'>target_unit</span>.</p>
|
|
<p>Both LOOP and archive data will be checked. </p>
|
|
<p>Knowing the details of how your hardware encodes data helps to minimize
|
|
the number of observations that need to be checked. For example, the VP2
|
|
devotes only one unsigned byte to storing wind speed, and even then
|
|
<span class="code">0xff</span> is devoted to a bad value, so the only
|
|
possible values that could appear are 0 through 126 mph, a reasonable
|
|
range. So, for the VP2, there is no real point in checking wind speed.
|
|
</p>
|
|
|
|
<h2 class="config_section" id="StdWXCalculate">[StdWXCalculate]</h2>
|
|
<p>The calculation service calculates derived quantities such as
|
|
<span class='code'>dewpoint</span>, <span class='code'>windchill</span>,
|
|
and <span class='code'>heatindex</span>.</p>
|
|
<p>Some hardware provides derived quantities, others provide only raw
|
|
observations. The calculation service provides derived quantities for
|
|
hardware that does not provide them, and known algorithms for hardware
|
|
that provides unreliable or antiquated calculations.</p>
|
|
<p>The calculation service can calculate the following values:
|
|
<ul>
|
|
<li>pressure</li>
|
|
<li>barometer</li>
|
|
<li>altimeter</li>
|
|
<li>windchill</li>
|
|
<li>heatindex</li>
|
|
<li>dewpoint</li>
|
|
<li>inDewpoint</li>
|
|
<li>rainRate</li>
|
|
</ul>
|
|
<p>In its default configuration, the service calculates values only if
|
|
they have not already been provided by the hardware or driver. This is
|
|
the default configuration:</p>
|
|
<p class="tty">[StdWXCalculate]
|
|
pressure = prefer_hardware
|
|
barometer = prefer_hardware
|
|
altimeter = prefer_hardware
|
|
windchill = prefer_hardware
|
|
heatindex = prefer_hardware
|
|
dewpoint = prefer_hardware
|
|
inDewpoint = prefer_hardware
|
|
rainRate = prefer_hardware</p>
|
|
<p>The options for each quantity are <span class='code'>hardware</span>,
|
|
<span class='code'>software</span>, or
|
|
<span class='code'>prefer_hardware</span></p>
|
|
<table class="indent">
|
|
<tr>
|
|
<td class="code">hardware</td>
|
|
<td>Never calculate the value.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code">software</td>
|
|
<td>Always calculate the value.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="code">prefer_hardware</td>
|
|
<td>Calculate the value only if it is not provided by hardware.</td>
|
|
</tr>
|
|
</table>
|
|
<p>For example, if your weather station calculates windchill using the
|
|
pre-2001 algorithm, and you prefer to have
|
|
<span class='code'>weewx</span> calculate it using a current algorithm,
|
|
specify the following:</p>
|
|
<p class="tty">[StdWXCalculate]
|
|
...
|
|
windchill = software</p>
|
|
|
|
<h2 class="config_section" id="StdArchive">[StdArchive]</h2>
|
|
<p>This section is for configuring <span class="code">StdArchive</span>, the
|
|
service that stores data in a database.</p>
|
|
<p class="config_option">archive_interval</p>
|
|
<p>If your station hardware supports data logging then the archive interval
|
|
will be downloaded from the station. Otherwise, you must specify it here in
|
|
seconds. Optional. Default is 300 seconds.</p>
|
|
<p class="config_option">archive_delay </p>
|
|
<p>How long to wait in seconds after the top of an archiving interval before
|
|
fetching new data off the station. For example, if your archive interval is
|
|
5 minutes and archive_delay is set to 15, then the data will be fetched at 00:00:15,
|
|
00:05:15, 00:10:15, etc. This delay is to give the station a few seconds to
|
|
archive the data internally, and in case your server has any other tasks to
|
|
do at the top of the minute. Default is 15 seconds. </p>
|
|
<p class="config_option" id="record_generation">record_generation</p>
|
|
<p>Set to whether records should be downloaded off the hardware (recommended),
|
|
or generated in software. If set to <span class="code">hardware</span>, then
|
|
<span class="code">weewx</span> tries to download archive records from your
|
|
station. However, not all types of stations support this, in which case
|
|
<span class="code">weewx</span> falls back to software generation. A setting
|
|
of <span class="code">hardware</span> will work for most users. A notable
|
|
exception is <a href="http://www.wxforum.net/index.php?topic=10315.0">users
|
|
who have cobbled together homebrew serial interfaces</a> for the Vantage stations
|
|
that do not include memory for a logger. These users should set this option
|
|
to <span class="code">software</span>, forcing software record generation.
|
|
Default is <span class="code">hardware</span>.</p>
|
|
<p class="config_option">loop_hilo</p>
|
|
<p>Set to <span class="code">True</span> to have LOOP data and archive
|
|
data to be used for high / low statistics. Set to <span class="code">False</span>
|
|
to have only archive data used. If your sensor emits lots of spiky data,
|
|
setting to <span class="code">False</span> may help. Default is
|
|
<span class="code">True</span>.</p>
|
|
<p class="config_option">data_binding</p>
|
|
<p>The data binding to be used to store the data. This should match one
|
|
of the bindings in the <span class="code">[DataBindings]</span> section, below. Optional. Default
|
|
is <span class="code">wx_binding</span>.</p>
|
|
|
|
<h2 class="config_section">[StdTimeSynch]</h2>
|
|
<p>This section is for configuring <span class="code">StdTymeSynch</span>, a
|
|
service that can synchronize the onboard clock of station with your computer.
|
|
Not all weather station hardware supports this.</p>
|
|
<p class="config_option">clock_check</p>
|
|
<p>How often to check the clock on the weather station in seconds. Default is
|
|
14,400 seconds (every 4 hours)</p>
|
|
<p class="config_option">max_drift</p>
|
|
<p>The maximum amount of clock drift to tolerate, in seconds, before resetting
|
|
the clock. Default is 5.</p>
|
|
|
|
<h2 class="config_section" id="DataBindings">[DataBindings]</h2>
|
|
<p>
|
|
A "data binding" associates storage characteristics with a specific
|
|
database. Each binding contains a database from the
|
|
<a href="#Databases"><span class='code'>[Databases]</span></a>
|
|
section plus parameters such as schema, table name, and mechanism
|
|
for aggregating data.
|
|
</p>
|
|
|
|
<h3 class="config_section" id="wx_binding">[[wx_binding]]</h3>
|
|
<p>
|
|
This is the binding normally used for weather data. A typical <span
|
|
class="code">[[wx_binding]]</span> section looks something like
|
|
this:
|
|
</p>
|
|
<pre class="tty">
|
|
[[wx_binding]]
|
|
database = archive_sqlite
|
|
table_name = archive
|
|
manager = weewx.wxmanager.WXDaySummaryManager
|
|
schema = schemas.wview.schema</pre>
|
|
<p>What follows is more detailed information about each of the
|
|
binding options.</p>
|
|
<p class="config_important">database</p>
|
|
<p>
|
|
The actual database to be used — it should match one of the
|
|
sections in <a href="#Databases"><span class="code">[Databases]</span></a>.
|
|
Should you decide to use a MySQL database, instead of the default
|
|
SQLite database, this is the place to change it. Required.
|
|
</p>
|
|
<p class="config_option">table_name</p>
|
|
<p>
|
|
Internally, the archive data is stored in one, long, flat table.
|
|
This is the name of that table. Normally this does not need to be
|
|
changed. Optional. Default is <span class="code">archive</span>
|
|
</p>
|
|
<p class="config_option">manager</p>
|
|
<p>
|
|
The name of the class to be used to manage the table. Optional.
|
|
Default is class <span class="code">weewx.wxmanager.WXDaySummaryManager</span>.
|
|
This class stores daily summaries in the database, and a
|
|
few types, such as heating- and cooling-degree days, appropriate
|
|
for weather. Normally, this does not need to be changed.
|
|
</p>
|
|
<p class="config_option">schema</p>
|
|
<p>
|
|
A Python list holding the structure of the schema to be used to
|
|
initialize the database. After initialization, it is not used.
|
|
Optional. Default is <span class="code">schemas.wview.schema</span>,
|
|
the schema used by the <a href="http://www.wviewweather.com">wview</a>
|
|
weather system.
|
|
</p>
|
|
|
|
<h2 class="config_section" id="Databases">[Databases]</h2>
|
|
<p>This section lists actual databases. The name of each database is
|
|
given in double brackets, for example,
|
|
<span class="code">[[archive_sqlite]]</span>. Each database section
|
|
contains the parameters necessary to create and manage the database.
|
|
The number of parameters varies depending on the type of database.</p>
|
|
|
|
<h3 class="config_section">[[archive_sqlite]]</h3>
|
|
<p>This definition uses the <a href="http://sqlite.org/">SQLite</a> database
|
|
engine to store data. SQLite is open-source, simple, lightweight, highly
|
|
portable, and memory efficient. For most purposes it serves nicely.</p>
|
|
<p class="config_option">database_name</p>
|
|
<p>The path to the SQLite file. A relative path is relative to
|
|
<span class="symcode">$SQLITE_ROOT</span>. Required.</p>
|
|
<p class="config_option" id='archive_timeout'>timeout</p>
|
|
<p>When the database is accessed by multiple threads and one of those threads
|
|
modifies the database, the SQLite database is locked until that transaction
|
|
is completed. The <span class='code'>timeout</span> option specifies how long
|
|
other threads should wait for the lock to go away before raising an exception.
|
|
The default is 5 seconds.</p>
|
|
<p class='config_option'>isolation_level</p>
|
|
<p>Set the current isolation level. See the pysqlite documentation on
|
|
<a href="http://docs.python.org/2.7/library/sqlite3.html#sqlite3.Connection.isolation_level">
|
|
isolation levels</a> for more information. There is no reason
|
|
to change this, but it is here for completeness. Default is <span class='code'>None</span>
|
|
(autocommit).</p>
|
|
|
|
<h3 class="config_section">[[archive_mysql]]</h3>
|
|
<p>This definition uses the MySQL database engine to store data.
|
|
It is free, highly-scalable, but more complicated to administer. </p>
|
|
<p>Note that if you choose the <a href="http://www.mysql.com/">MySQL</a>
|
|
database it is assumed that you know how to administer it. In particular,
|
|
you will have to set up a user with appropriate create and modify
|
|
privileges.</p>
|
|
<p class="config_option">host</p>
|
|
<p>The name of the server on which the database is located. Default is <span class="code">localhost</span>.</p>
|
|
<p class="config_option">user</p>
|
|
<p>The user name to be used to log into the server. Required.</p>
|
|
<p class="config_option">password</p>
|
|
<p>The password. Required.</p>
|
|
<p class="config_option">database_name</p>
|
|
<p>The name of the database. Required.</p>
|
|
|
|
<h2 class="config_section">[Engines]</h2>
|
|
<p>This section is used to configure the internal service engine in
|
|
<span class="code">weewx</span>. It is for advanced customization. Details on
|
|
how to do this can be found in the section <em>
|
|
<a href="customizing.htm#service_engine">Customizing the
|
|
weewx service engine</a></em> of the <a href="customizing.htm">Customizing Guide</a>. </p>
|
|
|
|
|
|
<h3 class="config_section">[[Services]]</h3>
|
|
<p>
|
|
Internally, <span class="code">weewx</span> consists of many <em>services</em>,
|
|
each responsible for some aspect of the program's functionality.
|
|
After an event happens, such as
|
|
the arrival of a new LOOP packet, any interested service gets a
|
|
chance to do some useful work on the event. For example, a service
|
|
might manipulate the packet, print it out, store it in a database,
|
|
etc. This section controls which services are loaded and in what
|
|
order they get their opportunity to do that work. Before <span
|
|
class="code">weewx</span> v2.6, this section held one, looong
|
|
option called <span class="code">service_list</span>, which held
|
|
the names of all the services that should be run. Since then, this
|
|
list has been broken down into five, smaller, lists, given below.
|
|
They are run in the order given below.
|
|
</p>
|
|
<p class="config_option" id="prep_services">prep_services</p>
|
|
<p>
|
|
These services get called before any others. They are typically
|
|
used to prepare the console. For example, the service <span
|
|
class="code">weewx.wxengine.StdTimeSynch</span>, which is
|
|
responsible for making sure the console's clock is up to date, is
|
|
a member of this group.
|
|
</p>
|
|
<p class="config_option" id="process_services">process_services</p>
|
|
<p>Services in this group tend to process any incoming data.
|
|
They typically do things like quality control, or unit conversion,
|
|
or sensor calibration.</p>
|
|
<p class="config_option" id="archive_services">archive_services</p>
|
|
<p>Once data have been processed, services in this group archive
|
|
them.</p>
|
|
<p class="config_option" id="restful_services">restful_services</p>
|
|
<p>RESTful services, such as the Weather Underground, or CWOP,
|
|
are in this group. They need processed data that have been
|
|
archived, hence they are run after the preceeding groups.</p>
|
|
<p class="config_option" id="report_services">report_services</p>
|
|
<p>The various reporting services run in this group, including
|
|
the standard reporting engine.</p>
|
|
<p>For reference, here is the standard set of services that are
|
|
run with the default distribution.</p>
|
|
<pre class="tty">
|
|
prep_services = weewx.engine.StdTimeSynch
|
|
process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate
|
|
archive_services = weewx.engine.StdArchive
|
|
restful_services = weewx.restx.StdStationRegistry, weewx.restx.StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
|
|
report_services = weewx.engine.StdPrint, weewx.engine.StdReport
|
|
</pre>
|
|
<p>If you're the type who likes to clean out your car trunk after every
|
|
use it, then you may also be the type who wants to pare this down
|
|
to the bare minimum. However, this will only make a slight
|
|
difference in execution speed and memory use.</p>
|
|
|
|
<h1 id="configuring_hardware">Configuring hardware</h1>
|
|
<p>This section describes how to configure some of the more popular
|
|
station hardware.</p>
|
|
<p>Some stations can be configured using the
|
|
<span class='code'>wee_config_device</span> utility supplied with weewx.
|
|
This utility uses code in the hardware-specific driver to set EEPROM
|
|
constants, read station memory, set the station archive interval, set
|
|
the altitude, configure rain bucket types, and many other options,
|
|
depending on the hardware.</p>
|
|
<p>Note that some stations cannot be configured by software at all,
|
|
and some stations are only partly configurable by software.</p>
|
|
<p>Run the utility with the <span class='code'>--help</span> option
|
|
to see which options are available.</p>
|
|
<p class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --help </p>
|
|
<p>The utility requires a <span class='code'>weewx.conf</span> file.
|
|
If no file is specified, it will look for
|
|
<span class='code'>weewx.conf</span> in the standard location. If
|
|
your configuration file is in a non-standard location, specify the
|
|
path to the configuration file as the first argument. For example,</p>
|
|
<p class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device /path/to/weewx.conf --help </p>
|
|
|
|
|
|
<h2 id="wee_config_cc3000">CC3000</h2>
|
|
<p>The CC3000 data logger may be configured to return data in
|
|
METRIC or US units. These are not the same groups of METRIC and US
|
|
units as defined within <span class='code'>weewx</span>. However, the
|
|
CC3000 driver will convert to the appropriate units for the
|
|
<span class='code'>weewx</span> configuration.</p>
|
|
<p>The CC3000 data logger stores 2MB of records.</p>
|
|
<p>The CC3000 driver supports catchup on startup, but it does not
|
|
support hardware record generation.</p>
|
|
|
|
<p>When the <span class='code'>station_type</span> is
|
|
<span class='code'>CC3000</span>,
|
|
the <span class='code'>--help</span> option will produce output
|
|
something like this:</p>
|
|
<p class="tty">CC3000 driver version 0.8
|
|
Usage: wee_config_device [config_file] [options] [--debug] [--help]
|
|
|
|
Configuration utility for weewx devices.
|
|
|
|
Options:
|
|
-h, --help show this help message and exit
|
|
--debug display diagnostic information while running
|
|
-y answer yes to every prompt
|
|
--info display weather station configuration
|
|
--current display current weather readings
|
|
--history=N display N records (0 for all records)
|
|
--history-since=N display records since N minutes ago
|
|
--clear-memory clear station memory
|
|
--set-clock set station clock to computer time
|
|
--set-interval=N set logging interval to N minutes
|
|
--set-units=UNITS set units to METRIC or ENGLISH
|
|
|
|
Mutating actions will request confirmation before proceeding.</p>
|
|
|
|
<h3>Station information</h3>
|
|
<p>Display the station settings with the <span class='code'>--info</span>
|
|
option.</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --info </pre>
|
|
<p>This will result in something like this:</p>
|
|
<pre class='tty'>firmware: Rainwise CC-3000 Version: 1.3 Build 006 Sep 04 2013
|
|
time: 2014/06/02 08:22:17
|
|
units: ENGLISH
|
|
memory: 251372 bytes, 4334 records, 12%
|
|
interval: 1</pre>
|
|
|
|
<h3 id="cc3000_changing_the_archive_interval">Changing the archive interval</h3>
|
|
<p>CC3000 loggers ship from the factory with an archive interval
|
|
of 1 minutes (60 seconds). To change the station's
|
|
interval to 5 minutes, do the following:</p>
|
|
<p class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --set-interval=5</p>
|
|
|
|
|
|
<h2 id="wee_config_fousb">FineOffsetUSB</h2>
|
|
|
|
<p>The station clock can only be set manually via buttons on the
|
|
console, or (if the station supports it) by WWVB radio. The
|
|
FineOffsetUSB driver ignores the station clock since it cannot be
|
|
trusted.</p>
|
|
<p>The station reads data from the sensors every 48 seconds.
|
|
The 30xx stations read UV data every 60 seconds.</p>
|
|
<p>The 10xx and 20xx stations can save up to 4080 historical readings.
|
|
That is about 85 days of data with the default recording interval of
|
|
30 minutes, or about 14 days with a recording interval of 5 minutes.
|
|
The 30xx stations can save up to 3264 historical readings.</p>
|
|
<p>When <span class='code'>weewx</span> starts up it will attempt
|
|
to download all records from the console since the last record in
|
|
the archive database.</p>
|
|
|
|
<p>When the <span class='code'>station_type</span> is
|
|
<span class='code'>FineOffsetUSB</span>,
|
|
the <span class='code'>--help</span> option will produce output
|
|
something like this:</p>
|
|
<p class="tty">FineOffsetUSB driver version 1.7
|
|
Usage: wee_config_device [config_file] [options] [--debug] [--help]
|
|
|
|
Configuration utility for weewx devices.
|
|
|
|
Options:
|
|
-h, --help show this help message and exit
|
|
--debug display diagnostic information while running
|
|
-y answer yes to every prompt
|
|
--info display weather station configuration
|
|
--current get the current weather conditions
|
|
--history=N display N records
|
|
--history-since=N display records since N minutes ago
|
|
--clear-memory clear station memory
|
|
--set-time set station clock to computer time
|
|
--set-interval=N set logging interval to N minutes
|
|
--live display live readings from the station
|
|
--logged display logged readings from the station
|
|
--fixed-block display the contents of the fixed block
|
|
--check-usb test the quality of the USB connection
|
|
--check-fixed-block monitor the contents of the fixed block
|
|
--format=FORMAT format for output, one of raw, table, or dict
|
|
|
|
Mutating actions will request confirmation before proceeding.</p>
|
|
|
|
<h3>Station information</h3>
|
|
<p>Display the station settings with the <span class='code'>--info</span>
|
|
option.</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --info </pre>
|
|
<p>This will result in something like this:</p>
|
|
<pre class='tty'>Fine Offset station settings:
|
|
local time: 2013.02.11 18:34:28 CET
|
|
polling_mode: ADAPTIVE
|
|
|
|
abs_pressure: 933.3
|
|
current_pos: 592
|
|
data_changed: 0
|
|
<span class="highlight">data_count: 22</span>
|
|
date_time: 2007-01-01 22:49
|
|
hum_in_offset: 18722
|
|
hum_out_offset: 257
|
|
id: None
|
|
lux_wm2_coeff: 0
|
|
magic_1: 0x55
|
|
magic_2: 0xaa
|
|
model: None
|
|
rain_coef: None
|
|
<span class="highlight">read_period: 30</span>
|
|
<span class="highlight">rel_pressure: 1014.8</span>
|
|
temp_in_offset: 1792
|
|
temp_out_offset: 0
|
|
timezone: 0
|
|
unknown_01: 0
|
|
unknown_18: 0
|
|
version: 255
|
|
wind_coef: None
|
|
wind_mult: 0</pre>
|
|
<p><span class="highlight">Highlighted </span> values can be modified with the <span class='code'>wee_config_device</span> utility.</p>
|
|
|
|
<h3 id="fo_changing_the_archive_interval">Changing the archive interval</h3>
|
|
<p>Fine Offset stations ship from the factory with an archive interval
|
|
(read_period) of 30 minutes (1800 seconds). To change the station's
|
|
interval to 5 minutes, do the following:</p>
|
|
<p class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --set-interval=5</p>
|
|
|
|
<h3 id="fo_dumping_the_console_memory">Dumping the console memory</h3>
|
|
<p>Fine Offset stations store records in a circular buffer — once the buffer fills, the oldest records are replaced by newer records. The 1080 and 2080 consoles store up to 4080 records. The 3080 consoles store up to 3264 records. The <span class='code'>data_count</span> indicates how many records are in memory. The <span class='code'>read_period</span> indicates the number of minutes between records. <span class='code'>wee_config_device</span> can display these records in space-delimited, raw bytes, or dictionary format.</p>
|
|
<p>For example, to display the most recent 30 records from the console memory:</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --history=30</pre>
|
|
<p>To clear the console memory:</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --clear-memory</pre>
|
|
|
|
<h3>Checking the USB quality</h3>
|
|
<p>Use the <span class='code'>wee_config_device</span> utility to test the quality of the USB connection between computer and console. Poor quality USB cables, under-powered USB hubs, and other devices on the bus can interfere with communication.</p>
|
|
<p>To test the quality of the USB connection to the console:</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --check-usb</pre>
|
|
<p>Let the utility run for at least a few minutes, or possibly an hour or two. It is not unusual to see a few bad reads in an hour, but if you see many bad reads within a few minutes, consider replacing the USB cable, USB hub, or removing other devices from the bus.</p>
|
|
|
|
<h3 id="polling_mode_and_the_polling_interval">Polling mode and the polling interval</h3>
|
|
<p>When reading 'live' data, <span class='code'>weewx</span> can read as fast as possible, or at a user-defined period. This is controlled by the <span class='code'>polling_mode</span> parameter.
|
|
</p>
|
|
<table class='indent'>
|
|
<caption>Polling modes for Fine Offset stations</caption>
|
|
<tr class="first_row">
|
|
<td width='15%'>Mode</td>
|
|
<td width='30%'><span class='code'>weewx.conf</span></td>
|
|
<td>Notes</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="first_col">ADAPTIVE</td>
|
|
<td>
|
|
<p class='tty' style='margin:0'>[FineOffsetUSB]
|
|
polling_mode = ADAPTIVE</p>
|
|
</td>
|
|
<td>
|
|
<p>In this mode, <span class='code'>weewx</span> reads data from the station as often as possible, but at intervals that avoid communication between the console and the sensors. Nominally this results in reading data every 48 seconds.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="first_col">PERIODIC</td>
|
|
<td>
|
|
<p class='tty' style='margin:0'>[FineOffsetUSB]
|
|
polling_mode = PERIODIC
|
|
polling_interval = 60</p>
|
|
</td>
|
|
<td>
|
|
<p>In this mode, <span class='code'>weewx</span> reads data from the station every <span class='code'>polling_interval</span> seconds.</p>
|
|
<p>The console reads the sensors every 48 seconds (60 seconds for UV), so setting the <span class='code'>polling_interval</span> to a value less than 48 will result in duplicate readings.</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<h2 id="wee_config_te923">TE923</h2>
|
|
<p>The <span class='code'>wee_config_device</span> utility cannot
|
|
configure TE923 stations.</p>
|
|
<p>Some station models will recognize up to 5 remote
|
|
temperature/humidity sensor units. Use the hardware switch in each
|
|
sensor unit to identify sensors. Use the
|
|
<span class='code'>sensor_map</span> in
|
|
<span class='code'>weewx.conf</span> to map each sensor to a database
|
|
field.
|
|
</p>
|
|
<p>The station has either 200 or 3300 history records, depending on
|
|
the model. That is just over a day (200 records) or about 23 days
|
|
(3300 records) with an archive interval of 5 minutes.</p>
|
|
<p>The TE923 driver is not capable of reading archive records from
|
|
the station.</p>
|
|
|
|
|
|
<h2 id="wee_config_ultimeter">Ultimeter</h2>
|
|
<p>The <span class='code'>wee_config_device</span> utility cannot
|
|
configure Ultimeter stations.</p>
|
|
<p>The Ultimeter driver operates the Ultimeter in Data Logger Mode,
|
|
which results in sensor readings every 1/2 second or so.</p>
|
|
<p>The Ultimeter driver ignores the maximum, minimum, and average
|
|
values recorded by the station.</p>
|
|
|
|
|
|
<h2 id="wee_config_vantage">Vantage</h2>
|
|
<p>When the <span class='code'>station_type</span> is
|
|
<span class='code'>Vantage</span>,
|
|
the <span class='code'>--help</span> option will produce output
|
|
something like this:</p>
|
|
<p class="tty">Vantage driver version 3.0
|
|
Usage: wee_config_device [config_file] [--help] [--info] [--clear]
|
|
[--set-interval=SECONDS] [--set-altitude=FEET] [--set-barometer=inHg]
|
|
[--set-bucket=CODE] [--set-rain-year-start=MM]
|
|
[--set-offset=VARIABLE,OFFSET]
|
|
[--set-transmitter-type=CHANNEL,TYPE,TEMP,HUM]
|
|
[--set-time] [--set-dst=[AUTO|ON|OFF]]
|
|
[--set-tz-code=TZCODE] [--set-tz-offset=HHMM]
|
|
[--set-lamp=[ON|OFF]] [--dump] [--logger_summary=FILE]
|
|
[--start | --stop]
|
|
|
|
Configures the Davis Vantage weather station.
|
|
|
|
Options:
|
|
-h, --help show this help message and exit
|
|
--debug display diagnostic information while running
|
|
-y answer yes to every prompt
|
|
--info To print configuration, reception, and barometer
|
|
calibration information about your weather station.
|
|
--clear To clear the memory of your weather station.
|
|
--set-interval=SECONDS
|
|
Sets the archive interval to the specified number of
|
|
seconds. Valid values are 60, 300, 600, 900, 1800,
|
|
3600, or 7200.
|
|
--set-altitude=FEET Sets the altitude of the station to the specified
|
|
number of feet.
|
|
--set-barometer=inHg Sets the barometer reading of the station to a known
|
|
correct value in inches of mercury. Specify 0 (zero)
|
|
to have the console pick a sensible value.
|
|
--set-bucket=CODE Set the type of rain bucket. Specify '0' for 0.01
|
|
inches; '1' for 0.2 MM; '2' for 0.1 MM
|
|
--set-rain-year-start=MM
|
|
Set the rain year start (1=Jan, 2=Feb, etc.).
|
|
--set-offset=VARIABLE,OFFSET
|
|
Set the onboard offset for VARIABLE inTemp, outTemp,
|
|
extraTemp[1-7], inHumid, outHumid, extraHumid[1-7],
|
|
soilTemp[1-4], leafTemp[1-4], windDir) to OFFSET
|
|
(Fahrenheit, %, degrees)
|
|
--set-transmitter-type=CHANNEL,TYPE,TEMP,HUM
|
|
Set the transmitter type for CHANNEL (1-8), TYPE
|
|
(0=iss, 1=temp, 2=hum, 3=temp_hum, 4=wind, 5=rain,
|
|
6=leaf, 7=soil, 8=leaf_soil, 9=sensorlink, 10=none),
|
|
as extra TEMP station and extra HUM station (both 1-7,
|
|
if applicable)
|
|
--set-time Set the onboard clock to the current time.
|
|
--set-dst=AUTO|ON|OFF
|
|
Set DST to 'ON', 'OFF', or 'AUTO'
|
|
--set-tz-code=TZCODE Set timezone code to TZCODE. See your Vantage manual
|
|
for valid codes.
|
|
--set-tz-offset=HHMM Set timezone offset to HHMM. E.g. '-0800' for U.S.
|
|
Pacific Time.
|
|
--set-lamp=ON|OFF Turn the console lamp 'ON' or 'OFF'.
|
|
--start Start the logger.
|
|
--stop Stop the logger.
|
|
--dump Dump all data to the archive. NB: This may result in
|
|
many duplicate primary key errors.
|
|
--logger-summary=FILE
|
|
Save diagnostic summary to FILE (for debugging the
|
|
logger).
|
|
|
|
Mutating actions will request confirmation before proceeding.</p>
|
|
|
|
<h3>Station information</h3>
|
|
<p>Use the <span class="code">--info</span> option to display the
|
|
current EEPROM settings: </p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --info </pre>
|
|
<p>This will print out something like: </p>
|
|
<pre class="tty">Davis Vantage EEPROM settings:
|
|
|
|
CONSOLE TYPE: VantagePro2
|
|
|
|
CONSOLE FIRMWARE:
|
|
Date: Dec 11 2012
|
|
Version: 3.12
|
|
|
|
CONSOLE SETTINGS:
|
|
<span class="highlight">Archive interval: 300 (seconds)</span>
|
|
<span class="highlight">Altitude: 700 (foot)</span>
|
|
Wind cup type: large
|
|
<span class="highlight">Rain bucket type: 0.01 inches</span>
|
|
<span class="highlight">Rain year start: 10</span>
|
|
<span class="highlight">Onboard time: 2014-09-25 07:41:14</span>
|
|
|
|
CONSOLE DISPLAY UNITS:
|
|
Barometer: inHg
|
|
Temperature: degree_F
|
|
Rain: inch
|
|
Wind: mile_per_hour
|
|
|
|
CONSOLE STATION INFO:
|
|
Latitude (onboard): 45.7
|
|
Longitude (onboard): -121.6
|
|
<span class="highlight">Use manual or auto DST? AUTO</span>
|
|
<span class="highlight">DST setting: N/A</span>
|
|
<span class="highlight">Use GMT offset or zone code? ZONE_CODE</span>
|
|
<span class="highlight">Time zone code: 4</span>
|
|
<span class="highlight">GMT offset: N/A</span>
|
|
|
|
TRANSMITTERS:
|
|
<span class="highlight">Channel 1: iss</span>
|
|
<span class="highlight">Channel 2: (N/A)</span>
|
|
<span class="highlight">Channel 3: temp (as extra temperature 1)</span>
|
|
<span class="highlight">Channel 4: (N/A)</span>
|
|
<span class="highlight">Channel 5: (N/A)</span>
|
|
<span class="highlight">Channel 6: (N/A)</span>
|
|
<span class="highlight">Channel 7: (N/A)</span>
|
|
<span class="highlight">Channel 8: (N/A)</span>
|
|
|
|
RECEPTION STATS:
|
|
Total packets received: 10670
|
|
Total packets missed: 128
|
|
Number of resynchronizations: 0
|
|
Longest good stretch: 934
|
|
Number of CRC errors: 651
|
|
|
|
BAROMETER CALIBRATION DATA:
|
|
<span class="highlight">Current barometer reading: 29.834 inHg</span>
|
|
<span class="highlight">Altitude: 700 feet</span>
|
|
Dew point: 55 F
|
|
Virtual temperature: 59 F
|
|
Humidity correction factor: 27
|
|
Correction ratio: 1.025
|
|
Correction constant: +0.000 inHg
|
|
Gain: 0.000
|
|
Offset: -47.000
|
|
|
|
OFFSETS:
|
|
<span class="highlight">Wind direction: +0 deg</span>
|
|
<span class="highlight">Inside Temperature: +0.0 F</span>
|
|
<span class="highlight">Inside Humidity: +0%</span>
|
|
<span class="highlight">Outside Temperature: +0.0 F</span>
|
|
<span class="highlight">Outside Humidity: +0%</span>
|
|
<span class="highlight">Extra Temperature 1: +0.0 F</span></pre>
|
|
<p>The console version number is available only on consoles with firmware
|
|
dates after about 2006.</p>
|
|
<p><span class="highlight">Highlighted </span> values can be changed using this utility.</p>
|
|
|
|
<h3 id="vantage_time_zone">Time zone</h3>
|
|
<p>To set the time zone code to Central European Time (code 20):</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --set-tz-code=20</pre>
|
|
<p class="warning">You can set either the time zone code <em>or</em> the
|
|
time zone offset, but not both. </p>
|
|
|
|
<h3 id="vantage_archive_interval">Archive interval</h3>
|
|
<p>Valid archive intervals for the Davis Vantage stations are 60,
|
|
300, 600, 900, 1800, 3600, and 7200 seconds. However, if you are
|
|
ftp'ing lots of files to a server, setting it to 60 seconds
|
|
may not give enough time to have them all uploaded before the next
|
|
archive record is due. If this is the case, you should pick an
|
|
archive interval of at least 300 seconds, or trim the number of
|
|
files you are using.</p>
|
|
<p>To change the archive interval to 10 minutes (600 seconds):</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --set-interval=600</pre>
|
|
<p>I have found that a five minute (300 seconds) archive interval works
|
|
well for the Vantage stations. Because of the large amount of onboard
|
|
memory they carry, going to a larger interval does not have any real
|
|
advantages. </p>
|
|
|
|
<h3 id="vantage_rain_bucket_type">Rain bucket type</h3>
|
|
<p>Normally, this is set by Davis, but if you have replaced your bucket
|
|
with a different kind, you might want to reconfigure. For example, to
|
|
change to a 0.1 mm bucket (bucket code "2"), use the
|
|
following:</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --set-bucket=2</pre>
|
|
|
|
<h3 id="vantage_configuring_additional_sensors">Additional sensors</h3>
|
|
<p>If you have additional sensors for your Vantage station, you
|
|
can configure them using your console. However, if you have
|
|
a <a href="http://www.davisnet.com/weather/products/weather_product.asp?pnum=06316">Davis
|
|
Weather Envoy receiver</a>, it will not have a console! As an alternative,
|
|
the <span class='code'>weewx</span>
|
|
utility <span class="code">wee_config_device</span> lets
|
|
you do this from the command line.</p>
|
|
<p>For example, to add an extra temperature sensor to channel 3, do the following:</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --set-transmitter-type=3,1,2</pre>
|
|
<p>This says to turn on channel 3, set its type to 1 ("Temperature only"), and have it show up in the
|
|
database as <span class="code">extraTemp2</span>. Here's another example, this time for a combined
|
|
temperature / humidity sensor:</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --set-transmitter-type=5,3,2,4</pre>
|
|
<p>This will add the combined sensor to channel 5, set its type to 3 ("Temperature and humidity"),
|
|
and it will show up in the database
|
|
as <span class="code">extraTemp2</span> and <span class="code">extraHumid4</span>.</p>
|
|
<p>The <span class="code">--help</span> option will give you the code for each sensor type.</p>
|
|
|
|
<h3 id="vantage_setting_offsets">Setting offsets</h3>
|
|
<p>The Davis instruments can correct sensor errors by adding
|
|
an <em>offset</em> to their emitted values. This is particularly
|
|
useful for Southern Hemisphere users. Davis fits the wind vane
|
|
to the Integrated Sensor Suite (ISS) in a position optimized for
|
|
Northern Hemisphere users, who face the solar panel to the
|
|
south. Users south of the equator must orient the ISS's solar
|
|
panel to the north to get maximal insolation, resulting in a
|
|
180° error in the wind direction. The solution is to add a
|
|
180° offset correction. You can do this with the following
|
|
command:</p>
|
|
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --set-offset=windDir,180</pre>
|
|
|
|
<h3 id="vantage_dumping_the_logger_memory">Dumping the logger memory</h3>
|
|
<p>Generally, <span class="code">weewx</span> downloads only new archive
|
|
records from the on-board logger in the Vantage. However, occasionally the
|
|
memory in the Vantage will get corrupted, making this impossible. See the
|
|
troubleshooting section below <em><a href="#html_generated_but_not_updated">Weewx
|
|
generates HTML pages, but it does not update them</a></em>. The
|
|
fix involves clearing the memory but, unfortunately, this means you may
|
|
lose any data which might have accumulated in the logger memory, but not
|
|
yet downloaded. By using the <span class="code">--dump</span> command
|
|
before clearing the memory, you might be able to save these data. </p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --dump</pre>
|
|
<p>This will dump all data archived in the Vantage memory directly to the
|
|
database, without regard to whether or not they have been seen before.
|
|
Because the command dumps <em>all</em> data, it may result in many
|
|
duplicate primary key errors. These can be ignored.</p>
|
|
|
|
|
|
<h2 id="wee_config_wmr100">WMR100</h2>
|
|
<p>The <span class='code'>wee_config_device</span> utility cannot
|
|
configure WMR100 stations.</p>
|
|
<p>The station emits partial packets, which may confuse some online
|
|
services.</p>
|
|
|
|
|
|
<h2 id="wee_config_wmr200">WMR200</h2>
|
|
<p>The <span class='code'>wee_config_device</span> utility cannot
|
|
configure WMR200 stations.</p>
|
|
<p>The station emits partial packets, which may confuse some online
|
|
services.</p>
|
|
<p>When <span class='code'>weewx</span> starts up it will attempt to
|
|
download all records from the console since the last record in the
|
|
archive database.
|
|
</p>
|
|
|
|
|
|
<h2 id="wee_config_wmr9x8">WMR9x8</h2>
|
|
<p>The <span class='code'>wee_config_device</span> utility cannot
|
|
configure WMR9x8 stations.</p>
|
|
<p>The station includes a data logger, but the driver does not read
|
|
records from the station.</p>
|
|
<p>The station emits partial packets, which may confuse some online
|
|
services.</p>
|
|
|
|
|
|
<h2 id="wee_config_ws1">WS1</h2>
|
|
<p>The <span class='code'>wee_config_device</span> utility cannot
|
|
configure WS1 stations.</p>
|
|
<p>The WS1 stations produce data every 1/2 second or so.</p>
|
|
|
|
|
|
<h2 id="wee_config_ws23xx">WS23xx</h2>
|
|
<p>The hardware interface is a serial port, but USB-serial converters
|
|
can be used with computers that have no serial port. Beware that
|
|
not every type of USB-serial converter will work. Converters based
|
|
on ATEN UC-232A chipset are known to work.</p>
|
|
<p>The station does not record wind gust or wind gust direction.</p>
|
|
<p>The hardware calculates windchill and dewpoint.</p>
|
|
<p>The station has 175 history records. That is just over 7 days
|
|
of data with the factory default history recording interval of 60
|
|
minutes, or about 14 hours with a recording interval of 5 minutes.</p>
|
|
<p>When <span class='code'>weewx</span> starts up it will attempt
|
|
to download all records from the console since the last record in
|
|
the archive database.</p>
|
|
|
|
<p>When the <span class='code'>station_type</span> is
|
|
<span class='code'>WS23xx</span>,
|
|
the <span class='code'>--help</span> option will produce output
|
|
something like this:</p>
|
|
<p class="tty">WS23xx driver version 0.21
|
|
Usage: wee_config_device [config_file] [options] [--debug] [--help]
|
|
|
|
Configuration utility for weewx devices.
|
|
|
|
Options:
|
|
-h, --help show this help message and exit
|
|
--debug display diagnostic information while running
|
|
-y answer yes to every prompt
|
|
--info display weather station configuration
|
|
--current get the current weather conditions
|
|
--history=N display N history records
|
|
--history-since=N display history records since N minutes ago
|
|
--clear-memory clear station memory
|
|
--set-time set the station clock to the current time
|
|
--set-interval=N set the station archive interval to N minutes
|
|
|
|
Mutating actions will request confirmation before proceeding.</p>
|
|
|
|
<h3>Station information</h3>
|
|
<p>Display the station settings with the <span class='code'>--info</span>
|
|
option.</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --info </pre>
|
|
<p>This will result in something like this:</p>
|
|
<pre class='tty'>buzzer: 0
|
|
connection time till connect: 1.5
|
|
connection type: 15
|
|
dew point: 8.88
|
|
dew point max: 18.26
|
|
dew point max alarm: 20.0
|
|
dew point max alarm active: 0
|
|
dew point max alarm set: 0
|
|
dew point max when: 978565200.0
|
|
dew point min: -2.88
|
|
dew point min alarm: 0.0
|
|
dew point min alarm active: 0
|
|
dew point min alarm set: 0
|
|
dew point min when: 978757260.0
|
|
forecast: 0
|
|
history interval: 5.0
|
|
history last record pointer: 8.0
|
|
history last sample when: 1385564760.0
|
|
history number of records: 175.0
|
|
history time till sample: 5.0
|
|
icon alarm active: 0
|
|
in humidity: 48.0
|
|
...</pre>
|
|
|
|
<h3 id="ws23xx_changing_the_archive_interval">Changing the archive interval</h3>
|
|
<p>WS23xx stations ship from the factory with an archive interval of 60
|
|
minutes (3600 seconds). To change the station's interval to 5 minutes,
|
|
do the following:</p>
|
|
<p class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --set-interval=5</p>
|
|
<p class="warning"><strong>Warning!</strong><br/>
|
|
Changing the recording interval will clear the station memory.</p>
|
|
|
|
<h3 id="ws23xx_dumping_the_console_memory">Dumping the console memory</h3>
|
|
<p>WS23xx stations store records in a circular buffer - once the
|
|
buffer fills, the oldest records are replaced by newer records. The
|
|
console stores up to 175 records.
|
|
The <span class='code'>history number of records</span> indicates how
|
|
many records are in memory. The
|
|
<span class='code'>history interval</span> indicates the number of
|
|
minutes between records.</p>
|
|
<p>For example, to display the latest 30 records from the console memory:</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --history=30</pre>
|
|
<p>To clear the console memory:</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --clear-memory</pre>
|
|
|
|
|
|
<h2 id="wee_config_ws28xx">WS28xx</h2>
|
|
<p><span class='code'>weewx</span> communicates with a USB transceiver,
|
|
which communicates with the station console, which in turn communicates
|
|
with the sensors. The transceiver and console must be paired and
|
|
synchronized.</p>
|
|
<p>The station has 1797 history records. That is just over 6 days
|
|
of data with an archive interval of 5 minutes.</p>
|
|
<p>When <span class='code'>weewx</span> starts up it will attempt to
|
|
download all records from the console since the last record in the
|
|
archive database.
|
|
</p>
|
|
<p>The WS28xx driver sets the station archive interval to
|
|
5 minutes.</p>
|
|
<p>The WS28xx driver does not support hardware archive record
|
|
generation.</p>
|
|
|
|
<p>When the <span class='code'>station_type</span> is
|
|
<span class='code'>WS28xx</span>,
|
|
the <span class='code'>--help</span> option will produce output
|
|
something like this:</p>
|
|
<p class="tty">WS28xx driver version 0.33
|
|
Usage: wee_config_device [config_file] [options] [--debug] [--help]
|
|
|
|
Configuration utility for weewx devices.
|
|
|
|
Options:
|
|
-h, --help show this help message and exit
|
|
--debug display diagnostic information while running
|
|
-y answer yes to every prompt
|
|
--check-transceiver check USB transceiver
|
|
--pair pair the USB transceiver with station console
|
|
--info display weather station configuration
|
|
--set-interval=N set logging interval to N minutes
|
|
--current get the current weather conditions
|
|
--history=N display N history records
|
|
--history-since=N display history records since N minutes ago
|
|
--maxtries=MAXTRIES maximum number of retries, 0 indicates no max
|
|
|
|
Mutating actions will request confirmation before proceeding.</p>
|
|
|
|
<h3>Pairing</h3>
|
|
<p>The console and transceiver must be paired. Pairing ensures that your
|
|
transceiver is talking to your console, not your neighbor's console.
|
|
Pairing should only have to be done once, although you might have to
|
|
pair again after power cycling the console, for example after you replace
|
|
the batteries.</p>
|
|
<p>There are two ways to pair the console and the transceiver:</p>
|
|
<ol>
|
|
<li><strong>The Weewx way.</strong> Be sure that
|
|
<span class='code'>weewx</span> is not running.
|
|
Run the configuration utility,
|
|
press and hold the [v] button on the console until you see
|
|
'PC' in the display, then release the button. If the console pairs
|
|
with the transceiver, 'PC' will go away within a second or two.
|
|
<p class='tty'>wee_config_device --pair
|
|
|
|
Pairing transceiver with console...
|
|
Press and hold the [v] key until "PC" appears (attempt 1 of 3)
|
|
Transceiver is paired to console</p>
|
|
</li>
|
|
<li><strong>The HeavyWeather way.</strong> Follow the pairing
|
|
instructions that came with the station. You will have to run
|
|
HeavyWeather on a windows computer with the USB transceiver. After
|
|
HeavyWeather indicates the devices are paired, put the USB transceiver
|
|
in your <span class="code">weewx</span> computer and start weewx.
|
|
Do not power cycle the station console or you will have to start
|
|
over.</li>
|
|
</ol>
|
|
|
|
<p>If the console does not pair, you will see messages in the log such as
|
|
this:</p>
|
|
<pre class='tty'>ws28xx: RFComm: message from console contains unknown device ID (id=165a resp=80 req=6)</pre>
|
|
<p>Either approach to pairing may require multiple attempts.</p>
|
|
|
|
<h3>Synchronizing</h3>
|
|
<p>After pairing, the transceiver and console must be synchronized in
|
|
order to communicate. Synchronization will happen automatically at the
|
|
top of each hour, or you can force synchronization by pressing the [SET]
|
|
button momentarily. Do not press and hold the [SET] button - that
|
|
modifies the console alarms.</p>
|
|
<p>When the transceiver and console are synchronized, you will see lots of
|
|
'<span class="code">ws28xx: RFComm</span>' messages in the log when <span class="code">debug=1</span>. When the devices are
|
|
not synchronized, you will see messages like this about every 10
|
|
minutes:</p>
|
|
<pre class='tty'>Nov 7 19:12:17 raspi weewx[2335]: ws28xx: MainThread: no contact with console</pre>
|
|
<p>If you see this, or if you see an extended gap in the weather data
|
|
in the <span class="code">weewx</span> plots, press momentarily the [SET] button, or wait until
|
|
the top of the hour.</p>
|
|
<p>When the transceiver has not received new data for awhile, you will see
|
|
messages like this in the log:</p>
|
|
<pre class='tty'>Nov 7 19:12:17 raspi weewx[2335]: ws28xx: MainThread: no new weather data</pre>
|
|
<p>If you see 'no new weather data' messages with the
|
|
'no contact with console' messages,
|
|
it simply means that the transceiver has not been able to synchronize
|
|
with the console. If you see only the 'no new weather data' messages,
|
|
then the sensors are not communicating with the console, or the console
|
|
may be defective.</p>
|
|
|
|
<h3>Station information</h3>
|
|
<p>Display the station settings with the <span class='code'>--info</span>
|
|
option.</p>
|
|
<p class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --info </p>
|
|
<p>This will result in something like this:</p>
|
|
<p class='tty'>alarm_flags_other: 0
|
|
alarm_flags_wind_dir: 0
|
|
checksum_in: 1327
|
|
checksum_out: 1327
|
|
format_clock: 1
|
|
format_pressure: 0
|
|
format_rain: 1
|
|
format_temperature: 0
|
|
format_windspeed: 4
|
|
history_interval: 1
|
|
indoor_humidity_max: 70
|
|
indoor_humidity_max_time: None
|
|
indoor_humidity_min: 45
|
|
indoor_humidity_min_time: None
|
|
indoor_temp_max: 40.0
|
|
indoor_temp_max_time: None
|
|
indoor_temp_min: 0.0
|
|
indoor_temp_min_time: None
|
|
lcd_contrast: 4
|
|
low_battery_flags: 0
|
|
outdoor_humidity_max: 70
|
|
outdoor_humidity_max_time: None
|
|
outdoor_humidity_min: 45
|
|
outdoor_humidity_min_time: None
|
|
outdoor_temp_max: 40.0
|
|
outdoor_temp_max_time: None
|
|
outdoor_temp_min: 0.0
|
|
outdoor_temp_min_time: None
|
|
pressure_max: 1040.0
|
|
pressure_max_time: None
|
|
pressure_min: 960.0
|
|
pressure_min_time: None
|
|
rain_24h_max: 50.0
|
|
rain_24h_max_time: None
|
|
threshold_storm: 5
|
|
threshold_weather: 3
|
|
wind_gust_max: 12.874765625
|
|
wind_gust_max_time: None</p>
|
|
|
|
<h3>Alarms</h3>
|
|
<p>When an alarm goes off, communication with the transceiver stops.
|
|
The WS28xx driver clears all alarms in the station. It is better to
|
|
create alarms in weewx, and the <span class="code">weewx</span> alarms
|
|
can do much more than the console alarms anyway.</p>
|
|
|
|
|
|
<h1 id="configuring_mysql">Configuring MySQL</h1>
|
|
<p>This section applies only to those who wish to use the MySQL
|
|
database, instead of the default SQLite database.</p>
|
|
<p>
|
|
First, you should change your <a href="#wx_binding"><span class="code">[[wx_binding]]</span></a>
|
|
section to point to MySQL, instead of SQLite. After the change, it
|
|
will look something like this (change <span class="highlight">highlighted</span>):
|
|
</p>
|
|
<pre class="tty">
|
|
[[wx_binding]]
|
|
# The database should match one of the sections in [Databases]
|
|
<span class="highlight">database = archive_mysql</span>
|
|
# The name of the table within the database
|
|
table_name = archive
|
|
# The class to manage the database
|
|
manager = weewx.wxmanager.WXDaySummaryManager
|
|
# The schema defines to structure of the database contents
|
|
schema = schemas.wview.schema</pre>
|
|
|
|
<p>Assuming that you want to use the default database configuration, your
|
|
<span class="code"><a href="#Databases">[Databases]</a></span> section
|
|
should
|
|
look something like this:</p>
|
|
<pre class="tty">[Databases]
|
|
[[archive_mysql]]
|
|
host = localhost
|
|
user = weewx
|
|
password = weewx
|
|
database_name = weewx
|
|
driver = weedb.mysql
|
|
</pre>
|
|
<p>This assumes user <span class="code">weewx</span> would have password <span class="code">weewx</span>.
|
|
Adjust as necessary.</p>
|
|
<p>You will need to give the necessary permissions for the database <span class="code">weewx</span>
|
|
to whatever MySQL user you choose, by
|
|
default, user <span class="code">weewx</span>. Here are the necessary minimum
|
|
permissions:</p>
|
|
<pre class="tty">mysql> CREATE USER 'weewx'@'localhost' IDENTIFIED BY 'weewx';
|
|
mysql> GRANT select, update, create, delete, insert ON weewx.* TO weewx@localhost;</pre>
|
|
|
|
<h1 id="running">Running <span class="code">weewx</span></h1>
|
|
<p><span class="code">Weewx</span> can be run either directly,
|
|
or as a daemon. When first trying
|
|
<span class="code">weewx</span>, it is best to run it directly
|
|
because you will be able to see sensor output and diagnostics, as well
|
|
as log messages. Once everything is working properly, run it as a
|
|
daemon.</p>
|
|
|
|
<h2>Running directly</h2>
|
|
<p>To run <span class="code">weewx</span> directly, invoke
|
|
the main program, <span class="code">weewxd</span>, giving
|
|
the configuration file as its only parameter: </p>
|
|
<pre class="tty">sudo <span class="symcode">$BIN_ROOT</span>/weewxd <span class="symcode">$CONFIG_ROOT</span>/weewx.conf</pre>
|
|
<p>It should start by downloading any data stored in your weather station
|
|
(if the station has a data logger) into the archive database. For some
|
|
stations, such as the Davis Vantage with a couple thousand records, this
|
|
could take a minute or two. I have found this process particularly slow
|
|
on SuSE for some reason. </p>
|
|
<p><span class="code">Weewx</span> will then start monitoring live sensor
|
|
data (also referrred to as 'LOOP' data),
|
|
printing a short version of the received data on standard output, about
|
|
once every two seconds for a Vantage station, or considerably longer
|
|
for some other stations. </p>
|
|
<p>You can tell a running instance of <span class="code">weewx</span> to
|
|
reread its configuration file by sending it the
|
|
<span class="code">HUP</span> signal.
|
|
First run <span class="code">ps</span> to find out the Process ID (PID)
|
|
number of the instance, then send it the <span class="code">HUP</span> signal: </p>
|
|
<pre class="tty">ps -a # Note the PID of the weewxd process
|
|
kill -HUP <em>pid</em> # Send it a HUP signal</pre>
|
|
<p>Note that this <em>only</em> rereads the configuration file. It will
|
|
not reload any code.</p>
|
|
|
|
<h2>Running as a daemon</h2>
|
|
<p>For unattended operations it is best to have <span class="code">weewx</span>
|
|
run as a daemon, started automatically when the server is rebooted. </p>
|
|
<p>If you use a packaged install from a DEB or RPM distribution, this is
|
|
done automatically. You can ignore this section.</p>
|
|
<p>Start by selecting the appropriate run script. They can be found under
|
|
<span class="symcode">$WEEWX_ROOT</span><span class="code">/util/init.d/</span>. </p>
|
|
<table class="locations" style="width:90%">
|
|
<tr>
|
|
<td style='width:30%'>Debian/Ubuntu/Mint:</td>
|
|
<td class='tty'><span class="symcode">$WEEWX_ROOT</span><span class="code">/util/init.d/weewx.debian</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td >Redhat/CentOS/Mint:</td>
|
|
<td class='tty'><span class="symcode">$WEEWX_ROOT</span><span class="code">/util/init.d/weewx.redhat</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td>SuSE:</td>
|
|
<td class='tty'><span class="symcode">$WEEWX_ROOT</span><span class="code">/util/init.d/weewx.suse</span></td>
|
|
</tr>
|
|
</table>
|
|
<p>Check the chosen script to make sure the variable <span class="code">WEEWX_ROOT</span>
|
|
has been set to the proper root directory for your
|
|
<span class="code">weewx</span> installation (it should have been set to the correct value automatically
|
|
by the install process, but it is worth checking). </p>
|
|
<p>Copy it to the proper location for your system: </p>
|
|
<table class="locations" style="width:90%">
|
|
<tr>
|
|
<td style="width: 30%">Debian/Ubuntu/Mint:</td>
|
|
<td class='tty'>cp <span class="symcode">$WEEWX_ROOT</span><span class="code">/util/init.d/weewx.debian /etc/init.d/weewx</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Redhat/CentOS/Fedora:</td>
|
|
<td class='tty'>cp <span class="symcode">$WEEWX_ROOT</span><span class="code">/util/init.d/weewx.redhat /etc/rc.d/init.d/weewx</span></td>
|
|
</tr>
|
|
<tr>
|
|
<td>SuSE:</td>
|
|
<td class='tty'>cp <span class="symcode">$WEEWX_ROOT</span><span class="code">/util/init.d/weewx.suse /etc/init.d/weewx</span></td>
|
|
</tr>
|
|
</table>
|
|
<p>Make sure the script is executable: </p>
|
|
<table class="locations" style="width:90%">
|
|
<tr>
|
|
<td style="width: 30%">Debian/Ubuntu/Mint:</td>
|
|
<td class='tty'>chmod +x /etc/init.d/weewx</td>
|
|
</tr>
|
|
<tr>
|
|
<td >Redhat/CentOS/Fedora:</td>
|
|
<td class='tty'>chmod +x /etc/init.d/rc.d/weewx</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SuSE:</td>
|
|
<td class='tty'>chmod +x /etc/init.d/weewx</td>
|
|
</tr>
|
|
</table>
|
|
<p>Create symbolic links in the run level directories: </p>
|
|
<table class="locations" style="width:90%">
|
|
<tr>
|
|
<td style="width: 30%">Debian/Ubuntu/Mint:</td>
|
|
<td class='tty'>update-rc.d weewx defaults 98</td>
|
|
</tr>
|
|
<tr>
|
|
<td >Redhat/CentOS/Fedora:</td>
|
|
<td class='tty'>chkconfig weewx on</td>
|
|
</tr>
|
|
<tr>
|
|
<td>SuSE:</td>
|
|
<td class='tty'>/usr/lib/lsb/install_initd /etc/init.d/weewx</td>
|
|
</tr>
|
|
</table>
|
|
<p><span class="code">Weewx</span> will now start automatically whenever your
|
|
system is booted. You can also manually start, stop, and restart the
|
|
<span class="code">weewx</span> daemon: </p>
|
|
<pre class="tty">sudo /etc/init.d/weewx start
|
|
sudo /etc/init.d/weewx stop
|
|
sudo /etc/init.d/weewx restart</pre>
|
|
<p>By default, the scripts are designed to have <span class="code">weewx</span>
|
|
run at run levels 2, 3, 4 and 5. Incidentally, a nice tool for setting run levels
|
|
with Debian (Ubuntu, Mint) systems is
|
|
<a href="http://sysv-rc-conf.sourceforge.net/">sysv-rc-conf</a>. It uses a curses
|
|
interface to allow you to change easily which run level any of your daemons
|
|
runs at. There is a similar tool on SuSE. From the start menu run the YAST Control
|
|
Center, then look for Systems Services (Runlevel). Pick "Expert" mode
|
|
to see the run levels. </p>
|
|
<p>You can also tell <span class="code">weewx</span> to reread its configuration
|
|
file without stopping by using the 'reload' option: </p>
|
|
<pre class="tty">sudo /etc/init.d/weewx reload </pre>
|
|
|
|
<h1 id="monitoring">Monitoring <span class="code">weewx</span></h1>
|
|
<p><span class="code">Weewx</span> logs many events to the system log.
|
|
On Debian systems, this is <span class="code">/var/log/syslog</span>,
|
|
on SuSE, <span class="code">/var/log/messages</span>. Your system may
|
|
use yet another place. When troubleshooting the system, be sure to check
|
|
it! </p>
|
|
<p class='tty'>tail -f /var/log/syslog</p>
|
|
|
|
<p>Set the debug option in <span class='code'>weewx.conf</span> to
|
|
generate many more checks and output more information. This can be
|
|
useful for diagnosing problems and debugging.</p>
|
|
<p class='tty'>debug = 1</p>
|
|
|
|
<h1 id="wview_compatibility">Compatibility with <span class="code">wview</span></h1>
|
|
<h2>sqlite3</h2>
|
|
<p>The SQLite archive database used by <span class="code">weewx</span>
|
|
(nominally, <span class="code">weewx.sdb</span>) is completely
|
|
compatible with the database used by
|
|
<a href="http://www.wviewweather.com">wview</a> (usually called
|
|
<span class="code">wview-archive.sdb</span>), at least as of wview
|
|
Version 5.2.X. The schema, and its semantics, is identical.
|
|
</p>
|
|
<p>If you have data from <span class='code'>wview</span>, you can
|
|
'import' them into <span class='code'>weewx</span> by simply copying the
|
|
SQLite database
|
|
file. Assuming that the <span class='code'>wview</span> data are in file <span class='code'>/var/wview/archive/wview-archive.sdb</span>,</p>
|
|
<p class='tty'>sudo /etc/init.d/weewx stop
|
|
cd <span class="symcode">$SQLITE_ROOT</span>
|
|
mv weewx.sdb weewx.sdb.bak
|
|
cp /var/wview/archive/wview-archive.sdb weewx.sdb
|
|
sudo /etc/init.d/weewx start</p>
|
|
<p>
|
|
Internally, within the <span class="code">weewx.sdb</span> database,
|
|
<span class="code">weewx</span> also maintains a "daily summary" of all the statistics. This
|
|
is done for performance reasons. The daily summary will
|
|
automatically be built on the first startup. This could take
|
|
a few minutes if the <span class='code'>wview</span> archive contains
|
|
more than a month or two of data.
|
|
</p>
|
|
<p>
|
|
On my modest 500 MHz <a href="http://www.fit-pc.com/">fit-PC
|
|
Slim</a> with 512 MB of memory it took a little over 4 minutes for a
|
|
year and a half (25 MB) of data.
|
|
</p>
|
|
|
|
<h2>MySQL</h2>
|
|
<p>The MySQL archive database used by wview is "almost" compatible with
|
|
<span class="code">weewx</span>. The one difference is that in wview, the column <span class="code">interval</span>
|
|
is named <span class="code">arcInt</span> (presumably because
|
|
<span class="code">interval</span> is a keyword in MySQL, although it can
|
|
still be used by surrounding the word with backquotes). </p>
|
|
<p>To change the column name to what <span class="code">weewx</span> uses, namely <span class="code">interval</span>,
|
|
use the utility <span class="code">mysql</span> and issue the command:</p>
|
|
<pre class="tty">ALTER TABLE <em>your-wview-archive-name</em> CHANGE arcInt `interval` INTEGER NOT NULL; </pre>
|
|
<p>where <span class="code"><em>your-wview-archive-name</em></span> is the
|
|
name of your wview archive database. Note that the word <span class="code">
|
|
interval</span> is surrounded by backquotes.</p>
|
|
<p>Then in the <span class="code">[Databases]</span> section of
|
|
<span class="code">weewx.conf</span>, replace the name of the database
|
|
with whatever your installation of wview used <span class="code"><em>your-wview-archive-name</em></span>:</p>
|
|
<pre class="tty">[[archive_mysql]]
|
|
host = ...
|
|
user = ...
|
|
database_name = <em>your-wview-archive-name</em></pre>
|
|
|
|
|
|
<h1 id="integrating_with_webserver">Integrating with a web server</h1>
|
|
<h2>If the server is on the same machine</h2>
|
|
<p>The reports generated by <span class='code'>weewx</span> can be
|
|
served by a web server running on the same computer as
|
|
<span class='code'>weewx</span>. Here's how.</p>
|
|
|
|
<p>First, install a web server on the computer on which
|
|
<span class='code'>weewx</span> is running. For example, on Debian
|
|
systems:</p>
|
|
<p class='tty'>sudo apt-get install apache2</p>
|
|
<p>Then, if <span class='code'>weewx</span> was installed from DEB or RPM
|
|
package, simply enter the <span class='code'>weewx</span> URL in a web
|
|
browser in order to see your webpages.</p>
|
|
<p class='tty'>http://localhost/weewx</p>
|
|
<p>Alternatively, if <span class='code'>weewx</span> was installed using
|
|
<span class='code'>setup.py</span>, copy the Apache configuration
|
|
snippet that comes with <span class="code">weewx</span> to the apache configuration directory, then restart
|
|
Apache:</p>
|
|
<p class='tty'>sudo cp util/apache/conf.d/weewx.conf /etc/apache2/conf.d
|
|
sudo /etc/init.d/apache2 restart</p>
|
|
<p>Be sure that the path in the Apache configuration snippet matches the <span class='code'>HTML_ROOT</span> defined in the
|
|
<span class='code'>weewx</span> configuration file.</p>
|
|
<p class='tty'>Alias /weewx <strong>/home/weewx/public_html</strong>
|
|
<Directory <strong>/home/weewx/public_html</strong>>
|
|
Options FollowSymlinks
|
|
AllowOverride None
|
|
Order allow,deny
|
|
Allow from all
|
|
</Directory></p>
|
|
<p>Then open the <span class='code'>weewx</span> URL in a web browser:</p>
|
|
<p class='tty'>http://localhost/weewx</p>
|
|
|
|
<h2>If the server is on a different machine</h2>
|
|
<p>Use the FTP or RSYNC 'reports' to upload to a web server. Either of
|
|
these will copy everything from the <span class='code'>HTML_ROOT</span>
|
|
directory to a location on the remote server on which the web server
|
|
is running.</p>
|
|
|
|
|
|
<h1 id="backup">Making backups</h1>
|
|
<p>
|
|
To backup a <span class='code'>weewx</span> installation, make a copy of
|
|
the weewx configuration, weather data, skins/templates, and custom code.
|
|
In most cases these can be copied while weewx is running. The location
|
|
of these files depends on which method was used to install
|
|
<span class='code'>weewx</span>.
|
|
</p>
|
|
<p>
|
|
It is not necessary to backup the images and HTML files generated from
|
|
templates, since weewx will easily create those again. This includes
|
|
the NOAA reports in some skins.
|
|
</p>
|
|
<h2>Configuration</h2>
|
|
<p>
|
|
Save the <span class='code'>weewx.conf</span> file.
|
|
</p>
|
|
<table class="locations" style="width:70%">
|
|
<tr>
|
|
<td style="width: 30%">setup.py:</td>
|
|
<td class='tty'>/home/weewx/weewx.conf</td>
|
|
</tr>
|
|
<tr>
|
|
<td >DEB/RPM:</td>
|
|
<td class='tty'>/etc/weewx/weewx.conf</td>
|
|
</tr>
|
|
</table>
|
|
<h2>Weather data</h2>
|
|
<p>
|
|
Meteorological data are saved in the
|
|
archive database. For a SQLite
|
|
configuration, simply save the <span class='code'>weewx.sdb</span>
|
|
file. For a MySQL configuration, save a dump of the archive database.
|
|
</p>
|
|
<table class="locations" style="width:70%">
|
|
<tr>
|
|
<td style="width: 30%">setup.py:</td>
|
|
<td class='tty'>/home/weewx/archive/weewx.sdb</td>
|
|
</tr>
|
|
<tr>
|
|
<td >DEB/RPM:</td>
|
|
<td class='tty'>/var/lib/weewx/weewx.sdb</td>
|
|
</tr>
|
|
</table>
|
|
<h2>Skins and templates</h2>
|
|
<p>
|
|
Save the contents of the skins directory if you have modified the default
|
|
skin or if you have added any new skins or template files.
|
|
</p>
|
|
<table class="locations" style="width:70%">
|
|
<tr>
|
|
<td style="width: 30%">setup.py:</td>
|
|
<td class='tty'>/home/weewx/skins</td>
|
|
</tr>
|
|
<tr>
|
|
<td >DEB/RPM:</td>
|
|
<td class='tty'>/etc/weewx/skins</td>
|
|
</tr>
|
|
</table>
|
|
<h2>Other customizations</h2>
|
|
<p>
|
|
Save the contents of the
|
|
<span class='code'>user</span> directory if you have modified the
|
|
database schema or added any extensions. If the extensions save data
|
|
to a database you should backup those databases as well.
|
|
</p>
|
|
<table class="locations" style="width:70%">
|
|
<tr>
|
|
<td style="width: 30%">setup.py:</td>
|
|
<td class='tty'>/home/weewx/bin/user</td>
|
|
</tr>
|
|
<tr>
|
|
<td >DEB/RPM:</td>
|
|
<td class='tty'>/usr/share/weewx/user</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Restoring from backup</h2>
|
|
<p>
|
|
To restore from backup, do a fresh install of
|
|
<span class='code'>weewx</span> then replace the default files with
|
|
those from a backup. Then start <span class='code'>weewx</span>.
|
|
</p>
|
|
|
|
|
|
<h1 id="troubleshooting">Troubleshooting</h1>
|
|
<p>This section lists some common problems installing and running
|
|
<span class="code">weewx</span>. If you are still stuck, be sure to: </p>
|
|
<ul>
|
|
<li style="margin-bottom: 1em">Set the option <span
|
|
class="code">debug</span> to <span class="code">1</span> in <span
|
|
class='code'>weewx.conf</span>. This will put much more
|
|
information in the log file, which can be very useful for
|
|
troubleshooting and debugging!
|
|
<p class='tty' style="margin-top: 1em">debug = 1</p>
|
|
</li>
|
|
<li style="margin-bottom: 1em">Look at the <a href="#monitoring">log file</a>. I am
|
|
always happy to take questions, but the first thing I will ask
|
|
is, "Did you look at the log file?"
|
|
<p class='tty' style="margin-top: 1em">sudo tail -f /var/log/syslog</p>
|
|
</li>
|
|
<li style="margin-bottom: 1em">Run <span class="code">weewxd</span> directly from
|
|
the command line, rather than as a
|
|
daemon. Generally, <span class="code">weewx</span> will catch
|
|
and log any unrecoverable exceptions. But if you are getting
|
|
strange results, it is worth running directly and looking for
|
|
any clues.
|
|
<p class='tty' style="margin-top: 1em">sudo <span class="symcode">$BIN_ROOT</span>/weewxd <span class="symcode">$CONFIG_ROOT</span>/weewx.conf</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<h2>Hardware problems</h2>
|
|
|
|
<h3>Tips on making a system reliable</h3>
|
|
<p>If you are having problems keeping your weather station up for long
|
|
periods of time, here are some tips, in decreasing order of importance:
|
|
</p>
|
|
|
|
<div class='image image-right' style='width:205px'>
|
|
<a href="images/ferrites.jpg"><img src="images/ferrites.jpg" width='200' border='1' alt="Ferrite coils" longdesc="Cable connection looped through a ferrite coil" /></a>
|
|
<div class='image_caption'>Ferrite coils on a Davis Envoy. There are two
|
|
coils, one on the USB connection (top wire) and one on the power
|
|
supply. Both have loops. Click for larger picture.</div>
|
|
</div>
|
|
<ul>
|
|
<li>Run on dedicated hardware. If you are using the server for other
|
|
tasks, particularly as your desktop machine, you will have reliability
|
|
problems. If you are using it as a print or network server, you will
|
|
probably be OK.
|
|
</li>
|
|
<li>Run headless. Modern graphical systems are extremely complex. As new
|
|
features are added, test suites do not always catch up. Your system
|
|
will be much more reliable if you run it without a windowing system (X
|
|
Windows, in the case of Linux). </li>
|
|
<li>Use an Uninterruptible Power Supply (UPS). The vast majority of power
|
|
glitches are very short lived — just a second or two — so
|
|
you do not need a big one. The 425VA unit I use to protect my fit-PC
|
|
cost $55 at Best Buy.</li>
|
|
<li>If you buy a Davis VantagePro and your computer has an old-fashioned
|
|
serial port, get the VantagePro with a serial connection, not a USB
|
|
connection. See the section on <a href="#davis_cp2101_converter">Davis
|
|
cp2101 converter problems</a> for details. </li>
|
|
<li>If you do use a USB connection, put a ferrite coil on each end of
|
|
the cable to your console. If you have enough length and the ferrite
|
|
coil is big enough, make a loop so it goes through the coil twice.
|
|
See the figure at right.
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Establishing connectivity</h3>
|
|
<p>If you are unable to get anything out of <span class="code">weewx</span>
|
|
first check that you have connectivity to your weather station. For the
|
|
Davis stations, you can use a terminal emulator to run a simple test.
|
|
Set it up to communicate using the appropriate port and baudrate. I
|
|
like <span class="code">minicom</span> because it can be run from
|
|
through a simple TTY connection. The utility
|
|
<span class="code">screen</span> also works well. For example:</p>
|
|
<pre class="tty">minicom -b 19200 -D /dev/ttyUSB0</pre>
|
|
<p>or, using <span class='code'>screen</span>:</p>
|
|
<pre class="tty">screen /dev/ttyUSB0 19200</pre>
|
|
<p>Then type in <span class="code">TEST</span>, all in capital letters. It
|
|
will not echo the characters. Then hit the
|
|
<span class="code"><enter></span>
|
|
key. It should echo back <span class="code">TEST</span>.</p>
|
|
<p>If this works, then you have established connectivity with the Davis
|
|
and the problem must lie elsewhere.</p>
|
|
|
|
<h3 id="davis_cp2101_converter">Davis cp2101 converter problems</h3>
|
|
<p>The USB converter used in the Davis VantagePro is known to have some "noise"
|
|
problems. The symptom is that the Linux kernel will disconnect from your old
|
|
USB port claiming "EMI noise", and reconnect to a new and different
|
|
port, where <span class="code">weewx</span> cannot find it. Here is a
|
|
typical log output: </p>
|
|
<p class='tty'>Nov 29 10:40:21 hummingbird kernel: [6661624.786792] hub 2-0:1.0: port 3 disabled by hub (EMI?), re-enabling...
|
|
Nov 29 10:40:21 hummingbird kernel: [6661624.786871] usb 2-3: USB disconnect, address 2
|
|
Nov 29 10:40:21 hummingbird kernel: [6661624.795778] cp2101 2-3:1.0: device disconnected
|
|
Nov 29 10:40:21 hummingbird weewx[25808]: VantagePro: Max retries exceeded while getting LOOP packets
|
|
... (messages elided)
|
|
Nov 29 10:40:22 hummingbird kernel: [6661625.352340] cp2101 2-3:1.0: cp2101 converter detected
|
|
Nov 29 10:40:22 hummingbird kernel: [6661625.528107] usb 2-3: reset full speed USB device using ohci_hcd and address 3
|
|
Nov 29 10:40:22 hummingbird kernel: [6661625.735497] usb 2-3: cp2101 converter now attached to ttyUSB1</p>
|
|
<p>In this example, the VantagePro was connected to <span class="code">/dev/ttyUSB0</span>,
|
|
but then reconnected to <span class="code">/dev/ttyUSB1</span>. </p>
|
|
<p>If you put ferrite coils on the USB connection, you will eliminate 90% of
|
|
this problem. I did this about 3 years ago, and have not had a problem since.
|
|
</p>
|
|
<p>However, there is one final step that you can take to really harden up
|
|
your system: install a <span class="code">udev</span> script that will create
|
|
a symbolic link to the VantagePro USB port, whatever it might be. With this
|
|
approach, if the port jumps from <span class="code">ttyUSB0</span> to
|
|
<span class="code">ttyUSB1</span>, the symbolic link will follow it. You just
|
|
specify port <span class="code">/dev/vpro</span> in the configuration file
|
|
<span class="code">weewx.conf</span> and be done with it. </p>
|
|
|
|
<h3 id='udev_script'>Installing a udev script</h3>
|
|
<p>Use a udev rule to ensure that a USB device always appears at the same
|
|
location such as <span class='code'>/dev/vpro</span> instead of
|
|
<span class='code'>/dev/ttyUSB2</span></p>
|
|
<p>For example, for my VantagePro2 weather station, I have installed a file
|
|
<span class="code">/etc/udev/rules.d/vpro.rules</span>
|
|
on my fit-PC that looks like this: </p>
|
|
<p class='tty'># Automount the VantagePro2 to port /dev/vpro.
|
|
# Install in /etc/udev/rules.d/vpro.rules
|
|
#
|
|
ACTION=="add", ATTRS{interface}=="CP2102 USB to UART Bridge Controller", SYMLINK+="vpro"</p>
|
|
<p>This rule says that when the USB port is plugged in (action
|
|
<span class="code">add</span>), and it has an attribute with name
|
|
<span class="code">interface</span> that is equal to
|
|
"<span class="code">CP2102 to UART Bridge Controller</span>",
|
|
then add a symbolic link for its physical port to
|
|
<span class="code">/dev/vpro</span>. </p>
|
|
<p>Here is a rule that works for my Serial-to-USB cable, made by "Y.C. Cable USA". It
|
|
not only adds a symbolic link <span class="code">vpro</span>, but also sets the
|
|
<span class="code">chmod</span>
|
|
permissions to <span class="code">666</span>, allowing any user to read or write to it.</p>
|
|
<pre class='tty'># Automount Serial-to-USB cable to port /dev/vpro
|
|
# Install in /etc/udev/rules.d/cable.rules
|
|
#
|
|
ACTION=="add",ATTRS{idVendor}=="05ad",ATTRS{idProduct}=="0fba",MODE="0666",SYMLINK+="vpro"</pre>
|
|
<p>Your devices may, and probably will, have different identifiers!! I can recommend
|
|
this article, "<a href="http://www.reactivated.net/writing_udev_rules.html"><em>Writing
|
|
udev rules</em></a>," for how to find and write an appropriate
|
|
<span class="code">udev</span> rule for your controller. (Note, however, that
|
|
this article uses the old <span class="code">udevinfo</span> command, rather
|
|
than the newer <span class="code">udevadm</span> command.) In particular, run
|
|
the command </p>
|
|
<p class='tty'># udevadm info --attribute-walk --path $(udevadm info --query=path --name=/dev/ttyUSB0) </p>
|
|
<p>where<span class="code"> /dev/ttyUSB0</span> is the port (substitute
|
|
your real USB port) the weather station is attached to. It will print
|
|
out various identifiers that can be useful in identifying your weather
|
|
station to <span class="code">udev</span>.
|
|
While the first example script above used a rule that matched attribute
|
|
<span class="code">interface</span>, others are possible. For example,
|
|
the second example, for the serial-to-USB cable, chose to match the
|
|
attribute <span class="code">product</span>. </p>
|
|
<p>Once you have installed your <span class="code">udev</span> rule, you
|
|
can then set <span class="code">port=/dev/vpro</span> in
|
|
<span class="code">weewx.conf</span>, confident that it will always point
|
|
to your weather station, no matter which USB port it is actually
|
|
attached to! </p>
|
|
<p>I have tested this system many times. You can yank the USB port out of the
|
|
machine and then plug it back in while also pulling out the network connection
|
|
in the middle of an FTP upload: <span class="code">weewx</span> will recover.
|
|
</p>
|
|
<p>Or, at least, it should! </p>
|
|
<h3 id="html_generated_but_not_updated">Weewx generates HTML pages, but it does not update them</h3>
|
|
<p>If you are getting a symptom that everything appears normal, that is HTML
|
|
is getting generated and getting FTP'd to your webserver <em>(look in the
|
|
log to be sure</em>!), but your web pages are not being updated, it could be
|
|
because the data on board your console has gotten garbled. The way the Davis
|
|
Vantage series works is that the software (<span class="code">weewx</span> in
|
|
this case) asks the console for all archive data "since" some time.
|
|
The console then downloads the records one at a time. After it gets to the very
|
|
last one, the memory wraps around, and the timestamp will suddenly jump backwards
|
|
in time a couple weeks — this how the software knows it has downloaded the last
|
|
record and so it stops.</p>
|
|
<p>However, if the internal memory gets garbled, the console will immediately
|
|
return archives in the past, and so it looks like the timestamps have decreased
|
|
in value and so <span class="code">weewx</span> figures that is it: there is
|
|
no more data.</p>
|
|
<p>I have received reports from a couple of users who have had this problem.
|
|
There seems to be two fixes:</p>
|
|
<ol>
|
|
<li>Unplug the console, take out the batteries, and wait a minute or two.
|
|
This will cause the console software to internally reboot. In one case this
|
|
has fixed the problem without data loss.</li>
|
|
<li>If all else fails, clear the memory of the console using the utility
|
|
<span class="code">wee_config_device</span>. This may cause loss of data, but
|
|
usually works. Adjust paths as necessary:</li>
|
|
</ol>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_device --clear </pre>
|
|
<p>See also the section <em><a href="#Dumping_the_logger_memory">Dumping
|
|
the logger memory</a></em>, which may help you avoid data loss.</p>
|
|
<h3>3rd party Vantage connectors</h3>
|
|
<p>This section is for those who are using a homebrew or 3rd party connector
|
|
to a Davis Vantage console that does not contain a logger, such as the
|
|
<a href="http://www.wxforum.net/index.php?topic=14063.0">DSI-01 serial interface</a>.
|
|
That is, it is a pure serial connection to the console, with no onboard memory.
|
|
</p>
|
|
<p>For these interfaces, you must set record generation to <em>software</em>.
|
|
Without this information, <span class="code">weewx</span> is unable to detect
|
|
the absence of onboard memory. If you do not do this, you will get errors that
|
|
look like the following in your syslog:</p>
|
|
<pre class="tty">Nov 27 20:30:21 rpi weewx[5607]: reportengine: Caught unrecoverable exception in generator weewx.filegenerator.FileGenerator
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** 'NoneType' object has no attribute '__getitem__'
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** Traceback (most recent call last):
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** File "/home/weewx/bin/weewx/reportengine.py", line 132, in run
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** obj.start()
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** File "/home/weewx/bin/weewx/reportengine.py", line 259, in start
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** self.run()
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** File "/home/weewx/bin/weewx/filegenerator.py", line 41, in run
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** self.setup()
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** File "/home/weewx/bin/weewx/filegenerator.py", line 52, in setup
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** self.initAlmanac(self.gen_ts)
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** File "/home/weewx/bin/weewx/filegenerator.py", line 87, in initAlmanac
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** rec = self.getRecord(archivedb, celestial_ts)
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** File "/home/weewx/bin/weewx/filegenerator.py", line 115, in getRecord
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** record_dict_vt = weewx.units.dictFromStd(record_dict)
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** File "/home/weewx/bin/weewx/units.py", line 892, in dictFromStd
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** std_unit_system = d['usUnits']
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** TypeError: 'NoneType' object has no attribute '__getitem__'
|
|
Nov 27 20:30:21 rpi weewx[5607]: **** Generator terminated...
|
|
Nov 27 20:30:23 rpi weewx[5607]: genimages: Generated 11 images in 2.53 seconds</pre>
|
|
<p>See the section on option <span class="code">
|
|
<a href="#record_generation">record_generation</a></span>.</p>
|
|
<h3>Raspberry Pi</h3>
|
|
<p>Running <span class="code">weewx</span> on a Raspberry Pi has become
|
|
very popular. You'll have to look elsewhere for instructions on setting up
|
|
your RPi, but there are a few very common problems with
|
|
setting them up.</p>
|
|
<h4>NTP</h4>
|
|
<p class="warning">You must run NTP on your RPi, and you must make sure it
|
|
starts and updates the time <em>before</em> <span class="code">weewx</span>
|
|
runs.</p>
|
|
<p>The reason is that the RPi does not have an onboard clock. If you lose
|
|
power and, say, an hour later it comes back, your RPi will simply pick up
|
|
where it left off — one hour behind. The symptom that something is amiss
|
|
is that everything will appear to be running normally, but your webpage
|
|
will not get updated (at least, until the length of the power failure has
|
|
elapsed).
|
|
<a href="https://groups.google.com/forum/#!searchin/weewx-user/clock/weewx-user/tmbrOC6-UiM/1xohs9WUAW8J">
|
|
Here's one user's nice analysis of the problem.</a></p>
|
|
<p>What this means is that it is not enough to simply run the
|
|
<span class="code">weewx</span>
|
|
daemon. You need some way of delaying its start until NTP is not only up
|
|
and running, but has contacted a time server and corrected the RPi's
|
|
clock. </p>
|
|
<p>Several users are working on a solution to this problem. Perhaps you'll
|
|
be the one to figure it out?!</p>
|
|
<h4>Use a high-quality SD card</h4>
|
|
<p>The SD card supplied with most RPis seems to be of very low quality. Make sure
|
|
you use a good, Class 10 card. User William Phelps reports, "You can usually spot
|
|
a failing card by watching the kernel I/O wait time. Once the card starts to go, the
|
|
I/O wait time will increase significantly."</p>
|
|
<h4>FTP</h4>
|
|
<p>Many Raspbian versions of Debian do not seem to include an FTP client. You may have
|
|
to install this if you plan on using FTP.</p>
|
|
<pre class="tty">
|
|
sudo apt-get install ftp
|
|
</pre>
|
|
<h4>Use a good power supply</h4>
|
|
<p>A lot of problems with the RPi seem to center around
|
|
inadequate power supplies. Many weather stations can
|
|
demand a lot of current through their USB connection.
|
|
Make sure your RPi can supply it, either by getting a good
|
|
power supply (I use
|
|
a <a href="http://www.amazon.com/gp/product/B00J3IB7A2/">Innogear
|
|
1.5 A supply</a>, which costs all of $5.50 from
|
|
Amazon), or, alternatively, by using a powered USB hub.</p>
|
|
|
|
<h4>Run a lightweight web server</h4>
|
|
<p>The RPi is astonishingly powerful for its size, but it does have its limitations.
|
|
If you plan on running a webserver on it, perhaps to serve your home, then use a
|
|
lightweight one, such as <a href="http://www.lighttpd.net/">lighttpd</a>
|
|
or <a href="http://nginx.org/">nginx</a>. Apache works, but it uses far more
|
|
memory. In my tests:</p>
|
|
<table style="width: 30%" class='indent'>
|
|
<caption>Memory requirements of 3 common webservers on a Raspberry Pi</caption>
|
|
<tr class="first_row">
|
|
<td>Webserver</td><td>VIRT</td><td>RES</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="first_col">Apache</td><td>222 Mb</td><td>3 Mb</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="first_col">lighttpd</td><td>7 Mb</td><td>2 Mb</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="first_col">nginx</td><td>11 Mb</td><td>1.7 Mb</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h3>Fine Offset USB lockups</h3>
|
|
<p>The Fine Offset series
|
|
weather stations and their derivatives are a fine value and
|
|
can be made to work reasonably reliably, but they have one
|
|
problem that is difficult to work around: their USB bus can
|
|
unexpectantly lock up, making it impossible to communicate
|
|
with the console. The symptom in the log will look something
|
|
like this:</p>
|
|
<pre class="tty">Jun 7 21:50:33 localhost weewx[2460]: fousb: get archive interval failed attempt 1 of 3: could not detach kernel driver from interface 0: No data available</pre>
|
|
<p>The exact error may vary, but the thing to look for is the
|
|
"<span class='code'>could not detach kernel driver</span>"
|
|
message. Unfortunately, we have not found a software cure for
|
|
this. Instead, you must power cycle the unit. Remove the
|
|
batteries and unplug the USB, then put it back together. No
|
|
need to restart weewx.</p>
|
|
<p>More details
|
|
about <a href="http://sourceforge.net/p/weewx/wiki/folockup/">Fine
|
|
Offset lockups</a> can be found in the Wiki.</p>
|
|
|
|
<h3 id='archive_interval'>Archive interval</h3>
|
|
<p>Most hardware with data-logging includes a parameter to specify
|
|
the archive interval used by the logger. If the hardware and driver
|
|
support it, <span class='code'>weewx</span> will use this interval
|
|
as the <span class='code'><em>archive_interval</em></span>. If not,
|
|
<span class='code'>weewx</span> will fall back to the
|
|
<span class='code'>archive_interval</span> specified in
|
|
<a href='[StdArchive]'><span class='code'>[StdArchive]</span></a>.
|
|
The default fallback value is 300 seconds (5 minutes).
|
|
</p>
|
|
<p>If the hardware archive interval is large, it will take a
|
|
long time before anything shows up in the
|
|
<span class='code'>weewx</span> reports. For example, WS23xx stations
|
|
ship with an archive interval of 60 minutes, and Fine Offset stations
|
|
ship with an archive interval of 30 minutes.
|
|
If you run <span class='code'>weewx</span> with a WS23xx station in
|
|
its factory default configuration, it will take 60 minutes before the
|
|
first data point shows up, then another 60 minutes until the next one,
|
|
and so on.
|
|
</p>
|
|
<p>
|
|
Since reports are generated when a new archive record arrives,
|
|
a large archive interval means that reports will be generated
|
|
infrequently.
|
|
</p>
|
|
<p>If you want data and reports closer to real-time, use the
|
|
<a href="#configuring_hardware"><span class="code">wee_config_device</span></a>
|
|
utility to change the interval.
|
|
</p>
|
|
|
|
<h2>Software problems</h2>
|
|
|
|
<p>This section covers some common software configuration problems.</p>
|
|
|
|
<h3>Nothing in the log file</h3>
|
|
<p>As it is running, <span class='code'>weewx</span> periodically sends
|
|
status information, failures, and other things to your system's logging
|
|
facility. They typically look something like this:</p>
|
|
<pre class='tty'>-DATE- --TIME-- HOST weewx[-PID-]: LOG_MESSAGE
|
|
|
|
Jan 1 09:46:32 saga weewx[15292]: wxengine: Initializing weewx version 2.5.1
|
|
Jan 1 09:46:32 saga weewx[15292]: wxengine: Using Python 2.6.6 (r266:84292, Dec 27 2010, 21:57:32) #012[GCC 4.4.5 20100902 (prerelease)]
|
|
Jan 1 09:46:32 saga weewx[15292]: wxengine: pid file is /var/run/weewx.pid</pre>
|
|
|
|
<p>The location of this logging file varies from system to system,
|
|
but it is typically
|
|
in <span class="code">/var/log/syslog</span>, or something
|
|
similar.</p>
|
|
<p>However, some systems default to saving only warning or
|
|
critical information, so the <span class="code">info</span>
|
|
messages from <span class="code">weewx</span> may not appear.
|
|
If this happens to you, check your system logging configuration.
|
|
On Debian systems, look
|
|
in <span class="code">/etc/rsyslog.conf</span>. On Redhat
|
|
systems, look in <span class="code">/etc/syslog.conf</span>.</p>
|
|
|
|
<h3><span class="code">configobj</span> errors</h3>
|
|
<p>These are errors in the configuration file. Two are very common.
|
|
Incidentally, these errors are far easier to diagnose when
|
|
<span class="code">weewx</span> is run directly than when it is run
|
|
as a daemon. </p>
|
|
<h4><span class="code">configobj.DuplicateError</span> exception</h4>
|
|
<p>This error is caused by using an identifier more than once in the
|
|
configuration file. For example, you may have inadvertently listed
|
|
your FTP server twice:
|
|
</p>
|
|
<p class='tty'>[Reports]
|
|
[[FTP]]
|
|
... (details elided)
|
|
user = fred
|
|
server = ftp.myhost.com
|
|
password = mypassword
|
|
server = ftp.myhost.com # OOPS! Listed it twice!
|
|
path = /weather
|
|
... </p>
|
|
<p>Generally, if you encounter this error, the log file will give you the
|
|
line number it happened in: </p>
|
|
<p class='tty'>Apr 24 12:09:15 raven weewx[11480]: wxengine: Error while parsing configuration file /home/weewx/weewx.conf
|
|
Apr 24 12:09:15 raven weewx[11480]: wxengine: Unable to initialize main loop:
|
|
Apr 24 12:09:15 raven weewx[11480]: **** Duplicate keyword name at line 254.
|
|
Apr 24 12:09:15 raven weewx[11480]: **** Exiting. </p>
|
|
<h4><span class="code">configobj.NestingError</span> exception</h4>
|
|
<p>This is a very similar error, and is caused by a misformed section nesting.
|
|
For example: </p>
|
|
<p class='tty'>[Reports]
|
|
[[FTP]]]
|
|
... (details elided)</p>
|
|
<p>Note the extra closing bracket on the subsection <span class="code">FTP</span>.
|
|
</p>
|
|
<h3>No barometer data</h3>
|
|
<p>If everything appears normal except that you have no barometer data, the
|
|
problem may be a mismatch between the unit system used for service
|
|
<span class="code">StdConvert</span> and the unit system used by service
|
|
<span class="code">StdQC</span>. For example:</p>
|
|
<pre class="tty">[StdConvert]
|
|
target_unit = METRIC
|
|
...
|
|
|
|
[StdQC]
|
|
[[MinMax]]
|
|
barometer = 28, 32.5</pre>
|
|
<p>The problem is that you are requiring the barometer data to be between
|
|
28 and 32.5, but with the unit system set to
|
|
<span class="code">METRIC</span>, the data will be in the range 990 to
|
|
1050 or so!</p>
|
|
<p>The solution is to change the values to match the units in StdConvert,
|
|
or specify the units in MinMax, regardless of the units in StdConvert.
|
|
For example:</p>
|
|
<pre class="tty">[StdConvert]
|
|
target_unit = US
|
|
...
|
|
|
|
[StdQC]
|
|
[[MinMax]]
|
|
barometer = 950, 1100, mbar</pre>
|
|
|
|
<h3><span class="code">Cheetah.NameMapper.NotFound</span> errors</h3>
|
|
<p>If you get errors of the sort: </p>
|
|
<p class='tty'>Apr 12 05:12:32 raven reportengine[3074]: filegenerator: Caught exception "<class 'NameMapper.NotFound'>"
|
|
Apr 12 05:12:32 raven reportengine[3074]: **** Message: "cannot find 'fubar' in template /home/weewx/skins/Standard/index.html.tmpl"
|
|
Apr 12 05:12:32 raven reportengine[3074]: **** Ignoring template and continuing.</p>
|
|
<p>you have a tag in your template that <span class="code">weewx</span>
|
|
does not recognize. In this example, it is the tag
|
|
<span class="code">$fubar</span> in the template
|
|
<span class="code">/home/weewx/skins/Standard/index.html.tmpl</span>.
|
|
</p>
|
|
|
|
<h3 id="many_loop_read_errors">Many LOOP read errors with Davis Vantage</h3>
|
|
<p>The symptom is many LOOP errors and unreliable downloading of archive records.
|
|
Your log may look like this:</p>
|
|
<pre class="tty">
|
|
Jan 18 20:38:52 rpi weewx[6024]: VantagePro: Opened up serial port /dev/ttyUSB0, baudrate 19200
|
|
Jan 18 20:38:53 rpi weewx[5977]: VantagePro: LOOP #12; read error. Try #1
|
|
Jan 18 20:38:53 rpi weewx[5977]: **** Expected to read 99 chars; got 0 instead
|
|
Jan 18 20:38:58 rpi weewx[7543]: VantagePro: LOOP #13; read error. Try #1
|
|
Jan 18 20:38:58 rpi weewx[7543]: **** Expected to read 99 chars; got 4 instead
|
|
Jan 18 20:39:03 rpi weewx[7543]: VantagePro: LOOP #14; read error. Try #2
|
|
Jan 18 20:39:03 rpi weewx[7543]: **** Expected to read 99 chars; got 0 instead
|
|
Jan 18 20:39:03 rpi weewx[5977]: VantagePro: LOOP #13; read error. Try #2
|
|
Jan 18 20:39:03 rpi weewx[5977]: **** Expected to read 99 chars; got 4 instead
|
|
Jan 18 20:39:08 rpi weewx[7543]: VantagePro: LOOP #15; read error. Try #3
|
|
Jan 18 20:39:08 rpi weewx[7543]: **** Expected to read 99 chars; got 4 instead
|
|
Jan 18 20:39:09 rpi weewx[5977]: VantagePro: LOOP #14; read error. Try #3
|
|
Jan 18 20:39:09 rpi weewx[5977]: **** Expected to read 99 chars; got 2 instead
|
|
Jan 18 20:39:14 rpi weewx[5977]: VantagePro: LOOP #15; read error. Try #4
|
|
Jan 18 20:39:14 rpi weewx[5977]: **** Expected to read 99 chars; got 2 instead</pre>
|
|
<p>If you look closely at the log above, you'll see that there are
|
|
multiple instances of <span class="code">weewx</span> running
|
|
simultaneously (process IDs 5977, 6024, and 7543). They are
|
|
contending with each other for control of the console, resulting
|
|
in missed packets and records.
|
|
</p>
|
|
<p>The cure is simple: kill all but one of them. Or, better yet,
|
|
kill them all, then do a restart.</p>
|
|
|
|
<h3 id='dots_in_plots'>Dots in the plots</h3>
|
|
<p>If you see dots instead of lines in the daily plots, you might want to
|
|
change the graphing options or adjust the station's archive interval.</p>
|
|
<p>In a default configuration, a time period greater than 1% of the
|
|
displayed timespan is considered to be a gap in data. So when the
|
|
interval between data points is greater than about 10 minutes, the
|
|
daily plots show dots instead of connected points. </p>
|
|
<p>Change the <a href="customizing.htm#line_gap_fraction"><span class='code'>line_gap_fraction</span></a>
|
|
option in <span class="code">skin.conf</span>
|
|
to control how much time is considered a break in data.</p>
|
|
<p>As for the archive interval, check the log file for an entry like this
|
|
soon after <span class='code'>weewx</span> starts up:</p>
|
|
<p class='tty'>Dec 30 10:54:17 saga weewx[10035]: wxengine: The archive interval in the configuration file (300) does not match the station hardware interval (1800).
|
|
Dec 30 10:54:17 saga weewx[10035]: wxengine: Using archive interval of 1800</p>
|
|
<p>In this example, interval in <span class="code">weewx.conf</span> is 5
|
|
minutes, but the station interval is 30 minutes. When the interval
|
|
in <span class="code">weewx.conf</span> does not match the station's
|
|
hardware interval, <span class="code">weewx</span> defers to the
|
|
station's interval.</p>
|
|
<p>Use the <a href="#configuring_hardware"><span class="code">wee_config_device</span></a> utility to change the station's interval.</p>
|
|
|
|
<h3 id='spikes'>Spikes in the graphs</h3>
|
|
<p>Occasionally you may see anomalous readings, typically manifested as
|
|
spikes in the graphs. The source could be a flaky serial/USB connection,
|
|
radio or other interference, a cheap USB-Serial adapter, low-quality
|
|
sensors, or simply an anomalous reading.</p>
|
|
<p>Sensor quality matters. It is not unusual for some low-end hardware
|
|
to report odd sensor readings occasionally (once every few days). Some
|
|
sensors, such as solar radiation/UV, have a limited lifespan of about
|
|
5 years. The (analog) humidity sensors on older Vantage stations are
|
|
known to deteriorate after a few years in wet environments.</p>
|
|
<p>If you frequently see anomalous data, first check the hardware.</p>
|
|
<p>To keep bad data from the database, add a quality control (QC) rule
|
|
such as Min/Max bounds. See the <a href="#StdQC">QC</a> section for
|
|
details.</p>
|
|
<p>To remove bad data from the database, you will have to do some basic
|
|
SQL commands. For example, let's say the station emitted some very
|
|
high temperatures and wind speeds for one or two readings. This is
|
|
how to remove them:</p>
|
|
<ol>
|
|
<li>stop <span class='code'>weewx</span></li>
|
|
<li>Make a copy of the archive database
|
|
<pre class='tty'>cp $SQLITE_ROOT/weewx.sdb $SQLITE_ROOT/weewx-YYMMDD.sdb</pre></li>
|
|
<li>Verify the bad data exist where you think they exist
|
|
<pre class='tty'>sqlite3 $SQLITE_ROOT/weewx.sdb
|
|
sqlite> select dateTime,outTemp from archive where outTemp > 1000;</pre></li>
|
|
<li>See whether the bad temperature and wind data happened at the same time
|
|
<pre class='tty'>sqlite> select dateTime,outTemp,windSpeed from archive where outTemp > 1000;</pre></li>
|
|
<li>Remove the bad data by setting to NULL
|
|
<pre class='tty'>sqlite> update archive set windSpeed=NULL where outTemp > 1000;
|
|
sqlite> update archive set outTemp=NULL where outTemp > 1000;</pre></li>
|
|
<li>Delete the statistics database so that <span class='code'>weewx</span> can regenerate it without the anomalies</li>
|
|
<li>start <span class='code'>weewx</span></li>
|
|
</ol>
|
|
|
|
<h3>'Database is locked' error</h3>
|
|
<p>This seems to be a problem with the Raspberry Pi, <strong>when using SQLite</strong>.
|
|
There is no analogous problem with MySQL databases. You will see errors in the system log that
|
|
looks like this:</p>
|
|
<pre class='tty'>
|
|
Feb 12 07:11:06 rpi weewx[20930]: **** File "/usr/share/weewx/weewx/archive.py", line 118, in lastGoodStamp
|
|
Feb 12 07:11:06 rpi weewx[20930]: **** _row = self.getSql("SELECT MAX(dateTime) FROM %s" % self.table)
|
|
Feb 12 07:11:06 rpi weewx[20930]: **** File "/usr/share/weewx/weewx/archive.py", line 250, in getSql
|
|
Feb 12 07:11:06 rpi weewx[20930]: **** File "/usr/share/weewx/weedb/sqlite.py", line 120, in execute
|
|
Feb 12 07:11:06 rpi weewx[20930]: **** raise weedb.OperationalError(e)
|
|
Feb 12 07:11:06 rpi weewx[20930]: **** OperationalError: database is locked
|
|
Feb 12 07:11:06 rpi weewx[20930]: **** _cursor.execute(sql, sqlargs)
|
|
Feb 12 07:11:06 rpi weewx[20930]: **** File "/usr/share/weewx/weedb/sqlite.py", line 120, in execute
|
|
Feb 12 07:11:06 rpi weewx[20930]: **** raise weedb.OperationalError(e)
|
|
<span class='highlight'>Feb 12 07:11:06 rpi weewx[20930]: **** OperationalError: database is locked</span></pre>
|
|
<p>We are still trying to decipher exactly what the problem is, but it seems that
|
|
(many? most? all?) implementations of the SQLite 'C' access libraries on the RPi
|
|
sleep for a full second if they find the database locked. This gives them only
|
|
five chances within the 5 second timeout period before an exception is raised.</p>
|
|
<p>Not all Raspberry Pis have this problem. It seems to be most acute when running big
|
|
templates with lots of queries, such as the forecast extension.</p>
|
|
<p>There are a few possible fixes:</p>
|
|
<ul>
|
|
<li>Increase the <a href='#archive_timeout'><span class='code'>timeout</span> option</a>.</li>
|
|
<li>Use a high quality SD card in your RPi. There seems to be some evidence that faster
|
|
SD cards are more immune to this problem.</li>
|
|
<li>Trim the size of your templates to minimize the number of queries necessary.</li>
|
|
</ul>
|
|
<p>None of these 'fixes' are very satisfying and we're trying to come up with a more robust solution.</p>
|
|
|
|
<h3>Strings in the database</h3>
|
|
<p>If you modify the SQLite archive database using an editing tool,
|
|
occasionally strings will get embedded in it, causing
|
|
<span class='code'>weewx</span> to raise
|
|
an exception. <strong>This is only a problem with SQLite</strong>.
|
|
There is no analogous problem with MySQL databases. You will see errors in the system log that
|
|
look something like this:</p>
|
|
<pre class='tty'>
|
|
Dec 31 17:01:06 arm weewx[18141]: **** File "/usr/share/weewx/weewx/wxengine.py", line 432, in __init__
|
|
Dec 31 17:01:06 arm weewx[18141]: **** self.setupStatsDatabase(config_dict)
|
|
Dec 31 17:01:06 arm weewx[18141]: **** File "/usr/share/weewx/weewx/wxengine.py", line 543, in setupStatsDatabase
|
|
Dec 31 17:01:06 arm weewx[18141]: **** self.statsDb.backfillFrom(self.archive)
|
|
Dec 31 17:01:06 arm weewx[18141]: **** File "/usr/share/weewx/weewx/stats.py", line 461, in backfillFrom
|
|
Dec 31 17:01:06 arm weewx[18141]: **** _statsDict.addRecord(_rec)
|
|
Dec 31 17:01:06 arm weewx[18141]: **** File "/usr/share/weewx/weewx/accum.py", line 305, in addRecord
|
|
Dec 31 17:01:06 arm weewx[18141]: **** self._add_value(record[obs_type], obs_type, record['dateTime'], add_hilo)
|
|
Dec 31 17:01:06 arm weewx[18141]: **** File "/usr/share/weewx/weewx/accum.py", line 264, in _add_value
|
|
Dec 31 17:01:06 arm weewx[18141]: **** self[obs_type].addSum(val)
|
|
Dec 31 17:01:06 arm weewx[18141]: **** File "/usr/share/weewx/weewx/accum.py", line 81, in addSum
|
|
Dec 31 17:01:06 arm weewx[18141]: **** self.sum += val
|
|
<span class='highlight'>Dec 31 17:01:06 arm weewx[18141]: **** TypeError: unsupported operand type(s) for +=: 'float' and 'unicode'</span>
|
|
Dec 31 17:01:06 arm weewx[18141]: **** Exiting.</pre>
|
|
<p>The problem is that a unicode null string <span class='code'>u''</span>
|
|
got entered where a <span class='code'>NULL</span> should be. The
|
|
utility <span class='code'>wee_config_database</span> can fix this.
|
|
Run it with the option <span class='code'>--string-check</span> to
|
|
search for these embedded strings. Add the option
|
|
<span class='code'>--fix</span> to have the utility fix them:</p>
|
|
<pre class="tty"><span class="symcode">$BIN_ROOT</span>/wee_config_database <span class="symcode">$CONFIG_ROOT</span>/weewx.conf --string-check --fix</pre>
|
|
|
|
<h3>Python 2.5</h3>
|
|
<p>Weewx should work with Python version 2.5, but it may take some fiddling
|
|
to get it to work. Later versions of Python come with pysqlite and
|
|
PIL already installed. You may have to do this yourself. Here is
|
|
how to do it with <a href="https://pypi.python.org/pypi/setuptools#python-2-4-and-python-2-5-support">
|
|
<span class='code'>easy_install</span></a>, but you may be
|
|
able to use <span class='code'>apt-get</span> or other tools, depending on
|
|
your operating system.</p>
|
|
<pre class="tty">
|
|
sudo easy_install pysqlite
|
|
sudo easy_install PIL</pre>
|
|
<p>Various possible complications:</p>
|
|
<ul>
|
|
<li>You may have to install the development environment of SQLite in
|
|
order to get <span class='code'>pysqlite</span> to install. This worked on my system:
|
|
<pre class="tty">
|
|
apt-get install libsqlite3-dev</pre>
|
|
Then rerun the installation of <span class='code'>pysqlite</span>.
|
|
</li>
|
|
<li>When you run <span class='code'>weewx</span>, you may get an error that looks like this
|
|
<pre class="tty">
|
|
File "/usr/lib/python2.5/site-packages/PIL-1.1.7-py2.5-linux-x86_64.egg/ImageFont.py", line 218, in truetype
|
|
return FreeTypeFont(filename, size, index, encoding)
|
|
File "/usr/lib/python2.5/site-packages/PIL-1.1.7-py2.5-linux-x86_64.egg/ImageFont.py", line 134, in __init__
|
|
self.font = core.getfont(file, size, index, encoding)
|
|
File "/usr/lib/python2.5/site-packages/PIL-1.1.7-py2.5-linux-x86_64.egg/ImageFont.py", line 34, in __getattr__
|
|
raise ImportError("The _imagingft C module is not installed")
|
|
ImportError: The _imagingft C module is not installed</pre>
|
|
This is because your installed version of PIL was compiled without
|
|
libfreetype, which is needed for the FreeType fonts used in the
|
|
generated images. You can either change the font type (look in
|
|
file <span class='code'>skin.conf</span>), or supply the missing library. Note: if you are missing
|
|
the freetype library, you may be missing others as well. This is what worked on my system. YMMV.
|
|
<pre class="tty">
|
|
# Install the Freetype library:
|
|
sudo apt-get install libfreetype6-dev
|
|
# Make sure it, and the zlib library, are visible to easy_install
|
|
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
|
|
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
|
|
# Remove the PIL paths
|
|
sudo easy_install -m PIL
|
|
# Remove PIL itself:
|
|
sudo rm -r /usr/lib/python2.5/site-packages/PIL*
|
|
# Now rebuild PIL, this time with the right libraries
|
|
sudo easy_install PIL
|
|
</pre>
|
|
You may have to fiddle with the exact path used in the symbolic link. A helpful tool
|
|
is the Unix tool <span class='code'>find</span>. For example, the following
|
|
uncovered where my freetype library was hiding:
|
|
<pre class="tty">
|
|
find /usr/lib -name "libfreetype*" -print</pre>
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>FreeBSD</h3>
|
|
<p>User Fabian reports that the following had to be done to get the
|
|
VantagePro2 working under FreeBSD:</p>
|
|
<pre class="tty">I needed the uslcom Driver for the usb/rs232 Adapter used by my vantage. Also I had to reset the memory of the weatherstation.
|
|
Loading the Driver:
|
|
Put uslcom_load="YES" in /boot/loader.conf (to load it as module).
|
|
Which gives here an output like:
|
|
uslcom0: <CP2102 USB to UART Bridge Controller> on usbus1
|
|
And put in <span class="code">weewx.conf</span>:
|
|
port = /dev/cuaU0</pre>
|
|
|
|
<h3>Apple OSX 10.9 (Mavericks)</h3>
|
|
<p>User Mike has written a
|
|
<a href='http://www.cougar.eu.com/useful-guides/weewx-installation-on-osx.html'>
|
|
very nice guide</a> on how to install <span class='code'>
|
|
weewx</span> on Apple's Mavericks operating sytem.</p>
|
|
|
|
<h3>Funky symbols in plots</h3>
|
|
<p>If your plots have strange looking symbols for units, such as
|
|
degrees Fahrenheit (°F), that look something like this:</p>
|
|
<img src='images/funky_degree.png'/>
|
|
<p>Then the problem may be that you are missing the fonts
|
|
specified for the option
|
|
<span class="code">unit_label_font_path</span> in your
|
|
<span class="code">skin.conf</span> file and, instead,
|
|
<span class="code">weewx</span> is substituting a default font, which does not
|
|
support the UTF-8 character necessary to make a degree sign. Look in
|
|
section <span class="code">[ImageGenerator]</span> for a line
|
|
that looks like:</p>
|
|
<pre class="tty">unit_label_font_path = /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf</pre>
|
|
<p>Make sure that the specified path
|
|
(<span class='code'>/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf</span>
|
|
in this case) actually exists. If it does not, on Debian
|
|
operating systems (such as Ubuntu), you may be able to install
|
|
the necessary fonts:</p>
|
|
<pre class="tty">sudo apt-get install ttf-freefont
|
|
sudo fc-cache -f -v</pre>
|
|
<p>The first command installs the "Truetype" fonts, the second rebuilds
|
|
the font cache. If your system does not have <span class="code">fc-cache</span>
|
|
command, then install it from the <span class="code">fontconfig</span> package:</p>
|
|
<pre class="tty">sudo apt-get install fontconfig</pre>
|
|
<p>If none of this works, or if you are on a different operating
|
|
system, then you will have to change the option <span class="code">unit_label_font_path</span>
|
|
to point to something on your system which does support UTF-8 characters.</p>
|
|
|
|
<h1 id="architecture">Architectural Notes</h1>
|
|
<p>This section is not required to get started, but it should help you
|
|
understand a bit more about how <span class="code">weewx</span> works. </p>
|
|
<h2>Goals</h2>
|
|
<p>The primary design goals of <span class="code">weewx </span>are: </p>
|
|
<ul>
|
|
<li>Architectural simplicity. No semaphores, no named pipes, no inter-process
|
|
communications, no complex multi-threading to manage. </li>
|
|
<li>Extensibility. Make it easy for the user to add new features or to modify
|
|
existing features.</li>
|
|
<li>"Fast enough." In any design decision, architectural simplicity
|
|
and elegance trump speed. </li>
|
|
<li>One code base. The same code base should be used for all platforms,
|
|
all weather stations, all reports, and any combination of features. Ample
|
|
configuration and customization options should be provided so the user does not
|
|
feel tempted to start hacking code. At worse, the user may have to subclass,
|
|
which is much easier to port to newer versions of the code base, than customizing
|
|
the base code. </li>
|
|
<li>Minimal reliance on external packages, so the user does not have
|
|
to go chase them down all over the Web before getting started. </li>
|
|
<li>Support only the Davis VantagePro2 initially (that is what I have),
|
|
but make no architectural decisions that lock out other stations. </li>
|
|
<li>As "pythonic" as I know how to make it. I am a beginner
|
|
Python programmer with two decades of experience in C++. I tried hard to
|
|
not make the code base look like it was written by a C++ programmer who
|
|
stumbled across a Python manual! </li>
|
|
</ul>
|
|
<h2>Strategies</h2>
|
|
<p>To meet these goals, the following strategies were used: </p>
|
|
<ul>
|
|
<li>A "micro-kernel" design. The <span class="code">weewx</span>
|
|
engine actually does very little. Its primary job is to load and run <em>
|
|
services</em> at runtime, making it easy for users to add or subtract features.
|
|
</li>
|
|
<li>A largely stateless design style. For example, many of the processing
|
|
routines read the data they need directly from the database, rather than
|
|
caching it and sharing with other routines. While this means the same data
|
|
may be read multiple times, it also means the only point of possible cache
|
|
incoherence is through the database, where transactions are easily controlled.
|
|
This greatly reduces the chances of corrupting the data, making it much
|
|
easier to understand and modify the code base. </li>
|
|
<li>Isolate the data collection and archiving code in a single thread that
|
|
is simple enough that it is unlikely to crash. The report processing is
|
|
where most mistakes are likely to happen, so isolate that in a separate
|
|
thread. If it crashes, it will not affect the main data thread. </li>
|
|
<li>A powerful configuration parser,
|
|
<a href="http://www.voidspace.org.uk/python/configobj.html">ConfigObj</a>,
|
|
by Michael Foord and Nicola Larosa, was chosen to read the configuration
|
|
file. This allows many options that might otherwise have to go in the code
|
|
to go instead in a configuration file. </li>
|
|
<li>A powerful templating engine,
|
|
<a href="http://www.cheetahtemplate.org/">Cheetah</a>, was used. This allows
|
|
many variables that I may not have thought of to be accessed from within
|
|
the HTML templates, without starting to modify the code. </li>
|
|
<li>Pure Python. The code base is 100% Python — no underlying C libraries
|
|
need be built to install <span class="code">weewx</span>. This also means
|
|
no Makefiles are needed. </li>
|
|
</ul>
|
|
<p>While <span class="code">weewx</span> is nowhere near as fast at generating
|
|
images and HTML as its predecessor, <span class="code">wview</span> (this is
|
|
partially because <span class="code">weewx</span> uses fancier fonts and a much more powerful templating
|
|
engine), it is fast enough for all platforms but the slowest. I run
|
|
it regularly on a 500 MHz machine where generating the 9 images used in the "Current
|
|
Conditions" page takes just under 2 seconds (compared with
|
|
0.4 seconds for <span class="code">wview</span>). </p>
|
|
<p>Unfortunately, the architectural goal of one code base is likely to be broken
|
|
with the arrival of Python V3.X. It has so many changes that are not backwards
|
|
compatible with V2.X, that a separate code base will most likely be needed.
|
|
My intention is to stick with the V2.X versions until V3.X is so widespread
|
|
it cannot be ignored, then make a permanent switch. Given the slow adoption
|
|
rate of V3.X this is unlikely to happen anytime soon. In any case, I doubt the
|
|
transition will affect the average <span class="code">weewx</span> user. </p>
|
|
<p>All writes to the databases are protected by transactions. You can kill the
|
|
program at any time (either Control-C if run directly or "<span class="code">/etc/init.d/weewx
|
|
stop</span>" if run as a daemon) without fear of corrupting the databases. </p>
|
|
<p>The code makes ample use of exceptions to insure graceful recovery from problems
|
|
such as network outages. It also monitors socket and console timeouts, restarting
|
|
whatever it was working on several times before giving up. In the case of an
|
|
unrecoverable console error (such as the console not responding at all), the
|
|
program waits 60 seconds then restarts the program from the top.</p>
|
|
<p>Any "hard" exceptions, that is those that do not involve network
|
|
and console timeouts and are most likely due to a logic error, are logged, reraised,
|
|
and ultimately cause thread termination. If this happens in the main thread
|
|
(not likely due to its simplicity), then this causes program termination. If
|
|
it happens in the report processing thread (much more likely), then only the
|
|
generation of reports will be affected — the main thread will continue downloading
|
|
data off the instrument and putting them in the database. You can fix the problem
|
|
at your leisure, without worrying about losing any data. </p>
|
|
|
|
<h2>Terminology</h2>
|
|
<p>This is a glossary of terminology used throughout the code. </p>
|
|
<table style="width: 95%" class='indent'>
|
|
<caption>Terminology used in weewx</caption>
|
|
<tr class="first_row">
|
|
<td>Name</td>
|
|
<td>Description</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">archive record</td>
|
|
<td>A record obtained from the SQL database</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">archive packet</td>
|
|
<td>A packet obtained from the store on the weather station. For
|
|
example, with a Davis VantagePro, it is obtained using the
|
|
<span class="code">DMPAFT</span> command. </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">datetime</td>
|
|
<td>An instance of the Python object
|
|
<span class="code">datetime.datetime</span>. Variables of type
|
|
datetime usually have a suffix <span class="code">_dt</span>.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">db_dict</td>
|
|
<td>A dictionary with all the data necessary to bind to a database.
|
|
An example for SQLite would be <span class="code">
|
|
{'driver':'db.sqlite',
|
|
'root':'/home/weewx',
|
|
'database_name':'archive/weewx.sdb'}</span>,
|
|
an example for MySQL would be <span class="code">{
|
|
'driver':'db.mysql',
|
|
'host':'localhost',
|
|
'user':'weewx',
|
|
'password':'mypassword',
|
|
'database_name':'weewx'}</span>.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">epoch time</td>
|
|
<td>Sometimes referred to as "unix time," or "unix
|
|
epoch time." The number of seconds since the epoch, which is
|
|
1 Jan 1970 00:00:00 UTC. Hence, it always represents UTC (well...
|
|
after adding a few leap seconds. But, close enough). This is the
|
|
time used in the databases and appears as type <span class="code">
|
|
dateTime</span> in the SQL schema, perhaps an unfortunate name
|
|
because of the similarity to the completely unrelated Python type
|
|
<span class="code">datetime</span>. Very easy to manipulate, but
|
|
it is a big opaque number. </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">loop packet</td>
|
|
<td>A packet with the current observations. For example, with a Davis
|
|
VantagePro, it is obtained using the <span class="code">LOOP</span>
|
|
command. </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">observation type</td>
|
|
<td>A type that can be used in the presentations. This is generally
|
|
all of the SQL types, plus calculated data (such as
|
|
<span class="code">rms</span> or <span class="code">vecavg</span>).</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">packet</td>
|
|
<td>Something obtained from the weather station. Frequently uses a
|
|
complex internal encoding, so it requires some processing to be
|
|
useful.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">record</td>
|
|
<td>Something obtained from the SQL database. </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">SQL type</td>
|
|
<td>A type that appears in the SQL database. This usually looks
|
|
something like <span class="code">outTemp</span>,
|
|
<span class="code">barometer</span>,
|
|
<span class="code">extraTemp1</span>,
|
|
and so on.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">time stamp</td>
|
|
<td>A variable in unix epoch time. Always in UTC. Variables carrying
|
|
a time stamp usually have a suffix
|
|
<span class="code">_ts</span>.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">tuple-time</td>
|
|
<td>An instance of the Python object <span class="code">
|
|
<a href="http://docs.python.org/2/library/time.html#time.struct_time">
|
|
time.struct_time</a></span>. This is a 9-wise tuple that
|
|
represent a time. It could be in either local time or UTC, though
|
|
usually the former. See module <span class="code">
|
|
<a href="http://docs.python.org/2/library/time.html">time</a>
|
|
</span> for more information. They are useful because they are a
|
|
little closer in format to what the Davis VantagePro uses, although
|
|
they still require a bit of processing. Variables carrying tuple
|
|
time usually have a suffix <span class="code">_tt</span>.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">unit system</td>
|
|
<td>A complete set of units used together. Either <span class="code">US</span>,
|
|
<span class="code">METRIC</span>, or <span class="code">METRICWX</span>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="text_highlight">value tuple</td>
|
|
<td>A 3-way tuple. First element is a value, second element
|
|
the unit type the value is in, the third the unit group. An
|
|
example would be <span class="code">(21.2,
|
|
'degree_C', 'group_temperature')</span>.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Units</h2>
|
|
<p>In general, there are three different areas where the unit system makes a
|
|
difference.: </p>
|
|
<ol>
|
|
<li>On the weather station. As far as I know, the Davis Vantage series
|
|
supports only U.S. Customary units internally. The Oregon Scientific
|
|
stations use an odd mix of US and metric. The Fine Offset
|
|
stations are metric. The LaCrosse stations are metric. The
|
|
Hideki stations are a mix of US and metric. One-wire devices
|
|
can be either US or metric. RainWise data loggers can be configured
|
|
to use either US or metric. PeetBros devices use a mix of US and
|
|
metric.</li>
|
|
<li>In the database. Either US or Metric can be used.</li>
|
|
<li>In the presentation (i.e., html and image files). </li>
|
|
</ol>
|
|
<p>The general strategy is that measurements are converted by service
|
|
<span class="code">StdConvert</span> as they come off the weather station into
|
|
a target unit system, then stored internally in the database. Then, as they
|
|
come off the database to be used for a report, they are converted into a target
|
|
unit, specified by the skin. </p>
|
|
<h2>Value "<span class="code">None</span>"</h2>
|
|
<p>The Python special value <span class="code">None</span> is used
|
|
throughout to signal a missing data point. All functions expect it. </p>
|
|
<p>However, the time value must never be <span class="code">None</span>.
|
|
This is because it is used as the primary key in the SQL database. </p>
|
|
<h2>Time</h2>
|
|
<p><span class="code">Weewx </span>stores all data in UTC (roughly, "Greenwich"
|
|
or "Zulu") time. However, usually one is interested in weather events
|
|
in local time and want image and HTML generation to reflect that. Furthermore,
|
|
most weather stations are configured in local time. This requires that many
|
|
data times be converted back and forth between UTC and local time. To avoid
|
|
tripping up over time zones and daylight savings time, <span class="code">weewx</span>
|
|
generally uses Python routines to do this conversion. Nowhere in the code base
|
|
is there any explicit recognition of DST. Instead, its presence is implicit
|
|
in the conversions. At times, this can cause the code to be relatively inefficient.
|
|
</p>
|
|
<p>For example, if one wanted to plot something every 3 hours in UTC time, it
|
|
would be very simple: to get the next plot point, just add 10,800 to the epoch
|
|
time: </p>
|
|
<pre class="tty">next_ts = last_ts + 10800 </pre>
|
|
<p>But, if one wanted to plot something for every 3 hours <em>in local time</em>
|
|
(that is, at 0000, 0300, 0600, etc.), despite a possible DST change in the middle,
|
|
then things get a bit more complicated. One could modify the above to recognize
|
|
whether a DST transition occurs sometime between <span class="code">last_ts</span>
|
|
and the next three hours and, if so, make the necessary adjustments. This is
|
|
generally what <span class="code">wview</span> does. <span class="code">Weewx
|
|
</span>takes a different approach and converts from UTC to local, does the arithmetic,
|
|
then converts back. This is inefficient, but bulletproof against changes in
|
|
DST algorithms, etc: </p>
|
|
<pre class="tty">time_dt = datetime.datetime.fromtimestamp(last_ts)
|
|
delta = datetime.timedelta(seconds=10800)
|
|
next_dt = time_dt + delta
|
|
next_ts = int(time.mktime(next_dt.timetuple()))</pre>
|
|
<p>Other time conversion problems are handled in a similar manner. </p>
|
|
|
|
<p class="copyright"> © <a href="copyright.htm">Copyright</a> Tom Keffer </p>
|
|
</div> <!-- #technical_content -->
|
|
|
|
</body>
|
|
</html>
|