I believe I have identified a hitherto unreported "lockup" situation with a
Fine Offset system.
The USB lockup suffered by certain systems is known and work-arounds have
been published
(not least by me); this problem is manifest by Wind, Rain, Temp/Humidity
being absent while Solar
data continues to be reported on the console.
The weewx log prints the following report:
<day> <time> <hostname> weewx[<PID>]: fousb: station status {'unknown': 0,
'lost_connection': 64, 'rain_overflow': 0} (64)
Note that this print is ~similar~ to that printed after startup and
catch-up of EEPROM data:
<day> <time> <hostname> weewx[<PID>]: engine: Starting main packet loop.
<day> <time> <hostname> weewx[<PID>]: fousb: station status {'unknown': 0,
'lost_connection': 0, 'rain_overflow': 0} (0)
The difference being the `'lost_connection': 64,` inclusion and the final
characters: `(64)`.
This is the (new) lockup condition. There is no "Errno" print.
Because the majority of the log text is printed while the system is in a
benign state and not
being sufficiently clever to grep out either/or of the error condition
prints - the quoted long text within the
string defeated me - I have modified my lockup-detector script to capture
the unique `(64)` and fire off the
USB power cycler script.
It is sufficient.
#!/bin/bash
# monitorlockup
# watch the weewx log file for lockup condition and use USB power recycling
to clear the lockup
# 20190622+20200110
LOGfile=/home/weewx/weather/logs/weewx.log
tail -Fn0 $LOGfile |
while read line ; do
echo "$line" | grep -qe 'Errno 110' -e '(64)'
if [ $? = 0 ]
then
logger -t monitorlockup Error No 110 or lost connection 64
Observed in weewx.log
/home/weewx/powercycleusb
fi
done
READY=1
and the power-cycler (requires acquisition and build of `uhubctl`)
#!/bin/bash
/home/weewx/uhubctl -d 15 -a cycle -p 2
logger -t powercycleusb USB port 2 power cycled
READY=0
YMMV!
[RPi2B, Raspian 10.2, Weewx 3.9.2: http://g1ogy.com/wx ]
--
Dave, G1OGY
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/f2dfa2c6-d77c-42f8-b4a5-2e8365b24b63%40googlegroups.com.