GW1000 APi Driver - Additional Data in Weewx?

98 views
Skip to first unread message

NanoG5Kite

unread,
Aug 3, 2020, 6:31:47 AM8/3/20
to weewx-user
I´m wondering now, how to possible get the additional Data displayed correctly in weewx?

E.g. Ligtning and Battery Status:

What I tried so far in weewx.conf:

# Options for extension 'GW1000'
[Accumulator]
    [[lightning_last_det_time]]
        extractor = last
    [[lightning_strike_count]]
        extractor = sum
    [[wh55_ch4_batt]]
        extractor = last
    [[dayRain]]
        extractor = last
    [[wh41_ch3_batt]]
        extractor = last
    [[wh51_ch1_batt]]
        extractor = last
    [[wh25_batt]]
        extractor = last
    [[wh31_ch1_batt]]
        extractor = last
    [[stormRain]]
        extractor = last
    [[wh31_ch8_batt]]
        extractor = last
    [[wh65_batt]]
        extractor = last
    [[wh51_ch15_batt]]
        extractor = last
    [[wh57_batt]]
        extractor = last
    [[yearRain]]
        extractor = last
    [[daymaxwind]]
        extractor = last
    [[24havpm252]]
        extractor = last
    [[wh51_ch12_batt]]
        extractor = last
    [[wh31_ch4_batt]]
        extractor = last
    [[wh55_ch1_batt]]
        extractor = last
    [[wh51_ch11_batt]]
        extractor = last
    [[wh51_ch13_batt]]
        extractor = last
    [[wh41_ch4_batt]]
        extractor = last
    [[wh41_ch2_batt]]
        extractor = last
    [[wh31_ch2_batt]]
        extractor = last
    [[wh51_ch16_batt]]
        extractor = last
    [[hourRain]]
        extractor = last
    [[lightning_distance]]
        extractor = last
    [[24havpm251]]
        extractor = last
    [[wh51_ch14_batt]]
        extractor = last
    [[wh51_ch10_batt]]
        extractor = last
    [[wh41_ch1_batt]]
        extractor = last
    [[wh51_ch5_batt]]
        extractor = last
    [[weekRain]]
        extractor = last
    [[wh51_ch2_batt]]
        extractor = last
    [[wh51_ch7_batt]]
        extractor = last
    [[wh51_ch8_batt]]
        extractor = last
    [[wh31_ch7_batt]]
        extractor = last
    [[monthRain]]
        extractor = last
    [[wh31_ch6_batt]]
        extractor = last
    [[ws80_batt]]
        extractor = last
    [[wh31_ch3_batt]]
        extractor = last
    [[wh68_batt]]
        extractor = last
    [[wh31_ch5_batt]]
        extractor = last
    [[wh40_batt]]
        extractor = last
    [[totalRain]]
        extractor = last
    [[wh51_ch4_batt]]
        extractor = last
    [[wh51_ch6_batt]]
        extractor = last
    [[wh51_ch9_batt]]
        extractor = last
    [[24havpm253]]
        extractor = last
    [[wh51_ch3_batt]]
        extractor = last
    [[wh55_ch3_batt]]
        extractor = last
    [[wh55_ch2_batt]]
        extractor = last
    [[24havpm254]]
        extractor = last
    [[wh26_batt]]
        extractor = last



[[[[Generic]]]]
                ........
        lightning_strike_count = Strikes
        lightning_last_det_time = Last Strike
        lightning_distance = Strike Distance
        wh65_batt = WH65 Battery
        wh57_batt = WH57 Battery

skin.conf in Belchertown:

station_observations = "barometer", "dewpoint", "windchill", "heatindex", "outHumidity", "rainWithRainRate", "radiation", "UV", "visibility", "cloudbase","lightning_distance", "lightning_last_det_time", "lightning_strike_count", "wh65_batt", "wh57_batt"


root@DietPi:~# PYTHONPATH=/home/weewx/bin python -m user.gw1000 --test-driver
Using configuration file /home/weewx/weewx.conf

Interrogating GW1000 at 192.168.12.189:45000

2020-08-03 12:08:07 CEST (1596449287): UV: 8, dateTime: 1596449287, dayRain: 0.3, daymaxwind: 2.0, inHumidity: 50, inTemp: 24.5, lightning_distance: None, lightning_last_det_time: None, lightning_strike_count: None, luminosity: 109709.0, monthRain: 12.2, outHumidity: 66, outTemp: 19.7, pressure: 1012.0, rain: None, rainRate: 0.0, relbarometer: 1013.6, stormRain: 0.0, usUnits: 17, uvradiation: 334.7, weekRain: 12.2, wh57_batt: 3, wh65_batt: 0, windDir: 334, windGust: 2.0, windSpeed: 1.3, yearRain: 198.7


During the mqtt connection I get resonable battery and strike count values - but the "undifined" text in written - screenshot at the bottom.

With mqtt unconneted as follows:

Strike Distance N/A
Last StrikeInvalid observation
Strikes0,000000
WH65 BatteryInvalid observation
WH57 BatteryInvalid observation

Belchertown.JPG

NanoG5Kite

unread,
Aug 3, 2020, 6:33:48 AM8/3/20
to weewx-user
Forgot to mention that since the last reset my WH57 did not recorded any lightning strikes, but like to stay prepared to record now... ;-)

gjr80

unread,
Aug 3, 2020, 8:21:48 PM8/3/20
to weewx-user
The —test-driver output you posted seems to show the driver is properly obtaining data from the GW1000 and sensors. I suggest you run WeeWX directly (http://weewx.com/docs/usersguide.htm#Running_directly) and observe the loop packets (lines starting with LOOP:) and archive records (lines starting with REC:) displayed on the console. If they look correct the driver is doing its job.

What Belchertown and MQTT require I do not know, that is a question for Pat and the Belchertown users. Perhaps it is a simple config change, perhaps it is more involved. If either Belchertown or MQTT need GW1000 data to be saved to archive then two conditions must be met. First the field(s) concerned must appear in the archive record emitted by WeeWX and secondly the field(s) concerned must exist in your database schema.

Gary
Reply all
Reply to author
Forward
0 new messages