News
syslog:
Jan 14 11:38:44 wetterba weewx[27182]: fousb: polling interval is 60
Jan 14 11:38:44 wetterba weewx[27182]: fousb: found station on USB bus=004
device=003
Jan 14 11:38:44 wetterba weewx[27182]: snowdepth: using /home/weewx/snow
Jan 14 11:38:44 wetterba weewx[27182]: engine: StdConvert target unit is
0x10
...
Jan 14 11:41:11 wetterba weewx[27182]: fousb: changing data format from
1080 to 3080
Jan 14 11:41:14 wetterba weewx[27182]: snowdepth: SNOW value of 1.5
Jan 14 11:41:14 wetterba weewx[27182]: snowdepth: found usUnits of 16
Jan 14 11:41:14 wetterba weewx[27182]: snowdepth: SYSLOG ERR cannot read
value: 16
Jan 14 11:41:16 wetterba weewx[27182]: manager: added record 2017-01-14
11:41:11 CET (1484390471) to database 'weewx3080'
Jan 14 11:41:16 wetterba weewx[27182]: manager: added record 2017-01-14
11:41:11 CET (1484390471) to daily summary in 'weewx3080'
Jan 14 11:41:16 wetterba weewx[27182]: engine: Starting main packet loop.
my snowhes.py
...
def newArchiveRecord(self, event):
try:
with open(self.filename) as f:
snow_val = f.read()
value_vt = ValueTuple(float(snow_val), 'cm', 'group_snow')
snow_total = convert(value_vt, event.record['usUnits'])
syslog.syslog(syslog.LOG_INFO, "snowdepth: found SNOW-value of
%s" % snow_total)
delta = weewx.wxformulas.calculate_rain(snow_total,
self._last_snow)
self._last_snow = float(snow_total)
event.record['snowRate'] = float(self._last_snow)
event.record['snow'] = float(delta)
except Exception, e:
syslog.syslog(syslog.LOG_ERR, "snowdepth: SYSLOG ERR cannot
read value: %s" % e)
in "event.record['usUnits']" = 16 = METRIC = 0x10
_last_snow ==> self._last_snow = None
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.