{"id":39705717,"url":"https://github.com/mbaltrusitis/hueber","last_synced_at":"2026-01-18T10:32:50.847Z","repository":{"id":57437696,"uuid":"82080134","full_name":"mbaltrusitis/hueber","owner":"mbaltrusitis","description":"Python API and tooling for the Philips Hue.","archived":false,"fork":false,"pushed_at":"2017-02-15T19:20:54.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2024-08-08T17:16:47.216Z","etag":null,"topics":["hue-bridge","philips"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/mbaltrusitis.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-15T16:16:31.000Z","updated_at":"2020-01-29T08:48:47.000Z","dependencies_parsed_at":"2022-09-15T11:20:29.315Z","dependency_job_id":null,"html_url":"https://github.com/mbaltrusitis/hueber","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mbaltrusitis/hueber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbaltrusitis%2Fhueber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbaltrusitis%2Fhueber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbaltrusitis%2Fhueber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbaltrusitis%2Fhueber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbaltrusitis","download_url":"https://codeload.github.com/mbaltrusitis/hueber/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbaltrusitis%2Fhueber/sbom","scorecard":{"id":630733,"data":{"date":"2025-08-11","repo":{"name":"github.com/mbaltrusitis/hueber","commit":"1f8f0970856e9273b0ed741fe98d49ebfe9866d9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'dev'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2019-130","Warn: Project is vulnerable to: PYSEC-2019-131"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T07:50:50.798Z","repository_id":57437696,"created_at":"2025-08-21T07:50:50.798Z","updated_at":"2025-08-21T07:50:50.798Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["hue-bridge","philips"],"created_at":"2026-01-18T10:32:49.968Z","updated_at":"2026-01-18T10:32:50.824Z","avatar_url":"https://github.com/mbaltrusitis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"######\nhueber\n######\n\n************\ndescription.\n************\n\nHueber is a fully type-checked Python API for the Philips Hue lighting system. Tooling is also included which enables you to declare update statements (also type-checked) and which can then be safely and efficiently pushed to a Philips Hue Bridge. You are free to use either parts of ``hueber`` together or seperately that is up to you (e.g. use the state builder tools with another API).\n\nplease note!\n============\n\nThat as of now this does not cover the full Philips Hue API and only covers ``/lights``, ``/groups`` and ``/config``. It would not take much work to add them but its just not a prioritiy for me now.\n\n**************\nprerequisites.\n**************\n\n* Python 3.6 (re: static typing annotation)\n* Philips Hue bridge ver2 (I have not tested this with the first generation) connected to your local network\n\n****************\ngetting started.\n****************\n\n\nOpen a REPL and start with instantiating a ``Bridge()`` by passing it the local IP address::\n\n    \u003e\u003e\u003e hue = Bridge(\"192.168.0.5\", \"r3aLLy-L0nG-Us3RName-H3r3\")\n    \u003e\u003e\u003e print(Bridge)\n    Bridge(192.168.0.5, xxxxx...-H3r3)\n\nnote:\n=====\n\nPhilip's providse documenation on how to find your bridge on your network. Please consult `their documentation \u003chttps://developers.meethue.com/documentation/getting-started\u003e`_.\n\nFrom here all your lights and groups are accessible via the Bridge type (I have only shown an abridged version of the output below)::\n\n    \u003e\u003e\u003e print(hue.lights)\n    {1: Light(1, Bedroom Dresser, ... ), 5: Light(5, Kitchen Cabinets, ... ) ... }\n    \u003e\u003e\u003e print(hue.groups)\n    {1: Group(1, Kid's Bedroom, ...), 3: Group(3, Kitchen, ...) ... }\n\nAs you can see above the ``Bridge.lights`` and ``Bridge.groups`` attributes are a collection. An individual ``light`` or ``group`` can be accesed via its index which is the ID given to it by the Philips Hue Bridge::\n\n    \u003e\u003e\u003e hue.lights[1]  # select light with id 1\n    Light(1, Coffee Station, Dimmable light)\n    \u003e\u003e\u003e hue.lights[1].data  # return a dict of all its attributes\n    {'state': {'on': False, 'bri': 77, 'alert': 'select', 'reachable': True},\n    'type': 'Dimmable light', 'name': 'Coffee Station', 'modelid': 'LWB014',...\n    }\n\nThis is all well and good but what if you want to change the state or your light or group? Use the Light-/GroupBuilders to easily construct update strings::\n\n    \u003e\u003e\u003e from hueber.lib import LightBuilder\n    \u003e\u003e\u003e new_update = LightBuilder()\n    \u003e\u003e\u003e new_update[\"on\"] = True\n    \u003e\u003e\u003e new_update[\"bri\"] = 254\n    \u003e\u003e\u003e hue.lights[1].push(new_update.update_str())\n    [{'success': {'/lights/1/state/on': True}}, {'success': {'/lights/1/state/bri': 254}}]\n\nAll ``*Builder`` types are just a ``dict`` underneath so all of the methods and idioms you use for a ``dict`` should be available to a ``Builder``.\n\n**************\ngoing further.\n**************\n\nThis code is particularly well documented (I think) so please dig into the source if you have any more questions or, if you think something really does need further explanation open an issue and I will do my best to updated the README.\n\n*************\ncontributing.\n*************\n\nI am happy to accept a pull request, look into the TODO.rst file for gaps or features I am looking to implement down the road. Please make sure any PRs are off of the ``dev`` branch otherwise it will just not be accepted and be sure to include your name/handle in the contributors file. Additionally, make sure you run ``mypy`` over the project directory.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbaltrusitis%2Fhueber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbaltrusitis%2Fhueber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbaltrusitis%2Fhueber/lists"}