darkopy

A package to run an automated aquarium with a Raspberry Pi. Takes automatic selfies and posts them to Twitter.


Keywords
aquarium, twitter, picamera, raspberry, raspi, pi, fish
License
CC-BY-NC-SA-2.5
Install
pip install darkopy

Documentation

DarkoPy

This is a python package to run an automated aquarium with a raspberry pi. It will include an adjustable, self-regulating heat system, an LED light system that varies intensity with time to simulate sunlight and moonlight, and a twitter account for your fish. From Twitter, they'll let you know when they need their water changed, when they need food, and they'll send periodic selfies for your viewing pleasure. If desired, you can receive notifications directly to your cell phone with your fish's tweets.

For an example, see @darko_the_fish on twitter: https://twitter.com/darko_the_fish

Webpages for this project:

Software dependencies:

Hardware needed:

  • Raspberry pi, I'm using 3 B, but any should work. If not a 3, a wifi dongle or ethernet connection will be necessary.

  • Raspberry pi camera module, I'm using v2.

  • Some form of cheap aquarium heater (doesn't need temperature control, we'll do that ourselves. Just get a cheap one that heats and heats and heats endlessly)

  • A submersible thermistor/thermometer.

  • An LED hood for the aquarium. I will build my own, but in theory any LED lamp (including readymade) will work because we'll just be adjusting the amount of power flowing into it to control intensity.

  • Some wires, and preferably a breadboard for the heat system

  • A digital potentiometer, like this one: https://www.sparkfun.com/products/10613

Setup:

Nothing too complicated. I'll list the steps here in order to make things as clear as possible.

1) Get the raspberry pi connected to the internet somehow (many easy tutorials on google). Attach the camera module.

2) Get this package on your raspberry pi. Now that you're connected to the internet, you can use git clone from the terminal (ssh into your raspberry pi first. Again, many easy tutorials are available online if you need one):

 git clone https://github.com/astro-britt/DarkoPy

3) Build your LED lamp hood if you're building one. The details of how I built mine are on the project webpage listed above.

4) Set up a twitter account for your fish.

5) Register to make a twitter application following this tutorial: http://nodotcom.org/python-twitter-tutorial.html Make note of the values twitter gives you, because you'll need them in the next step.

6) Go to the file init.py and insert your twitter values where indicated. While you're here, go to the section for aquarium settings and make sure the temperature and temperature tolerance values are correct for your fish. Google this to be sure of your fish's needs! You can also change the frequency of selfies and food/water change prompts if desired, as well as the camera resolution and the path to the directory you'd like to save your fish selfies and videos in.

7) If you'd like to receive notifications with tweets from your fish directly to your phone as they're generated, download the app "IFTTT". Sign up if you don't already have an account, and then activate this recipe, substituting your fish's twitter ID in the correct field:

https://ifttt.com/recipes/439334-send-a-notification-to-your-iphone-if-a-specific-user-tweets

Now explore IFTTT a bit, it's pretty nifty.