{"id":37719400,"url":"https://github.com/moff4/aqara_capi","last_synced_at":"2026-01-16T13:31:06.789Z","repository":{"id":57751518,"uuid":"519253467","full_name":"moff4/aqara_capi","owner":"moff4","description":"SDK for Aqara Cloud API","archived":false,"fork":false,"pushed_at":"2022-09-12T19:36:04.000Z","size":35,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-22T08:42:18.061Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/moff4.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":"2022-07-29T14:56:12.000Z","updated_at":"2024-10-06T07:55:49.000Z","dependencies_parsed_at":"2022-08-26T09:00:14.833Z","dependency_job_id":null,"html_url":"https://github.com/moff4/aqara_capi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moff4/aqara_capi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moff4%2Faqara_capi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moff4%2Faqara_capi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moff4%2Faqara_capi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moff4%2Faqara_capi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moff4","download_url":"https://codeload.github.com/moff4/aqara_capi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moff4%2Faqara_capi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":[],"created_at":"2026-01-16T13:31:06.710Z","updated_at":"2026-01-16T13:31:06.776Z","avatar_url":"https://github.com/moff4.png","language":"Python","funding_links":["https://www.buymeacoffee.com/komissarov"],"categories":[],"sub_categories":[],"readme":"\n# Aqara Cloud API\n\n[![CodeFactor](https://www.codefactor.io/repository/github/moff4/aqara_capi/badge)](https://www.codefactor.io/repository/github/moff4/aqara_capi)\n\n### Python SDK for Aqara Cloud API\n\n_(Functionality is not full, but already has core for futher upgrades)_\n\n### Install\n\n```bash\npip install aqara_capi\n```\n\n### Example of usage\n\n```python\n\nfrom aqara_capi import CloudApiClient, Locality\n\n# create client\nclient = CloudApiClient(\n    app_id=APP_ID,  # your params from https://developer.aqara.com/console\n    app_key=APP_KEY,\n    key_id=KEY_ID,\n    locality=Locality.RU,  # for cloud domain\n)\n\n# set access and refresh tokens\nclient.set_tokens(access_token='...', refresh_token='...')\n\n# or generate them\nclient.get_auth_code(\n    account='my@example.com',\n    account_type=0,\n    access_token_validity='7d',\n)\nclient.get_access_token(\n    auth_code='secret code from ur email',\n    account='my@example.com',\n    account_type=0,\n)\n\n\n# print your devices\nresponse = client.query_device_info()\nprint(response.result)\n\n# print device attributes\nresponse = client.query_resource_info(\n    model='lumi.light....',\n)\nprint(response.result)\n\n# trigger some action (for example turn on light)\nclient.write_resource_device(\n    subject_id='lumi...',\n    resource_id='4.1.85',\n    value='1',\n)\n\n```\n\n[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/komissarov)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoff4%2Faqara_capi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoff4%2Faqara_capi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoff4%2Faqara_capi/lists"}