Description
I plan to build a custom wooden bird feeder and attach it to my flat's balcony to provide winter snacks for local birds. However, this will be no ordinary feeder; it will feature a PTZ IP Camera positioned specifically to monitor the visitors.
The camera feed will be recorded by an open-source NVR software running on an OpenSUSE virtual machine within our home hypervisor. The system must be capable of using image recognition to detect when a bird arrives for sunflower seeds and log the event timestamp.
Ideally, the software will support Multi-Object Tracking (MOT) to assign unique IDs to individual birds and track the concurrent count of birds at the feeder. This metric will be transmitted via MQTT to Home Assistant for long-term storage and visualization.
Best case scenario would be if the NVR software could do bird classification and log the bird type.
Goals
- Hardware Setup
- Build and install the bird feeder.
- Mount and position the PTZ camera.
- Infrastructure
- Prepare the OpenSUSE VM on the hypervisor.
- Select the appropriate NVR software.
- Software Installation
- Install the OS and system dependencies.
- Install the NVR software.
- Add the camera feed to the NVR.
- AI & Integration
- Configure image recognition and object detection.
- Setup Multi-Object Tracking (MOT).
- Configure MQTT to send data to Home Assistant.
- Setup graphing in Home Assistant.
Resources
Looking for hackers with the skills:
Nothing? Add some keywords!
This project is part of:
Hack Week 25
Activity
Comments
-
12 days ago by opithart | Reply
Bird feeder
With help from my handy girlfriend, we built a pretty sturdy and, in my opinion, quite pretty wooden bird feeder for my balcony.
The centerpiece is 20 by 30 cm with raised edges all around so birds have a place to land and hold onto, and the roof is also wooden with black asphalt cardboard (could not find a better translation for the Czech word lepenka).
The whole feeder is really solid, weighs about 5 kg, and is bolted to an antenna mount that is bolted to the balcony railing.IP Camera
Camera choice was not that hard with just a few of my requirements: RTSP video stream, PTZ controls for movement, PoE power, and a non-astronomical price.
With all those requirements satisfied, I chose the TP-Link VIGI C540V camera. It ticked all my boxes, actually has more features than I originally wanted, and costs just around €130. That is an amazing price for a PTZ camera with optical zoom.
Also, at least it's not Hikvision with its China government–backed production and global security concerns... although TP-Link's reputation is not that great either.
With all that said, the camera lives in a separate IoT VLAN in my home network with all communication to the outside dropped by the firewall.NVR – Network Video Recorder
After some research and with help from my colleague Pavel Dostál (check him out), I chose Frigate.
It is an open-source project. Although it offers a paid tier called Frigate+ that gives you easy access to better recognition models, the whole NVR works just fine without any subscription at all.
The whole app is containerized, which is a big plus.
One thing this project really excels at is documentation: it is easy to read, structured, contains all relevant information, and is easy to navigate through.Virtual machine setup
This step was quite straightforward. On our home Proxmox cluster (… yes, I know :D) I created a VM, gave it a few CPU cores, 8 gigs of memory, and 128 gigs of disk space for now. I can grow its virtual drive whenever I want in the future.
Then I installed openSUSE Leap on it with Podman and that was just about it for the installation.
I could have used another VM that was already running calledmainprod, which is intended for any containerized workload I want to run, but I decided not to, because I wanted this project to be completely separate (for now). If I need/want to, I can live-migrate this VM to another machine in the cluster.Frigate NVR
This step took some real time, not because Frigate was bad in any way; it was mostly just me playing with its YAML configuration and fine-tuning camera parameters and detection zones.
The UI is great, I can easily view all detections and scroll through all recordings on a timeline. The inner workings of Frigate are quite interesting: how it detects motion, then objects, then their classification and alerting. If you are interested in that, check out their documentation (docs video pipeline).
The only thing that could be improved is exporting video; some better selection mechanism for saving parts of the recording would be nice.For testing, I downloaded a few minutes of some bird feeder recording with lots of birds and fed it to Frigate in a loop. On this I was able to verify detection and classification of birds; it worked great!
After all that, I added the RTSP camera feed and the NVR started doing its thing. Now it was just a matter of having actual birds come to the balcony for some treats.
Home Assistant connection with MQTT
Frigate exposes a great number of MQTT topics containing events, camera details, detections, and much more. Again, all covered in their docs.
With an MQTT broker running on our HA instance, the correct config, the HA integration for Frigate, and an automation of my own making, I now have bird trigger timestamps and bird counts in my Home Assistant dashboard.Conclusion
Again, I really enjoyed working on this Hack Week project.
It is amazing how I could combine manual woodworking, network camera technology, open-source containerized software, and our beloved Home Assistant.
As I'm writing this conclusion, I am looking at the bird feeder from my window and smiling a bit each time some hungry bird comes to get a seed, dried worm, or a bite of an apple. -
-
Similar Projects
This project is one of its kind!