{"id":28457065,"url":"https://github.com/connorlay/hue_sdk","last_synced_at":"2025-07-11T08:34:11.629Z","repository":{"id":57505893,"uuid":"325120256","full_name":"connorlay/hue_sdk","owner":"connorlay","description":"An unofficial Elixir SDK for the Philips Hue personal wireless lighting system :bulb:","archived":false,"fork":false,"pushed_at":"2022-08-13T18:32:12.000Z","size":79,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-22T02:17:23.469Z","etag":null,"topics":["elixir","hue","hue-api","hue-bridge","hue-lights"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/connorlay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-28T21:27:23.000Z","updated_at":"2023-04-29T00:30:57.000Z","dependencies_parsed_at":"2022-09-26T17:51:46.072Z","dependency_job_id":null,"html_url":"https://github.com/connorlay/hue_sdk","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/connorlay/hue_sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorlay%2Fhue_sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorlay%2Fhue_sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorlay%2Fhue_sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorlay%2Fhue_sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/connorlay","download_url":"https://codeload.github.com/connorlay/hue_sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/connorlay%2Fhue_sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262689561,"owners_count":23349133,"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":["elixir","hue","hue-api","hue-bridge","hue-lights"],"created_at":"2025-06-06T23:10:02.783Z","updated_at":"2025-06-30T00:32:19.796Z","avatar_url":"https://github.com/connorlay.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elixir Hue SDK 💡\n\n\u003c!-- MDOC !--\u003e\n\nAn unofficial Elixir SDK for the Philips Hue personal wireless lightning system.\n\nBuild with `Finch`, `Jason`, `Mdns`, and `NimbleOptions`.\n\n## Features\n\n`HueSDK` ships with the following features:\n\n- Automatic discovery of the Hue Bridge device on local networks\n- Complete support of the latest Hue Bridge JSON REST API\n- SSL support for requests made to the Hue Bridge device\n\n### Automatic Bridge Discovery\n\n`HueSDK` supports [automatic bridge discovery](https://developers.meethue.com/develop/application-design-guidance/hue-bridge-discovery/) via the following protocols:\n\n- N-UPnP\n- mDNS\n- Manual IP\n\nIf you have already connected your Hue Bridge device to the internet and registered online with Philips, then N-UPnP will be the fastest and most reliable way to discover your device.\n\nIf you do not wish to connect your Hue Bridge device to the internet or register it with Philips, then mDNS can be used to discover your device.\n\nIf neither of those protocols work, you can manually enter the IP address of your Hue Bridge device via the Manual IP protocol. Consult your home router to identify the device's IP address.\n\n### REST API\n\n`HueSDK` supports the following resources:\n\n- [Lights](https://developers.meethue.com/develop/hue-api/lights-api/)\n- [Groups](https://developers.meethue.com/develop/hue-api/groupds-api/)\n- [Schedules](https://developers.meethue.com/develop/hue-api/3-schedules-api/)\n- [Scenes](https://developers.meethue.com/develop/hue-api/4-scenes/)\n- [Sensors](https://developers.meethue.com/develop/hue-api/5-sensors-api/)\n- [Rules](https://developers.meethue.com/develop/hue-api/6-rules-api/)\n- [Configuration](https://developers.meethue.com/develop/hue-api/7-configuration-api/)\n- [Resourcelinks](https://developers.meethue.com/develop/hue-api/9-resourcelinks-api/)\n- [Capabilities](https://developers.meethue.com/develop/hue-api/10-capabilities-api/)\n\nCurrently, this library provides a simple Elixir wrapper over the Hue Bridge REST API. Please refer to the [official documentation](https://developers.meethue.com/develop/hue-api/) for detailed information on interacting with lights, groups, schedules, etc.\n\nHigh-level Elixir APIs may be added in future versions. If you have any you would like implemented, please open an issue or pull-request!\n\n## Installation\n\nAdd the Hue SDK to your `mix.exs` and run `mix deps.get`:\n\n```elixir\ndef deps do\n  [\n    {:hue_sdk, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nAdd any optional configuration to your `config/*.exs` files:\n\n```elixir\nuse Config\n\n# disabling SSL\nconfig :hue_sdk, ssl: false\n\n# specifying a custom N-UPnP host\nconfig :hue_sdk, portal_host: \"mycustomproxy.com\"\n```\n\n## Usage\n\nAutomatically discover your Hue Bridge device available on your local network:\n\n```elixir\n{:nupnp, [bridge]} = HueSDK.Discovery.discover(HueSDK.Discovery.NUPNP)\n```\n\nPress the link button on your Hue Bridge device and authenticate a new user:\n\n```elixir\nbridge = HueSDK.Bridge.authenticate(bridge, \"connorlay#huesdk\")\n```\n\nMake requests to the Hue Bridge REST API:\n\n```elixir\nHueSDK.API.Lights.get_all_lights(bridge)\n\n{:ok,\n %{\n   \"1\" =\u003e %{\n     \"capabilities\" =\u003e %{\n       \"certified\" =\u003e true,\n       \"control\" =\u003e %{\n         \"colorgamut\" =\u003e [[0.6915, 0.3083], [0.17, 0.7], [0.1532, 0.0475]],\n         \"colorgamuttype\" =\u003e \"C\",\n         \"ct\" =\u003e %{\"max\" =\u003e 500, \"min\" =\u003e 153},\n         \"maxlumen\" =\u003e 800,\n         \"mindimlevel\" =\u003e 200\n       },\n       \"streaming\" =\u003e %{\"proxy\" =\u003e true, \"renderer\" =\u003e true}\n     },\n     \"config\" =\u003e %{\n       \"archetype\" =\u003e \"classicbulb\",\n       \"direction\" =\u003e \"omnidirectional\",\n       \"function\" =\u003e \"mixed\",\n       \"startup\" =\u003e %{\"configured\" =\u003e true, \"mode\" =\u003e \"safety\"}\n     },\n     \"manufacturername\" =\u003e \"Signify Netherlands B.V.\",\n     \"modelid\" =\u003e \"LCA003\",\n     \"name\" =\u003e \"Floor Lamp\",\n     \"productid\" =\u003e \"Philips-LCA003-1-A19ECLv6\",\n     \"productname\" =\u003e \"Hue color Lamp\",\n     \"state\" =\u003e %{\n       \"alert\" =\u003e \"select\",\n       \"bri\" =\u003e 145,\n       \"colormode\" =\u003e \"xy\",\n       \"ct\" =\u003e 443,\n       \"effect\" =\u003e \"none\",\n       \"hue\" =\u003e 7675,\n       \"mode\" =\u003e \"homeautomation\",\n       \"on\" =\u003e false,\n       \"reachable\" =\u003e true,\n       \"sat\" =\u003e 199,\n       \"xy\" =\u003e [0.5016, 0.4151]\n     },\n     \"swconfigid\" =\u003e \"598716A0\",\n     \"swupdate\" =\u003e %{\n       \"lastinstall\" =\u003e \"2021-01-27T22:48:41\",\n       \"state\" =\u003e \"noupdates\"\n     },\n     \"swversion\" =\u003e \"1.76.6\",\n     \"type\" =\u003e \"Extended color light\",\n     \"uniqueid\" =\u003e \"00:17:88:01:09:4c:a7:29-0b\"\n   },\n   # ...\n  }\n}\n```\n\n\u003c!-- MDOC !--\u003e\n\n## Additional Resources\n\n- The Hue Developers [forum](https://developers.meethue.com/forum/).\n- The Hue API [documentation](https://developers.meethue.com/develop/hue-api/).\n\n## Acknowledgments\n\nTo the authors of [Huex](https://github.com/xavier/huex) and [Yet Another Hue API](https://github.com/ZeroOne3010/yetanotherhueapi), which served as inspiration for `HueSDK`.\n\nTo the maintainers of [Finch](https://github.com/keathley/finch), [Jason](https://github.com/michalmuskala/jason), [Mdns](https://github.com/rosetta-home/mdns), and [NimbleOptions](https://github.com/dashbitco/nimble_options) for their ongoing efforts.\n\nTo [Philips and Signify](https://www.philips-hue.com/en-us/about-us) for creating the Hue Lighting system and opening the REST API for developers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorlay%2Fhue_sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnorlay%2Fhue_sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnorlay%2Fhue_sdk/lists"}