{"id":37019399,"url":"https://github.com/dector/tuya-lib","last_synced_at":"2026-01-14T02:09:19.297Z","repository":{"id":57743052,"uuid":"328597975","full_name":"dector/tuya-lib","owner":"dector","description":":bulb: EXPERIMENTAL library to control Tuya devices","archived":true,"fork":false,"pushed_at":"2021-02-24T22:52:15.000Z","size":234,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-11-16T09:46:55.033Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dector.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-11T08:34:56.000Z","updated_at":"2023-01-27T20:28:25.000Z","dependencies_parsed_at":"2022-09-11T10:41:17.368Z","dependency_job_id":null,"html_url":"https://github.com/dector/tuya-lib","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/dector/tuya-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dector%2Ftuya-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dector%2Ftuya-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dector%2Ftuya-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dector%2Ftuya-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dector","download_url":"https://codeload.github.com/dector/tuya-lib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dector%2Ftuya-lib/sbom","scorecard":{"id":331615,"data":{"date":"2025-08-11","repo":{"name":"github.com/dector/tuya-lib","commit":"d7482d5cb4c171b037089d8f2a72c9cac799f21e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"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":"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":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: sample/gradle/wrapper/gradle-wrapper.jar:1"],"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"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":"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"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-18T03:46:58.955Z","repository_id":57743052,"created_at":"2025-08-18T03:46:58.955Z","updated_at":"2025-08-18T03:46:58.955Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":[],"created_at":"2026-01-14T02:09:18.549Z","updated_at":"2026-01-14T02:09:19.290Z","avatar_url":"https://github.com/dector.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tuya-lib\n\n`Tuya-lib` is an **EXPERIMENTAL** JVM library to control smart devices with Tuya firmware.\n\n_EXPERIMENTAL_ status means that this library is in incubating state - I'm lurking around, trying things and breaking\nthem up. **Library API and structure will be changed without additional notices.** However, published maven artifacts\nwill not be removed.\n\n## Features\n\n**WARNING:** Only devices with firmware version 3.3 are supported for now.\n\n- Turn on a `Bulb`.\n- Turn off a `Bulb`.\n- Check if a `Bulb` is turned on.\n\n## Installation\n\n1. Library is distributed via [MavenCentral](https://search.maven.org/artifact/space.dector.tuyalib/library). Ensure\n   that you have it enabled in `build.gradle.kts`:\n\n```kotlin\nrepositories {\n    // ...\n    mavenCentral()\n}\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003ci\u003eFor snapshots\u003c/i\u003e\u003c/summary\u003e\n\n```kotlin\nrepositories {\n    // ...\n    maven(\"https://maven.pkg.jetbrains.space/dector/p/tuya-lib/mvn\")\n}\n```\n\n\u003c/details\u003e\n\n2. Add `tuya-lib` to your dependencies:\n\n```kotlin\ndependencies {\n    // ...\n    implementation(\"space.dector.tuyalib:library:0.1.0\")\n}\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003ci\u003eFor snapshots\u003c/i\u003e\u003c/summary\u003e\n\n```kotlin\nrepositories {\n    // ...\n    implementation(\"space.dector.tuyalib:library:0.1.1-SNAPSHOT\")\n}\n```\n\n\u003c/details\u003e\n\n3. Sync your project with Gradle and you are done.\n\n## Usage\n\n### Controlling a bulb\n\n_You can check [sample/](sample/) directory for minimalistic library usage example._\n\n_Simple android app example is available in [another repository](https://github.com/dector/ghosty)._\n\n**WARNING:** Only bulb with firmware version 3.3 is supported for now.\n\n**WARNING:** Your bulb need to be activated (instructions will be provided later).\n\n```kotlin\nval bulb = Bulb(\n    // bulb IP in local network\n    ip = \"192.168.0.17\",\n\n    // device ID in Tuya system\n    deviceId = \"1ca7b0eb833a56fcf449\",\n\n    // local AES key for device\n    localKey = \"3e3de0d819e34753\",\n)\n\nbulb.turnOn()\n```\n\nUse small delay between executing operations. Devices are slow and might skip your commands if you are sending them too\nfast.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) file.\n\n## License\n\nThis project is licensed under the [Apache 2.0](https://choosealicense.com/licenses/apache-2.0/) License - see\nthe [LICENSE.md](LICENSE.md) file for details.\n\n## Acknowledgments\n\nThis library might never exist without these awesome projects and people behind them that did all the work for reversing\nTuya devices protocol:\n\n- [tuya-convert](https://github.com/ct-Open-Source/tuya-convert)\n- [TuyaAPI](https://github.com/TuyaAPI/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdector%2Ftuya-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdector%2Ftuya-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdector%2Ftuya-lib/lists"}