{"id":17995070,"url":"https://github.com/aetheryx/tuya-api","last_synced_at":"2025-04-04T05:25:24.426Z","repository":{"id":83426681,"uuid":"380364765","full_name":"aetheryx/tuya-api","owner":"aetheryx","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-29T02:08:02.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T16:43:46.874Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/aetheryx.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-25T22:15:17.000Z","updated_at":"2021-06-29T02:08:05.000Z","dependencies_parsed_at":"2023-10-15T12:56:36.626Z","dependency_job_id":null,"html_url":"https://github.com/aetheryx/tuya-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aetheryx%2Ftuya-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aetheryx%2Ftuya-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aetheryx%2Ftuya-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aetheryx%2Ftuya-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aetheryx","download_url":"https://codeload.github.com/aetheryx/tuya-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247125681,"owners_count":20887754,"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":[],"created_at":"2024-10-29T20:17:51.511Z","updated_at":"2025-04-04T05:25:24.402Z","avatar_url":"https://github.com/aetheryx.png","language":"TypeScript","readme":"# tuya-api\nA strongly-typed, high-level API for Tuya devices\n```ts\nimport { Color, LightDevice } from './src/devices';\n\nconst dev = new LightDevice({\n  id: 'd93cadd64b9d52d6cddd38cd',\n  key: '3f92c536b7467b2d41',\n  ip: '192.168.178.42',\n});\n\ndev.addEventListener('change', ({ status, color, brightness }) =\u003e {\n  if (status !== undefined) {\n    console.log('Status changed to', status ? 'on' : 'off');\n  }\n\n  if (color !== undefined) {\n    console.log('Color changed to', color.toColor().rgb().hex());\n  }\n\n  if (brightness !== undefined) {\n    console.log(`Brightness changed to ${brightness}%`);\n  }\n});\n\nawait dev.init();\nawait dev.setColor(Color.fromRGB('#CA2D36'));\n```\n\nwork in progress - just a small side project for now :)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faetheryx%2Ftuya-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faetheryx%2Ftuya-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faetheryx%2Ftuya-api/lists"}