{"id":16641818,"url":"https://github.com/samthor/light","last_synced_at":"2026-04-25T13:11:05.302Z","repository":{"id":57528437,"uuid":"131087247","full_name":"samthor/light","owner":"samthor","description":"Controls a WebLight in Go","archived":false,"fork":false,"pushed_at":"2018-05-10T22:52:19.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-27T00:02:41.671Z","etag":null,"topics":["weblight"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samthor.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":"2018-04-26T02:11:29.000Z","updated_at":"2020-04-22T03:05:19.000Z","dependencies_parsed_at":"2022-08-30T11:50:58.197Z","dependency_job_id":null,"html_url":"https://github.com/samthor/light","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samthor/light","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Flight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Flight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Flight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Flight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samthor","download_url":"https://codeload.github.com/samthor/light/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Flight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32262932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"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":["weblight"],"created_at":"2024-10-12T07:47:59.292Z","updated_at":"2026-04-25T13:11:05.282Z","avatar_url":"https://github.com/samthor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Go library to control a light.\nWorks with the [WebLight](https://github.com/sowbug/weblight).\n\n# Usage\n\nRun `light.Update()` in its own goroutine, perhaps with a short delay (sub-second).\n\n```go\n\tlight.Add(light.Task{\n\t\tColor: \u0026light.Red,\n\t})\n\n\tcolor, err := light.Update()\n\tif err != nil {\n\t\tlog.Fatal(err) // or ignore, whatever\n\t}\n\tlog.Printf(\"set color: %+v\", color)\n```\n\nTo add colors that take priority expire after a time:\n\n```go\n\tlight.Add(light.Task{\n\t\tPriority: 100,     // higher takes precedence\n\t\tColor: \u0026light.Red,\n\t\tDuration: time.Second,\n\t})\n```\n\nTo cancel tasks:\n\n```go\n\tref := light.Add(light.Task{\n\t\tPriority: 10,\n\t\tColor: \u0026light.Color{128, 0, 255},\n\t})\n\n\t// later\n\tref.Cancel()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Flight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamthor%2Flight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Flight/lists"}