Skip to content
/ pleco Public

Pleco is a complete fishtank controller, intended to be run on a RaspberryPI, with a relay board connected. With that hardware, it's possible to turn on and off any AC equipment (such as lights, water pumps, etc).

License

Notifications You must be signed in to change notification settings

dklight/pleco

Repository files navigation

Pleco

License: GPL v3

Pleco is a complete fishtank controller, intended to be run on a RaspberryPI, with a relay board connected. With that hardware, it's possible to turn on and off any AC equipment (such as lights, water pumps, etc).

Features

  • Simple appliances (100V-220V) on/off using relay controller board
  • Schedule on/off for lights, water pumps, etc

Hardware

  • Raspberry PI (any model should be compatible)
  • Relay board

Install

To install, SSH into your Raspberry PI, and run:

git clone https://github.com/dklight/pleco.git
cd pleco
pip install -r requirements.txt

Usage

CLI

For now, pleco is just a CLI script for turning on and off electrical (AC) stuff.

Each electrical appliance should be conected to a port in the relay board. Each port should be asociated to a Raspberry PI GPIO pin.

To turn a port on use the pleco_cli.py script as follows:

./pleco_cli.py --port=1 --on

To turn a port off simply use the pleco_cli.py script as follows:

./pleco_cli.py --port=1 --off

Scheduling actions

It is possible to use Cron to schedule on/off actions:

root@raspecera:/etc/cron.d# cat light_controller
# Main Lights
0 08 * * * root /usr/bin/python /usr/local/bin/pleco_cli.py --port=4 --on 
    --conf=/etc/pleco.conf
0 20 * * * root /usr/bin/python /usr/local/bin/pleco_cli.py --port=4 --off 
    --conf=/etc/pleco.conf

For additional help with Cron syntax use crontab.guru

License

GNU General Public License v3.0

See LICENSE to see the full text.

Changelog

2017-11-09

  • Initial commit
  • Add basic doc
  • License GPLv3

2017-11-11

  • Complete repository reorganization
  • Split code into modules

TODO

  • Flask API to interact with the relay module
  • Simple Js GUI to interat with API
  • Testing!
  • CI with TravisCI
  • Electronic schematics

About

Pleco is a complete fishtank controller, intended to be run on a RaspberryPI, with a relay board connected. With that hardware, it's possible to turn on and off any AC equipment (such as lights, water pumps, etc).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published