https://github.com/weewx/weewx/issues/67

 reported a 10.6/9.9 = 1.07 correction factor needed, nearly identical to 
mine.

Do any TE923 owners get correct rain reported?  Or is your console 
consistently ~7% higher than what weewx reports?

Here's a more complete patch I am going with.  Or of course *= 1.07 in 
[StdCalibrate][[Corrections] if using the driver unmodified.

--- te923.py.orig 2019-07-14 07:12:05.000000000 -0500
+++ te923.py 2020-06-13 17:11:34.896489069 -0500
@@ -51,9 +51,10 @@
 This implementation polls the station for data.  Use the polling_interval 
to
 control the frequency of polling.  Default is 10 seconds.
 
-The manual says that a single bucket tip is 0.03 inches.  In reality, a 
single
-bucket tip is between 0.02 and 0.03 in (0.508 to 0.762 mm).  This driver 
uses
-a value of 0.02589 in (0.6578 mm) per bucket tip.
+The manual says that a single bucket tip is 0.03 inches.  In reality,
+a single bucket tip is between 0.02 and 0.03 in (0.508 to 0.762 mm).
+This driver uses a value of 1/36" as observed in 36 bucket tips per
+1.0 inches on the console. 1/36 = 0.0277777 inch = 0.070555555 mm.
 
 The station has altitude, latitude, longitude, and time.
 
@@ -1261,7 +1262,7 @@
 
         packet['rainTotal'] = data['rain']
         if packet['rainTotal'] is not None:
-            packet['rainTotal'] *= 0.06578 # weewx wants cm
+            packet['rainTotal'] *= 0.070555555 # weewx wants cm (1/36" 
bucket tips)
         packet['rain'] = weewx.wxformulas.calculate_rain(
             packet['rainTotal'], last_rain)
 
@@ -1445,7 +1446,7 @@
 # FIXME: figure out how to detect link status between station and rain 
bucket
 # NB: wview treats the raw rain count as millimeters
 def decode_rain(buf):
-    """rain counter is number of bucket tips, each tip is about 0.03 
inches"""
+    """rain counter is number of bucket tips, each tip is about 1/36 
inch"""
     data = dict()
     if DEBUG_DECODE:
         logdbg("RAIN BUF[30]=%02x BUF[31]=%02x" % (buf[30], buf[31]))
@@ -2038,9 +2039,10 @@
             data[label % 'max'], _ = decode_humid(buf[12+i*6])
         data['windspeed_max'], _ = decode_ws(buf[37], buf[38])
         data['windgust_max'], _ = decode_ws(buf[39], buf[40])
-        data['rain_yesterday'] = (buf[42] * 0x100 + buf[41]) * 0.6578
-        data['rain_week'] = (buf[44] * 0x100 + buf[43]) * 0.6578
-        data['rain_month'] = (buf[46] * 0x100 + buf[45]) * 0.6578
+        # these were * 0.6578 but that not right, so just report raw for 
now:
+        data['rain_yesterday'] = (buf[42] * 0x100 + buf[41]) * 1
+        data['rain_week'] = (buf[44] * 0x100 + buf[43]) * 1
+        data['rain_month'] = (buf[46] * 0x100 + buf[45]) * 1
         tt = time.localtime()
         offset = 1 if tt[3] < 12 else 0
         month = bcd2int(buf[47] & 0xf)



-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/bff619cc-7e10-4e83-9e82-febd1a5faa5ao%40googlegroups.com.

Reply via email to