Author Topic: Info about gw1000 weewx API driver  (Read 246 times)

0 Members and 1 Guest are viewing this topic.

Offline fra

  • Member
  • *
  • Posts: 6
Info about gw1000 weewx API driver
« on: October 09, 2021, 11:40:15 AM »
Good afternoon, I have a Walbeck Halley WH2650 with the WH32B indoor T/H/P sensor, the WS69 outdoor array and a WH57 lighting detector. I'm using weewx on a raspberry, sending data to Meteotemplate and a remote influxDb server+Grafana. At the moment I managed to get everything successfully working with a custom modified version of the Interceptor driver, but I was thinking to switch to the gw1000 api driver, in order to custom upload data to another external server (now I'm sending data to the local raspberry). I have two questions for those who are using it:
1. What happens if wifi drops or router reboots (I have scheduled a router reboot every night - a couple of minutes to complete the process -  to avoid issues with connection getting stuck - I'm using a usb sim card dongle) and the driver is unable to reach the wh2650? Will it crash /stop weewx (so that I have to manually restart it) or it will continue? (with the interceptor being a simple "sniffer" nothing bad happens).
2. Is the lightning_distance field treated correctly? What I mean is that while the units of the main station packet loop are imperial and stored as imperial in Weewx database (but shown and extracted as metric), the lightning_distance field provided by the WH57 is in kilometres (checked with the ecowitt app), causing a units' mismatch (it was one of the small modifications I had to made to the interceptor driver - it was thinking that lightning_distance was in miles, storing it directly to the database and giving a mismatched value)
Sorry for being a bit lenghty, thank you for any help you can offer   :-)

Offline Gyvate

  • Forecaster
  • *****
  • Posts: 1027
Re: Info about gw1000 weewx API driver
« Reply #1 on: November 07, 2021, 01:40:46 PM »
for a WH2650 the GW1000 API driver is the better choice over the interceptor driver.
The only thing is that in the respective section below you have to add:
#-------------- start excerpt w2eewx.conf ------------
[StdCalibrate]
  [[Corrections]]
    radiation = luminosity/126.7 if luminosity is not None else None
#--------------end excert weewx.conf ----------

as the GW1000 does not provide direct radiation info but luminosity (light) values

The GW1000 driver will try to reconnect several times before it gives up.

Regarding your daily router reboot, it should work - in the worst case weewx would lose one archiving interval (e.g. if the interval is 300 seconds/5 minutes and the reboot takes longer)
quote from the developer:
"... if the driver loses connectivity (ie no response is received to an API request) it retries the same command two more times and if still no response falls back to broadcast to locate the device (the MAC address is used to ensure the driver connects to the same device). If no response to the broadcast then the 60 sec delayed driver restart kicks in and if an IP address has been specified it should be used rather than using a broadcast ...."
Froggit WH4000SE (=EW 2320E) 1.6.0/GW1100 2.0.6/Froggit DP1500 1.6.8 (+EW GW1000 (4) 1.6.8 test/backup)/HP1000SE Pro (HP2551) 1.6.0/1.7.6, WH2650 WiFi (2) 1.6.8
Ecowitt WS80,WH40,WH65,WH31(5),WH31-EP(1),WN30/DP30 (1),WH32(1),WH32-EP(1),WH32B [T/H/P] (1), WH57 [Lightning] (1), WH41 [PM2.5] (2), WH51 [SoilMoisture] (5), WH45, WH55 (2)
Meteobridge Pro (2) [test,prod] 5.2 Oct 8 2021, 14568 - Blake-Larsen Sun Recorder - RPi4/weewx 4.5.1/CumulusMX 3152/MB RPi4 (2643)
Meteoshield Pro, MetSpec Rad02
Ecowitt 5763,34418;WU ISAARB3(WH4000SE), ISAARB22(HP2553);Weathercloud 3011399141, http://meshka.eu/