RPiLC allows you to control multiple RGB LEDs from a single server that can be run on one Raspberry Pi. it is also possible to run RPiLC Server on any machine that can run Node.js and connect RPiLC instances in remote mode to this server.
Feature | Description |
---|---|
🤹♀️ Control multipale RGB Leds from one server | Brings all your LEDs to one place |
🌐 Remote Mode | Option to run the app in remote mode, Allows you to control your RGB LED from a RPiLC server |
🏠 MQTT Support for Home Assistant | Option to enable MQTT, works with Home Assistant's MQTT Discovery |
🚦 Live Color Preview | Watch the color change as you move the color picker |
📲 Touch friendly | The app was designed to be comfortable to use on any device |
✅ Client themes | Make your RPiLC client match your style! |
🕒 Recent Colors | Choose a color from a list of recently used colors |
▶ Cycle Colors | Select colors to cycle, choose transition effect |
📱 iOS web app | Add RPiLC to your home screen and use it like a normal app |
🌐 Web Client | Use RPiLC from any modern browser |
🔄 Updater | Get updates for RPiLC through the web client (Experimental) |
↔ API | Interact with RPiLC via the API |
In order to use RPiLC you need:
- A Raspberry Pi.
- Node.js version 8.0.0 or newer installed (you can follow this to install the latest Node.js version on your Pi).
- Pigpio C library (Version V41 or higher)
- Python-setuptools & Python3-setuptools (required for Pigpio)
- RGB led strip connected to the Pi's GPIO (you can follow this guide for wiring)
Get the latest release from here and extract it to a new folder, or do:
git clone https://github.com/Winor/RPiLC
cd RPiLC
npm install
Note that in order to run RPiLC, the app has to be ran with root privilags so it can have accsess to the Pi's GPIO.
sudo node index.js
Visit http://127.0.0.1 in your browser and configure the app to match your setup. (You can also edit config.json manually after it is generated by the app)
Specify the Pin number you used to connect each color channel to your Raspberry Pi GPIO, add new device for more RGB Leds. ("Use Pi GPIO" option must be checked in Backend settings)
Server port: the port for the server to run on (use 80 for default http port)
Server Mode:
- Local Server: Run RPiLC as server, you must have one RPiLC instance running at that mode.
- Remote: This option will run RPiLC as a Client. When selecting this mode, the rest of the Backend settings will be ignored and you will have to specify Server URL in the Remote Setings section. (the server must allow remote SIO devices)
- Server URL: will only take effect when running in remote mode, enter the URL of the machine running RPiLC Server. (for example: http://192.178.1.0)
You can start RPiLC on startup by following these steps:
Note that in order to run RPiLC on startup, pm2 has to run the app as root so RPiLC can get accsess to the Pi's GPIO.
sudo npm install pm2@latest -g
cd [RPiLC location]
sudo pm2 start index.js --name RPiLC
sudo pm2 startup
Use HTTP get requests to interact with your LED Devices, for example http://127.0.0.1/api/local-0/setcolor/blue
will set the LED strip color to blue.
Every request will return device info in JSON format.
Location | Description |
---|---|
/api | Returns array of devices by name and ID |
/api/{deviceid} | Returns object with device info |
/api/{deviceid}/toggle | Turns the Device on/off depending on the state |
/api/{deviceid}/toggle/on | Turns the Device on |
/api/{deviceid}/toggle/off | Turns the Device off |
/api/{device}/setcolor/{color} | Set the Device color to a specific color, accepts hex value, rgb(x, x, x) and color name |
/api/group/{group}/setcolor/{color} | Set all Devices within the same group to a specific color |