I know I saw, somewhere, a way to call an existing weewx method to convert units to whatever is needed, but I can't find it again. It may have been in a service in the Wiki rather than in the documentation, because I can't find it there.
Is there such a thing? I didn't like how limited the Adafruit program was and the dependencies, so I have fixed my first ever Python program to read the sensor. I'm ready to turn it into a service, with the options in weewx.conf and everything. I think. Anyway, I'd like to use the weewx conversion if necessary and possible. On Saturday, April 1, 2017 at 5:38:31 PM UTC-4, mwall wrote: > > On Saturday, April 1, 2017 at 5:29:16 PM UTC-4, Craig Thom wrote: >> >> My goal is to use the existing SDR driver and to use a service to read >> the pressure from the BMP280 and add it to the data the SDR driver is >> collecting. > > > craig, > > handling the units in a service is slightly different that in a driver. > > in the driver, you can specify the unit system of the packet to match the > units from the sensors (assuming they all emit values in the same unit > system). > > in a service, you must work with whatever unit system you find in the > packet. > > so be sure to check the value of usUnits, then convert your sensor value > (if necessary) to be in units that are appropriate for the unit system > specified by usUnits. > > m >