Skip to content

Turns your RasPi into a webcam that tweets pictures at configurable times of the day.

License

Notifications You must be signed in to change notification settings

frederikheld/treecam

Repository files navigation

TreeCam

Right in front of my window there's this wonderful tree which accompanies me through the seasons of the year. Year after year I think how great it would be to follow this noble tree through the year by taking pictures of it's day by day transformation.

This picture was taken right before the buds bursted in 2021

So I developed TreeCam, which takes pictures of the tree in regular intervals and posts them on Twitter as well as uploads them to a FTP server.

This repository contains the software that you can use to set up your own TreeCam. It also comes with a reference implementation that shows how a TreeCam hardware can look like.

Reference Implementation

You can see the latest picture that my TreeCam device has taken at treecam.frederikheld.de.

My TreeCam device is posting pictures to twitter.com/fhdevlab automatically four times a day. I will also tweet timelapses and background information from time to time. Unfortunately not anymore.

If you are interested in the hardware I'm running, please have a look into the ./birdhouse directory.

Outline of the TreeCam services

TreeCam is designed to run on a balenaOS powered Raspberry Pi, which makes it resilient against sudden power outages and also allows to run updates remotely via balenaCloud. TreeCam consists of different services that can be found in the subdirectories of ./src.

Camera

The camera service is the main service of TreeCam. It takes pictures and posts them to Twitter and/or an FTP server and therefore requires a RasPi camera module.

Additional services are integrated via Git submodules:

Heating and Ventilation

balena-hvac is useful if you operate your camera outdoors and want to prevent damages through over-heating or condensation. It requires additional hardware!

Convenient WiFi setup

wifi-connect and balena-reset can be used to manage the WiFi connection between the TreeCam and your home wifi via a captive portal and reset button. You don't need those services if you provide your WiFi credentials when downloading the image in balenaCloud or if you only want to use wired networking.

Configuration

The configuration of the whole installment is done (as usual for balena multi-container apps) in the ./docker-compose.yml file in the root level of this repository. The individual configuration of each services works slightly different. Please read the README.md files of each service to learn about it. Each service also comes with their own exemplary docker-compose.yml that you can use as templates.

Robust and user-friendly

TreeCam was designed with robustness and usability in mind, which led to the following design decisions:

  • The operating system is balenaOS which runs the different modules in Docker containers. It is very resilient against unexpected power loss and can be updated and maintained via balenaCloud.

  • This makes it easy to operate the device in places that are difficult to access. As long as there's a WiFi connection available, you're fine

  • The WiFi connection can be set up via a captive portal

  • The services can easily be configured via a central docker-compose file and the balenaCloud

  • New features and services can be added with moderate Python skills

Setup

See src/README.md for instructions how to setup your TreeCam device.

Known Issues

The RasPi Zero W would be the perfect device for this project because of it's low price and power consumption. Unfortunately downloading the containers from the balenaCloud will most likely fail on a low-spec device like the Zero due an issue with the balenaOS watchdog. See the related support thread here: https://forums.balena.io/t/persistent-failed-to-download-image-due-to-connect-econnrefused-var-run-balena-engine-sock-error/114001/14

Contribute

I'd be happy to receive pull requests that add new features and services to TreeCam. For example features that upload pictures to other social media platforms or services that implement new use cases.

Please have a look into the issues on GitHub to see what else is planned that you could support with your skills and time.

About

Turns your RasPi into a webcam that tweets pictures at configurable times of the day.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages