{"id":15031640,"url":"https://github.com/finnkauski/lighthouse","last_synced_at":"2025-08-30T07:31:16.395Z","repository":{"id":62442228,"uuid":"239117614","full_name":"finnkauski/lighthouse","owner":"finnkauski","description":"Philips Hue API wrapper crate for Rust","archived":false,"fork":false,"pushed_at":"2022-01-10T17:59:59.000Z","size":161,"stargazers_count":43,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-19T03:08:11.218Z","etag":null,"topics":["cli","crate","hue","hue-api","hue-bridge","hue-cli","lighthouse","lights","philips-hue","philips-hue-lights","rust","rust-crate","rust-lang","rustlang","smart-home","smart-lights"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/finnkauski.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":"2020-02-08T11:13:53.000Z","updated_at":"2023-11-16T09:23:22.000Z","dependencies_parsed_at":"2022-11-01T22:15:29.542Z","dependency_job_id":null,"html_url":"https://github.com/finnkauski/lighthouse","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnkauski%2Flighthouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnkauski%2Flighthouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnkauski%2Flighthouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnkauski%2Flighthouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finnkauski","download_url":"https://codeload.github.com/finnkauski/lighthouse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231455919,"owners_count":18379383,"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":["cli","crate","hue","hue-api","hue-bridge","hue-cli","lighthouse","lights","philips-hue","philips-hue-lights","rust","rust-crate","rust-lang","rustlang","smart-home","smart-lights"],"created_at":"2024-09-24T20:16:14.523Z","updated_at":"2024-12-27T08:08:31.491Z","avatar_url":"https://github.com/finnkauski.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/finnkauski/lighthouse.svg?branch=main)](https://travis-ci.com/finnkauski/lighthouse)\n\n\u003cp align=\"left\"\u003e\u003cimg align=\"left\" src=\"meta/logo.png\" width=\"240px\"\u003e\u003c/p\u003e\n\n# Lighthouse\n\nControl your Philips Hue lights with this API wrapper!\n\n\n\n**NOTE:**\nThis wrapper is under active redevelopment, see the older commits in order to get\nthe previous iterations of the API. Also this is not a complete API wrapper for the HUE API as I do not have the time to expand the wrapper. If you would like to contribute please consider making a PR.\n\n## Usage\n\nAdding the dependency:\n\n```toml\n[dependencies]\nlighthouse = \"0.2.1\"\n```\n\nAnd then in your application:\n\n```rust\nuse std::net::{IpAddr, Ipv4Addr};\nuse lighthouse::bridge::Bridge;\n// Acquire your IP address and substitute here\nlet ip_addr = IpAddr::V4(Ipv4Addr::new(192, 168, 1, 10));\n// Get an API token from your bridge, requires proof of physical access\nlet bridge_token = String::from(\"my-example-token\");\nlet mut bridge = Bridge::new(ip_addr, bridge_token).unwrap();\nlet lights = bridge.get_lights();\n```\n\nIf you haven't set up a user token or discovered your bridge yet, you can do so with the interactive `try_register` function:\n\n```rust\nuse lighthouse::*;\n// Discovers the bridge's IP and registers a user token\n// This requires physical access to the Bridge!\nlet bridge = bridge::Bridge::try_register(true).unwrap();\n```\n\nSee the `./examples/` directory for more examples.\n\n**NOTE:**\nThe features for color conversion and serialisation to and from files are now behind\nfeature flags. Available flags are:\n\n- color - adds the color conversion module\n- persist - adds the ability to serialise to and from files and also to create bridges from environment variables\n\n## Command line tool\n\nThe previous releases of this library came with a binary that allowed users to control their lights from the command line.\nThe crate has been refactored and simplified. The binary will have to be refactored as well. However the priority is to\nfinished a more sensible API wrapper before moving onto the binary.\n\n## Also see:\n\n[lighthouse.el](https://github.com/finnkauski/lighthouse.el) - an Emacs package\nwrapping the functionality of `lighthouse` (uses older version of the library)\n\n[lightshow](https://github.com/finnkauski/lightshow) - A simple scripting language\nallowing you to script your lights into lightshows (uses older version of the library)\n\n## Contributions\n\nI don't have the time to wrap absolutely all the endpoints and the data structures required for the API.\n\nI would really love people to chip in over time and keep adding new functionality through extra endpoints wrapped.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnkauski%2Flighthouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinnkauski%2Flighthouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnkauski%2Flighthouse/lists"}