I have added the “baudrate” : 9600  to the driver (as looking at the embedded docs in there, which sent me to a link confirming it is 9600 baud)

I think this (if it is correct) should be hardcoded rather than configurable as it seems the wmr9x8 will always be 9600 baud, though if this is the default pyserial rate anyway, nothing should need to change!

 

Debugging:

 

Stopped the service.

Then ran sudo python3 /usr/share/weewx/weewxd /etc/weewx/weewx.conf  to run from the command line.

 

Should I be seeing anything in the console at all?  Syslog last line indicates  weewx[34003] INFO weewx.engine: Starting main packet loop.

 

So I think it is listening, but not getting anything so looking like a hardware or configuration issue with the serial port on the PC. 

And just when I thought I had “upgraded” my PC with RS232 😉

 

 

I let it run for 15 minutes, then cancelled, with no loop packets received.

 

I will experiment further with the hardware side – maybe something in BIOS configures the port in some way.

 

Thanks for the help – will let you know how I go, could help some future me!

 

Keith

 

Sent from Mail for Windows

 

From: Tom Keffer
Sent: Sunday, 24 July 2022 7:47 AM
To: weewx-user
Subject: Re: [weewx-user] Re: No data being recieved by weewx from WMR-918

 

Unfortunately, the driver does not let you set the baudrate from the configuration file. If you want to change it, you'll have to go into the code. If you want to do this, starting at line 94 of weewx/driver/wmr9x8.py you'll find this:

 

        self.serialconfig = {
            "bytesize": serial.EIGHTBITS,
            "parity": serial.PARITY_NONE,
            "stopbits": serial.STOPBITS_ONE,
            "timeout": None,
            "rtscts": 1
        }

 

Just add baudrate so it looks like this:

 

        self.serialconfig = {
            "bytesize": serial.EIGHTBITS,
            "parity": serial.PARITY_NONE,
            "stopbits": serial.STOPBITS_ONE,
            "timeout": None,
            "rtscts": 1,

            "baudrate" : 4800
        }

 

If that works for you, I'll add the ability to change baudrate through weewx.conf.

 

-tk

 

On Sat, Jul 23, 2022 at 2:37 PM Keith Baddock <[email protected]> wrote:

I'll have to investigate how to set the baud rate, as I'm pretty sure the wmr918 is outputting at 9600. It just appears I might not be listening at 9600! I did think that the 11.5k baud was the max the interface could support, but the client software could set it to whatever it needed to suit the device. Running from the command line gives me no visual output. I was expecting to see loop packets too.  

 

Sent from my Galaxy-Tab A 2017 on the Telstra Mobile Network
Get Outlook for Android

From: [email protected] <[email protected]> on behalf of Tom Keffer <[email protected]>
Sent: Sunday, July 24, 2022 12:21:45 AM
To: weewx-user <[email protected]>
Subject: Re: [weewx-user] Re: No data being recieved by weewx from WMR-918

 

Could definitely be a baud rate issue. The driver opens the port using the default pyserial rate, which is 9600, and you seem to be at 115200. 

 

Can you change the port rate to 9600? If not, we can try changing the driver to expect 115200.

 

These things are also easier to diagnose by running weewxd from the command line. Then you can see the LOOP packets coming in.

 

-tk

 

On Sat, Jul 23, 2022 at 4:27 AM Keith <[email protected]> wrote:

Jul 23 20:33:14 dragon systemd[1]: Started Run anacron jobs.
Jul 23 20:33:14 dragon anacron[9791]: Anacron 2.3 started on 2022-07-23
Jul 23 20:33:14 dragon anacron[9791]: Normal exit (0 jobs run)
Jul 23 20:33:14 dragon systemd[1]: anacron.service: Succeeded.
Jul 23 20:33:26 dragon systemd[1]: Starting LSB: weewx weather system...
Jul 23 20:33:26 dragon weewx[9804]:  * Starting weewx weather system weewx
Jul 23 20:33:26 dragon weewx[9815] INFO __main__: Initializing weewx version 4.8.0
Jul 23 20:33:26 dragon weewx[9815] INFO __main__: Using Python 3.8.10 (default, Jun 22 2022, 20:18:18) #
012[GCC 9.4.0]
Jul 23 20:33:26 dragon weewx[9815] INFO __main__: Platform Linux-5.15.0-41-generic-x86_64-with-glibc2.29
Jul 23 20:33:26 dragon weewx[9815] INFO __main__: Locale is 'en_AU.UTF-8'
Jul 23 20:33:26 dragon weewx[9815] INFO __main__: Using configuration file /etc/weewx/weewx.conf
Jul 23 20:33:26 dragon weewx[9815] INFO __main__: Debug is 1
Jul 23 20:33:26 dragon weewx[9815] INFO __main__: PID file is /var/run/weewx.pid
Jul 23 20:33:26 dragon weewx[9818] DEBUG __main__: Initializing engine
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.engine: Loading station type WMR9x8 (weewx.drivers.wmr9x8)
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.drivers.wmr9x8: driver version is 3.4.1
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.drivers.wmr9x8: sensor map is {'barometer': 'barometer', '
pressure': 'pressure', 'windSpeed': 'wind_speed', 'windDir': 'wind_dir', 'windGust': 'wind_gust', 'windG
ustDir': 'wind_gust_dir', 'windBatteryStatus': 'battery_status_wind', 'inTemp': 'temperature_in', 'outTe
mp': 'temperature_out', 'extraTemp1': 'temperature_1', 'extraTemp2': 'temperature_2', 'extraTemp3': 'tem
perature_3', 'extraTemp4': 'temperature_4', 'extraTemp5': 'temperature_5', 'extraTemp6': 'temperature_6'
, 'extraTemp7': 'temperature_7', 'extraTemp8': 'temperature_8', 'inHumidity': 'humidity_in', 'outHumidit
y': 'humidity_out', 'extraHumid1': 'humidity_1', 'extraHumid2': 'humidity_2', 'extraHumid3': 'humidity_3
', 'extraHumid4': 'humidity_4', 'extraHumid5': 'humidity_5', 'extraHumid6': 'humidity_6', 'extraHumid7':
 'humidity_7', 'extraHumid8': 'humidity_8', 'inTempBatteryStatus': 'battery_status_in', 'outTempBatteryS
tatus': 'battery_status_out', 'extraBatteryStatus1': 'battery_status_1', 'extraBatteryStatus2': 'battery
_status_2', 'extraBatteryStatus3': 'battery_status_3', 'extraBatteryStatus4': 'battery_status_4', 'extra
BatteryStatus5': 'battery_status_5', 'extraBatteryStatus6': 'battery_status_6', 'extraBatteryStatus7': '
battery_status_7', 'extraBatteryStatus8': 'battery_status_8', 'inDewpoint': 'dewpoint_in', 'dewpoint': '
dewpoint_out', 'dewpoint0': 'dewpoint_0', 'dewpoint1': 'dewpoint_1', 'dewpoint2': 'dewpoint_2', 'dewpoin
t3': 'dewpoint_3', 'dewpoint4': 'dewpoint_4', 'dewpoint5': 'dewpoint_5', 'dewpoint6': 'dewpoint_6', 'dew
point7': 'dewpoint_7', 'dewpoint8': 'dewpoint_8', 'rain': 'rain', 'rainTotal': 'rain_total', 'rainRate':
 'rain_rate', 'hourRain': 'rain_hour', 'rain24': 'rain_24', 'yesterdayRain': 'rain_yesterday', 'rainBatt
eryStatus': 'battery_status_rain', 'windchill': 'windchill'}
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.drivers.wmr9x8: Opened up serial port /dev/ttyS0
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSync
h
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.engine: StdConvert target unit is 0x1
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrat
e
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.engine.StdQC
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.wxservices: StdWXCalculate will use data binding wx_bindin
g
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.manager: Daily summary version is 4.0
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.wxservices.StdWXCa
lculate
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdWXXTypes
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdWXXTyp
es
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdPressureCooker
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdPressu
reCooker
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdRainRater
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdRainRa
ter
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdDelta
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdDelta
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.engine.StdArchive
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.engine: Archive will use data binding wx_binding
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.engine: Record generation will be attempted in 'hardware'
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.engine: Using archive interval of 300 seconds (specified i
n weewx configuration)
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Use LOOP data in hi/low calculations: 1
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.engine.StdArchive
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.restx.StdStationRegistry
Jul 23 20:33:26 dragon weewx[9804]:    ...done.
Jul 23 20:33:26 dragon systemd[1]: Started LSB: weewx weather system.
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.restx: StationRegistry: Registration not requested.
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.restx.StdStationRe
gistry
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.restx.StdWunderground
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.restx: Wunderground: Posting not enabled.
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.restx.StdWundergro
und
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.restx.StdPWSweather
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.restx: PWSweather: Posting not enabled.
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.restx.StdPWSweathe
r
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.restx.StdCWOP
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.restx: CWOP: Posting not enabled.
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.restx.StdCWOP
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.restx.StdWOW
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.restx: WOW: Posting not enabled.
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.restx.StdWOW
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.restx.StdAWEKAS
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.restx: AWEKAS: Posting not enabled.
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.restx.StdAWEKAS
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.engine: 'pyephem' not detected, extended almanac data is n
ot available
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Jul 23 20:33:26 dragon weewx[9818] INFO __main__: Starting up weewx version 4.8.0
Jul 23 20:33:26 dragon weewx[9818] DEBUG weewx.engine: Station does not support reading the time
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.manager: Starting backfill of daily summaries
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.manager: Empty database
Jul 23 20:33:26 dragon weewx[9818] INFO weewx.engine: Starting main packet loop.
Jul 23 20:49:37 dragon NetworkManager[729]: <info>  [1658573377.2147] manager: NetworkManager state is n
ow CONNECTED_SITE
Jul 23 20:49:37 dragon systemd[1]: Starting Network Manager Script Dispatcher Service...

On Saturday, 23 July 2022 at 21:26:43 UTC+10 Keith wrote:

I'm moving my WMR-918 weather station off a "well past it" Windows 7 PC onto a "not quite past it" PC running Ubuntu 20.04.4 LTS and trying to get it working with weewx.

 

The WMR-918 was definitely sending data to VWS on the old PC prior to the relocation, so I know it and the cable are still OK.

On the Ubuntu PC I had to add a DB-9 connector with cable to the motherboard, so there may be a chance that is where the problem is, or there is some issues with enabling the serial port.

 

weewx was installed using the deb installation method, and seems to launch OK but does not appear to generate any loop data,

 

Serial Port appears to be there, not sure if I need to do some kind of config on it, eg 9600 baud?

 dmesg | grep tty
[    0.065487] printk: console [tty0] enabled
[    0.242012] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A

 

Anything obvious I've missed, known tricks with this weather station?

Log to follow.

Thanks,

keith

 

 

 

 

 

--
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 [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/8fe5af41-762a-4662-b342-96f916e9c759n%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/XBS4Rng1RdQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zECKTCUC1n5%3D_m8ORBRtK%3DxUKndVJ4HDiwBNELetd93MaA%40mail.gmail.com.

--
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 [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/MEYP282MB20404E0C7928AE8BCC6FCB89FD939%40MEYP282MB2040.AUSP282.PROD.OUTLOOK.COM.

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/XBS4Rng1RdQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEBrzFkP0omP8HDLaXdXj6xNg%3DpEd-VE_AidULCe3QBMHA%40mail.gmail.com.

 

--
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 [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/F0EC7799-CE64-40C4-BDC8-38C375DA4988%40hxcore.ol.

Reply via email to