Inspiration

Having a bird feeder in your backyard is rewarding. It allows you to get closer to nature. I've been fascinated by birds since I was young, photographing them is a whole task in itself. I figured I could build something to manage and help keep watch of bird feeders. Thus, Bird ↑.

What it does

BirdUp allows one to setup their camera on a tripod to observe and take photos with ease.

With a press of any button (via GraphQL [create your own triggers!]) a photo is taken by the Camera connected to the device.

Afterwards the "capture" graphql mutation reaches the Microprofile Graphql resolver on Quarkus, which triggers a request to the Capture service. It attempts to take a photograph with the connected camera. When successful it subsequently saves the image to the Minio block storage server and notifies Quarkus. Quarkus using Hibernate with Postgresql creates a Sighting Entity. A bird has been recorded.

If capture is called with the React Application the data is automatically refreshed with Mobx.

Sightings can be tagged with bird entities so that the photos can we queried later for specific birds. (Give me all Sightings with Sparrows and Blue Jays)

How I built it

  • Frontend - Displays Sightings and Birds, allows for capturing photos, inspecting metadata, tagging sightings.
    • Typescript
    • React
    • Styled-Components
    • ExifReader
    • GQLClient
    • Mobx
    • date-fns
  • Backend - Manages Records of Birds, Sightings, Captures Sightings, Provides GraphQL API.
    • Java
    • Quarkus
    • Graphql
    • HTTP
    • Hibernate ORM
    • Postgresql
  • Storage - Minio Server along with golang http server to submit/fetch for images (associated with sightings by ID)
    • Go
    • HTTP
    • Minio
  • Camera - Service that asks a Camera to take a photo and returns it to the caller.
    • Python
    • libgphoto2
    • Aiohttp
    • HTTP
  • Remote - Bluetooth Remote that triggers capture mutations on button presses (an example of Capture being extended to trigger on X)
    • Python
    • Aiohttp
    • Evdev
    • Bluetooth
    • GQLClient

Challenges I ran into

  • Deploying to Raspberry PI (different architecture) mainly just gathering all of the deps; it took a while. Containerizing every service would help.
  • libgphoto2 library took some effort to learn.
  • CORS, I ended up slapping NGINX with proxy_pass and the correct CORS headers infront of everything as it was the easiest solution.
  • I wish I had read about Minio more as I could've just integrated it directly into Quarkus. I falsely presumed that they only had a go client (so I wrote a go server [facepalm]).

Accomplishments that I'm proud of

  • Working Demo !!!
  • Got to fill up bird feeders.
  • Heard a goldfinch, no photos sadly.

What I learned

  • Learned and thrived using Quarkus. I've used Java/JVM-* languages in the past. It was the first language I learned and I've moved away from it in the past years for various reason. Quarkus provided some vigor. I am excited to use it in the future with Kotlin. P.S Thanks for the good docs, it pulled me in to this Hackathon.
  • Bluetooth (bluetoothctl)
  • How to interface with DSLR's (Cameras).

What's next for BirdUp

  • Tensorflow service to automatically tag birds.
  • More triggers, cron jobs scheduling,
  • AMQP Messaging, connect multiple cameras pointed to N feeders.
  • More EXIF data.
  • Tools for interacting with the camera more with the website, Poll for battery information etc.
  • Containerize everything, just didn't have time to do it sadly.

Similar Applications that could've been made

  • Fun Photobooth (think graduation party)
  • ID Photographing.
  • Photographing anything on a schedule

Built With

Share this project:

Updates