{"id":16287759,"url":"https://github.com/akrantz01/lights","last_synced_at":"2025-03-20T03:30:29.548Z","repository":{"id":42655251,"uuid":"456738419","full_name":"akrantz01/lights","owner":"akrantz01","description":"Control an Adafruit NeoPixel strip through a web UI with support for presets, schedules, and custom animations.","archived":false,"fork":false,"pushed_at":"2025-03-09T21:50:12.000Z","size":1176,"stargazers_count":0,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T14:01:40.472Z","etag":null,"topics":["golang","protobuf","python","raspberry-pi","react","redux","typescript","websocket"],"latest_commit_sha":null,"homepage":"https://lights.krantz.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akrantz01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-02-08T01:20:45.000Z","updated_at":"2022-11-03T01:16:21.000Z","dependencies_parsed_at":"2024-03-06T00:23:44.088Z","dependency_job_id":"d31e707d-6f68-4668-a29b-d5bdb22ca601","html_url":"https://github.com/akrantz01/lights","commit_stats":{"total_commits":297,"total_committers":2,"mean_commits":148.5,"dds":"0.21885521885521886","last_synced_commit":"04d0eae34eb76ce8d514e9fb834ee97dd75f4c3e"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akrantz01%2Flights","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akrantz01%2Flights/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akrantz01%2Flights/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akrantz01%2Flights/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akrantz01","download_url":"https://codeload.github.com/akrantz01/lights/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244543693,"owners_count":20469542,"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":["golang","protobuf","python","raspberry-pi","react","redux","typescript","websocket"],"created_at":"2024-10-10T19:46:03.910Z","updated_at":"2025-03-20T03:30:28.840Z","avatar_url":"https://github.com/akrantz01.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lights\n\nLights allows you to control an Adafruit NeoPixel light strip using a web interface on a Raspberry Pi. Authentication\nprovided by [Auth0](https://www.auth0.com) prevents unauthorized users from messing with your lights. The frontend acts\nas a real-time interface synchronized between all connected clients, reducing the possibility of stale data.\n\nLights is currently controlling a strip in my dorm room. You can see what my lights are doing at\n[https://lights.krantz.dev](https://lights.krantz.dev).\n\n\n### Features\n\n- Change the brightness, on/off state, and color of the entire strip\n- Set the color of individual LEDs\n- Create preset displays of LEDs\n- Automatically change the lights using schedules\n- Run custom animations compiled to [WebAssembly](https://webassembly.org/) (ex [rainbow](sample-animations/rainbow))\n- Assign permissions to users\n\n\n## Architecture\n\nTo control the lights, there are 3 primary components: the frontend, the API, and the controller. The frontend, built \nusing React, provides a friendly user interface for viewing and controlling. The API, written in Golang, bridges the \ncontroller and frontend to provide higher level control over the strip such as presets and schedules. Finally, the \ncontroller, written in Python, does the interfacing with the light strip itself through a handful of basic primitives.\n\nThe API and frontend communicate via a REST API and WebSocket API. The REST API is used for CRUD operations on\nanimations, presets, and schedules which are all stored in the database. The WebSocket API is used for providing real-time\nstatus updates and control over the strip. There is also a server-sent events route for providing real-time updates to\nthe REST resources.\n\nThe API and controller communicate via a [Cap'n Proto](https://capnproto.org) RPC interface as defined in \n[lights.capnp](lights_capnp/lights.capnp). For similar systems, the separation between API and controller would not be\nnecessary. However, as the [NeoPixel library](https://pypi.org/project/adafruit-circuitpython-neopixel/) only runs on\nthe Raspberry Pi, this makes it possible to develop on any system that is on the same network as the Pi.\n\n\n## Roadmap\n\nSome features I would like to add in the future:\n\n- [ ] animations editable in the web UI\n- [ ] a mobile app\n- [x] cross-compile the controller in CI\n\n\n### Contributing\n\nIf you would like to contribute to fix a bug or add a feature, feel free to make a PR!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakrantz01%2Flights","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakrantz01%2Flights","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakrantz01%2Flights/lists"}