{"id":19185791,"url":"https://github.com/getraid/raspberrypi-led-node-and-webserver","last_synced_at":"2026-06-15T02:33:33.294Z","repository":{"id":125372592,"uuid":"121150135","full_name":"getraid/raspberrypi-led-node-and-webserver","owner":"getraid","description":"Control LED stripes through your Webbrowser via Websockets from the Raspberry Pi.","archived":false,"fork":false,"pushed_at":"2023-01-25T20:41:07.000Z","size":1918,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-04T05:19:24.743Z","etag":null,"topics":[],"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/getraid.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-11T17:49:12.000Z","updated_at":"2023-01-24T23:20:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e1013d5-36ee-4be0-aba1-8ec98afd34e0","html_url":"https://github.com/getraid/raspberrypi-led-node-and-webserver","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getraid%2Fraspberrypi-led-node-and-webserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getraid%2Fraspberrypi-led-node-and-webserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getraid%2Fraspberrypi-led-node-and-webserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getraid%2Fraspberrypi-led-node-and-webserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getraid","download_url":"https://codeload.github.com/getraid/raspberrypi-led-node-and-webserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240261499,"owners_count":19773474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-09T11:11:57.511Z","updated_at":"2026-06-15T02:33:28.265Z","avatar_url":"https://github.com/getraid.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry Pi LED-stripe controller with Node running a Webserver\nControl LED stripes through your Webbrowser via Websockets from the Pi. \nAlso useable, with for example C#, to write applications that send the data via websockets: [possible idea](http://www.screenbloom.com/) or to sync it via Logitech-Software via API.\n\n## Showcase:\nYoutube:\u003cbr\u003e\n[![youtube showcase](https://img.youtube.com/vi/o8wPmeHrHuY/0.jpg)](https://www.youtube.com/watch?v=o8wPmeHrHuY)\n![outside picture](https://i.imgur.com/upRAnYN.jpg)\n![website screenshot](https://i.imgur.com/Y2gUril.png)\n\n## Requirements:\n* Raspberry Pi 1 model B up to Raspberry Pi 3 Model B (tested everything but Pi 1a, Pi2 and Pi3b)\n* Noobs or Rasbian (tested)\n* 1 LED stripe with RGB connected on RPi GPIO pins (can be changed at manual setup: 6): red: gpio27, green: gpio17, blue: gpio22 (raspberry pi zero w)\n* A local network (to reach the pi) and the IP adress of the PI\n* A PC with open port 22, to ssh/connect to the pi.\n\n## Standard Pinout\n* red: gpio pin **27** / pincount 11\n* green: gpio pin **17** / pincount 13\n* blue: gpio pin **22** / pincount 15\n* ground: gpio pin **4** / pincount 7\n\n## Setup:\n\n### Automated\n1. SSH into your Pi via [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) on Windows or the Terminal on Linux / macOs (`ssh pi@your-pi-local-ip-adress:22`)\n2. type in these commands, this will automate the installation.\n```\nwget http://git.getraid.com/raspberrypi-led-node-and-webserver/script.sh\nchmod +x script.sh\nsh script.sh\n```\n### Manual\nYou effectively need to change the **thick** written parts, because they are depending on your setup (GPIO)\n\n1. SSH into your Pi via [Putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html) on Windows or the Terminal on Linux / macOs (`ssh pi@your-pi-local-ip-adress:22`)\n2. To update the PI and the repositories itself -\u003e `sudo apt-get update \u0026\u0026 upgrade --y`\n3. Install Node.js shown [here](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions) (I had Node 6.11.4 on my pi) or [here(german)](https://stefanreimers.wordpress.com/2017/03/18/node-js-auf-dem-raspberry-pi-zero-w/)\n4. Clone this repo to your pi `git clone https://github.com/getraid/raspberrypi-led-node-and-webserver`\n5. Go into the folder `cd raspberrypi-led-node-and-webserver`\n6. **Change the RGB pins to the ones that you connected** `nano ws.js`\n  * `var led1 = new Gpio(your-gpio-pin-g, { mode: Gpio.OUTPUT });`\n  * `var led2 = new Gpio(your-gpio-pin-r, { mode: Gpio.OUTPUT });`\n  * `var led3 = new Gpio(your-gpio-pin-b, { mode: Gpio.OUTPUT });`\n  * to save changes: *CTRL + X -\u003e Y -\u003e Enter*\n7. \\* (Change the IP where the websocketserver lies to your Pi's ip `nano ws-client.js`)\n  * ` var ws = new WebSocket(\"ws://your-pi-local-ip-adress:3000\");`\n  * to save changes: *CTRL + X -\u003e Y -\u003e Enter*\n8. Install pigpio `sudo apt-get install pigpio -y`\n9. Update all dependecies: `npm install` \n10. Run the script: `sudo node ws-dev.js` (sudo necessary because of GPIO access and port 80)\n10.1 If further down no problems occur, you can launch `sudo node ws.js` instead. Ws-dev just shows more log data.\n11. Open your Webbrowser and enter the IP adress of your pi in the url bar. For example: `http://192.168.178.42/`\n12. If the title of the page says *Connected to Server* then you can click on the field with the \"FFFFFF\" and drag the color slider around.\n  * Else check the console of the Pi. Maybe your port is blocked or there is a GPIO error.\n  * Used Ports: 80 (webserver) \u0026 3000 (websocketserver)\n13. Install tmux to run the script in the background `sudo apt-get install tmux`\n  * `tmux`\n  * `sudo node ws`\n  * *CTRL + B and then press d*\n  * You can now close the terminal. To re-enter the tmux session, type `tmux a` \n14. Enjoy your LED-Stripe webcontroller from any device in your local area network\n  * It is also possible to start this script running with tmux on the startup of the system -\u003e rc.local. \n  \n\\* 7 - Is not necessary anymore, change it if you encounter errors.\n\n## Sidenote:\nYou'll see the count of users connected in the console, as well as a client number. This number doesn't have a meaning or anything else, it is just a random number, to quickly differenciate which user send what. (for the lulz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetraid%2Fraspberrypi-led-node-and-webserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetraid%2Fraspberrypi-led-node-and-webserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetraid%2Fraspberrypi-led-node-and-webserver/lists"}