From 96dcfa7b34e8a8a591ef7d202d91817c9f9de3d5 Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Mon, 25 Mar 2013 15:27:07 +0000 Subject: [PATCH] Added WMR200 to the configuration file and to the User's Guide. --- bin/weewx/wmr200.py | 18 +++---- docs/usersguide.htm | 112 ++++++++++++++++++++++++++------------------ weewx.conf | 20 ++++++++ 3 files changed, 96 insertions(+), 54 deletions(-) diff --git a/bin/weewx/wmr200.py b/bin/weewx/wmr200.py index 2f5ff02b..8800d5e4 100644 --- a/bin/weewx/wmr200.py +++ b/bin/weewx/wmr200.py @@ -104,7 +104,7 @@ class UsbDevice(object): if not self.dev: return False - # Open the device and get a handle. + # Open the device and get a handle. try: self.handle = self.dev.open() except usb.USBError, e: @@ -288,11 +288,11 @@ class Packet(object): if self._SizeActual() < 2: print 'Packet too small to compute 16 bit checksum' return - sum = 0 + checksum = 0 # Checksum is last two bytes in packet. for byte in self.pkt_data[:-2]: - sum += byte - return sum + checksum += byte + return checksum def _checkSumField(self): """Returns the checksum field of the current packet @@ -623,9 +623,9 @@ class PacketTemperature(Packet): # _record['windchill'] # = weewx.wxformulas.windchillC(T, # self.last_wind_record['windSpeed']) - # except AttributeError: - # pass - # _record['outTempBatteryStatus'] = (packet[0] & 0x40) >> 6 + # except AttributeError: + # pass + # _record['outTempBatteryStatus'] = (packet[0] & 0x40) >> 6 elif sensor_id >= 2: # If additional temperature sensors exist (channel>=2), then # use observation types 'extraTemp1', 'extraTemp2', etc. @@ -823,7 +823,7 @@ class WMR200(weewx.abstractstation.AbstractStation): # Buffer of bytes read from console device. self.buf = [] - # Access the console via the usb accessor. + # Access the console via the usb accPacketHistoryReadessor. self.usb_device = UsbDevice(vendor_id, product_id) self.usb_device.timeout = float(stn_dict.get('timeout', 15.0)) @@ -964,7 +964,7 @@ class WMR200(weewx.abstractstation.AbstractStation): while self.buf: yield self.buf.pop(0) - except (IndexError, usb.USBError), e: + except (IndexError, usb.USBError), e: # @UnusedVariable yield None def _PollForData(self): diff --git a/docs/usersguide.htm b/docs/usersguide.htm index 838e89b8..e3870250 100644 --- a/docs/usersguide.htm +++ b/docs/usersguide.htm @@ -26,7 +26,7 @@ function showtab(tab,id) { document.getElementById(tab+'-tab-'+id).className = 'tab selected'; } - + @@ -108,21 +108,21 @@ Version: 2.2.1 WS1090 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 WS2080 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 Tested WS2090 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 @@ -152,14 +152,14 @@ Version: 2.2.1 6975 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 6976 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 @@ -167,77 +167,77 @@ Version: 2.2.1 WH1080 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 Tested WH1081 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 WH1091 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 WH1090 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 Tested WS1080 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 WA2080 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 WA2081 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 WH2080 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 WH2081 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 WH3080 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 WH3081 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 Tested @@ -245,29 +245,36 @@ Version: 2.2.1 265 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 - Oregon Scientific + Oregon Scientific WMR100N USB pyusb - WMR-USB2 + WMR1002 Tested + + WMR200 + USB + pyusb + WMR2003 + Experimental + WMR918 Serial pyserial - WMR-9183 + WMR9x84 WMR968 Serial pyserial - WMR-9183 + WMR9x84 Tested @@ -275,7 +282,7 @@ Version: 2.2.1 TP1080WC USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 @@ -283,35 +290,38 @@ Version: 2.2.1 W-8681 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5 WX-2008 USB pyusb - FineOffsetUSB4 + FineOffsetUSB5
    -
  1. Davis "Vantage" series of weather stations, including the - - VantagePro2™ and VantageVue™, - using serial, USB, or - - WeatherLinkIP™ connections. Both the "Rev A" (firmware - dated before 22 April 2002) and "Rev B" versions are supported. +
  2. Davis "Vantage" series of weather stations, including the + + VantagePro2™ and VantageVue™, + using serial, USB, or + WeatherLinkIP™ connections. Both the "Rev A" (firmware + dated before 22 April 2002) and "Rev B" versions are supported.
  3. -
  4. Oregon Scientific WMR-USB series. Tested on the - WMR100N, other stations may work as well.
  5. -
  6. Oregon Scientific WMR-918/968 series. Tested on the - Oregon Scientific WMR-968, other stations may work as well.
  7. -
  8. Fine Offset series of weather stations. These are branded by +
  9. Oregon Scientific WMR100 series. Tested on the + WMR100N, other stations may work as well.
  10. +
  11. Oregon Scientific WMR200 series. This is an experimental version. Please report any problems! +
  12. +
  13. Oregon Scientific WMR-918/968 series. Tested on the + Oregon Scientific WMR-968, other stations may work as well. +
  14. +
  15. Fine Offset series of weather stations. These are branded by many vendors, including Ambient Weather, National Geographic, Watson, Elecsa, Tycon, Maplin, Froggit, and others. Tested on the - Ambient Weather WS2080, other stations may work as well.
  16. + Ambient Weather WS2080, other stations may work as well. +

System Requirements

@@ -618,11 +628,15 @@ Version: 2.2.1 Davis Vantage weather stations - WMR-USB - Oregon Scientific WMR-USB series stations + WMR100 + Oregon Scientific WMR100 series stations - WMR-918 + WMR200 + Oregon Scientific WMR200 series stations (experimental) + + + WMR9x8 Oregon Scientific WMR-918/968 series station @@ -673,15 +687,23 @@ Version: 2.2.1

max_tries

How many times to try again before giving up. Default is 4.

-

[WMR-USB]

-

This section is for options relating to the Oregon Scientific WMR series +

[WMR100]

+

This section is for options relating to the Oregon Scientific WMR100 series of weather stations with USB connectors.

stale_wind

How long a wind record can be used to calculate wind chill (in seconds). Default is 30.

-

[WMR-918]

-

This section is for options relating to the Oregon Scientific WMR-918 +

[WMR200]

+

This section is for options relating to the Oregon Scientific WMR200 series + of weather stations with USB connectors. This support is experimental. Please + report any problems!

+

stale_wind

+

How long a wind record can be used to calculate wind chill (in seconds). + Default is 30.

+ +

[WMR9x8]

+

This section is for options relating to the Oregon Scientific WMR-918/968 series of weather stations with serial connectors.

type

For the moment, only serial is supported.

diff --git a/weewx.conf b/weewx.conf index 3109d3d8..43820c8b 100644 --- a/weewx.conf +++ b/weewx.conf @@ -62,6 +62,7 @@ version = 2.2.1 # Set to type of station hardware. Supported stations include: # Vantage # WMR100 + # WMR200 # WMR9x8 # FineOffsetUSB # Simulator @@ -143,6 +144,25 @@ version = 2.2.1 ############################################################################################ +[WMR200] + + # + # This section is for the Oregon Scientific WMR200 + # + + ###################################################### + # The rest of this section rarely needs any attention. + # You can safely leave it "as is." + ###################################################### + + # How long a wind record can be used to calculate wind chill (in seconds) + stale_wind = 30 + + # The driver to use + driver = weewx.wmr200 + +############################################################################################ + [WMR9x8] #