On Sunday, 23 June 2019 07:30:53 UTC+1, Johannes Ebner wrote: > > How is this script working? > > Do you run it once and it stays in the background? Or do you run it via > crontab? > > >> ATM it is running from the command line as I did not want to reboot the Pi:
/home/weewx/monitorlockup & I have also added that command line to /etc/rc.local so that the script will start on reboot. The monitoring script sits in the background waiting for a log print. When weewx writes to the log file the script wakes up and checks the new log line(s) for "Errno 110". If the string is absent the script goes back to waiting for the next log print. If the print is an error line then it fires off the second script to powercycle the relevant USB port. You can watch it come alive every 5 minutes with `top(1)`. Obviously, you will need to have acquired and built the source of `uhubctrl` in advance. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0b23e47f-73af-4f9c-9891-99fb9d9fc270%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.