While waiting for my next project to take off (info to come here when it happens), this is a good time to mention the impressive stability of 2 computers serving my weather station page. The machines are an old laptop and a Raspberry PI, both running Linux distros.
The graphs on that page is collected from a simple weather station with an outdoor unit located in the garden:
The outdoor unit runs on 2 AA batteries (they seem to last forever!) and contains a temperature sensor and a humidity sensor, they are located inside the Stevenson screen. On the roof of the Stevenson screen is a rain sensor plus a wind speed and wind direction sensor. The location of the outdoor unit is not ideal, and the wind direction is not to be trusted. Mostly, it is the temperature that is of interest, but wind speed and rain can sometimes be useful also.
The outdoor unit sends readings wirelessly to the indoor unit which has its own indoor temperature plus pressure sensors. The indoor unit is permanently connected via USB to an old laptop running Linux Xubuntu 11.10 . All that laptop does is run a program that queries the indoor unit and stores the readings in an SQLite database every 5 minutes. The incredible thing is that the old laptop was last rebooted 11. May 2012, i.e. almost 3 years ago. That is stability!
The images on the weather station page are generated from the Raspberry PI based weather camera housed in a dummy surveillance camera, mounted on an old TV antenna pole. The Raspberry PI camera runs Linux Rasbian. Since performing some hardware changes 2-Jan-2015, the RPI machine has not been rebooted, it has captured images every minute for almost 90 days in a row. Not bad!
However, 2 days ago, the images suddenly stopped coming, something was wrong. After investigating, it quickly became clear that the SD card the RPI was running from had acquired a file system problem, so it crashed and a reboot didn’t work. The camera was taken down, SD card erased+reformatted and Rasbian was reinstalled. Problem solved, now the camera is running fine again with the same hardware.
The problem may have been caused by excessive writing of files to the SD card, which will eventually wear it out. To prevent similar problems in the future, I decided to install a small RAM drive based on this description. Instead of temporarily writing the images to the SD card before copying to a disk in the house, it now writes the images to the RAM drive. A very simple fix that should increase the life expectancy of the SD card.
It will be interesting to see how long these two work-horses will run before requiring a boot!