The permanent solution for me was to replace the console with an SDR
receiver and a pressure sensor.
Cutting the power to the console worked on 10% of the times for me, because
the raspberry pi wouldn't "reset" the usb port most of the times (I had to
remove and instert the USB cable anyways).
Here is the script. Its a bit rough but it works ok.
#!/bin/bash
#Check to see if the weather station is working
if [[ "`pidof -x $(basename $0) -o %PPID`" ]]; then
echo "Process $(basename $0) is already running run killall
$(basename $0) to stop it if you want."
exit 1
fi
FI
Greg, that's brilliant! If I thought I'd have some free time, I'd ask
about the code for the cron job script, etc. I better not!
Sounds like you're very well-prepared. Thanks for your input!
On Mon, May 14, 2018 at 9:17 PM, Greg from Oz wrote:
> I took the battery out of my console...permane
I took the battery out of my console...permanently and I put in a normally
closed relay into the 5V of the usb cable that goes to the console.
I run a cron job that checks to see if the weather index.html file has NOT
been changed in 20 minutes. If is has not then the same script restarts
weewx.