I'm cobbling together a driver that will ultimately seed its packets with a JSON query from the Davis WeatherLink Live hardware (mentioned in a separate thread).
I used mwall's suggestion to start with his maxbotix driver, and stripped a bunch of stuff out of it to basically have it generate a bogus _pkt set of parameters.
When I run this with --test-driver it does the expected thing, showing me the bogus packet's contents. Cool.
root@stretch64pkg:/home/weewx/bin/user# PYTHONPATH=/home/weewx/bin python3 /home/weewx/bin/user/vincetest.py --test-driver
testing driver
('2020-02-29 21:58:39 GMT (1583013519)', {'usUnits': 1, 'outTemp': 31.23, 'dateTime': 1583013519})
('2020-02-29 21:58:42 GMT (1583013522)', {'usUnits': 1, 'outTemp': 31.23, 'dateTime': 1583013522})
('2020-02-29 21:58:44 GMT (1583013524)', {'usUnits': 1, 'outTemp': 31.23, 'dateTime': 1583013524})
But...when I run the driver in the foreground, check out the output...
root@stretch64pkg:/home/weewx/bin/user# /home/weewx/bin/weewxd /home/weewx/weewx.conf
LOOP: 2020-02-29 21:59:00 GMT (1583013540) dateTime: 1583013540, maxSolarRad: 525.2302552658722, outTemp: 31.23, rainRate: 0.0, usUnits: 1
LOOP: 2020-02-29 21:59:02 GMT (1583013542) dateTime: 1583013542, maxSolarRad: 525.1744219921469, outTemp: 31.23, rainRate: 0.0, usUnits: 1
LOOP: 2020-02-29 21:59:04 GMT (1583013544) dateTime: 1583013544, maxSolarRad: 525.1185872811789, outTemp: 31.23, rainRate: 0.0, usUnits: 1
Questions I have is :
- where did the maxSolarRad and rainRate elements and values come from ? They're not mentioned in the driver at all.
- does weewx have some stuff under the hood that is seeding elements that don't necessarily exist in the gear a particular driver contains ?
Draft driver is attached in case anybody has ideas....