{"id":22518418,"url":"https://github.com/singhaxn/rpi-rgb-app","last_synced_at":"2026-04-18T17:01:58.008Z","repository":{"id":37859171,"uuid":"196968841","full_name":"singhaxn/rpi-rgb-app","owner":"singhaxn","description":"Use a Raspberry Pi to control an RGB strip, connected via GPIO, through an RGB amplifier","archived":false,"fork":false,"pushed_at":"2022-06-15T13:05:30.000Z","size":691,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T02:45:29.086Z","etag":null,"topics":["flask","gpio","html-css-javascript","lan","pigpiod-daemon","python3","raspberry-pi","rgb-amplifier","rgb-controller","rgb-strip","rpi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/singhaxn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-15T09:34:52.000Z","updated_at":"2022-07-26T06:09:13.000Z","dependencies_parsed_at":"2022-09-06T04:50:38.846Z","dependency_job_id":null,"html_url":"https://github.com/singhaxn/rpi-rgb-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/singhaxn/rpi-rgb-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhaxn%2Frpi-rgb-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhaxn%2Frpi-rgb-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhaxn%2Frpi-rgb-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhaxn%2Frpi-rgb-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singhaxn","download_url":"https://codeload.github.com/singhaxn/rpi-rgb-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singhaxn%2Frpi-rgb-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31976805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T16:27:12.723Z","status":"ssl_error","status_checked_at":"2026-04-18T16:27:11.140Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","gpio","html-css-javascript","lan","pigpiod-daemon","python3","raspberry-pi","rgb-amplifier","rgb-controller","rgb-strip","rpi"],"created_at":"2024-12-07T04:15:35.114Z","updated_at":"2026-04-18T17:01:57.984Z","avatar_url":"https://github.com/singhaxn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RGB Strip controller for Raspberry Pi\n\nThis app allows you to control an RGB strip, connected to your Raspberry Pi through GPIO, from a web browser. On Chrome for Android, specifically, you can create a shortcut to the controller page on your home screen, and use it like any other RGB controller app.\n\nThis app was inspired by [this article](https://www.instructables.com/id/Easiest-RGB-LED-Strip-With-Raspberry-Pi/) on Instructables.\n\n## How does it work?\n\nThis is a [`Flask`](https://flask.palletsprojects.com/en/2.1.x/) application, that uses either [`pigpio`](https://abyz.me.uk/rpi/pigpio/python.html) or [`lgpio`](https://abyz.me.uk/lg/py_lgpio.html), to set GPIO signals to control a connected RGB LED strip. An RGB amplifier is used to convert the 3.3V GPIO signals to 12V as required by a 5050 RGB strip.\n\nAlthough this app has only been tested with a 12V strip, with an appropriate amplifier or circuit, this may even work with 5V strips.\n\n## Setting it up\n\nHere, we assume that you already have Raspberry Pi OS (or a compatible OS) installed on a Raspberry Pi (henceforth, RPi or Pi for short) and you have a working network connection on the RPi, ideally, with a static IP address. Additionally, you will need to know how to edit text files on your RPi and, either have a keyboard and display hooked up to your RPi while you set it up, or know how to connect to it over the network via SSH. All of this information is readily available online.\n\nIf you intend to run only this app on your RPi, the Lite image on a RPi Zero, should suffice.\n\nThe following instructions assume that the red, green and blue channels are being controlled by GPIO23, GPIO24 and GPIO25, respectively. If you're using different pins please see the [App Configuration](#app-configuration) section below.\n\n### Hardware connections\n \nThe pin layout shown here is for a 1st generation RPi. Please check the pin layout for your version, before connecting.\n\n![Connections](./connections.png \"Connections\")\n\n### Software\nGet to the command prompt on your RPi (direct login or SSH).\n\nInstall the prerequisites\n```\nsudo apt-get install python3 python3-flask git\n```\nInstall _one_ of the following libraries:\n- __`pigpio`__ (recommended but only works on kernel 5.10 or lower)\n    - Raspbian / Raspberry Pi OS Legacy (Buster):\n        ```\n        sudo apt-get install pigpiod pigpio-tools python3-pigpio\n        ```\n    - Others: https://abyz.me.uk/rpi/pigpio/download.html\n- __`lgpio`__ (flickering observed)\n    - Ubuntu: https://ubuntu.com/tutorials/gpio-on-raspberry-pi#2-installing-gpio\n    - Others (including Raspberry Pi OS): http://abyz.me.uk/lg/download.html\n\nDetermine the IP address of your RPi and note it down. For simplicity, we will refer to this IP address as `\u003cPi_IP_Address\u003e`, where required.\n```\nhostname -I\n```\nClone this repository\n```\ngit clone https://github.com/singhaxn/rpi-rgb-app.git\n```\nNavigate into your app folder\n```\ncd rpi-rgb-app\n```\n\nOpen `rgb-app.service` in your favorite editor and specify the correct `User` and `WorkingDirectory` in the `[Service]` section:\n- `User` should be the owner of the `rpi-rgb-app` directory\n- `WorkingDirectory` should be the absolute path to the `rpi-rgb-app` directory\n\nCopy the service file into `/etc/systemd/system`\n```\nsudo cp rgb-app.service /etc/systemd/system/\n```\nStart the service\n```\nsudo systemctl daemon-reload\nsudo service rgb-app start\n```\nStart the service automatically at boot\n```\nsudo systemctl enable rgb-app.service\n```\n\n## User Interface\n\nIn a web browser, on any device on your network (same network as the RPi), open the page `http://\u003cPi_IP_Address\u003e:5000/`. On this page, click the power button. The LED strip should turn on white and you should see a page similar to this:\n\n![UI](rgb-app-ui.png \"UI\")\n\nIf not, see the [Troubleshooting](#troubleshooting) section below.\n\nThe gear icons can be used to edit colors and effects:\n\n![Sequence editor](rgb_sequence_editor.png \"Sequence editor\")\n\n\n## App Configuration\n\nThe first time you run the app, the configuration file `config/settings.json` is created inside your clone of this repository. If you ever want to revert back to the default settings, simply delete `config/settings.json` and restart the `rgb-app` service. This section describes some common modifications that may be needed in this configuration file for your environment.\n\nIf you do need to edit the live configuration file, remember to stop the `rgb-app` service first:\n```\nsudo service rgb-app stop\n```\nand start it up again afterwards\n```\nsudo service rgb-app start\n```\n\n### Common Modifications\n1. Specify the IP address of your Pi (`\u003cPi_IP_Address\u003e`) under `bind-addr`. Ideally, this should be a static IP address. The default address is set to `127.0.0.1` which will be accessible only if your browser is running on the RPi itself.\n2. If you want to use a different port, specify it under `bind-port`. For simplicity, the default port number `5000` is used in these instructions.\n3. If you're using different pins than the default GPIO23, GPIO24 and GPIO25 for the red, green and blue channels, respectively, specify the correct GPIO IDs under `pins`. The sequence is `[R, G, B]`. Please note that these are GPIO ids and not physical pin numbers.\n\n## Troubleshooting\n1. ### `http://\u003cPi_IP_Address\u003e:5000/` returns an `ERR_CONNECTION_REFUSED` error\n    - Make sure, the correct bind address is specified in the configuration file, as described in the [App Configuration](#app-configuration) section above.\n\n2. ### LED Colors are wrong\n    - Do not expect the color reproduction of your RGB LED strips to be accurate with respect to the colors you see on your screen. Each LED strip is likely to have a different calibration. This is why only red, green, blue and white presets are provided by default. Still, double check to make sure the correct GPIO pin IDs are specified in the configuration file, as described in the [App Configuration](#app-configuration) section above.\n\n3. ### `pigpio`-specific issues\n    1. #### `pigs` works but you can't control your LED strip from the web interface\n        - Make sure, the correct GPIO pin IDs are specified in the configuration file, as described in the [App Configuration](#app-configuration) section above.\n        - Check whether __Schedule__ is enabled in the web interface. If so, then the LED strip will only turn on when specified in the schedule. Disable __Schedule__ if you want to control the lights manually.\n        - Make sure __Brightness__ is not set too low on the web interface.\n        - Make sure __Color__ is not set to `[0, 0, 0]` on the web interface.\n    2. #### CPU usage is too high\n        If you're using pigpio for the sole purpose of controlling an RGB strip, consider turning off alert sampling as follows:\n        - Open `/lib/systemd/system/pigpiod.service` in your favorite editor and add the `-m` flag on the `ExecStart` line in the `[Service]` section:\n            ```\n            ExecStart=/usr/bin/pigpiod -l -s 10 -m\n            ```\n        - Restart the relevant services\n            ```\n            sudo service rgb-app stop\n            sudo service pigpiod stop\n            sudo systemctl daemon-reload\n            sudo service pigpiod start\n            sudo service rgb-app start\n            ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinghaxn%2Frpi-rgb-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinghaxn%2Frpi-rgb-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinghaxn%2Frpi-rgb-app/lists"}