Hopefully this will help others trying to configure the Oregon Scientific WMR 89/89A weather station.
OS: Running a Raspberry Pi Zero W Rev 1.1
Thanks to all who have contributed to the driver for the Oregon Scientifc WMR 89/89A weather station. THE DRIVER IS AVAILABLE FROM from the original author, Matthew Wall at:
https://github.com/matthewwall/weewx-wmr89.
I've had to make a few additions/amendments to the driver to get it working so I thought I'd add a post in case anyone else is having similar difficulties. I've also attached the modified driver file I'm using if this is easier, but the changes are minor so you may prefer to make them yourself. [SEE ATTACHED modified 'wmr89.py'. Full installation procedure outlined below.]
[1] CHANGES to original 'wmr89.py'
(a) on line 222,
change 'ord(x)' to 'ord(x[0])'
(b) on line 107,
change 'logdbg("sensors: $s" % pkt)' to 'logdbg("sensors: %s" % pkt)'
(c) on line 82,
change 'rainRate' to 'rain'
(d) on line 113,
change 'self._calculate_rain_delta(packet)' to
#if packet contains rain data then calculate rain increment
if self.sensor_map['rain_total'] in packet:
self._calculate_rain_delta(packet)
Thats all.
[2] FULL INSTALLATION DETAILS
The full configuration for the WMR89/89A I followed was: (I have assumed that you have already downloaded and installed the weewx software (Debian version as I'm working on a Raspberry Pi. If you haven't done this yet, during the installation choose the 'Simulator' weather station, although this is not essential.)
STEP 2:
Add the CP210X kernel module, by entering the commands:
sudo modprobe cp210x
sudo sh -c 'echo 0fde ca0a > /sys/bus/usb-serial/drivers/cp210x/new_id'
STEP 3:
The original driver for the WMR 89/89A is at '/usr/share/weewx/user/wmr89.py'.
Either modifiy this file (type 'sudo nano wmr89.py' having changed to the directory '/usr/share/weewx/user/'), or copy the updated 'wmr89.py' attached to this post to the directory '/usr/share/weewx/user/', overwriting the original 'wmr89.py'.
STEP 4:
Reconfigure weewx. [Note, when selecting a station, choose 'WMR89' and the connection should be too device '/dev/ttyUSB0'.]
sudo wee_config --reconfigure
STEP 5:
Run weewx by entering the command
sudo weewxd /etc/weewx/weewx.conf
RESULT:
You should see a stream of output to the terminal with readings from the weather station. At this point you can stop weewx and run it rather as a daemon, using (see weewx User Guide)
sudo /etc/init.d/weewx start