Using two GW1000

62 views
Skip to first unread message

Bret

unread,
Feb 5, 2022, 12:07:12 PM2/5/22
to weewx-user
I have an Ambient WS-1550-IP along with quite a few Ambient and Ecowitt sensors.  Since the GW1000 will work with all of my sensors, I'm using that instead of my original ObserverIP.  However, I have more than eight WH31s and therefore am also running a second GW1000.

Mostly I've just been using WS View, ecowitt.net, and my own PHP to view current data.  However, I've been reading about WeeWX for over a year in hopes to use it to store and look at the data over time.  I've gotten it working fine with the first GW1000 using the weewx-gw1000 driver but the second one seems like it's going to require a second instance and database, etc.

Since I'm a programmer, I was wondering if there were any ingenious ways I might be able to combine the data together and be able to keep it in one WeeWX instance.  I fully realize that it will be custom and I don't expect anyone to help support it.  A few of my initial ideas are to run two copies of the weewx-gw1000 driver and somehow combine the data before it is passed into WeeWX.  I know I could set both GW1000 up to post the data to a PHP and then write the data to a file and use the fileparse driver but I'd prefer to use the GW1000 pull API and only write the stuff to interface this all together.

I have very little Python experience but I've used enough languages that I'm not afraid of it.  I also realize that my background and desire to customize things to my liking mean that I'll probably be diving more into Python.  I just don't want to customize things so much that I can't upgrade to new versions of WeeWX, etc.

Any ideas and advice will be greatly appreciated.

Bret

Tom Keffer

unread,
Feb 5, 2022, 4:41:29 PM2/5/22
to weewx-user
Certainly running two instances would be the simplest, each writing to a separate database. One instance would then do the reporting, using both databases.

I believe that the gw-1000 driver can be run as a WeeWX service, as well as a regular driver, so I suppose another strategy would be to do both. The driver being run as a service would augment the driver being run as a driver. Gary would know more about this.

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/237a96bd-332a-4311-9d64-c003ecaeb776n%40googlegroups.com.

gjr80

unread,
Feb 5, 2022, 7:02:45 PM2/5/22
to weewx-user
Whilst it's true that the GW1000 driver can operate as both a driver and a service the GW1000 driver was never designed to operate both at the same time on the same WeeWX instance (the main limitation in this regard is that both the driver and the service use the same [GW1000] config stanza). Having a quick (emphasis on quick) look at the GW1000 driver it may be possible to have the service use a different config stanza, say [GW1000Service], by changing class Gw1000Service() to extract it's GW1000 config dict from [GW1000Service], eg:

class Gw1000Service(weewx.engine.StdService, Gw1000):
....

     def __init__(self, engine, config_dict):
     """Initialise a Gw1000Service object."""

         # extract the GW1000/GW1100 service config dictionary
         gw1000_config_dict = config_dict.get('GW1000Service', {})

You would definitely need to specify IP addresses for each GW1000 (ie not use discovery) and you would need a custom field map for either the driver or the service.

I don't know if this will work or not, class Gw1000Service has dual inheritance and this may cause an issue with what GW1000 config dict is used where, so no guarantees. There may be other changes required. If it were me I would learn to live with two databases, it certainly won't limit WeeWX.

Gary
Reply all
Reply to author
Forward
0 new messages