Doesn't matter what units are in the database. Doesn't matter what units are used to display. What matters is that *all units within the loop packet* are in the same unit system. So, if you're adding a temperature in Fahrenheit to a loop packet in Celsius, you're going to get the results you see.
You must check what units the incoming packet is in, then convert your temperature as necessary. The unit system used by the packet is in the field 'usUnits' (an unfortunate name, inherited from wview). -tk On Tue, Oct 6, 2020 at 12:50 PM bdf0506 <[email protected]> wrote: > I am using the SDR driver to grab stats from an RTL_433 capable devices. > It grabs the data from the device and places in the loop packets in > Farenheight - which is exactly what I want. > > Problem is, these are custom database fields that I created for them, so > now I need to tell WeeWx which units to use. Once I tell it which unit to > use, WeeWx is taking it upon itself to do an unwanted conversion. It > probably thinks I am giving it to WeeWx in C and trying to convert to F, > when really all I want to do is take my perfect measurement and apply a > unit to it for reports. > > What am I missing? How can I apply a unit and NOT have it perform any > conversions? > > *weewx.conf* > [StdConvert] > target_unit=US > > *user/extensions.py * > import weewx.units > weewx.units.obs_group_dict['BasementTemp'] = 'group_temperature' > weewx.units.obs_group_dict['CrawlSpaceTemp'] = 'group_temperature' > > > Oct 6 15:48:13 weewx weewx[23355] WARNING weewx.qc: 2020-10-06 15:48:03 > EDT (1602013683) LOOP value 'BasementTemp' 166.06400000000002 outside > limits (10.0, 120.0) > Oct 6 15:48:13 weewx weewx[23355] WARNING weewx.qc: 2020-10-06 15:48:09 > EDT (1602013689) LOOP value 'CrawlSpaceTemp' 155.696 outside limits (10.0, > 120.0) > Oct 6 15:48:24 weewx weewx[23355] WARNING weewx.qc: 2020-10-06 15:48:19 > EDT (1602013699) LOOP value 'BasementTemp' 166.06400000000002 outside > limits (10.0, 120.0) > Oct 6 15:48:30 weewx weewx[23355] WARNING weewx.qc: 2020-10-06 15:48:25 > EDT (1602013705) LOOP value 'CrawlSpaceTemp' 155.696 outside limits (10.0, > 120.0) > > -- > 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/f59a35ce-041c-4203-987a-bb25b74a042an%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/f59a35ce-041c-4203-987a-bb25b74a042an%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAPq0zEAW7B8g2reQ4KRHzjNsw0XgNootYv%2BbjqSNfn3em2BNGQ%40mail.gmail.com.
