GW1000 Ecowitt Gateway

205 views
Skip to first unread message

jmltech

unread,
Jan 9, 2023, 3:42:09 PM1/9/23
to weewx-user
Hi, I am rebuilding my server, and installed a new fresh install of weewx version 4.9.1 and tested using the simulator driver.... all is good.  values from the simulator are updated in the archive table.

I then installed the Ecowitt Gateway as a service following the install instructions on the wiki... version 0.5.0b5

I tested the Ecowitt Gateway service using the --live-data command line option as well as --test-service command line option, and all is well... the service is reading my gateway fine, and is picking up all of my sensors along with their values.

The problem that I'm seeing is that I didn't see any updates to the weewx.sdb database for the ecowitt gateway after install.  I also noticed that the Ecowitt Gateway has lots of added fields listed in the home/weewx/bin/user/gw1000.py, but I didn't see any of those added to my weewx.sdb database after first run, or after any of the achive packets were updated to the archive table.

Am I supposed to add these fields manually? Or is the Ecowitt Gateway service supposed to add them on install, or add them dynamically on first use?

If I add a field_map_extensions to the weewx.conf under the [GW1000] stanza such as:
    [[field_map_extensions]]
        extraTemp9 = intemp
        extraHumid9 = inhumid
and restart weewx... my ecowitt sensor values isn't added, even though I see the intemp and inhumid in the loop packets in the log file using debug=3.  I don't see an extraTemp9 or an extraHumid9 listed in the database, even though this is one of the fields listed in the gw1000.py driver.  The values from the simulator driver are being added to the archive table.

However, if I add a field_map_extensions to the weewx.conf under the [GW1000] stanza such as:
    [[field_map_extensions]]
        extraTemp5 = intemp
        extraHumid5 = inhumid
and restart weewx, I now see the values being added to the weewx.sdb archive table for extraTemp5 and extraHumid5 that came from my ecowitt sensor (as well as the values from the simulator)

so, it appears that none of the ecowitt field names were added to the archive table on install.  If I'm supposed to add them manually, then the wiki install instructions need to be updated.

Thanks for the help,
Joe


vince

unread,
Jan 9, 2023, 4:03:47 PM1/9/23
to weewx-user
The driver isn't going to alter your weewx db schema if that's what you're asking.

There's no extraTemp9 or extraHumid9 in the weewx db schema.  You might want to map your ecowitt sensors to some elements already in the weewx schema to keep things simple.

What sensors do you have and what channels are they on ?

jmltech

unread,
Jan 9, 2023, 4:24:03 PM1/9/23
to weewx-user
Thanks. After checking the install and driver python code, I didn’t see anything that would add the extra fields to the database… but I’m a python novice, so didn’t know if weewx would add dynamically. What is confusing is all of he field names listed in the install driver. I guess that is done for future use. 

For EcoWitt, I have:
Gateway that is reporting intemp and inhumid, as well as barometer?
5 - WH31 on channels 1-5
1 - WH32 that cam with the Gateway, reporting Outtemp and OutHumid
1 - WN34BL pond thermometer 

Right now they are all sitting on my workbench, since I’m testing them out with weewx. 

I am running this as a service, since my main driver will be my existing Davis Vantage Pro2 with a connected data logger weather station. After testing on the new server, I do plan on migrating my existing weewx.sdb database over to the new server, so it will be easy to add the extra fields. I have about 7 years of data that I want to keep. The Ecowitts are new, so I figured it was a good time to upgrade. My old server is running weewx version 3.9.2 under Ubuntu and I have some zwave devices that reported temperature, that I will move away from

vince

unread,
Jan 9, 2023, 4:43:36 PM1/9/23
to weewx-user
You have 8 extraT+H fields and 8 devices so you're set.

  • Map the WH31 to extraWhatever1-5 matching their channel settings
  • Set the WN34BL to channel 6, 7, or 8 and map it to the matching extraWhateverNNN field for consistency
  • Map the WH32 to whatever is still unused in extraTemp1-8 since you can only have one of those
  • Map the gateway to whatever is still unused in extraTemp1-8 since the VP2 will kinda win grabbing the inTemp+Humid fields
FWIW - I do my Ecowitt stuff in docker in one db and do MQTT publish from there.  My VP2 does MQTT-subscribe to the Ecowitt topics to seed the weewx db.  It made it simpler for my brain that day.

Now when you grab your 9th extra sensor, then you will likely have a little work to do...

gjr80

unread,
Jan 9, 2023, 5:13:22 PM1/9/23
to weewx-user
A couple of points that might help:
  • for an observation to be recorded in the database two fundamental conditions must be met:
  1. the field/observation concerned must exist in the archive records generated by WeeWX (this can be checked by running WeeWX directly and observing the loop packets (LOOP: lines) and archive records (REC: lines) that appear on the console
  2. the field/observation must appear in the database archive table schema, for a default clean install this will be the wview_extended schema, if you are upgrading a old installation or have previously modified your schema your schema may be different
  • as a rule of thumb drivers do not modify the database schema, programatically it could be done but I would suggest that it would add significant complexity to a driver and its operation would be fraught with danger, off the top of my head I cannot think of a single driver that modifies the database schema
  • I would recommend against trying to read through the driver to understand the fields used by the driver, the Ecowitt gateway driver uses a complex series of mappings  to produce its output to WeeWX. The wiki contains a comprehensive table of available fields showing the default field mapping that should more than suffice.
The Ecowitt gateway driver wiki is publicly editable, if there is a shortfall or incorrect information feel free to make appropriate changes.
 

jmltech

unread,
Jan 9, 2023, 5:21:35 PM1/9/23
to weewx-user
Thanks Vince. That sounds easy enough. What about the pressure?  Since the Davis already reports pressure, I was thinking of ignore the pressure from the gateway.

 So, that only leaves battery and signal. 

vince

unread,
Jan 9, 2023, 6:57:28 PM1/9/23
to weewx-user
Here for me, I mapped the inside T+H since the gateway is in a different room, but ignore anything else it might have since the VP2 is about 5 feet away as the long power drill drills...
Reply all
Reply to author
Forward
0 new messages