10 2 * * 0 sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y
56 1 * * * sudo reboot now
5,25,45 * * * * cd /script/file/location && sudo sh hourly_pywws.sh
0 10 * * 0 mpack -s "Weekly Weather Station Log" /log/file/location/pywws_hourly_run.log name@email.com
2 10 * * 0 cd /script/file/location && sh Weekly_LogFile_Reset.sh <div id="page"> <div id="header"> <!-- Text to be adapted for your site name and slogan --> <div id="header_part1">pywws<br /><span>Python software for USB Wireless WeatherStations</span></div> <div id="header_part2"></div> </div> <!-- Section for main menu, all grey bar long --> <div id="menubar"> <div id="header_left"> <!-- Script to insert today's date --> <script type="text/javascript"> <!-- var CurrentDate = new Date(); var DateCur = CurrentDate.getDate(); var DayNumber = CurrentDate.getDay(); var MonthNumber = CurrentDate.getMonth(); var Year = CurrentDate.getFullYear(); document.write(DayName[DayNumber] + ", " + DateCur + " " + MonthName[MonthNumber] + " " + Year); //--> </script> </div> <a id="home" href="index.php"> >> Home</a> <div id="nav"> <li> <a href="index.php?page=LogFile" >Log Files</a> </li></script> <?php if (!isset($_GET['page'])) { require_once('index.txt'); } else { $page = $_GET['page']; // echo '<h1>'.$page.'</h1>'; switch ($page) { case "LogFile":
echo '<h2>Most Recent Log File</h2>'; echo '<p class="scroll_1">'; $lines = file('/location/of/your/logfile/hourly_log.log'); foreach ($lines as $line) { echo $line.'<br />'."\n"; } echo '</p>'; echo '<h2>Current Weekly Summary Log File</h2>'; echo '<p class="scroll_2">'; $lines = file('/location/of/your/logfile/pywws_hourly_run.log'); foreach ($lines as $line) { echo $line.'<br />'."\n"; } echo '</p>'; break;RegardsRichard
You can see them on this screenshot at about midnight (above where it says "10 Dec"). This obviously shows data that pywws has caught up with after I've reset the console .... no readings after the event until after the first 5 mins, and then the values are shifted. I don't understand why this occurs.This is the duplication of data error I mentioned in my original post.
I think this is caused by pywws calculating the number of missed records based on the time the last successful read of data and the current time, it then imports that number of records from the base station, however as the system has locked up and had not read any new records from the sensors it causes data to be duplicated, I hope that makes sense.
I always clear the station memory after a pick-up to avoid this problem using the following command:
pywws-setweatherstation -z
I've also found that sometimes the logging interval gets reset to the factory default value of 30 minutes so I run:
pywws-setweatherstation -r 5
Hope this is of help.
R
R
R
Dear Ian,Sorry to hear your station locked up recently. I switched over to using an OrangePi Zero on 27 January 2019 and haven't had a lock-up since. Not the longest time without a lock-up yet, but getting close. I'll keep you posted.