On Monday, February 19, 2018 at 2:34:34 PM UTC-5, Alan W. wrote:
>
> Is there an in-use driver that could provide a starting place for a 
> channel by channel (value by value) driver, including station configuration?
>

alan,

start simple, and make the driver as dumb as possible.

pick one protocol - after you get one working, you can consider adding 
others.

since the driver will have to poll the hardware, decide on appropriate 
polling intervals, based on the sensor refresh rates.

don't worry about all the different units - just pick one set of units and 
go with it.  prolly best if you pick a set of units that fits either US, 
METRIC, or METRICWX so you don't have to do conversions in the driver.

it looks like you'll want to do partial packets.  poll each sensor, and 
send the data for each sensor immediately - do not aggregate sensors for 
LOOP data.  you don't want to maintain any more state in the driver than 
you have to.

eventually you'll want to implement ConfEditor so that the driver is easy 
to install.

you can implement the Configurator when you're ready to let weewx configure 
the device (wee_device is the entry point for that).  see the cc3000, 
te923, vantage, or ws23xx drivers for configurator examples.  they are all 
a bit more complicated, since changing hardware settings typically requires 
some user prompting and confirmation.

for an example of multiple protocols, take a look at the driver for the 
vaisala WX5xx series:

https://github.com/matthewwall/weewx-wxt5x0

the vaisala instrument has multiple protocols, and multiple ways of polling 
the sensors.  you can query each sensor, or you can query for data from 
multiple sensors.

i typically do a class for the hardware (or for each protocol if the 
hardware supports multiple protocols).  then the driver class.  that makes 
it easy to do a 'main' function that just exercises the hardware and makes 
development much faster.

m

-- 
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