Hi,

Not a SDR user but having a look at the 3080/x080 parsers it look like the 
x080 parser is taking the parsed rainfall value (presumably in mm) and 
putting it in a record that uses the METRIC unit system 
<http://weewx.com/docs/customizing.htm#units>. Sounds great but the problem 
is that the METRIC unit system uses cm for rainfall units. So the rainfall 
value in mm is being interpreted by WeeWX as cm hence the factor of 10 
error. A couple of solutions come to mind; instead of creating a record 
with the METRIC unit system change it to create a record with a METRICWX 
punit system which does in fact use mm for rainfall, only problem is that 
METRICWX uses different wind speed units so we fix one issue (rainfall) and 
create another (wind speed). The other solution is to simply convert the 
rainfall in mm to cm in the x080 parser. Quite an acceptable approach 
though the name 'x080' indicates to me it is not just for 3080, so if some 
other station using this parser provides rain in cm this solution would 
break the driver for that station station. However, in my limited 
experience I have not seen too many stations whose sensors that natively 
report cm. 

Try making the following change (untested) to sdr.py, circa line 851 change:

        pkt['rain_total'] = Packet.get_float(obj, 'rain')

to

        _rain_total = Packet.get_float(obj, 'rain')
        pkt['rain_total'] = _rain_total / 10 if _rain_total is not None 
else None

You will need to restart WeeWX for the change to take effect. Then wait for 
some rain or cycle your rain gauge with a known number of tips or 'rain'.

Gary

On Saturday, 11 August 2018 17:56:13 UTC+10, Gazza wrote:
>
>
> It has just rained for the first time since I got my FOWH3080 clone 
> station working with the SDR FOWHx080 driver and  have just noticed Weewx 
> is showing the wrong value for rain.
>
> The loop data received from the station for rain_total is 0.3 per tip but 
> Weewx is reporting 3mm per tip.
>
> There is a comment in the FOWH1080Packet section of sdr.py about rain 
> being in "mm not cm" but there is nothing obvious in the section for the 
> FOWHx080 that relates to the value per tip.
>
>
> Gary 
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to