{"id":30799775,"url":"https://github.com/fgardt/lighting-manager","last_synced_at":"2026-04-12T16:03:58.619Z","repository":{"id":60260408,"uuid":"536840616","full_name":"fgardt/lighting-manager","owner":"fgardt","description":"Adressable RGB Strip Controller with simple web API","archived":false,"fork":false,"pushed_at":"2023-04-26T02:42:47.000Z","size":129,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-04-26T03:23:12.574Z","etag":null,"topics":["raspberry-pi","ws8212"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/fgardt.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":"2022-09-15T02:50:24.000Z","updated_at":"2023-02-04T04:35:24.000Z","dependencies_parsed_at":"2023-02-18T13:30:19.140Z","dependency_job_id":null,"html_url":"https://github.com/fgardt/lighting-manager","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/fgardt/lighting-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgardt%2Flighting-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgardt%2Flighting-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgardt%2Flighting-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgardt%2Flighting-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgardt","download_url":"https://codeload.github.com/fgardt/lighting-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgardt%2Flighting-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273813209,"owners_count":25172892,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["raspberry-pi","ws8212"],"created_at":"2025-09-05T19:53:47.344Z","updated_at":"2026-04-12T16:03:53.598Z","avatar_url":"https://github.com/fgardt.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Lighting Manager**\n\nControl your ws281x LED strip with a Raspberry Pi through an API.\n\n---\n\n## **Setup**\n\n### **Docker**\n\nThis can be run with `docker-compose up -d lighting-manager` with the following compose file:\n\n```yml\nversion: \"3\"\n\nservices:\n  lighting-manager:\n    image: ghcr.io/fgardt/lighting-manager:latest\n    container_name: lighting-manager\n    restart: unless-stopped\n    privileged: true\n    ports:\n      - \"88:88\"\n#    environment:\n#      - LOG_LEVEL=trace\n    command: [\"--count\", \"YOUR_LED_COUNT\", \"--pin\", \"YOUR_PIN\"]\n```\n\n_note: the container needs to be run in privileged mode to access the GPIOs._\\\n_note: default log level for the container is `info`. If you want to override it to any other value you'll need to use the environment variable. Possible values are `off`, `error`, `warn`, `info`, `debug` and `trace`._\n\n### **Standalone**\n\nAnother option would be to either compile the code yourself or download the binary from the latest [release](https://github.com/fgardt/lighting-manager/releases).\\\nOnce you have the binary simply execute it (and pass along all required flags described below).\n\n_note: this will probably need to be run as root or with `sudo` so it can access the GPIOs._\n\n**Compiling it yourself:**\n\nYou could try to compile it directly on your Raspberry Pi but I highly doubt it will work (maybe on a Pi 4, couldn't try that yet).\n\nTo compile for your Raspberry on another machine you will need some dependencies.\\\n_This from now on assumes that you are on Ubuntu and have the rust toolchain already installed._\n\n- `rustup target add arm-unknown-linux-gnueabihf`\n- `sudo apt install libclang-dev gcc-arm-linux-gnueabihf`\n\nTo compile run `cargo build --release --target arm-unknown-linux-gnueabihf`.\\\nThe binary should be located at `target/arm-unknown-linux-gnueabihf/release/lighting-manager`.\n\n---\n\n## **Command flags**\n\n```text\nUsage: lighting-manager [OPTIONS] --pin \u003cPIN\u003e --count \u003cCOUNT\u003e\n\nOptions:\n  -p, --port \u003cPORT\u003e            Sets the port to listen on [default: 88]\n  -a, --address \u003cADDRESS\u003e      Sets the ip address to listen on [default: 0.0.0.0]\n  -P, --pin \u003cPIN\u003e              Sets the pin to which the WS281x LED string is connected\n  -c, --count \u003cCOUNT\u003e          Sets the count of LEDs in the string\n      --log-level \u003cLOG_LEVEL\u003e  Sets the used logging level\n                               Possible values: error, warn, info, debug, trace\n                               For no logging don't set this option\n                               Note: the LOG_LEVEL environment variable overrides this option\n  -h, --help                   Print help information\n  -V, --version                Print version information\n```\n\n---\n\n## **API**\n\nThe API listens for HTTP GET requests. Values are parsed from the URI.\n\n### `/`\n\nReturns a message with the current running version of the program.\n\n### `/all_modes`\n\nReturns all currently supported modes of the program as JSON.\n\n**Example:**\n\nRequest: `http://your-pi:88/all_modes`\\\nResponse (pretty printed):\n\n```json\n{\n  \"ALARM\": 4,\n  \"COLORRAPE\": 5,\n  \"IDENTIFY\": 7,\n  \"OFF\": 0,\n  \"RAINBOW\": 2,\n  \"SLEEP\": 3,\n  \"STATIC\": 1,\n  \"STROBE\": 6\n}\n```\n\n_note: both the key and the corresponding value can be used to refer to a mode._\n\n### `/mode`\n\nReturns the currently active mode.\n\n**Example:**\n\nRequest: `http://your-pi:88/mode`\\\nResponse:\n\n```text\nCurrent mode: STATIC\n```\n\n### `/mode/{MODE}`\n\nChange the currently active mode to `{MODE}`.\n\n**Example:**\n\nRequest: `http://your-pi:88/mode/RAINBOW`\\\nResponse:\n\n```text\nUpdated mode: RAINBOW\n```\n\n_note: the passed mode is case-insensitive or can also be the corresponding integer (2 in the case of RAINBOW)._\n\n### `/[h,s,v]`\n\nReturns the current value for hue, saturation or value.\n\n**Example:**\n\nRequest: `http://your-pi:88/h`\\\nResponse:\n\n```text\nCurrent HUE: 30\n```\n\n_note: returned values are floats and range from [0-360) (hue) and [0-1] (saturation \u0026 value)._\n\n### `/[h,s,v]/{VALUE}`\n\nChange the current value for hue, saturation or value to `{VALUE}`.\n\n**Example:**\n\nRequest: `http://pi-squared.local/h/340.5`\\\nResponse:\n\n```text\nUpdated HUE: 340.5\n```\n\n_note: values get clipped to the previously mentioned ranges._\\\n_note: for legacy reasons provided values can also be treated as unsigned integers [0-360) (hue) and [0-255] (saturation \u0026 value)._\n\n### `/plain/[h,s,v,mode]`\n\nReturns the current value for hue, saturation, value or the currently active mode.\n\n**Example:**\n\nRequest: `http://pi-squared.local/plain/h`\\\nResponse:\n\n```text\n340.5\n```\n\n_note: returned modes are in lowercase._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgardt%2Flighting-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgardt%2Flighting-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgardt%2Flighting-manager/lists"}