{"id":20121446,"url":"https://github.com/networld-to/philips-hue-client","last_synced_at":"2025-10-06T13:47:06.148Z","repository":{"id":64299328,"uuid":"568952071","full_name":"networld-to/philips-hue-client","owner":"networld-to","description":"Philips Hue v2 API client","archived":false,"fork":false,"pushed_at":"2024-02-09T13:25:25.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T20:20:38.551Z","etag":null,"topics":["go","golang","philips","philips-hue","philips-hue-api","philips-hue-bridge","philips-hue-lights"],"latest_commit_sha":null,"homepage":"","language":"Go","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/networld-to.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":"2022-11-21T19:06:21.000Z","updated_at":"2022-11-21T23:26:37.000Z","dependencies_parsed_at":"2024-06-20T10:28:54.924Z","dependency_job_id":null,"html_url":"https://github.com/networld-to/philips-hue-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/networld-to/philips-hue-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networld-to%2Fphilips-hue-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networld-to%2Fphilips-hue-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networld-to%2Fphilips-hue-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networld-to%2Fphilips-hue-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/networld-to","download_url":"https://codeload.github.com/networld-to/philips-hue-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/networld-to%2Fphilips-hue-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278621842,"owners_count":26017253,"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-10-06T02:00:05.630Z","response_time":65,"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":["go","golang","philips","philips-hue","philips-hue-api","philips-hue-bridge","philips-hue-lights"],"created_at":"2024-11-13T19:29:12.483Z","updated_at":"2025-10-06T13:47:06.127Z","avatar_url":"https://github.com/networld-to.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Philips Hue API v2 Client\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/networld-to/philips-hue-client)](https://goreportcard.com/report/github.com/networld-to/philips-hue-client)\n[![Godoc](https://godoc.org/github.com/networld-to/philips-hue-client?status.svg)](https://pkg.go.dev/github.com/networld-to/philips-hue-client/bridge)\n\nThe Philips Hue API is provided by a local bridge device that is connected to\nthe local network via ethernet cable (not PoE powered). This client implementation\nin golang implements the second generation of this local Philips Hue API.\n\n* Official Documentation: https://developers.meethue.com/develop/hue-api-v2/\n* API Reference: https://developers.meethue.com/develop/hue-api-v2/api-reference/\n\n## Getting Started\n\nPoint the domain `philips-hue.home.arpa` to your Philips Hue Bridge IP (not\nnecessary, but simplifies access). Make sure you have an appropriate Philips Hue\nBridge configuration under `~/.philips-hue.json`. It should look like this:\n\n```json\n{\"bridge\":\"philips-hue.home.arpa\",\"username\":\"THIS_IS_YOUR_PASSWORD\",\"devicetype\":\"node-philips-hue\"}\n```\n\nInstructions and helper code how to setup a new username is coming soon.\n\nTo test the library run the client via the following command.\n\n```bash\n# Comment or uncomment the appropriate lines in client/main.go and run\n$ go run client/main.go\n```\n\nUse the `philips-hue-client` in your application. Create a `main.go` or any\nother go file that uses the library, see example below.\n\n```golang\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/networld-to/philips-hue-client/bridge\"\n)\n\nfunc main() {\n\tgroups, _, err := bridge.GetGroups()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Println(bridge.ChangeGroupState(groups.Data[0].ID, bridge.BRIGHT_WARM_GREEN_ON))\n}\n```\n\nRun the following commands. This assumes that there is a file that is using\nthis library, see example snippet above.\n\n```bash\n# Initializes your go module. Change to a name of your liking, e.g. github.com/yourusername/yourmodulename\n$ go mod init your/go/mod\n$ go mod tidy\n$ go run main.go\n```\n\n## Security Scanning and Patching\n\n```bash\n# SAST Scanning, install via https://github.com/securego/gosec\n$ gosec ./...\n\n# Vulnerability and Secret Scanning, install via https://aquasecurity.github.io/trivy\n$ trivy fs .\n\n# Udate dependencies (if any)\n$ go get -u ./...\n$ go mod tidy\n```\n\n## Functionality\n\n* Lights\n    * Get all lights\n    * Get single light by ID (uuid)\n    * Switch light on and off\n    * Change light state (during on switch) with presets. Able to control\n        * on/off\n        * brightness\n        * color\n        * color temperature\n* Groups, same functionality as for lights, but for a predefined set of lights\n* Rooms\n    * Get all rooms\n    * Get single room by ID (uuid)\n\n## Available Predefined Light States\n\nThe following presets can be used to switch on the light and configure it\nappropriately, see [presets.go](./bridge/presets.go)\n\n* BRIGHT_NEUTRAL_WHITE_ON\n* BRIGHT_WARM_RED_ON\n* BRIGHT_WARM_GREEN_ON\n* BRIGHT_WARM_BLUE_ON\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetworld-to%2Fphilips-hue-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetworld-to%2Fphilips-hue-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetworld-to%2Fphilips-hue-client/lists"}