An Aquarium Light Controller for the Raspberry Pi
Hardware / OS
- Pi 2
- Pi 3B or 3B+
- Pi 1
- Pi Zero
- Pi 3B
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.
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
- Ephemeris - Calculate Moon and Sun positions in Swift.
- Moderator - A simple, modular command line argument parser in Swift.
- PCA9685 - PCA9685 I2C Driver for Swift.
- SwiftyGPIO (Fork) - Patched with improved GPIO PWM behavior.
- SwiftyJSON (IBM-Swift Fork) - The better way to deal with JSON data in Swift.
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
Help us keep the lights on
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
- 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.
0.2.0 - Aug 10, 2018
Prints details of hardware configuration on start
Somewhat improved error reporting when loading the configuration
Supports more than the Pi Zero / 1 GPIO, using a new configuration option
Can configure the gamma used for calculating brightness
Can set a channel's brightness (uses gamma) or intensity (raw light percentage) for any event in the schedule
Ability to set a minimum intensity for a channel