Dew point from WH31

128 views
Skip to first unread message

Acacia

unread,
Jun 17, 2021, 7:16:16 PM6/17/21
to weewx-user
Still quite new to WeeWX and how to configure it.

I have a WH31 connected to a GW1000 which is delivering extraTemp1 and extraHumid1 to WeeWX. I'd like to monitor the dew point from the WH31 sensor.

In looking over the documentation and code, I see the dewpoint and inDewpoint are calculated (and there is a nice calculator function to compute the dew point). I also see a dewpoint1, but that doesn't seem to be calculated from anything and is empty.

What is the best way to add the dew point for extraTemp1 and extraHumid1?

Do I need to create a new XType? 

That struck me as a little more complex than I was expecting, so figured I'd see if there is a simpler way to calculate, monitor and store the dew point from the WH31.

Thank you for helping a newbie,
j.

gjr80

unread,
Jun 19, 2021, 12:56:51 AM6/19/21
to weewx-user
Hi,

Best done as a very simple XType that calls the dew point function you mention. Provided you store the result in an existing (and preferably unused) field in your database schema (eg dewpoint1 if you are using the extended schema) then WeeWX will automatically save your new dewpoint to database making it available for use in plots and aggregates in reports.

Gary

gjr80

unread,
Aug 18, 2021, 11:00:57 PM8/18/21
to weewx-user
The problem you are having is with the ImageGenerator, the WeeWX generator that generates the plots. We are going to need a little more info to track this down. To start with can you post a copy of your dewpoint1 xtype code. Also, does the error occur on each report cycle or only now and then? Finally, can you provide a little more log file, perhaps a couple or report cycles.

Gary


Thank you, Gary.

With your pointer, I've gone ahead and created an XType that calculates the dew point from the WH31 sensor. 

Oddly, I keep running into a problem where it's being called via weewx.reportengine but 'extraTemp1' and 'extraHumid1' are set to None even though I've confirmed the values are in the raw data from the GW1000 sensor and being calculated by the driver as 'extraTemp1' and 'extraHumid1'.

Aug 17 13:45:26 raspberrypi weewx[5892] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 1.09 seconds
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.imagegenerator.ImageGenerator'
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****  {'dateTime': 1629140700, 'usUnits': 1, 'interval': 5, 'altimeter': 29.77096147392996, 'appTemp': 76.33914411582903, 'appTemp1': None, 'barometer': 29.75260458370075, 'batteryStatus1': None, 'batteryStatus2': None, 'batteryStatus3': None, 'batteryStatus4': None, 'batteryStatus5': None, 'batteryStatus6': None, 'batteryStatus7': None, 'batteryStatus8': None, 'cloudbase': 3665.7417182603513, 'co': None, 'co2': None, 'consBatteryVoltage': None, 'dewpoint': 59.94135712930961, 'dewpoint1': None, 'ET': None, 'extraHumid1': None, 'extraHumid2': None, 'extraHumid3': None, 'extraHumid4': None, 'extraHumid5': None, 'extraHumid6': None, 'extraHumid7': None, 'extraHumid8': None, 'extraTemp1': None, 'extraTemp2': None, 'extraTemp3': None, 'extraTemp4': None, 'extraTemp5': None, 'extraTemp6': None, 'extraTemp7': None, 'extraTemp8': None, 'forecast': None, 'hail': None, 'hailBatteryStatus': None, 'hailRate': None, 'heatindex': 73.952275862069, 'heatindex1': None, 'heatingTemp': None, 'heatingVoltage': None, 'humidex': 81.69790555830637, 'humidex1': None, 'inDewpoint': 61.50059246006814, 'inHumidity': 58.0, 'inTemp': 77.45931034482756, 'inTempBatteryStatus': None, 'leafTemp1': None, 'leafTemp2': None, 'leafWet1': None, 'leafWet2': None, 'lightning_distance': None, 'lightning_disturber_count': None, 'lightning_energy': None, 'lightning_noise_count': None, 'lightning_strike_count': None, 'luminosity': 92094.8275862069, 'maxSolarRad': None, 'nh3': None, 'no2': None, 'noise': None, 'o3': None, 'outHumidity': 61.6551724137931, 'outTemp': 73.95862068965516, 'outTempBatteryStatus': None, 'pb': None, 'pm10_0': None, 'pm1_0': None, 'pm2_5': None, 'pressure': 29.255053133620695, 'radiation': None, 'rain': 0.0, 'rainBatteryStatus': None, 'rainRate': 0.0, 'referenceVoltage': None, 'rxCheckPercent': None, 'signal1': None, 'signal2': None, 'signal3': None, 'signal4': None, 'signal5': None, 'signal6': None, 'signal7': None, 'signal8': None, 'snow': None, 'snowBatteryStatus': None, 'snowDepth': None, 'snowMoisture': None, 'snowRate': None, 'so2': None, 'soilMoist1': 41.0, 'soilMoist2': 1.0, 'soilMoist3': 1.0, 'soilMoist4': 0.0, 'soilTemp1': None, 'soilTemp2': None, 'soilTemp3': None, 'soilTemp4': None, 'supplyVoltage': None, 'txBatteryStatus': None, 'UV': 6.724137931034483, 'uvBatteryStatus': None, 'windBatteryStatus': None, 'windchill': 73.95862068965516, 'windDir': 18.585077538154152, 'windGust': 6.934519741011844, 'windGustDir': 45.0, 'windrun': 0.12920267593097706, 'windSpeed': 1.5504321111717245, 'dewpoint2': None, 'dewpoint3': None, 'dewpoint4': None, 'dewpoint5': None, 'dewpoint6': None, 'dewpoint7': None, 'dewpoint8': None, 'heatindex2': None, 'heatindex3': None, 'heatindex4': None, 'heatindex5': None, 'heatindex6': None, 'heatindex7': None, 'heatindex8': None, 'wetbulb': None, 'wetbulb1': None, 'wetbulb2': None, 'wetbulb3': None, 'wetbulb4': None, 'wetbulb5': None, 'wetbulb6': None, 'wetbulb7': None, 'wetbulb8': None, 'thw': None, 'thsw': None, 'inHeatindex': None, 'rainCount': None, 'rainCountRate': None, 'rainSize': None}
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****  Traceback (most recent call last):
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 196, in run
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****      obj.start()
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 281, in start
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****      self.run()
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 41, in run
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****      self.genImages(self.gen_ts)
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/imagegenerator.py", line 181, in genImages
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****      aggregate_interval=aggregate_interval)
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/xtypes.py", line 88, in get_series
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****      aggregate_interval)
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/xtypes.py", line 969, in get_series
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****      value = get_scalar(obs_type, record, db_manager)
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/xtypes.py", line 73, in get_scalar
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****      return xtype.get_scalar(obs_type, record, db_manager)
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/mechrmdewpoint.py", line 53, in get_scalar
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****      raise weewx.CannotCalculate(data) #obs_type)
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****  weewx.CannotCalculate: {'dateTime': 1629140700, 'usUnits': 1, 'interval': 5, 'altimeter': 29.77096147392996, 'appTemp': 76.33914411582903, 'appTemp1': None, 'barometer': 29.75260458370075, 'batteryStatus1': None, 'batteryStatus2': None, 'batteryStatus3': None, 'batteryStatus4': None, 'batteryStatus5': None, 'batteryStatus6': None, 'batteryStatus7': None, 'batteryStatus8': None, 'cloudbase': 3665.7417182603513, 'co': None, 'co2': None, 'consBatteryVoltage': None, 'dewpoint': 59.94135712930961, 'dewpoint1': None, 'ET': None, 'extraHumid1': None, 'extraHumid2': None, 'extraHumid3': None, 'extraHumid4': None, 'extraHumid5': None, 'extraHumid6': None, 'extraHumid7': None, 'extraHumid8': None, 'extraTemp1': None, 'extraTemp2': None, 'extraTemp3': None, 'extraTemp4': None, 'extraTemp5': None, 'extraTemp6': None, 'extraTemp7': None, 'extraTemp8': None, 'forecast': None, 'hail': None, 'hailBatteryStatus': None, 'hailRate': None, 'heatindex': 73.952275862069, 'heatindex1': None, 'heatingTemp': None, 'heatingVoltage': None, 'humidex': 81.69790555830637, 'humidex1': None, 'inDewpoint': 61.50059246006814, 'inHumidity': 58.0, 'inTemp': 77.45931034482756, 'inTempBatteryStatus': None, 'leafTemp1': None, 'leafTemp2': None, 'leafWet1': None, 'leafWet2': None, 'lightning_distance': None, 'lightning_disturber_count': None, 'lightning_energy': None, 'lightning_noise_count': None, 'lightning_strike_count': None, 'luminosity': 92094.8275862069, 'maxSolarRad': None, 'nh3': None, 'no2': None, 'noise': None, 'o3': None, 'outHumidity': 61.6551724137931, 'outTemp': 73.95862068965516, 'outTempBatteryStatus': None, 'pb': None, 'pm10_0': None, 'pm1_0': None, 'pm2_5': None, 'pressure': 29.255053133620695, 'radiation': None, 'rain': 0.0, 'rainBatteryStatus': None, 'rainRate': 0.0, 'referenceVoltage': None, 'rxCheckPercent': None, 'signal1': None, 'signal2': None, 'signal3': None, 'signal4': None, 'signal5': None, 'signal6': None, 'signal7': None, 'signal8': None, 'snow': None, 'snowBatteryStatus': None, 'snowDepth': None, 'snowMoisture': None, 'snowRate': None, 'so2': None, 'soilMoist1': 41.0, 'soilMoist2': 1.0, 'soilMoist3': 1.0, 'soilMoist4': 0.0, 'soilTemp1': None, 'soilTemp2': None, 'soilTemp3': None, 'soilTemp4': None, 'supplyVoltage': None, 'txBatteryStatus': None, 'UV': 6.724137931034483, 'uvBatteryStatus': None, 'windBatteryStatus': None, 'windchill': 73.95862068965516, 'windDir': 18.585077538154152, 'windGust': 6.934519741011844, 'windGustDir': 45.0, 'windrun': 0.12920267593097706, 'windSpeed': 1.5504321111717245, 'dewpoint2': None, 'dewpoint3': None, 'dewpoint4': None, 'dewpoint5': None, 'dewpoint6': None, 'dewpoint7': None, 'dewpoint8': None, 'heatindex2': None, 'heatindex3': None, 'heatindex4': None, 'heatindex5': None, 'heatindex6': None, 'heatindex7': None, 'heatindex8': None, 'wetbulb': None, 'wetbulb1': None, 'wetbulb2': None, 'wetbulb3': None, 'wetbulb4': None, 'wetbulb5': None, 'wetbulb6': None, 'wetbulb7': None, 'wetbulb8': None, 'thw': None, 'thsw': None, 'inHeatindex': None, 'rainCount': None, 'rainCountRate': None, 'rainSize': None}
Aug 17 13:45:26 raspberrypi weewx[5892] ERROR weewx.reportengine:         ****  Generator terminated

I'm kind of at a loss what I've got misconfigured, as it appears as if I'm getting a good graph based on the sensor data:



Any suggestions on why I'm getting into my XType with extraTemp1 and extraHumid1 set to None when the driver has it?

pi@raspberrypi:/usr/share/weewx $ python3 -m user.gw1000 --test-driver
Using configuration file /etc/weewx/weewx.conf

Interrogating GW1000 at 10.1.5.22:45000

2021-08-17 13:57:23 PDT (1629233843): UV: 6, dateTime: 1629233843, dayRain: 0.0, daymaxwind: 4.9, extraHumid1: 56, extraTemp1: 16.5, inHumidity: 50, inTemp: 27.1, luminosity: 90670.0, monthRain: 0.0, outHumidity: 40, outTemp: 27.2, pressure: 988.6, rain: None, rainRate: 0.0, relbarometer: 988.6, soilMoist1: 41, soilMoist2: 0, soilMoist3: 1, soilMoist4: 0, stormRain: 0.0, usUnits: 17, uvradiation: 229.2, weekRain: 0.0, wh31_ch1_batt: 0, wh31_ch1_sig: 0, wh40_batt: 0, wh40_sig: 4, wh51_ch1_batt: 1, wh51_ch1_sig: 4, wh51_ch2_batt: 1, wh51_ch2_sig: 4, wh51_ch3_batt: 1, wh51_ch3_sig: 4, wh51_ch4_batt: 1, wh51_ch4_sig: 4, windDir: 342, windGust: 1.8, windSpeed: 0.0, ws80_batt: 3.22, ws80_sig: 4, yearRain: 0.0

Thanks in advance for any help!

j.

Reply all
Reply to author
Forward
0 new messages