Swiftpack.co - Package - Kaiede/RPiLight


Build Status MIT license Swift Swift

An Aquarium Light Controller for the Raspberry Pi

Hardware / OS

Recommended Raspbian Swift Swift

  • Pi 2
  • Pi 3B or 3B+

Supported Raspbian Swift

  • Pi 1
  • Pi Zero

Experimental Debian Swift

  • Pi 3B

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

See the page on Setting up the Raspberry Pi for details.

Installing RPiLight

RPiLight includes a bootstrapping script that walks you through getting things setup from a freshly flashed OS:

source <(curl -s https://raw.githubusercontent.com/Kaiede/RPiLight/master/bootstrap.sh)

Once installed, if you installed the package, you can update using this (not supported on Pi Zero):

sudo apt-get update
sudo apt-get install rpilight

If updating from source:

./build.sh [stable | latest] install


Examples are in the examples folder.

See Configuring the Light Schedule for full details.

Starting the Daemon

The install script will do most of the work, so you should only need to start it using systemctl, which will control the service:

sudo systemctl start rpilight
sudo systemctl restart rpilight
sudo systemctl stop rpilight

Built With


Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.


  • Adam Thayer - Initial work - Kaiede

See also the list of contributors who participated in this project.


This project is licensed under the MIT License - see the LICENSE file for details


Stars: 4
Help us keep the lights on


0.9.0 - Nov 18, 2018


  • Fixes a bug where the light schedule would stop updating after a couple weeks.

Installing on Raspbian Stretch (Only Supported on Raspberry Pi 2/3):

  1. Download Both Debian Packages
  2. sudo dpkg --install swiftlang_4.1.3_armhf.deb rpilight_0.9.0_armhf.deb

0.3.1 - Aug 31, 2018

Fixes an issue where the service would crash because update intervals got too high and overflowed.

0.3.0 - Aug 28, 2018

New Functionality:

  • Can enable a Lunar Cycle to dim parts of your schedule based on the current phase of the moon.
  • New, compact configuration file format (w/updated examples).
  • Limits increased for PWM frequencies. 16 kHz for built-in, 1.5 kHz for the PCA9685.
  • Service now only runs as root on launch. It needs it to access the PWM hardware on the Pi, but can now switch to a lower-privilege user ('pi')


  • Updated build scripts that can produce debian/raspbian packages.
  • Under the hood work along with new tests to try to keep things stable, and lay the groundwork for future features.

0.2.2 - Aug 19, 2018

  • "./install.sh update" now syncs to the latest tag, not to the latest code
  • Swift is now installed in /opt/swift instead of /usr
  • Added bootstrap script to make first installs much easier
  • Other minor cleanup

0.2.1 - Aug 11, 2018

The 'board' property in the hardware config is now optional, unless RPiLight cannot detect what board you have.