A Raspberry Pi & ws281x Led strip control panel, written in Golang
Horus is a project I decided to make to be able to control the ws281B Led Strip that I installed on my house from anywhere (usually for my computer or phone). The led strip is attached to the Raspberry Pi's GPIO pins.
Horus has a well-made user interface (compatible with mobile devices) that lets the user log in, control the led strip & view your Pi's stats (CPU temperature, RAM usage, etc).
Client: HTML, JavaScript/jQuery, CSS/Sass
Server: Gin, Golang
- ws281x led strip compatible software
- Save color and gradient presets on all 4 different modes available now:
- Static color: Draws a color that will remain static.
- Static gradient: Create your own gradient combining the colors you want.
- Fading rainbow: A visually appealing rainbow that moves through your strip
- Breathing color: A breathing/pulsating effect on the color you want
- Raspberry Pi live stats: CPU temperature, usage, RAM usage, Disk space & system uptime live in your browser.
- Light & dark interface color modes.
- Semi-customizable interface
- Show or hide the features that you want or don't want to see!
- Choose your desired session cookie lifetime.
- Logging system: Keep all the errors that could happen & changes you make to your Led & configuration logged.
- Restful API: Integrate Horus with your own scripts (e.g. change your led color)
Clone the project
git clone https://github.com/keelus/horus
or download the latest release. If you don't have GUI/screen and have to do it via terminal:
wget https://github.com/keelus/horus/releases/download/vX.X.X/horus.zip # Replace X.X.X with the version of the release you want to install
Then, go to the project directory
cd horus
And simply run
sudo ./horus
On the first time execution, you will be asked to enter a username and password, which will be used to log in.
Also, to prevent Linux from asking for sudoers password, or to prevent it from stopping Horus
when disconnected from the SSH
connection, please check the RUN GUIDE.
After cloning the repo and entering the project directory, install the dependencies:
go mod tidy
then, go into the cmd
folder:
cd ./cmd
And run:
go build -o horus
Now, you will be left with a horus.sh
, which I recommend placing into the project directory to prevent issues from GO_PATH & relative path issues. Then, you can run it by:
sudo ./horus
To prevent Linux from asking for sudoers password, or to prevent it from stopping Horus
when disconnected from the SSH
connection, please check the RUN GUIDE.
The led strip is connected via GPIO to the Raspberry Pi. You should connect the led strip data line (usually green) to pin 12 (GPIO 18) (as seen here. It can vary where that pin is located depending on your Raspberry Pi model)
To be able to control your ws281x Led strip, Horus needs access to the Raspberry Pi's GPIO, where the strip is connected. Also, the web server is initialized by default on port 80 (which is a privileged port on Linux).
This project is open source under the terms of the MIT License
If you have any feedback, please reach out to me at [email protected]
Made by @keelus