Hi All,
I recently received a WMR89a and have been trying to get it to talk to
weewx. I have been reading through all the posts and discovered mwall's
driver in github.
I don't seem to have the unit talking to weewx as there are a lot of errors
in the syslog and was wondering if you could point me in the right
direction as to how to get it talking. I see from above that andr3id has
got it working in ubuntu so I'm hoping there is an easy fix.
I am running Ubuntu 16.04 on a VM hosted by ESXi 5.5. Having passed the USB
connection through to the VM I get the following when running lsusb:
root@weatherstation:/dev# lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 004: ID 0fde:ca0a Oregon Scientific
> Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
> Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
> Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
However there was no /dev/ttyUSB0 automatically created. To do that I
followed the comments in mwalls code and andr3id's post:
sudo modprobe cp210x
> sudo sh -c 'echo 0fde ca0a > /sys/bus/usb-serial/drivers/cp210x/new_id'
I have then run the wee_config --reconfigure script setting the driver as
WMR89 with port /dev/ttyUSB0
I have then started weewx but get the following:
root@weatherstation:/dev# /etc/init.d/weewx start
> [ ok ] Starting weewx (via systemctl): weewx.service.
root@weatherstation:/dev# /etc/init.d/weewx status
> ● weewx.service - LSB: weewx weather system
> Loaded: loaded (/etc/init.d/weewx; bad; vendor preset: enabled)
> Active: active (exited) since Mon 2018-04-02 13:09:23 BST; 26min ago
> Docs: man:systemd-sysv-generator(8)
> Process: 1776 ExecStop=/etc/init.d/weewx stop (code=exited,
> status=0/SUCCESS)
> Process: 1828 ExecStart=/etc/init.d/weewx start (code=exited,
> status=0/SUCCESS)
>
Full syslog of weewx startup:
> Apr 2 13:09:23 weatherstation systemd[1]: Starting LSB: weewx weather
> system...
> Apr 2 13:09:23 weatherstation weewx[1828]: * Starting weewx weather
> system weewx
> Apr 2 13:09:23 weatherstation weewx[1841]: engine: Initializing weewx
> version 3.8.0
> Apr 2 13:09:23 weatherstation weewx[1841]: engine: Using Python 2.7.12
> (default, Dec 4 2017, 14:50:18) #012[GCC 5.4.0 20160609]
> Apr 2 13:09:23 weatherstation weewx[1841]: engine: Platform
> Linux-4.4.0-116-generic-x86_64-with-Ubuntu-16.04-xenial
> Apr 2 13:09:23 weatherstation weewx[1841]: engine: Locale is 'en_GB.UTF-8'
> Apr 2 13:09:23 weatherstation weewx[1841]: engine: pid file is
> /var/run/weewx.pid
> Apr 2 13:09:23 weatherstation weewx[1828]: ...done.
> Apr 2 13:09:23 weatherstation systemd[1]: Started LSB: weewx weather
> system.
> Apr 2 13:09:23 weatherstation weewx[1845]: engine: Using configuration
> file /etc/weewx/weewx.conf
> Apr 2 13:09:23 weatherstation weewx[1845]: engine: Loading station type
> WMR89 (user.wmr89)
> Apr 2 13:09:23 weatherstation weewx[1845]: wmr89: driver version is 0.3
> Apr 2 13:09:23 weatherstation weewx[1845]: wmr89: using serial port
> /dev/ttyUSB0
> Apr 2 13:09:23 weatherstation weewx[1845]: wmr89: sensor map is
> {'windchill': 'wind_chill', 'dewpoint': 'dewpoint_out', 'outTemp':
> 'temperature_out', 'outHumidity': 'humidity_out', 'windDir': 'wind_dir',
> 'pressure': 'pressure', 'windSp$
> Apr 2 13:09:25 weatherstation weewx[1845]: engine: StdConvert target unit
> is 0x1
> Apr 2 13:09:25 weatherstation weewx[1845]: wxcalculate: The following
> values will be calculated: barometer=prefer_hardware,
> windchill=prefer_hardware, dewpoint=prefer_hardware,
> appTemp=prefer_hardware, rainRate=hardware, windrun=prefer$
> Apr 2 13:09:25 weatherstation weewx[1845]: wxcalculate: The following
> algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
> Apr 2 13:09:25 weatherstation weewx[1845]: engine: Archive will use data
> binding wx_binding
> Apr 2 13:09:25 weatherstation weewx[1845]: engine: Record generation will
> be attempted in 'hardware'
> Apr 2 13:09:25 weatherstation weewx[1845]: engine: Using archive interval
> of 300 seconds (specified in weewx configuration)
> Apr 2 13:09:25 weatherstation weewx[1845]: engine: Using binding
> 'wx_binding' to database 'weewx.sdb'
> Apr 2 13:09:25 weatherstation weewx[1845]: manager: Starting backfill of
> daily summaries
> Apr 2 13:09:25 weatherstation weewx[1845]: restx: StationRegistry:
> Registration not requested.
> Apr 2 13:09:25 weatherstation weewx[1845]: restx: Wunderground: Posting
> not enabled.
> Apr 2 13:09:25 weatherstation weewx[1845]: restx: PWSweather: Posting not
> enabled.
> Apr 2 13:09:25 weatherstation weewx[1845]: restx: CWOP: Posting not
> enabled.
> Apr 2 13:09:25 weatherstation weewx[1845]: restx: WOW: Posting not
> enabled.
> Apr 2 13:09:25 weatherstation weewx[1845]: restx: AWEKAS: Posting not
> enabled.
> Apr 2 13:09:25 weatherstation weewx[1845]: engine: Starting up weewx
> version 3.8.0
> Apr 2 13:09:25 weatherstation weewx[1845]: engine: Starting main packet
> loop.
> Apr 2 13:09:25 weatherstation weewx[1845]: engine: Caught unrecoverable
> exception in engine:
> Apr 2 13:09:25 weatherstation weewx[1845]: **** ord() expected a
> character, but string of length 2 found
> Apr 2 13:09:25 weatherstation weewx[1845]: **** Traceback (most
> recent call last):
> Apr 2 13:09:25 weatherstation weewx[1845]: **** File
> "/usr/share/weewx/weewx/engine.py", line 871, in main
> Apr 2 13:09:25 weatherstation weewx[1845]: **** engine.run()
> Apr 2 13:09:25 weatherstation weewx[1845]: **** File
> "/usr/share/weewx/weewx/engine.py", line 187, in run
> Apr 2 13:09:25 weatherstation weewx[1845]: **** for packet in
> self.console.genLoopPackets():
> Apr 2 13:09:25 weatherstation weewx[1845]: **** File
> "/usr/share/weewx/user/wmr89.py", line 106, in genLoopPackets
> Apr 2 13:09:25 weatherstation weewx[1845]: **** for pkt in
> self.station.get_data():
> Apr 2 13:09:25 weatherstation weewx[1845]: **** File
> "/usr/share/weewx/user/wmr89.py", line 222, in get_data
> Apr 2 13:09:25 weatherstation weewx[1845]: **** (ord(x),
> _fmt(a[i])))
> Apr 2 13:09:25 weatherstation weewx[1845]: **** TypeError: ord()
> expected a character, but string of length 2 found
> Apr 2 13:09:25 weatherstation weewx[1845]: **** Exiting.