2017 is turning out to be a great bird box season for us.
Both of our Raspberry Pi camera boxes are occupied, with the first set of chicks almost ready to leave the nest.
For the last few days my only concern has been whether I'll run out of SD card space before the chicks depart.
The old 2013/4 designed Raspberry Pi camera system attached to our Canadian Maple tree has been working faultlessly, as it pretty much has for each season since spring 2014. It is the temporary home of two great tits. The female laid six eggs about 14 days ago, and today they started to hatch.
The newer PicaxePi box is mounted on the side of our pergola, and is the home of two blue tits and their 8 or 9 chicks. This is the first year that eggs have been laid in this box. Hopefully we will get a proper chance to count these chicks before they leave the nest in 3 or 4 days time.
This is also the system that has been giving me a few little problems. It is great to have 2 Pi cameras fitted to this box (one inside, the other on the outside) each controlled by its own Pi Zero. But the current drain on the 12Ahr battery is just too high.
I think I had estimated a run time of about 37hrs, and sure enough, I've had to change batteries after about 35hrs for two of my three batteries. (With the longer days of May, the box is probably running for 15 or 16 hours per day). The third battery (the newest) had been allowed to fully discharge over winter, and its not happy! So it only lasts about 30hr when powering this box.
If I run this system again next year, I will provide software control of the power to the outside camera. That way I can leave the camera off by default, and only turn it on when we are actually watching. Motion recordings have been pretty useless anyway, since an approaching bird is so small compared to the large area of moving vegetation.
My only other option (short of buying a car battery) is to follow NestBoxTech's lead and connect using power-over-ethernet. I'd really like to do this, but I don't want a cable draped across the garden (maybe I could attach a box to the back of the house).
So anyway, the problem I had this week was (like the last one) related to running out of SD card space. I've been remembering to remove the video files regularly from the PicaxePi system. But each time I did, I noticed I had less space than before.
By yesterday I'd calculated that the remaining space (approx 400MB) would disappear by Sunday and the system would not be able to boot up. So I had to take a second look today via ssh.
I traced the problem to the /var folder which had consumed 11GB of my 16GB micro SD card. More specifically the log files (user, system & debug) were the main culprits, so I chose to delete user.log, syslog.1 and debug.1. I also checked the most recent entries for user, syslog & debug using the commands like this:-
tail -n 100 /var/log/syslog
...and I found a large number of motion related messages. A quick check inside the motioneye.conf file revealed that motion log-level reporting had been left set to Debug ...probably by me, as I don't think this is the default.
Anyway, all fixed now that I've replaced "debug" with "error" for log-level recording. Thank goodness for ssh!
The system should prevent logs from becoming a problem, but I guess logrotate is not configured by default on the Pi.