$hour.pm2_5.has_data is always false

259 views
Skip to first unread message

sbar...@gmail.com

unread,
Apr 10, 2021, 8:50:36 AM4/10/21
to weewx-user
Hi, 

I am trying to improve my station sking with a proper AQI computation/display. however when using $hour.pm2_5.has_data it is always false.

Data is stored in the pm2_5 column of weewx archive database. Gauges show the current values, and history plot show prior data.

Is there a setting I need to add somewhere so that hourly average can be computed on this column as well?

Regards,

Tom Keffer

unread,
Apr 10, 2021, 10:49:26 AM4/10/21
to weewx-user
Well, you can check what's in the database for the last hour.  Adjust the path to the database as necessary.

sqlite3 /var/lib/weewx/weewx.sdb
sqlite> select datetime(dateTime,'unixepoch','localtime'),pm2_5 from archive where dateTime>=(select max(dateTime)-3600 from archive);



--
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/6110a7ae-2012-47b9-9ffe-0cc7c8c67837n%40googlegroups.com.

sbar...@gmail.com

unread,
Apr 10, 2021, 10:58:06 AM4/10/21
to weewx-user
I checked, (I adjusted the query a bit since I am on mysql), but it confirmed there are 31 rows in the last 1 hour.

I ran :
select count(*),avg(pm2_5),max(pm2_5) from archive where dateTime>=(select max(dateTime)-3600 from archive);

and got : 
count(*) avg(pm2_5) max(pm2_5)

31   1.0897849462365594  1.2

Tom Keffer

unread,
Apr 12, 2021, 11:10:19 AM4/12/21
to weewx-user
Sorry, I don't have an explanation.

Can we see the [DataBindings], [Databases], and [DatabaseTypes] sections of weewx.conf? You can obfuscate any passwords.

sbar...@gmail.com

unread,
Apr 12, 2021, 4:07:24 PM4/12/21
to weewx-user
Hi,

Here are the requested sections : 
##############################################################################

#   This section binds a data store to a database.

[DataBindings]
    
    [[wx_binding]]
        # The database must match one of the sections in [Databases].
        # This is likely to be the only option you would want to change.
        database = archive_mysql
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.wxmanager.WXDaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        schema = schemas.wview.schema
    [[wd_binding]]
        manager = weewx.manager.DaySummaryManager
        schema = user.wdschema.weewxwd_schema
        table_name = archive
        database = weewxwd_mysql
    [[forecast_binding]]
        database = forecast_mysql
        manager = weewx.manager.Manager
        schema = user.forecast.schema
        table_name = archive
    [[wdsupp_binding]]
        database = wd_supp_mysql
        table_name = supp
        manager = weewx.manager.Manager
        schema = user.wdschema.wdsupp_schema
    [[pm_binding]]
        database = archive_mysql
        table_name = archive
        manager = weewx.wxmanager.WXDaySummaryManager
        schema = user.sds011.schema

##############################################################################

#   This section defines various databases.
[Databases]
    
    # A SQLite database is simply a single file
    [[archive_sqlite]]
        database_name = weewx.sdb
        database_type = SQLite
    
    # MySQL
    [[archive_mysql]]
        database_type = MySQL
        database_name = weewx
        host = 
        user = 
        password = 
    [[weewxwd_mysql]]
        database_name = weewxwd
        database_type = MySQL
        host = 
        user = 
        password = 
    [[weewxwd_sqlite]]
        database_name = weewxwd.sdb
        root = %(WEEWX_ROOT)s
        database_type = SQLite
    [[forecast_sqlite]]
        database_name = forecast.sdb
        database_type = SQLite
    [[forecast_mysql]]
        database_name = forecast
        database_type = MySQL
        host = 
        user = 
        password = 
    [[wd_supp_sqlite]]
        database_type = SQLite
        database_name = wdsupp.sdb
    [[wd_supp_mysql]]
        database_name = weewxwd
        database_type = MySQL
        host = 
        user = 
        password = 
    [[pm_sqlite]]
        database_name = pm.sdb
        database_type = SQLite

##############################################################################

#   This section defines defaults for the different types of databases.

[DatabaseTypes]
    
    # Defaults for SQLite databases
    [[SQLite]]
        driver = weedb.sqlite
        # Directory in which the database files are located
        SQLITE_ROOT = %(WEEWX_ROOT)s/archive
    
    # Defaults for MySQL databases
    [[MySQL]]
        driver = weedb.mysql
        # The host where the database is located
        host = localhost
        # The user name for logging in to the host
        user = 
        # The password for the user name (quotes guard against parsing errors)
        password = 

##############################################################################

While reviewing this, I noticed the manager line in the PM_Binding. Could this be the issue? 



Tom Keffer

unread,
Apr 12, 2021, 4:15:16 PM4/12/21
to weewx-user
That's a lot of bindings and databases. Which one are you using for your $hour.pm2_5.has_data query? In fact, maybe you should tell us the exact tag you are using.

-tk

sbar...@gmail.com

unread,
Apr 12, 2021, 4:28:25 PM4/12/21
to weewx-user
Sure,

Sorry for this.

So I am using the archive_mysql binding. It holds the archive database filled by my driver loop (which is SDR).
I have an additional SDS011 service that fills in the pm2_5 and pm10 columns. This 2 columns have been added to the archive table.

So despite the complicated conf, this is just one binding for my 'live data'.(Maybe I should clean this up.)

Tom Keffer

unread,
Apr 12, 2021, 5:52:53 PM4/12/21
to weewx-user
Sorry again, but I am unable to reproduce this. It works fine on my test setup.

Do all variables exhibit this? For example, $hour.outTemp.has_data?

sbar...@gmail.com

unread,
Apr 13, 2021, 3:56:16 PM4/13/21
to weewx-user
Hi, 

I tried to get $hour.outTemp.avg, and just got N/A

but $day.pm2_5.avg does work and give me the average over the last 24h. So it seems my setup is only messing up the "hourly" summary. Any idea where I should look to try figure this one out?

Regards,

Tom Keffer

unread,
Apr 13, 2021, 10:12:34 PM4/13/21
to weewx-user
Queries for time spans that are multiples of a day or done on the daily summary. Otherwise, on the main archive table. So $day uses the daily summary, and $hour uses the main archive table.

$hour.outTemp.avg could give you N/A either because outTemp does not appear in the schema, or because there are no data.

What do these give you?

    <p>\$hour.outTemp.has_data = $hour.outTemp.has_data</p>
    <p>\$hour.outTemp.avg = $hour.outTemp.avg</p>
    <p>\$hour.pm2_5.has_data = $hour.pm2_5.has_data</p>
    <p>\$hour.pm2_5.avg = $hour.pm2_5.avg</p>

-tk


sbar...@gmail.com

unread,
Apr 14, 2021, 2:34:59 AM4/14/21
to weewx-user
Hello,

I admit I fell from my chair when trying your above sample, and seeing the results. :).
The sample interestingly shows has_data = false, but pm2_5.avg gets calculated. (you can check output, plus the ones I actually need there : http://meteobron.ddns.net).

However, when I add : 
<snip>
##
#set $Avg1hPM25 = $hour.pm2_5.max
#set $Avg1hPM10 = $hour.pm10_0.max
{
</snip>
to the gauge-data.txt.tmpl of my steal series template, the resulting data is : 
{ "timeUTC":"2021,04,14,05,24,00", "date":"2021.04.14 07:24", "dateFormat":"y.m.d h:m", "SensorContactLost":"0", "tempunit":"C", "windunit":"km/h", "pressunit":"mb", "rainunit":"mm", "cloudbaseunit":"ft", "temp":"2.0", "tempTL":"1.9", "tempTH":"6.2", "TtempTL":"07:11:34 AM", "TtempTH":"12:00:44 AM", "temptrend":"-0.5", "intemp":"20.2", "intempTL":"18.4", "intempTH":"20.7", "TintempTL":"06:37:35 AM", "TintempTH":"12:03:07 AM", "hum":"58", "humTL":"43", "humTH":"59", "ThumTL":"12:00:44 AM", "ThumTH":"07:23:22 AM", "inhum":"40", "dew":"-5.3", "dewpointTL":"-5.9", "dewpointTH":"-5.1", "TdewpointTL":"04:54:51 AM", "TdewpointTH":"01:38:07 AM", "wchill":"2.0", "wchillTL":"1.9", "TwchillTL":"07:12:00 AM", "heatindex":"2.0", "heatindexTH":"4.4", "TheatindexTH":"02:27:18 AM", "apptemp":"-0.6", "apptempTL":"0", "apptempTH":"0", "TapptempTL":"", "TapptempTH":"", "humidex":"2.0", "press":"1026.3", "pressL":"863.5", "pressH":"1181.0", "pressTL":"1025.8", "pressTH":"1026.7", "TpressTL":"03:45:59 AM", "TpressTH":"12:55:49 AM", "presstrendval":"0.4", "rfall":"0.0", "rrate":"0.0", "rrateTM":"0.0", "TrrateTM":"12:00:12 AM", "hourlyrainTH":"0.0", "ThourlyrainTH":"", "LastRainTipISO":"2000-01-01 00:00", "wlatest":"0", "wspeed":"0", "windTM":"4", "wgust":"0", "wgustTM":"9", "TwgustTM":"03:34:00 AM", "bearing":" N/A", "avgbearing":"345", "bearingTM":" N/A", "BearingRangeFrom10":"000", "BearingRangeTo10":"000", "domwinddir":"NNW", "WindRoseData":[], "windrun":"1.4", "Tbeaufort":"F1", "UV":"0.0", "UVTH":"0.0", "SolarRad":"9", "SolarTM":"10", "CurrentSolarMax":"7", "cloudbasevalue":"3603", "forecast":"14-Apr-2021 19:00 0.6&#176;C Fair / Mostly Clear 15-Apr-2021 07:00 13.3&#176;C Fair / Mostly Sunny 15-Apr-2021 19:00 1.1&#176;C Partly Cloudy 16-Apr-2021 07:00 13.9&#176;C Partly Cloudy 16-Apr-2021 19:00 1.7&#176;C Partly Cloudy 17-Apr-2021 07:00 14.4&#176;C Partly Cloudy 17-Apr-2021 19:00 3.9&#176;C Partly Cloudy 18-Apr-2021 07:00 15.6&#176;C Partly Cloudy 18-Apr-2021 19:00 3.9&#176;C Partly Cloudy 19-Apr-2021 07:00 17.8&#176;C Partly Cloudy 19-Apr-2021 19:00 5.0&#176;C Partly Cloudy ", "version":"4.3.0", "build":"", "pm2_5":"1.233", "pm10":"2.200", "Avg1hPM25":" N/A", "Avg1hPM10":" N/A", "ver":"15" }

with my 2 PM measures showing as N/A.



Many thanks again.

sbar...@gmail.com

unread,
Apr 14, 2021, 2:35:49 AM4/14/21
to weewx-user
Below, is the full template file as google does not seem to allow me to attach a file to a post.

## template for json data to feed the steel series gauges
## $Id: gauge-data.txt.tmpl 1279 2015-03-01 15:49:03Z mwall $
## by Matthew Wall on flight 868 ;)
## 31dec2014
## Updated 25jan2015 by M Crossley, changed cloudbase: to cloudbasevalue:
## Updated 12jan2016 by M Crossley, fixes applied from here: https://groups.google.com/forum/#!topic/weewx-user/rDdSbzQWbFw
## Updated 12mar2016 by M Crossley, force pressure UoM mbar to mb.
##                                  added UoM consitency from unit_type rather than labels which can be localised
##                                  force rain in cm to mm as gauges do not currently handle cm's.
## Updated 04oct2016 by M Crossley, added changes from PR4
## Updated 3Jun2020  by G Roderick, rain calculations now tolerate a station that does not provide rain data
##                                  (as distinct from rain data that is 0)
## definitions for the tags can be found here:
##
## the following fields are not directly available from weewx:
##
## ver:10?
## apptemp - calculated in this template
## apptempTL
## apptempTH
## TapptempTL
## TapptempTH
## humidex - calculated in this template
## forecast - calculated by forecasting module
## LastRainTipISO
## Tbeaufort - calculated by this template
## BearingRangeFrom10 - lowest clockwise bearing in last 10 minutes
## BearingRangeTo10 - highest clockwise bearing in last 10 minutes
## CurrentSolarMax - calculated in this template
## WindRoseData
## windrun - calculated in this template
##
## ver:12
## cloudbasevalue - calculated in this template in feet
## cloudbaseunit - defined in this template as ft
##
## ver:13
## changed UoMs
##
#import math
#import time
##
## get the time in formats that we need later
#set $ts=float($current.dateTime.raw)
#set $timeutc=time.strftime("%Y,%m,%d,%H,%M,%S", time.gmtime($ts))
##
## get some formats for calculated obs
#set $temp_format = $unit.format.outTemp
#set $press_format = $unit.format.pressure
#set $rain_format = $unit.format.rain
#set $rainrate_format = $unit.format.rainRate
#set $cloudbase_format = $unit.format.cloudbase
#set $windrun_format = $unit.format.windrun
#set $radiation_format = $unit.format.radiation
##
## see if the station has contact with the sensor
#set $sensorContactLost = 0
#set $rxchk = $getVar('current.rxCheckPercent.raw', 100)
#if $rxchk is not None and $rxchk == 0
#set $sensorContactLost = 1
#end if
##
## calculate humidex
#if $varExists('current.outTemp') and $current.outTemp.raw is not None and $varExists('current.dewpoint') and $current.dewpoint.raw is not None
#set $oT_C = $current.outTemp.degree_C.raw
#set $dp_K = $current.dewpoint.degree_C.raw + 273.16
#set $e = 6.11 * math.exp(5417.7530 * ((1/273.16) - 1/$dp_K))
#set $h = 0.5555 * ($e - 10.0)
#if $h > 0
#set $humidex = $oT_C + $h
#else
#set $humidex = $oT_C
#end if
#if $unit.unit_type.outTemp == 'degree_F'
#set $humidex = 32.0 + 1.8 * $humidex
#end if
#set $humidex = $temp_format % $humidex
#else
#set $humidex = 'N/A'
#end if
##
## calculate apparent temperature
##
## AT = Ta + 0.33*e - 0.70*ws - 4.00
##   where AT and Ta (air temperature) are deg-C,
##   e is water vapor pressure
##   ws is wind speed (m/s) at elevation of 10 meters
## e = rh / 100 * 6.105 * exp(17.27 * Ta / (237.7 + Ta))
##   rh is relative humidity
##
## AT = -2.7 + 1.04*T + 2.0*e -0.65*v
##   where AT and T (air temperature) are deg-C,
##   e is vapor pressure in kPa,
##   and v is 10m wind speed in m/sec
##
#if $varExists('current.outTemp') and $current.outTemp.raw is not None and $varExists('current.outHumidity') and $current.outHumidity.raw is not None and $varExists('current.windSpeed') and $current.windSpeed.raw is not None
#set $oT_C = $current.outTemp.degree_C.raw
#set $rh = $current.outHumidity.raw
#set $ws = $current.windSpeed.meter_per_second.raw
#set $e = ($rh / 100) * 6.105 * math.exp(17.27 * $oT_C / (237.7 + $oT_C))
#set $apptemp = $oT_C + 0.33 * $e - 0.7 * $ws - 4.0
#if $unit.unit_type.outTemp == 'degree_F'
#set $apptemp = 32.0 + 1.8 * $apptemp
#end if
#set $apptemp = $temp_format % $apptemp
#else
#set $apptemp = 'N/A'
#end if
##
## calculate the cloud base in feet
#if $varExists('current.outTemp') and $current.outTemp.raw is not None and $varExists('current.dewpoint') and $current.dewpoint.raw is not None
#set $oT_F = $current.outTemp.degree_F.raw
#set $dp_F = $current.dewpoint.degree_F.raw
#set $a_f = $station.altitude.foot.raw
#set $cloudbase = (($oT_F - $dp_F) / 4.4 * 1000) + $a_f
#set $cloudbase = $cloudbase_format % $cloudbase
#else
#set $cloudbase = 'N/A'
#end if
##
## calculate the wind run for the day
## FIXME: this is an approximation since averages are per-hour
#set $t = time.localtime($ts)
#set $windrun = 0
#for $n in range($t[3])
#set $ago = $hours_ago(hours_ago=$n).windSpeed.avg.raw
#if $ago is not None
#set $windrun = $windrun + $ago
#end if
#end for
#if $unit.unit_type.windSpeed == 'meter_per_second'
#set $windrun = $windrun / 3.6
#end if
#set $windrun = $windrun_format % $windrun
##
## calulate solar max
## Ryan-Stolzenbach, MIT 1972 formula
##
##       el - solar elevation in decimal degrees
##        R - distance from earth to sun in AU
##      atc - atmospheric transmission coefficient (0.70-0.91)
##        z - elevation in meters
##
#if $almanac.hasExtras
#set $rs_el = $almanac.sun.alt
#set $rs_R = $almanac.sun.earth_distance
#set $rs_atc = 0.8
#set $rs_z = $station.altitude.meter.raw
#set $rs_nrel = 1367.0
#set $rs_sinel = math.sin($rs_el * math.pi / 180.0)
#if $rs_z is not None and $rs_R is not None
#if $rs_sinel < 0
#set $solarMax = 0
#else
#set $rs_rm = math.pow((288.0-0.0065*$rs_z)/288.0,5.256)/($rs_sinel+0.15*math.pow($rs_el+3.885,-1.253))
#set $rs_toa = $rs_nrel * $rs_sinel / ($rs_R * $rs_R)
#set $solarMax = $rs_toa * math.pow($rs_atc, $rs_rm)
#end if
#set $solarMax = $radiation_format % $solarMax
#else
#set $solarMax = 'N/A'
#end if
#else
#set $solarMax = 'N/A'
#end if
##
## calculate today's highest beaufort based on wind speed in knots
#if $varExists('day.windSpeed') and $day.windSpeed.max.raw is not None
#if $unit.unit_type.windSpeed == 'mile_per_hour'
#set $kts = $day.windSpeed.max.raw * 0.8689762
#elif $unit.unit_type.windSpeed == 'km_per_hour'
#set $kts = $day.windSpeed.max.raw * 0.539956
#elif $unit.unit_type.windSpeed == 'meter_per_second'
#set $kts = $day.windSpeed.max.raw * 1.943844
#elif $unit.unit_type.windSpeed == 'knot'
#set $kts = $day.windSpeed.max.raw
#else
#set $kts = 0
#end if
#if $kts < 1
#set $beaufort = 0
#elif $kts < 4
#set $beaufort = 1
#elif $kts < 7
#set $beaufort = 2
#elif $kts < 11
#set $beaufort = 3
#elif $kts < 17
#set $beaufort = 4
#elif $kts < 22
#set $beaufort = 5
#elif $kts < 28
#set $beaufort = 6
#elif $kts < 34
#set $beaufort = 7
#elif $kts < 41
#set $beaufort = 8
#elif $kts < 48
#set $beaufort = 9
#elif $kts < 56
#set $beaufort = 10
#elif $kts < 64
#set $beaufort = 11
#else
#set $beaufort = 12
#end if
#else
#set $beaufort = 'N/A'
#end if
##
## if forecasting is installed, report the Zambretti forecast
#if $varExists('forecast.zambretti')
#set $fc = $forecast.label('Zambretti', $forecast.zambretti.code)
#else
#set $fc = 'forecast is not available'
#end if
##
#set $periods = $forecast.weather_periods('WU')
#set $WU_ICON_LABELS = ["Tornado","Tropical Storm","Hurricane","Strong Storms","Thunderstorms","Rain / Snow","Rain / Sleet","Wintry Mix","Freezing Drizzle","Drizzle","Freezing Rain","Showers","Rain","Flurries","Snow Showers","Blowing / Drifting Snow","Snow","Hail","Sleet","Blowing Dust / Sandstorm","Foggy","Haze","Smoke","Breezy","Windy","Frigid / Ice Crystals","Cloudy","Mostly Cloudy","Mostly Cloudy","Partly Cloudy","Partly Cloudy","Clear","Sunny","Fair / Mostly Clear","Fair / Mostly Sunny","Mixed Rain and Hail","Hot","Isolated Thunderstorms","Scattered Thunderstorms","Scattered Showers","Heavy Rain","Scattered Snow Showers","Heavy Snow","Blizzard","Not Available (N/A)","Scattered Showers","Scattered Snow Showers","Scattered Thunderstorms"]

#if len($periods) > 0
  #set $wts = ''
  #set $wloc = ''
  #set $fc = ''
  #set $Loops = 0
  #for $period in $periods
    #set $wts = $period.issued_ts
    #set $wloc = $period.location
#if $period.event_ts is not None
#set $fc +=$period.event_ts.string('') + ' '
#end if
#if $period.temp is not None
#set $fc += $period.temp.string('') + ' '
#end if
#if $period.clouds is None
#set $fc += 'N/A'
#else
#set $fc += $WU_ICON_LABELS[int($period.clouds)]
##set $fc += $period.clouds
#end if
#set $fc += '     '
#if $Loops > 10
#break
#else
#set $Loops += 1
#end if
  #end for
#else
  #set $fc='No forecast available'
#end if
##
#set $_trend = $trend(time_delta=3600).outTemp.raw
#if $_trend is None
#set $_trend = 0
#end if
#set $t_trend = $temp_format % $_trend
##
#set $_trend = $trend(time_delta=10800).barometer.raw
#if $_trend is None
#set $_trend = 0
#end if
#set $p_trend = $press_format % $_trend
##
## Set consistent units of measure
## Pressure UoM
#set $UOM_bar = $unit.unit_type.barometer
#if $UOM_bar == 'mbar'
#set $UOM_bar = 'mb'
#end if
##
## Temperature UoM
#if $unit.unit_type.outTemp == 'degree_F'
#set $UOM_temp = 'F'
#else
#set $UOM_temp = 'C'
#end if
##
## Windspeed UoM
#if $unit.unit_type.windSpeed == 'mile_per_hour'
#set $UOM_wind = 'mph'
#elif $unit.unit_type.windSpeed == 'km_per_hour'
#set $UOM_wind = 'km/h'
#elif $unit.unit_type.windSpeed == 'knot'
#set $UOM_wind = 'kts'
#elif $unit.unit_type.windSpeed == 'meter_per_second'
#set $UOM_wind = 'm/s'
#end if
##
## Rain UoM
#set $rain_mult = 1
#set $UOM_rain = $unit.unit_type.rain
#if $unit.unit_type.rain == 'inch'
#set $UOM_rain = 'in'
#elif $unit.unit_type.rain == 'cm'
## Gauges do not handle cm, convert to mm
#set $UOM_rain = 'mm'
#set $rain_mult = 10
#end if
#if $day.rain.sum.has_data
#set $day_rain = $rain_format % ($day.rain.sum.raw * $rain_mult)
#else
#set $day_rain = 0.0
#end if
#if $current.rainRate.raw is not None
#set $current_rainrate = $rainrate_format % ($current.rainRate.raw * $rain_mult)
#else
#set $current_rainrate = 0.0
#end if
#if $day.rainRate.max.has_data
#set $day_rainrate_max = $rainrate_format % ($day.rainRate.max.raw * $rain_mult)
#else
#set $day_rainrate_max = 0.0
#end if
##
## Today's High Hourly Rain
#set $hourlyrainTH = 0
#set $ThourlyrainTH = ''
#for $hour in $day.hours
#if $hour.rain.sum.has_data and $hour.rain.sum.raw > $hourlyrainTH
#set $hourlyrainTH = $hour.rain.sum.raw
#set $ThourlyrainTH = $hour.dateTime.format("%H:%M")
#end if
#end for
#set $hourlyrainTH = $hourlyrainTH * $rain_mult
#set $hourlyrainTH = $rain_format % $hourlyrainTH
##
#set $Avg1hPM25 = $hour.pm2_5.max
#set $Avg1hPM10 = $hour.pm10_0.max
{
           "timeUTC":"$timeutc",
              "date":"$current.dateTime.format('%Y.%m.%d %H:%M')",
        "dateFormat":"y.m.d h:m",
 "SensorContactLost":"$sensorContactLost",
          "tempunit":"$UOM_temp",
          "windunit":"$UOM_wind",
         "pressunit":"$UOM_bar",
          "rainunit":"$UOM_rain",
     "cloudbaseunit":"ft",
              "temp":"$current.outTemp.formatted",
            "tempTL":"$day.outTemp.min.formatted",
            "tempTH":"$day.outTemp.max.formatted",
           "TtempTL":"$day.outTemp.mintime",
           "TtempTH":"$day.outTemp.maxtime",
         "temptrend":"$t_trend",
            "intemp":"$current.inTemp.formatted",
          "intempTL":"$day.inTemp.min.formatted",
          "intempTH":"$day.inTemp.max.formatted",
         "TintempTL":"$day.inTemp.mintime",
         "TintempTH":"$day.inTemp.maxtime",
               "hum":"$current.outHumidity.formatted",
             "humTL":"$day.outHumidity.min.formatted",
             "humTH":"$day.outHumidity.max.formatted",
            "ThumTL":"$day.outHumidity.mintime",
            "ThumTH":"$day.outHumidity.maxtime",
             "inhum":"$current.inHumidity.formatted",
               "dew":"$current.dewpoint.formatted",
        "dewpointTL":"$day.dewpoint.min.formatted",
        "dewpointTH":"$day.dewpoint.max.formatted",
       "TdewpointTL":"$day.dewpoint.mintime",
       "TdewpointTH":"$day.dewpoint.maxtime",
            "wchill":"$current.windchill.formatted",
          "wchillTL":"$day.windchill.min.formatted",
         "TwchillTL":"$day.windchill.mintime",
         "heatindex":"$current.heatindex.formatted",
       "heatindexTH":"$day.heatindex.max.formatted",
      "TheatindexTH":"$day.heatindex.maxtime",
           "apptemp":"$apptemp",
         "apptempTL":"0",
         "apptempTH":"0",
        "TapptempTL":"",
        "TapptempTH":"",
           "humidex":"$humidex",
             "press":"$current.barometer.formatted",
            "pressL":"$year.barometer.min.formatted",
            "pressH":"$year.barometer.max.formatted",
           "pressTL":"$day.barometer.min.formatted",
           "pressTH":"$day.barometer.max.formatted",
          "TpressTL":"$day.barometer.mintime",
          "TpressTH":"$day.barometer.maxtime",
     "presstrendval":"$p_trend",
             "rfall":"$day_rain",
             "rrate":"$current_rainrate",
           "rrateTM":"$day_rainrate_max",
          "TrrateTM":"$day.rainRate.maxtime",
      "hourlyrainTH":"$hourlyrainTH",
     "ThourlyrainTH":"$ThourlyrainTH",
    "LastRainTipISO":"2000-01-01 00:00",
           "wlatest":"$current.windGust.formatted",
            "wspeed":"$current.windSpeed.formatted",
            "windTM":"$day.windSpeed.max.formatted",
             "wgust":"$current.windGust.formatted",
           "wgustTM":"$day.windGust.max.formatted",
          "TwgustTM":"$day.windGust.maxtime",
           "bearing":"$current.windDir.formatted",
        "avgbearing":"$day.wind.vecdir.formatted",
         "bearingTM":"$day.wind.gustdir.formatted",
"BearingRangeFrom10":"000",
  "BearingRangeTo10":"000",
        "domwinddir":"$day.wind.vecdir.ordinal_compass",
      "WindRoseData":[],
           "windrun":"$windrun",
         "Tbeaufort":"F$beaufort",
                "UV":"$current.UV",
              "UVTH":"$day.UV.max.formatted",
          "SolarRad":"$current.radiation.formatted",
           "SolarTM":"$day.radiation.max.formatted",
   "CurrentSolarMax":"$solarMax",
    "cloudbasevalue":"$cloudbase",
          "forecast":"$fc",
           "version":"$station.version",
             "build":"",
             "pm2_5":"$current.pm2_5.formatted",
              "pm10":"$current.pm10_0.formatted",
         "Avg1hPM25":"$Avg1hPM25",
"Avg1hPM10":"$Avg1hPM10",
   "ver":"15"
}

Tom Keffer

unread,
Apr 14, 2021, 7:02:48 PM4/14/21
to weewx-user
I can only fix what I can reproduce and, so far, I have not been able to. My apologies. If you can send me a simple template and database that reproduces the problem, I'll go at it.



--
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.

sbar...@gmail.com

unread,
Apr 15, 2021, 4:18:41 PM4/15/21
to weewx-user
Ok, I will try setup a minimal repro skin.
is mysql for the data table ok?

Tom Keffer

unread,
Apr 15, 2021, 9:16:31 PM4/15/21
to weewx-user
Sure. You can send me a dump file, or anything else, to recreate it.

sbar...@gmail.com

unread,
Jun 22, 2021, 5:11:22 PM6/22/21
to weewx-user
Hello,

It took a little while, but thank to a full reinstall, I have been able to fully reconfigure my weewx and I now have the expected summary hourly data.

there was something messed in my install/ extension / own source code changes that messed things up. Now that everything has been cleaned, it work way better.

Thank you again for your help.

sbar...@gmail.com

unread,
Jun 25, 2021, 12:30:54 PM6/25/21
to weewx-user
Hello, 

I was a bit over-optimistic. After results in the hour summary for the 1st few hours, they are now empty again.

I will need to dig into this a bit more, and if I can't understand what get's wrong, create a minimal repro.

Regards,

sbar...@gmail.com

unread,
Aug 9, 2021, 8:40:10 AM8/9/21
to weewx-user
Hi,

Just to close the issue, I moved the template statements relative to the pm measures to the beginning of the file, and I now have stable data readings.

Thank you for your help and looking into the matter.

Regards,

Reply all
Reply to author
Forward
0 new messages