Colossus Control Software

Colossus – The Raspberry Pi Aquarium Controller uses custom software by RBA Marketing.  Since we are using Raspberry Pi SBCs, it only made sense to write the software in Python.

The Colossus Control Software was developed using the DietPi OS.  DietPi makes installing common apps easy and has a very small footprint when booting.  Hand’s down, this is our favorite operating system for the Raspberry Pi.  The software will run on any Raspberry Pi operating system available.

Colossus Control Software Features

This python scripts handles the all of the relay switching, event logging, temperature monitoring, and system notifications.

Software Requirements

The following system applications are required for the Colossus Control Software to operate.

  • RPi.GPIO – GPIO Interface Library
  • WiringPi – GPIO Interface Library
  • I2c – I2c Support
  • LAMP Webserver Stack – Apache2/MySQL/PHP
  • phpMyAdmin – Php Mysql Manager
  • Python – Python Programming Language
  • mySQL Python Connector

You can find out how to install the above applications with easy google searches for your particular OS.  One of the reasons we use DietPi is that installing these applications is a part of the initial install process.  Once again, DietPi is highly recommended.

Miscellaneous Software

Espeak – Voice Program

Get The Software

Important note:

This software was designed to be used with three (3) MCP23017 I2C Expansion Chips. If you use less than three, you will have to modify the source code.

You can check out and download our software by visiting our GIT repository at Bitbucket.  Follow the quick setup steps below after downloading the code.

Quick Setup Guide

  1.  Create mysql database for the software using phpMyAdmin.
  2. Import config/colossus.sql into database.
  3. Edit config/colossus.confEnter your mysql information into the appropriate sectionsChange any other appropriate config options.
  4. Edit and change the following informationChange channel list to assign your own commands to a particular pin numberChange the expansionaddr[1-3] variables under #Global Placeholders.

Command Syntax

You can pass an optional on/off setting for the command if you like.  This is helpful for initialization and shutdown scripts.  If on or off is not specified, the software will flip the bit from 0 to 1 if off, or 1 to 0 if on.  Simple bit flipping with no current status checks.  If you need to know for sure that a relay is on or off, use the optional on/off

Sample Command Syntax

python Light1

python Light1  on

python Light1  off

Getting the Temperature

python temp

This command will read all DS18B20 probes defined in the config/colossus.conf file.

Miscellaneous Commands

python halt – Turn all i2c expanders to their “off” positions determined by the halt() routine located in the script.

python help – List all commands and pin numbers

python status [html] – Displays the current status of the relays.  Use the optional html to return the output as html instead of plain text.

python webstatus – Returns a single line of output as a comma seperated list contain relay name, pin number, and status.  This is used for the Colossus WordPress Plugin.

python phtest x.xx – Log result of manual pH testing into the database.

python waterchange xx -Log number of gallons of water changed into the database.

python log sensor data – Command line input feature to record miscellaneous sensor data to eventlog.