WeeWX / gw1000 issues

79 views
Skip to first unread message

James Litton

unread,
Dec 30, 2020, 11:49:22 PM12/30/20
to weewx-user
My wife bought me an EcoWitt GW1001 Weather Station for Christmas.  I set the unit up and have it reporting to Weather Underground and EcoWitt with no problems. I want to be able to report to other sites as well so I did some research and found WeeWX.  

I have two issues that are tripping me up:

(1) GW1000 Driver returns metric units.

I set my WeeWX server up along with the GW1000 Driver. All seemed fine until I noticed that my rainfall numbers were off.  After poking around, I noticed that the output of PYTHONPATH=/usr/share/weewx python3 -m user.gw1000 --test-driver
 shows my data (output below) in metric units instead of the expected imperial units.

2020-12-30 22:03:12 CST (1609387392): UV: 0, dateTime: 1609387392, dayRain: 54.6, daymaxwind: 4.6, inHumidity: 52, inTemp: 24.0, luminosity: 0.0, monthRain: 54.6, outHumidity: 99, outTemp: 11.6, pressure: 1006.7, rain: None, rainRate: 4.8, relbarometer: 1006.7, stormRain: 54.6, usUnits: 17, uvradiation: 0.1, weekRain: 54.6, wh65_batt: 0, windDir: 1, windGust: 0.0, windSpeed: 0.0, yearRain: 54.6

Running sudo /etc/init.d/weewx status includes the following in its output INFO user.gw1000: skipping rain measurement of 52.8: no last rain

I've searched for fixes to this, but can't seem to zero in on a solution.  I think StdConvert may play a role here (mine is set to US), but I'm not sure.

(1) Local Apache data updates every five minutes despite poll interval setting

My poll_interval setting in my weewx.conf file is set to poll_interval = 60 but for some reason my WeeWX reports are only updating every five minutes. 

Any suggestions for resolving this?

Thanks

gjr80

unread,
Dec 31, 2020, 1:07:27 AM12/31/20
to weewx-user
Hi,

Welcome to WeeWX. Let's see if we can sort your issues out. First up the five minute update v poll interval. What you are seeing is normal operation. The poll interval is how often the GW1000 driver polls your GW1000 for data, in your case it's every 60 seconds. The driver takes this data and creates what we call a loop packet. WeeWX accumulates these loop packets and at regular periods WeeWX synthesises what we call an archive record. In your case it sounds like your archive period is set to 300 seconds (five minutes). WeeWX saves this archive record to database and reports are then generated based on this and previous archive records in the database.

At the risk of throwing you in the deep end you might find it worthwhile reading the Introduction section of the Customization Guide, which includes the section on LOOP packets vs archive records.

Now for Metric units. You will see observations appear in various units throughout WeeWX. You might see units returned by the station when polled by the driver, you have the units emitted in the loop packets from the driver. You have the units in the archive record emitted by WeeWX, the units used in the WeeWX database and then the units used in any report generated by WeeWX. There are other places as well but these are the main ones. A given observation may appear in different units at one of these places compared to another, for example, your station may emit temperature in C but your database may store temperature in F and you may chose to display temperature in C in a report. At the end of the day the only thing that matters is that the units in any reports are what you want to see and that the values are correct.

One point of terminology, different observations use different units, for example temperature in C, humidity in %. Some of those observations will multiple different units that could be used, for example pressure in hPa, inHg, mbar, kPa. WeeWX uses what are called unit systems, with a unit system being a group of units that are used to cover all observation types supported by WeeWX. WeeWX uses three unit systems; US, Metric and MetricWX. Loop packets and archive records must follow one of these units systems. You will find further info on units in the Units section of the Customization Guide. Details of the units used in each of the three unit systems in at the Units appendix to the Customization Guide.

As it happens the GW1000 emits observations using Metric values (not the WeeWX Metric unit system). So any temperatures, rain, pressures and wind speeds received by the driver from the GW1000 will be in Metric units. In the case of the GW1000 driver it emits loop packets in the WeeWX MetricWX unit system (usUnits = 17 is the giveaway). This is what your are seeing when your run the driver directly with --test-driver. The unit system used by a driver is really up to the developer, in the case of the GW1000 since all obs are Metric with rain is in mm and speeds in metres/second, the obvious choice is the MetricWX unit system. For the Davis stations most obs from the station are in US customary units so that is the unit system of the loop packets emitted by the vantage driver. Some drivers need to do conversion of various obs from one unit to another to fit in with the unit system of the loop packets being emitted by the driver. At the end of the day it does not matter as WeeWX takes care of unit conversions when and where necessary. Generally speaking, you cannot change the units emitted by the driver without modifying the driver code.

Again in your case I suspect that your database will use US customary units (if you were to look at your database you would find temperatures in F despite the GW1000 driver emittign temperatures in C). In the case of the GW1000 WeeWX takes care of converting the loop packet data from MetrixWX to US customary. Your archive records produced by WeeWX will use the MetricWX unit system but will be converted to US customary before being stored in your database.

Reports that are generated by WeeWX use a system of tags to populate the reports with data from the database and elsewhere. Where applicable these tags use a default unit that is specified in skin.conf or under [StdReport] in weewx.conf. Where applicable it is also possible to force a particular tag to use a given unit rather than the default. If you are a glutton for punishment you can read about tags and their use of units in the Tags section of the Customization Guide.

The above has only scratched the surface regarding units, have a good read through and look at some of the links I have provided (they are better written than my words) and see if that gives you a clearer picture of what is going on and if that then answers your questions.

At the end of the day don't get wrapped about units, consistency and output is what matters.

Gary

vince

unread,
Dec 31, 2020, 1:40:22 PM12/31/20
to weewx-user
James - US Ecowitt user here - I can confirm my Ecowitt database is indeed in US units, with no modifications done to make that so.

James Litton

unread,
Jan 1, 2021, 8:58:45 AM1/1/21
to weewx-user
Thanks guys.
Reply all
Reply to author
Forward
0 new messages