Hi Susan, I replied to you privately, but I should probably do it here as
well so that others (more wise and experienced than I) can chime in... I
didn't use your install.py, since you just sent me the xc0422.py, but I did
exactly what the installer would do: I put it in bin/user/xc0422.py. I'm
using deb, so it went in /usr/share/weewx/user/xc0422.py. There doesn't
seem to be any defaults defined for xc0422.py. In my weewx.conf, I had to
specify all options or weewx couldn't load the driver. I'm not sure
whether that's normal behavior or not. Here is my snippet from weewx.conf;
I knew that I had to add driver and ip_address_mask, since my local net
uses that instead of 10.1.1. But I'm guessing that there must be a way to
define defaults within the driver itself.
[XC0422]
driver = user.xc0422
ip_address_mask = "192.168.1.255"
retry_count = 5
socket_timeout = 5
I tried at first to just use the first two lines, but after the driver
didn't load, I added the second two lines. Now it's fine.
One thing that I have seen is that the genLoopPackets loop just screams
through. The console seems to return data whenever it is asked. The way
the loop is written now, it asks as soon as it parses the last reply, which
can be many times a second, it seems. I was wondering whether a sleep for
5? seconds at the end of the loop would make sense. If nothing else, it
would cut down on network traffic...
The following is not really related to this driver per-se, but it is an
issue which I've had to handle...
At the moment, my home wifi network is a bit flakey (I've *got* to talk
with ATT Uverse!). While random non-responses from the ws1001 console are
handled quite nicely in the driver, the loss of wifi is not, and weewx will
exit. To take care of that, I added a systemd configuration for weewx. My
weewx.conf looks like:
# systemd configuration for weewx
[Unit]
Description=weewx weather system
Requires=syslog.service
Requires=ntp.service
After=syslog.service
After=ntp.service
#RequiresMountsFor=/home
[Service]
ExecStart=/usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid
/etc/weewx/weewx.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=60
Type=simple
PIDFile=/var/run/weewx.pid
#User=weewx
#Group=weewx
[Install]
WantedBy=multi-user.target
The "Restart=always" guarantees that weewx will get restarted, and the
"RestartSec=60" guarantees that my wifi will have had a chance to reset
before going into a start-crash-start-crash endless loop.
So far, the above has been running for a couple of days without issue.
THANKS Susan (and the developers of weewx!).
dr__bob
On Wednesday, January 18, 2017 at 6:12:58 PM UTC-8, [email protected] wrote:
>
> I have attached the tar.gz file that I *think* will work as an extension
> but I've only managed to test it on my iMac with Weewx installed via the
> 'setup.py' method.
> Can some mind soul(s) please try this out (in a test environment in case
> it generates black holes etc.) before I put it into the repository?
> Also any feedback on the usefulnes (or otherwise) of the 'readme.txt' or
> mistakes in the 'install.py' are welcomed.
> Thanks
> Susan
>