SHLiC (Simple Holiday Lighting Controller) is a home brew device for controlling outside (or really inside as well) outlets for simple lighting control. "Simple" meaning, outlet on/off. It is controllable through an HTTP REST interface.
The need came from my frustration of using X10 and WiFi enabled outlets to control my holiday lighting, with mixed successes. As such, all of the features are based on my needs & requests to myself, based on my holiday lighting needs. My goal was to have something controllable via any service or device that talks REST (ie, OpenHab)
SHLiC may be Simple, but that doesn't mean it's not robust.
SHLiC requires the following software to work
- Python 2.7
- virtualenv (pip install virtualenv)
- Flask (Python Library) (pip install flask)
- gpiozero (pip install gpiozero)
- pymemcache (pip install pymemcache)
- SHLiC should accept REST commands to control the status of a relay.
- Should also support an "all on" and "all off" command
- Local control (physical control of the output relays at the location) is required.
- When local lockout is enabled, block all remote commands to the controller
- When local lockout is disabled, return the state of the relays to the state they should be in based on remote commands that have happened since lockout started.
- Server component for centralized control
- Start with Python 2.7 installed (part of the base raspbian install)
- sudo apt-get install python-pip
- sudo pip install virtualenv
- sudo adduser shlic
- sudo su shlic
- cd ~
- virtualenv -p /usr/bin/python shlic
- source shlic/bin/activate
- pip install flask
- pip install gpiozero
- pip install pymemcache
- cd ~/shlic
- copy the app files in here
to run: gunicorn --bind 0.0.0.0:5000 runController:controller.engine.app
- Dry box ( HxWxH )
- Raspberry Pi 3 Amazon / Adafruit
- 8-Channel Relay Board Amazon
- 4-Port High Output USB Charger Amazon
- Blue Sea Systems Common BusBar (100a, 5 Screw, w/ Cover) Amazon
- Blue Sea Systems DualBus 100 Amp Common Bus 2701 Amazon --or-- Amazon
- 8x 1ft Extension Cords Amazon
- Relay 1: 5
- Relay 2: 6
- Relay 3: 12
- Relay 4: 13
- Relay 5: 16
- Relay 6: 19
- Relay 7: 20
- Relay 8: 21
- Local Lockout Switch: 4
- Local Control Switch: 18
- Ready: 22
- Local Lockout Status: 17
- Local Control Status: 27