[weewx-development] Re: How to implement rain and rainRate fields in a new driver?

2020-03-08 Thread Bill Burton
Hello Gary, Thank you so much for the thorough reply with all the tips on how to implement rain field functionality! Just to be clear, the interval the driver receives a loop packet is controlled by the driver's polling interval, not by the station as the driver is polling the station's comput

[weewx-development] Re: CRITICAL __main__: Database OperationalError exception: (1054, "Unknown column 'rain' in 'field list'")

2020-03-08 Thread Lucas Heijst
Tom, This workaround in wxservices.py works for me. def _setup(self, stop_ts, db_manager): """Initialize the rain event list""" if self.rain_events is None: self.rain_events = [] start_ts = stop_ts - self.retain_period try: # Get all rai

[weewx-development] How to handle mixed US and metric units in a driver?

2020-03-08 Thread Bill Burton
Hello, I'm implementing a driver for the Columbia Weather Systems MicroServer that supports a variety of their weather stations including the Pulsar 600. So far I have the driver polling the station reliably under WeeWX 3.9.2 under Python 2.7 and 4.0.0b13 under Python 3.6. However, the issue I

Re: [weewx-development] How to handle mixed US and metric units in a driver?

2020-03-08 Thread John Kline
Since you are writing the driver, have you considered performing the necessary conversions so that the driver returns US or metric (i.e., one or the other, not a mix)? > On Mar 8, 2020, at 12:57 PM, Bill Burton wrote: > >  > Hello, > > I'm implementing a driver for the Columbia Weather Syste

[weewx-development] SDR driver with WeeWX 4.0.0b14

2020-03-08 Thread steeple ian
Hi Hit a problem with the SDR driver. Under WeeWX3.9.2 it work perfectly. With WeeWX 4.0.0b14 I hit this problem. ar 09 00:18:24 raspberrypi weewxd[8537]: weewx[8537] CRITICAL weewx.engine: self.console = loader_function(config_dict, self) Mar 09 00:18:24 raspberrypi weewxd[8537]:

[weewx-development] Re: SDR driver with WeeWX 4.0.0b14

2020-03-08 Thread steeple ian
These are my weewx.conf settings. [SDR] # This section is for the software-defined radio driver. driver = user.sdr path = /usr/local/bin cmd = rtl_433 -f 868M -s 1024k -M utc -F json -R 78 [[sensor_map]] outTemp = temperature.71.FOWH65BPacke

[weewx-development] Re: SDR driver with WeeWX 4.0.0b14

2020-03-08 Thread Vince Skahan
On Sunday, March 8, 2020 at 5:31:58 PM UTC-7, steeple ian wrote: > > Mar 09 00:18:24 raspberrypi weewxd[8537]: weewx[8537] CRITICAL __main__: > Unable to load driver: failed to start process 'rtl_433 -f 868M -s 1024k -M > utc -F json -R 78': [Errno 13] Permission denied > > I would suspect your

Re: [weewx-development] How to handle mixed US and metric units in a driver?

2020-03-08 Thread Thomas Keffer
All units within a packet must use one of the three weewx unit systems, US, METRIC, or METRICWX. You can change from packet to packet, but not within a packet. You could emit a different packet for each observation type, but you could miss out on some calculations. For example, to calculate dewpoi

Re: [weewx-development] How to handle mixed US and metric units in a driver?

2020-03-08 Thread Bill Burton
Hello, On Sunday, March 8, 2020 at 4:01:53 PM UTC-4, John Kline wrote: > > Since you are writing the driver, have you considered performing the > necessary conversions so that the driver returns US or metric (i.e., one or > the other, not a mix)? > Yes, good question. I suppose it could be done

Re: [weewx-development] How to handle mixed US and metric units in a driver?

2020-03-08 Thread Thomas Keffer
As you concluded, it's generally best to keep the unit system as close to the "native" unit system of the hardware as possible. -tk On Sun, Mar 8, 2020 at 8:32 PM Bill Burton wrote: > Hello, > > On Sunday, March 8, 2020 at 4:01:53 PM UTC-4, John Kline wrote: >> >> Since you are writing the driv

Re: [weewx-development] How to handle mixed US and metric units in a driver?

2020-03-08 Thread John Kline
This isn’t the general case. I find it difficult to see the harm in converting to and fro for some cases. Are you worried about loss of precision? > On Mar 8, 2020, at 8:45 PM, Thomas Keffer wrote: > >  > As you concluded, it's generally best to keep the unit system as close to the > "nativ

Re: [weewx-development] How to handle mixed US and metric units in a driver?

2020-03-08 Thread Thomas Keffer
Yes. A good driver makes minimal interpretations about the data it is seeing. If possible, it should just pass it on. On Sun, Mar 8, 2020 at 9:03 PM John Kline wrote: > This isn’t the general case. I find it difficult to see the harm in > converting to and fro for some cases. Are you worried a

Re: [weewx-development] How to handle mixed US and metric units in a driver?

2020-03-08 Thread John Kline
I agree that, all things being equal, a driver should just pass it on; but this is not that case. There won’t be any meaningful loss of precision for the double conversions. As such, the alternative, splitting into separate packets, is an unnecessary complication even without factoring in that