{"id":30069316,"url":"https://github.com/13rac1/wled-sim","last_synced_at":"2025-08-08T11:08:43.720Z","repository":{"id":306327906,"uuid":"1020582103","full_name":"13rac1/wled-sim","owner":"13rac1","description":"🌈 Desktop WLED simulator for testing LED projects without real hardware. GUI matrix + API compatibility + DDP streaming. Perfect for prototyping light shows! ✨","archived":false,"fork":false,"pushed_at":"2025-07-16T18:05:20.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-02T21:21:53.208Z","etag":null,"topics":["led-strips","leds","simulator","wled","wled-gui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/13rac1.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,"zenodo":null}},"created_at":"2025-07-16T05:13:03.000Z","updated_at":"2025-07-16T18:05:24.000Z","dependencies_parsed_at":"2025-07-25T03:03:13.925Z","dependency_job_id":"b995d0f3-9077-4163-8b5b-11cbe3fa084b","html_url":"https://github.com/13rac1/wled-sim","commit_stats":null,"previous_names":["13rac1/wled-sim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/13rac1/wled-sim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/13rac1%2Fwled-sim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/13rac1%2Fwled-sim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/13rac1%2Fwled-sim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/13rac1%2Fwled-sim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/13rac1","download_url":"https://codeload.github.com/13rac1/wled-sim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/13rac1%2Fwled-sim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269410221,"owners_count":24412157,"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-08-08T02:00:09.200Z","response_time":72,"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":["led-strips","leds","simulator","wled","wled-gui"],"created_at":"2025-08-08T11:08:40.866Z","updated_at":"2025-08-08T11:08:43.707Z","avatar_url":"https://github.com/13rac1.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WLED Simulator\n\nA minimal but extensible desktop application that behaves like a real WLED node while running entirely on your workstation. It offers a Fyne-powered LED matrix, a WLED-compatible JSON REST API, and a full-speed DDP UDP listener, making it ideal for client development and automated integration tests.\n\n## Features\n\n* Configurable LED matrix display in a Fyne GUI.\n* Full WLED JSON API (`/json`, `/json/state`, `/json/info`) with `live` field support.\n* DDP UDP listener on port 4048 for real-time LED streaming.\n* Thread-safe shared LED state with power and brightness control.\n* Command-line flags and optional `config.yaml` for easy configuration.\n* Indicators for JSON and DDP activity, green for success and red for error.\n\n## Screenshot\n\n![WLED Simulator Screenshot](/docs/wled-sim-demo.png)\n\n5x4 Matrix displays a rainbow during a DDP request.\n\n## Quick Start\n\n```bash\ngit clone https://github.com/13rac1/wled-simulator\ncd wled-simulator\ngo mod tidy\ngo run ./cmd -rows 10 -cols 3 -http :9090 -init \"#00FF00\"\n```\n\nOpen `http://localhost:9090/json` in your browser or point your WLED mobile app at the same address to test live control.\n\n## Configuration Flags\n\n| Flag        | Default | Description                          |\n|-------------|---------|--------------------------------------|\n| `-rows`     | 10      | Number of LED rows                   |\n| `-cols`     | 2       | Number of LED columns                |\n| `-wiring`   | row     | LED wiring pattern: 'row' or 'col'   |\n| `-http`     | :8080   | HTTP listen address                  |\n| `-ddp-port` | 4048    | UDP port for DDP                     |\n| `-init`     | #000000 | Initial LED colour (hex)           |\n| `-controls` | false   | Show power/brightness controls in UI |\n| `-headless` | false   | Disable GUI for CI (API/DDP only)    |\n| `-v`        | false   | Verbose logging                      |\n\nYou can also create a `config.yaml` file with the same keys to persist defaults.\n\n```yaml\nrows: 10\ncols: 3\nwiring: \"col\"\nhttp_address: \":9090\"\nddp_port: 4048\ninit_color: \"#202020\"\n```\n\n### LED Wiring Patterns\n\nThe simulator supports two common LED matrix wiring patterns:\n\n- **Row-major (`-wiring row`)**: LEDs are wired left-to-right, then top-to-bottom\n  ```\n  0 → 1 → 2\n  3 → 4 → 5\n  ```\n\n- **Column-major (`-wiring col`)**: LEDs are wired top-to-bottom, then left-to-right\n  ```\n  0   2   4\n  ↓   ↓   ↓\n  1   3   5\n  ```\n\n## Testing\n\nRun all unit tests:\n\n```bash\ngo test ./...\n```\n\n### Manual Testing with curl\n\nTest the HTTP API endpoints with these curl commands (assumes simulator running on localhost:8080):\n\n**Set all LEDs to blue:**\n```bash\ncurl -X POST http://localhost:8080/json/state -H \"Content-Type: application/json\" -d '{\"on\":true,\"bri\":255,\"seg\":[{\"col\":[[0,0,255]]}]}'\n```\n\n**Set all LEDs to red:**\n```bash\ncurl -X POST http://localhost:8080/json/state -H \"Content-Type: application/json\" -d '{\"seg\":[{\"col\":[[255,0,0]]}]}'\n```\n\n**Set all LEDs to green:**\n```bash\ncurl -X POST http://localhost:8080/json/state -H \"Content-Type: application/json\" -d '{\"seg\":[{\"col\":[[0,255,0]]}]}'\n```\n\n**Set all LEDs to white:**\n```bash\ncurl -X POST http://localhost:8080/json/state -H \"Content-Type: application/json\" -d '{\"seg\":[{\"col\":[[255,255,255]]}]}'\n```\n\n**Get current state:**\n```bash\ncurl http://localhost:8080/json/state\n```\n\n**Get device info:**\n```bash\ncurl http://localhost:8080/json/info\n```\n\nThe API responses include a `live` field that indicates when DDP data is actively being received (matches real WLED behavior).\n\n### Manual Testing with DDP\n\nTest the DDP protocol using the included Python script (assumes simulator running on localhost:4048):\n\n**Set all LEDs to blue:**\n```bash\npython3 scripts/ddp_test.py --color blue\n```\n\n**Set all LEDs to red:**\n```bash\npython3 scripts/ddp_test.py --color red\n```\n\n**Display rainbow pattern:**\n```bash\npython3 scripts/ddp_test.py --pattern rainbow\n```\n\n**Display gradient pattern:**\n```bash\npython3 scripts/ddp_test.py --pattern gradient\n```\n\n**Run chase pattern (great for testing wiring):**\n```bash\npython3 scripts/ddp_test.py --pattern chase --delay 0.5\n```\n\n**Cycle through colors:**\n```bash\npython3 scripts/ddp_test.py --pattern cycle --delay 0.5\n```\n\n**Test with custom LED count:**\n```bash\npython3 scripts/ddp_test.py --color green --leds 30\n```\n\n**Test with remote host:**\n```bash\npython3 scripts/ddp_test.py --color white --host 192.168.1.100\n```\n\n## License\n\nAGPL","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F13rac1%2Fwled-sim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F13rac1%2Fwled-sim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F13rac1%2Fwled-sim/lists"}