{"id":16710234,"url":"https://github.com/majamassarini/lifx-lib","last_synced_at":"2026-06-03T16:31:13.408Z","repository":{"id":62576063,"uuid":"390756973","full_name":"majamassarini/lifx-lib","owner":"majamassarini","description":"A Python 3 library able to encode/decode Lifx (lan) messages","archived":false,"fork":false,"pushed_at":"2026-03-18T17:21:53.000Z","size":61,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-19T06:57:28.745Z","etag":null,"topics":["automate-home","home-automation","library","lifx","lifx-lan-protocol","lifxlan","python","python3"],"latest_commit_sha":null,"homepage":"https://maja-massarini-lifx-lib.readthedocs-hosted.com/en/latest/","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/majamassarini.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-07-29T14:48:04.000Z","updated_at":"2022-06-01T11:04:20.000Z","dependencies_parsed_at":"2022-11-03T18:58:29.845Z","dependency_job_id":null,"html_url":"https://github.com/majamassarini/lifx-lib","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/majamassarini/lifx-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majamassarini%2Flifx-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majamassarini%2Flifx-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majamassarini%2Flifx-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majamassarini%2Flifx-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/majamassarini","download_url":"https://codeload.github.com/majamassarini/lifx-lib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/majamassarini%2Flifx-lib/sbom","scorecard":{"id":613122,"data":{"date":"2025-08-11","repo":{"name":"github.com/majamassarini/lifx-lib","commit":"775fbaca37dd1797c29535963701581eebb6944a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/14 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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/majamassarini/lifx-lib/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/majamassarini/lifx-lib/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/majamassarini/lifx-lib/build.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:24","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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 'master'"],"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"}}]},"last_synced_at":"2025-08-21T03:08:49.176Z","repository_id":62576063,"created_at":"2025-08-21T03:08:49.177Z","updated_at":"2025-08-21T03:08:49.177Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33874679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"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":["automate-home","home-automation","library","lifx","lifx-lan-protocol","lifxlan","python","python3"],"created_at":"2024-10-12T20:07:33.844Z","updated_at":"2026-06-03T16:31:13.392Z","avatar_url":"https://github.com/majamassarini.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lifx-lib\n\n[![Build Status](https://travis-ci.com/majamassarini/lifx-lib.svg?branch=master)](https://travis-ci.com/majamassarini/lifx-lib)\n[![codecov](https://codecov.io/gh/majamassarini/lifx-lib/branch/master/graph/badge.svg?token=HQ27JK26MT)](https://codecov.io/gh/majamassarini/lifx-lib)\n[![Documentation Status](https://readthedocs.org/projects/lifx-lib/badge/?version=latest)](https://lifx-lib.readthedocs.io/en/latest/?badge=latest)\n\nA Python 3 library able to encode/decode Lifx (lan) messages.\n\nIt can be used with an asynchronous or synchronous client.\n\n## Examples\n\n###  Encode\n```python\n    \u003e\u003e\u003e import lifx\n    \u003e\u003e\u003e body = lifx.lan.light.SetColor()\n    \u003e\u003e\u003e header = lifx.lan.header.make(body.state)\n    \u003e\u003e\u003e body.rgb = (0, 255, 0)\n    \u003e\u003e\u003e body.kelvin = 3500\n    \u003e\u003e\u003e body.duration = 1024\n    \u003e\u003e\u003e msg = lifx.lan.Msg.encode(header, body)\n    \u003e\u003e\u003e msg\n    [0x31, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0xFF, 0xFF, 0xFF, 0xFE, 0xAC, 0x0D, 0x00, 0x04, 0x00, 0x00]\n```\n\n####  Encode from a dictionary\n```python\n   \u003e\u003e\u003e import lifx\n   \u003e\u003e\u003e dictionary = {\"hue\": 335, \"saturation\": 90, \"brightness\": 90, \"kelvin\": 3500, \"duration\": 1000,\n   ...               \"transient\": True, \"period\": 180000, \"cycles\": 30, \"skew_ratio\": 0.5, \"waveform\": \"sine\"}\n   \u003e\u003e\u003e body = lifx.lan.light.State_Factory.make(\"SetWaveform\", dictionary)\n   \u003e\u003e\u003e header = lifx.lan.header.make(body.state)\n   \u003e\u003e\u003e msg = lifx.lan.Msg.encode(header, body)\n   \u003e\u003e\u003e msg\n   [0x39, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x00, 0x01, 0x38, 0xEE, 0x66, 0xE6, 0x66, 0xE6, 0xAC, 0x0D, 0x20, 0xBF, 0x02, 0x00, 0x00, 0x00, 0xF0, 0x41, 0x00, 0x00, 0x01]\n```\n\n\n### Decode\n\n```python\n    \u003e\u003e\u003e import lifx\n    \u003e\u003e\u003e msg = lifx.lan.Msg.from_bytes([0x58, 0x00, 0x00, 0x54, 0xB9, 0x71, 0x5D, 0x07, 0xD0, 0x73, 0xD5, 0x12, 0x1A, 0xF1, 0x00, 0x00, 0x4C, 0x49, 0x46, 0x58, 0x56, 0x32, 0x00, 0x4D, 0x18, 0x52, 0x42, 0x1E, 0xB5, 0xFC, 0x82, 0x14, 0x6B, 0x00, 0x00, 0x00, 0x71, 0x7E, 0xCC, 0x4C, 0x09, 0x57, 0xAC, 0x0D, 0x00, 0x00, 0xFF, 0xFF, 0x4C, 0x49, 0x46, 0x58, 0x20, 0x42, 0x75, 0x6C, 0x62, 0x20, 0x31, 0x32, 0x31, 0x61, 0x66, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00])\n    \u003e\u003e\u003e (header, body) = msg.decode()\n    \u003e\u003e\u003e header.type\n    \u003cState.state_light: 107\u003e\n    \u003e\u003e\u003e body.kelvin\n    3500\n    \u003e\u003e\u003e body.rgb\n    (61, 87, 86)\n    \u003e\u003e\u003e str(body)\n    'State {power: 65535, hue: 178, saturation: 30, brightness: 34, kelvin: 3500, rgb: (61, 87, 86), label: LIFX Bulb 121af1}'\n```\n\n#### Decode to a dictionary\n\n```python\n    \u003e\u003e\u003e import lifx\n    \u003e\u003e\u003e msg = lifx.lan.Msg.from_bytes([0x39, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x00, 0x00, 0x01, 0x38, 0xEE, 0x66, 0xE6, 0x66, 0xE6, 0xAC, 0x0D, 0x20, 0xBF, 0x02, 0x00, 0x00, 0x00, 0xF0, 0x41, 0x00, 0x00, 0x01])\n    \u003e\u003e\u003e (header, body) = msg.decode()\n    \u003e\u003e\u003e header.type\n    \u003cState.set_waveform_light: 103\u003e\n    \u003e\u003e\u003e factory = lifx.lan.light.Description_Factory()\n    \u003e\u003e\u003e s = factory.make(body)\n    \u003e\u003e\u003e s[0]\n    'SetWaveform'\n    \u003e\u003e\u003e s[1]['waveform']\n    'sine'\n```\n\n\n## Getting Started\n\n```\npip install lifx-lib\n```\n\n## Diving In\n\n[Documentation](https://lifx-lib.readthedocs.io/en/latest/?badge=latest)\n\n## Contributing\n\nPull requests are welcome!.\n\n## License\n\nlifx-lib is licensed under the MIT license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajamassarini%2Flifx-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmajamassarini%2Flifx-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajamassarini%2Flifx-lib/lists"}