{"id":24915529,"url":"https://github.com/hasscc/petkit","last_synced_at":"2025-10-17T01:32:06.705Z","repository":{"id":44799079,"uuid":"400117627","full_name":"hasscc/petkit","owner":"hasscc","description":"🐱 Petkit feeder components for HomeAssistant","archived":false,"fork":false,"pushed_at":"2023-08-30T02:59:01.000Z","size":39,"stargazers_count":113,"open_issues_count":29,"forks_count":13,"subscribers_count":13,"default_branch":"main","last_synced_at":"2023-11-07T16:09:51.093Z","etag":null,"topics":["custom-component","feeder","home-assistant","petkit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hasscc.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":"2021-08-26T09:45:20.000Z","updated_at":"2023-10-21T19:19:24.000Z","dependencies_parsed_at":"2023-02-16T15:31:38.039Z","dependency_job_id":null,"html_url":"https://github.com/hasscc/petkit","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasscc%2Fpetkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasscc%2Fpetkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasscc%2Fpetkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasscc%2Fpetkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hasscc","download_url":"https://codeload.github.com/hasscc/petkit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236761705,"owners_count":19200661,"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":["custom-component","feeder","home-assistant","petkit"],"created_at":"2025-02-02T07:18:00.837Z","updated_at":"2025-10-17T01:32:06.341Z","avatar_url":"https://github.com/hasscc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Petkit for HomeAssistant\n\n\u003e ⚠️ I don't have more time to maintain this repo, [`RobertD502/home-assistant-petkit`](https://github.com/RobertD502/home-assistant-petkit) is a better integration, please switch to it.\n\n------\n\n## Installing\n\n\u003e [Download](https://github.com/hasscc/petkit/archive/main.zip) and copy `custom_components/petkit` folder to `custom_components` folder in your HomeAssistant config folder\n\nOR\n\n```shell\n# Auto install via terminal shell\nwget -q -O - https://cdn.jsdelivr.net/gh/al-one/hass-xiaomi-miot/install.sh | DOMAIN=petkit REPO_PATH=hasscc/petkit ARCHIVE_TAG=main bash -\n```\n\nAfter installing, confirm that the `custom_components/petkit` folder exists in your HomeAssistant config folder.\n\n\n## Config\n\n\u003e It is recommended to use another account credentials for this integration. \n\u003e \n\u003e Add the following to your `configuration.yaml`:\n\n```yaml\n# configuration.yaml\n\npetkit:\n  # Single account\n  username: 86-18866668888 # Username of Petkit APP (小佩宠物), important to use country code\n  password: abcdefghijklmn # MD5 or Raw password\n  api_base:       # Optional, default is China server: http://api.petkit.cn/6/\n  scan_interval:  # Optional, default is 00:02:00\n  feeding_amount: # Optional, default is 10(g), also can be input_number entity id.\n\n  # Multiple accounts\n  accounts:\n    - username: email1@domain.com\n      password: password1\n      api_base: http://api.petktasia.com/latest/ # Asia server\n      feeding_amount: 20\n    - username: email2@domain.com\n      password: password2\n      api_base: http://api.petkt.com/latest/     # America server\n      feeding_amount: input_number.your_feeding_amount_entity_id # min:10, step:10\n```\n\n\u003e For a simple test to ensure integration added correctly, the following works as well:\n\n```yaml\n# configuration.yaml\n\npetkit:\n  # Single account\n  username: email@domain.com # Username of Petkit APP (小佩宠物), important to use country code\n  password: your_password # MD5 or Raw password\n  api_base: http://api.petkt.com/latest/     # America server - this can be changed to any other server\n```\n\n\u003e To check if integration successful:\n\u003e\u003e 1. Go to `Settings -\u003e Devices \u0026 Services -\u003e Entities` \n\u003e\u003e 2. Search for `petkit` (you should see new entities with Integration label `Petkit`)\n\n\u003e If integration not successful:\n\u003e\u003e 1. Check your `home-assistant.log` file\n\u003e\u003e 2. Search for `petkit` in the file\n\u003e\u003e 3. There should be an error message related to your issue\n\u003e\u003e 4. Use Google translate\n\u003e\n\u003e Example error message:\n\u003e - `2023-06-01 14:58:08.450 ERROR (MainThread) [custom_components.petkit] Petkit login email@domain.com failed: {'error': {'code': 125, 'msg': '手机号未注册'}}`\n\u003e - `2023-06-01 14:58:08.501 WARNING (MainThread) [custom_components.petkit] Got petkit devices for email@domain.com failed: {'error': {'code': 5, 'msg': '登录会话期，请重新登录'}}`\n\n\n## Services\n\n#### [Request Petkit API](https://my.home-assistant.io/redirect/developer_call_service/?service=petkit.request_api)\n```yaml\nservice: petkit.request_api\ntarget:\n  entity_id: sensor.d4_xxxxxx_state # Any sensor entity in the account: the Petkit sensor entity ID shown in Settings -\u003e Devices \u0026 Services -\u003e Entities\ndata:\n  api: /discovery/device_roster\n  params:\n    key: val\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasscc%2Fpetkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhasscc%2Fpetkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasscc%2Fpetkit/lists"}