Project Log (Nestbox 2015)

Nestbox 2


Last year I placed a Raspberry Pi and a Pi NoIR camera in a nestbox in my parents garden. The project worked out very well, and this year I’ve made a better Nestbox construction and I’m going to use the ordinary Pi Camera, to get pictures with better quality and color.

I would also like to try out some other things, like integration with Twitter and Facebook.

Software: The Raspberry Pi will be running Linux Raspian and transfer a picture via secure copy to my web server.

What I am going to use (updated 2015-04-01):
A Nestbox
A Raspberry Pi (the stripped down type A)
Raspberry Pi 5 Mpixel Camera
USB Wi-FI adapter

I will continue to update this blog post about the progress, and eventually, a link to the webpage with the images.

2015-04-01: The Nestbox is almost done, making some adjustments with the construction.

2015-04-01: Raspberry Pi installed inside the nestbox and a first test picture is taken.

2015-04-02: The nestbox is up in the tree and running, sending an image every five minute.

2014-06-09 – Using the temp/humidity sensor?

Pondering about how to read serial from the Raspberry Pi with PHP. I’m reading about here.

I want to be able to fetch serial data from a temp/humidity sensor and display it on the web page with an image from the nestbox.

2014-11-20 – Tweeting Nestbox?

Besides the birds, I want the Nestbox itself to twitter – that is – to send some kind of status messages to Twitter. I’m reading about making a Raspberry Pi to  send messages over Twitter here.

Thinking about creating a version of the Nestbox software that contains a web server with a web page/portal.

2015-04-01 – Ready to go

The new nestbox is soon ready, it is connected to the net for testing right now. Recently I’ve been working on a web interface for the nestbox, but it will not be ready before the summer. The nestbox will be sending pictures to the web server before the end of this week. I’m also working on a solution to make the nestbox send one random picture a day to a Twitter account.

The diffrence between the 2015 version of the nestbox and the 2014 version is mainly the construction and the use of the ordinary Pi camera instead of the NoIR. The placement of the camera at a higher position will hopefully make the pictures better. The camera angel is also different.

The Pi will be sending pictures with scp (secure copy) instead of with http (wget).

Nestbox test image

Nestbox test image

A first test image – in the finished nestbox, the sides are painted white. Due to a little construction “mistake”, the sides are of another material than rest of the box.







2015-04-02 – Online!

The nestbox is now online! Everything seem to work fine right now. Making some adjustments with the cron jobs. Will be back with the exact commands for transfering the data from the nestbox server to the web server.


2015-04-03 – Tweepy Python Library

Today I’ve been looking into how to get the nestbox server interact with the newly started Twitter account. Found a lot of command line Twitter clients, like t and Twidge, but none seem to be able to send an image, just text messages.

Then I found a Python script at Raspi.TV, using a Python library called Tweepy, which accesses the Twitter API. My intention is now to write a similar script – it would not need to take the photo, only upload a copy of the image.jpg, at a certain time of the day, by using cron.

Tweepy uses a lot of different methods, found in the API Reference. The method for sending an image to Twitter is called “API.update_with_media” and is used with authentication. You must create a Twitter App for your Twitter account to get the required credentials.

At the Bird of the day-page I’m now using a WordPress Plugin called “Photo Gallery” to present some images from last year, check it out.


2015-04-27 – No birds

No birds in the nestbox so far. Lots of bird acitivity in the garden but only a couple of nearly 10.000 images has shown a bird visiting the nestbox.

The python script will soon be available on github – bitlabbet/nestbox_tweet.


2015-05-04 – Nestbox “vandalized”

This weekend an unknown bird “vandalized” the nestbox entrance hole, probably to prey on the nest. Unfortunately for the visitor, the nestbox was empty. I can also report about a humming bee visiting the nestbox a couple of hours. The camera is now taking 960 pictures every 24 hour.

The next weekend I’m planning to take down the nestbox and fill it with some sawdust, I suspect that the nestbox is rejected because the hole is “too high”.



The Nestbox’ habitants this year has so far been a humbee, some spiders, a fly catcher and a treecreeper. The Nestbox took about 60.000 pictures this summer. Before the winter, I will take down the nest, see to it and maybe change to the IR-camera. It will from now on send two pictures to Twitter a day. See you next year!


The Nestbox is now offline and powerless.