tom (and anyone else having problems with the wmr300 driver),
please try one of the following drivers, in this order, until you get one
that works:
wmr300-0.16b.py - this is the same as 0.12 that shipped in weewx 3.6.0, but
with patches
wmr300-0.16a.py - this is the same as 0.9 that shipped in weewx 3.5.0, but
with patches
wmr300-0.16c.py - this is the latest development version, and includes
additional diagnostics
let us know which one works. if one of them fails, please post the log
showing the failure. it would be helpful if you ran it two or three times,
and post the log corresponding to each failure.
please report the following information about your system:
- weewx version and how you installed it (setup.py versus deb versus rpm)
what was the last version of weewx you were running with no wmr300
failures?
- operating system
cat /etc/issue
- kernel
uname -a
- usb versions
dpkg -l | grep usb
- locale/lang
echo $LANG
the 'patches' referred to above include:
- fix for pressure (noticeable for stations at higher altitudes)
- fix for rain count
- new sensor mapping pattern
none of these patches affect the usb comms.
m
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
#!/usr/bin/env python
# Copyright 2015 Matthew Wall
# See the file LICENSE.txt for your rights.
#
# Credits:
# Thanks to Benji for the identification and decoding of 7 packet types
#
# Thanks to Eric G for posting USB captures and providing hardware for testing
# https://groups.google.com/forum/#!topic/weewx-development/5R1ahy2NFsk
#
# Thanks to Zahlii
# https://bsweather.myworkbook.de/category/weather-software/
#
# No thanks to oregon scientific - repeated requests for hardware and/or
# specifications resulted in no response at all.
# TODO: battery level for each sensor
# TODO: signal strength for each sensor
# TODO: altitude
# TODO: archive interval
# FIXME: warn if altitude in pressure packet does not match weewx altitude
# FIXME: figure out unknown bytes in history packet
# FIXME: decode the 0xdb packets
# FIXME: figure out how to automatically reset the rain counter, otherwise
# rain count is not recorded once the counter hits maximum value.
# FIXME: the read/write logic is rather brittle. it appears that communication
# must be initiated with an interrupt write. after that, the station will
# spew data. this implementation starts with a read, which will fail with
# a 'No data available' usb error. that results in an empty buffer (instead
# of an exception popping up the stack) so that a heartbeat write is sent.
# the genLoopPacket and genStartupRecords logic should be refactored to make
# this behiavor explicit.
# FIXME: if the operating system is localized, the check for the string
# 'No data available' will probably fail. we should check for a code instead,
# but it is not clear whether such an element is available in a usb.USBError
# object, or whether it is available across different pyusb versions.
"""Driver for Oregon Scientific WMR300 weather stations.
Sensor data transmission frequencies:
wind: 2.5 to 3 seconds
TH: 10 to 12 seconds
rain: 20 to 24 seconds
The station supports 1 wind, 1 rain, 1 UV, and up to 8 temperature/humidity
sensors.
Sniffing USB traffic shows all communication is interrupt. The endpoint
descriptors for the device show this as well. Response timing is 1.
The station ships with "Weather OS PRO" software for windows. This was used
for the USB sniffing.
Internal observation names use the convention name_with_specifier. These are
mapped to the wview or other schema as needed with a configuration setting.
For example, for the wview schema, wind_speed maps to windSpeed, temperature_0
maps to inTemp, and humidity_1 maps to outHumidity.
Maximum value for rain counter is 4 mm (10160 in) (0x9c 0x40). The counter
does not wrap; it must be reset when it hits maximum value otherwise rain data
will not be recorded.
Message types -
packet types from station:
57 - station type/model; history count
41 - ACK
D2 - history; 128 bytes
D3 - temperature/humidity/dewpoint; 61 bytes
D4 - wind; 54 bytes
D5 - rain; 40 bytes
D6 - pressure; 46 bytes
DB - forecast; 32 bytes
DC - temperature/humidity ranges; 62 bytes
packet types from host:
A6 - heartbeat
41 - ACK
65 - ? each of these is ack-ed by the station
cd - ? start history request? last two bytes are one after most recent read
35 - ? finish history request? last two bytes are latest record count
72 - ?
73 - ?
notes:
WOP sends A6 message every 20 seconds
WOP requests history at startup, then again every 120 minutes
each A6 is followed by a 57 from the station
each data packet D* from the station is followed b