Giter VIP home page Giter VIP logo

petkit's Introduction

Petkit for HomeAssistant

⚠️ I don't have more time to maintain this repo, RobertD502/home-assistant-petkit is a better integration, please switch to it.


Installing

Download and copy custom_components/petkit folder to custom_components folder in your HomeAssistant config folder

OR

# Auto install via terminal shell
wget -q -O - https://cdn.jsdelivr.net/gh/al-one/hass-xiaomi-miot/install.sh | DOMAIN=petkit REPO_PATH=hasscc/petkit ARCHIVE_TAG=main bash -

After installing, confirm that the custom_components/petkit folder exists in your HomeAssistant config folder.

Config

It is recommended to use another account credentials for this integration.

Add the following to your configuration.yaml:

# configuration.yaml

petkit:
  # Single account
  username: 86-18866668888 # Username of Petkit APP (小佩宠物), important to use country code
  password: abcdefghijklmn # MD5 or Raw password
  api_base:       # Optional, default is China server: http://api.petkit.cn/6/
  scan_interval:  # Optional, default is 00:02:00
  feeding_amount: # Optional, default is 10(g), also can be input_number entity id.

  # Multiple accounts
  accounts:
    - username: [email protected]
      password: password1
      api_base: http://api.petktasia.com/latest/ # Asia server
      feeding_amount: 20
    - username: [email protected]
      password: password2
      api_base: http://api.petkt.com/latest/     # America server
      feeding_amount: input_number.your_feeding_amount_entity_id # min:10, step:10

For a simple test to ensure integration added correctly, the following works as well:

# configuration.yaml

petkit:
  # Single account
  username: [email protected] # Username of Petkit APP (小佩宠物), important to use country code
  password: your_password # MD5 or Raw password
  api_base: http://api.petkt.com/latest/     # America server - this can be changed to any other server

To check if integration successful:

  1. Go to Settings -> Devices & Services -> Entities
  2. Search for petkit (you should see new entities with Integration label Petkit)

If integration not successful:

  1. Check your home-assistant.log file
  2. Search for petkit in the file
  3. There should be an error message related to your issue
  4. Use Google translate

Example error message:

  • 2023-06-01 14:58:08.450 ERROR (MainThread) [custom_components.petkit] Petkit login [email protected] failed: {'error': {'code': 125, 'msg': '手机号未注册'}}
  • 2023-06-01 14:58:08.501 WARNING (MainThread) [custom_components.petkit] Got petkit devices for [email protected] failed: {'error': {'code': 5, 'msg': '登录会话期,请重新登录'}}

Services

service: petkit.request_api
target:
  entity_id: sensor.d4_xxxxxx_state # Any sensor entity in the account: the Petkit sensor entity ID shown in Settings -> Devices & Services -> Entities
data:
  api: /discovery/device_roster
  params:
    key: val

petkit's People

Contributors

al-one avatar delfhub avatar itschrisg avatar ksheumaker avatar zhaoyibo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

petkit's Issues

Timestamp on last used?

Hi, wonderful project! Many thanks for making this available.

I'm trying to track my cat litterbox use, however I can't get my head around the last used sensor.

When I use: {{ as_timestamp(state_attr('sensor.t3_100006800_last_record', 'timestamp')) }}

It returns none.

Is there an easy way to get the last real usage?

api调用结果跟代码里不太一样啊

我调用代码里的API的响应:

"data": {
	  "name": "喂食器Mini",
	  "createdAt": "2019-11-07T10:01:18.521Z",
	  "id": 100000,
	  "state": 1,
	  "dailyFeed": {
		  "amount": 80,
		  "day": 20211104,
		  "deviceId": 0,
		  "items": [],
		  "realAmount": 85
	  },
	  "relation": {
		  "petIds": [
			  "xxxxx",
			  "xxxxx"
		  ],
		  "userId": "xxxxxx"
	  },
	  "status": {
		  "batteryPower": 4,
		  "batteryStatus": 0,
		  "desiccantLeftDays": 29,
		  "errorPriority": 0,
		  "feeding": 0,
		  "food": 1,
		  "ota": 0,
		  "overall": 1,
		  "pim": 1,
		  "runtime": 35263,
		  "wifi": {
			  "bssid": "xxxxxxx",
			  "rsq": -64,
			  "ssid": "xxx"
		  }
	  },
	  "desc": "下次出粮时间: 23:00"
  },
  "type": "FeederMini"

Feature request: turn P3 data into statistical details

Currently, all details coming from the Fit 3 collar are state-based, what means they show weirdly in HA and are pretty much useless. I guess that's just the HA default and information wasn't crunched in any way?
image

From what I could understand, this is what the P3 responds with:

  • basic exercise details (activityRecord), which include "strenuous exercise" (playSum), "exercise" (walkSum) and the sum of both (total). This doesn't seem that useful since it depends on the last time I opened the app to sync... So, unless there's a history of sorts (data24??), it seems it could just show useless, out-of-sync information if I don't open the app for a few days?
  • calories details (no mystery here)
  • sleep sum in seconds, both for deep and light sleep, as well as... timestamps of start/end periods?
  • there's also a mysterious data24 list of timestamps(?) as well, which I have no clue what it's about - although the only info missing from the app dashboard would be the activity graph... But I couldn't match what I saw in the API response with what I see in the app.

It would be awesome to be able to see a daily graph of activity/sleep sums... And maybe even a graph of sleep times.

I leave below some samples of API responses, if it's of any help. My timezone is supposed to be -0300, but I noticed the app is a bit confused on the matter - graph seems correctly positioned, but the app jumps into the next day during the night, while after syncing the info is still in the current day.

First day (info only about the night)
{
    "result": {
        "activityRecord": {
            "playSum": 680,
            "total": 13690,
            "walkSum": 13010
        },
        "calorieRecord": {
            "activityCalorieSum": 10,
            "basicCalorieSum": 258,
            "total": 268
        },
        "day": 20230215,
        "sleepDetail": {
            "day": 20230215,
            "deepSleep": 520,
            "deepSleeps": [
                [68630, 68950],
                [70550, 70750]
            ],
            "lightSleep": 3790,
            "lightSleeps": [
                [67370, 68630],
                [69290, 70550],
                [71080, 71390],
                [77000, 77960]
            ],
            "total": 4310
        }
    }
}
Second day (supposedly complete?)
{
    "result": {
        "activityRecord": {
            "playSum": 310,
            "total": 38570,
            "walkSum": 38260
        },
        "calorieRecord": {
            "activityCalorieSum": 28,
            "basicCalorieSum": 258,
            "total": 286
        },
        "data24": [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 45798, 24807, 2928, 4106, 1776, 2859, 34864, 44353, 53066, 39029, 84468, 18048, 13188, 29747, 67661, 65369, 66251, 105015, 99271, 108712, 35912, 98412, 73353, 85927, 64961, 68534, 39455, 4590, 4908, 2954, 6986, 1512, 18422, 2766, 0, 3421, 6928, 4883, 6547, 4779, 9345, 5596, 4404, 4678, 1494, 17188, 6485, 1217, 52093, 64751, 69987, 75505, 68863, 64304, 44334, 2702, 1936, 4408, 667, 4700, 5408, 3050, 58692, 83623, 58959, 23350, 32048],
        "day": 20230216,
        "sleepDetail": {
            "day": 20230216,
            "deepSleep": 6440,
            "deepSleeps": [
                [4670, 4890],
                [6490, 6560],
                [8130, 8180],
                [9940, 10720],
                [12640, 13400],
                [15340, 15510],
                [17220, 17380],
                [18960, 19030],
                [20620, 21330],
                [30000, 30120],
                [31700, 32360],
                [34400, 34690],
                [41770, 42430],
                [50410, 50960],
                [56060, 56720],
                [58760, 58770],
                [60380, 60880]
            ],
            "lightSleep": 31100,
            "lightSleeps": [
                [3410, 4670],
                [5230, 6490],
                [6870, 8130],
                [8680, 9940],
                [10720, 12640],
                [13400, 15340],
                [15960, 17220],
                [17700, 18960],
                [19360, 20620],
                [21330, 22520],
                [28740, 30000],
                [30440, 31700],
                [32360, 34400],
                [38440, 38930],
                [40510, 41770],
                [42430, 43970],
                [49150, 50410],
                [51290, 52120],
                [54800, 56060],
                [56720, 58760],
                [59120, 60380],
                [61190, 61700],
                [66350, 67530],
                [74970, 75280],
                [76460, 76790],
                [77120, 77520]
            ],
            "total": 37540
        }
    }
}
Third day (still incomplete as of now)
{
    "result": {
        "activityRecord": {
            "playSum": 130,
            "total": 22360,
            "walkSum": 22230
        },
        "calorieRecord": {
            "activityCalorieSum": 16,
            "basicCalorieSum": 206,
            "total": 222
        },
        "data24": [40365, 5310, 3740, 15117, 15228, 57531, 47757, 77455, 50759, 28094, 9958, 5563, 4832, 4078, 44920, 15776, 8326, 1266, 7019, 1803, 1973, 3942, 6794, 2283, 25291, 63888, 79362, 76148, 58642, 27043, 2589, 53990, 77593, 50776, 47983, 57400, 100306, 31675, 62626, 16588, 7923, 5908, 46615, 83142, 93268, 98365, 100810, 85583, 79794, 89501, 75725, 52620, 30003, 30627, 106842, 33849, 1200, 4336, 2765, 3508, 2856, 16072, 53870, 49801, 67553, 58073, 7860, 0, 534, 2344, 1775, 6272, 76286, 67536, 53439, 1801, 9991, 14429, 737, 2645, 4326, 1998, 8589, 6770, 40811, 47978, 2878, 1977, 6687, 5368, 5417, 3086, 1137, 11305, 40636, 36508],
        "day": 20230217,
        "sleepDetail": {
            "day": 20230217,
            "deepSleep": 6710,
            "deepSleeps": [
                [4800, 5250],
                [6850, 7400],
                [14200, 14950],
                [16900, 17400],
                [22200, 22620],
                [24190, 24540],
                [26150, 26350],
                [27920, 28180],
                [31780, 32440],
                [34480, 34750],
                [36360, 36820],
                [52030, 52690],
                [55160, 55590],
                [59190, 59280],
                [67270, 67930]
            ],
            "lightSleep": 29950,
            "lightSleeps": [
                [3540, 4800],
                [5590, 6850],
                [7720, 8830],
                [12940, 14200],
                [14950, 16900],
                [20940, 22200],
                [22930, 24190],
                [24890, 26150],
                [26660, 27920],
                [28500, 29010],
                [30520, 31780],
                [32440, 34480],
                [35100, 36360],
                [37170, 37840],
                [39410, 40010],
                [40760, 41170],
                [41530, 42640],
                [46370, 46950],
                [49160, 50420],
                [50770, 52030],
                [52690, 53310],
                [53900, 55160],
                [57930, 59190],
                [59590, 60850],
                [61190, 62220],
                [66010, 67270],
                [67930, 68350]
            ],
            "total": 36660
        }
    }
}

Set feed amount on request

Hello,

Thanks for this integration, I got my two feeders connected and working. However, I have two cats and they don't eat the same amount of food at each serving.

Is it possible to set the amount when making the call to the switch entity?

账号不存在

Logger: custom_components.petkit
Source: custom_components/petkit/init.py:229
Integration: Petkit (documentation, issues)
First occurred: 19:54:23 (1 occurrences)
Last logged: 19:54:23

Got petkit devices for 86-13112303081 failed: {'error': {'code': 7, 'msg': '账号不存在'}}

我有帳戶的,就是連不上

Attempt to decode JSON with unexpected mimetype

petkit:
  # Single account
  username: ***@gmail.com # Username of Petkit APP (小佩宠物), important to use country code
  password: ***** # MD5 or Raw password
  api_base: http://api.petkt.com/latest/

2022-02-14 19:19:54 ERROR (MainThread) [homeassistant.setup] Error during setup of component petkit
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/petkit/init.py", line 239, in _async_update_data
dls = await self.account.get_devices()
File "/config/custom_components/petkit/init.py", line 216, in get_devices
rsp = await self.request(api)
File "/config/custom_components/petkit/init.py", line 164, in request
return await req.json() or {}
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1103, in json
raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('http://api.petkt.com/latest/discovery/device_roster')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 227, in _async_setup_component
result = await task
File "/config/custom_components/petkit/init.py", line 86, in async_setup
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 161, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('http://api.petkt.com/latest/discovery/device_roster')

Feature request: group entities under a single device (Fit 3)

I'm trying to configure a Petkit Fit 3 collar in HA, but was a bit complicated - besides the rough configuration steps, there's no device to search for... All entities for each device should be grouped under a single device, so it's easier to find and see all information at once.

It also makes it harder to bulk-rename the entities, since they're code-based instead of having "friendlier" names.

The integration also does not show in the Integrations list (I guess that's expected since it's completely manual?).

How do you get messages from a Petkit device ?

Id like to see when Petkit food dispenser has dispensed food OR given an error that it is out of food. Is there a way to do that? I have the integration installed, but the only thing I get is an App error...

message: {'error': {'code': 97, 'msg': 'App is out of date, please upgrade'}}
title: Request: /discovery/
friendly_name: Request: /discovery/

Feature Request: Petkit Water Fountain Support

Hello, I have this service up and running on my Pura X litterbox and petkit feeder - it's probably the killer integration for me for home assistant! so Thankyou.

I have recently bought the Petkit EVERSWEET 3 PRO water fountain, the API is exposing the following information:

  • desiccant
  • feed_amount
  • feed_times
  • state
  • food_state
  • feeding

I presume these attributes would need assigning some form of type to be able to be used by home assistant.

full disclosure I am a novice at coding but anything I can do to help provide support or diagnostics guidance I would be more than up for learning here.

Thanks

Error 125 and general set up

This error originated from a custom integration.

Logger: custom_components.petkit
Source: custom_components/petkit/__init__.py:89 
Integration: Petkit (documentation, issues) 
First occurred: 19:34:35 (2 occurrences) 
Last logged: 19:34:35

Petkit login <username> failed: {'error': {'code': 125, 'msg': '手机号未注册'}}
Got petkit devices for <username> failed: {'error': {'code': 5, 'msg': '登录会话过期,请重新登录'}}

I have added the integration and the service petkit.request_api is available and I can see the entities but they are unavailable.

when calling the API request service I get the following error:

Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:410 
First occurred: 20:01:23 (2 occurrences) 
Last logged: 20:02:50

websocket_api script: Error executing script. Invalid data for call_service at pos 1: expected dict for dictionary value @ data['params']`

Can anyone help me please?

FRESH ELEMENT food state doesn't change to "Problem" when there is insufficient food.

The Eversweet fountain state works fine (it changes to "Problem" when the water is almost finished) and the Pura Max also does this when the waste bin is full, but strangely the Fresh Element food_state doesn't change to Problem when there is no more food in the reservoir.

Screenshot_20221218_194116_Chrome
Screenshot_20221218_194200_Home Assistant

Can you please check if this is a problem on the integration's end or with the API?

Thanks!

Unable to login in the United States

Hi -- awesome to see the work! I am based in the United States, per the app, I login with an email/password. I don't see any other username in the app. Putting email/password in the config doesn't seem to work. Any thoughts? Thanks for the work

UK integration not working

I have a device however its on the UK server and using the below example I cannot seem to be able to connect and I am getting the code 125 which I saw few people getting although none of the solutions seem to work and doesn't seem like there's a UK server either. I tried changing region to US in the app and try to re-add my device but it kept failed to connect properly even after reset. Any help?

petkit:
  # Single account
  username: [email protected] # Username of Petkit APP (小佩宠物), important to use country code
  password: your_password # MD5 or Raw password
  api_base: http://api.petkt.com/latest/     # America server - this can be changed to any other server

Error: Unable to import component

Hello together,

thanks for the petkit integration for homeassistant. unfortunately i get the following error after i install the package in the custom components folder and add petkit to the configuration:

Setup failed for petkit: Unable to import component: cannot import name 'CoordinatorEntity' from 'homeassistant.helpers.update_coordinator' (/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/update_coordinator.py)"

What am I doing wrong?

Thank you
Kai

Pura Max can't use "cleanup" and "continue"

if i select "cleanup", not thing happent, no error log output.
if select "continue", get error log


此错误来自自定义集成。

Logger: custom_components.petkit
Source: custom_components/petkit/__init__.py:769
Integration: Petkit (documentation, issues)
First occurred: 04:01:43 (1 occurrences)
Last logged: 04:01:43

Petkit device control failed: [{'id': 171881, 'type': 'continue', 'kv': '{"continue_action":0}'}, {'error': {'code': 2105, 'msg': '设备已停止运行,无法完成操作'}}]

Pura Max "Maintenance Mode"

thanks again for this component.
Is there a way to add the new "maintenance mode" in the Pura Max actions list?

translate Chinese messages in states.petkit_device_state.attributes.desc

Hello everyone, I recently began to use Home Assistant, so please forgive my inexperience.

I successfully installed this custom component (btw, great work!) but I'm struggling to find a way to translate the messages from the devices I have (3 fresh element mini feeders and a pura max litter box).

On the feeders this message is "Next feeding time" followed by hh:mm time, and on the pura max it reports "last utilization", again followed by time in hh:mm format. From midnight until the first daily visit from a cat the reported message is like "Cat litter level ok"

Does anybody have a suggestion?

pura max. after midnight, BEFORE the first utilization
image

pura max, after the first cat's visit of the day
image

on the fresh element mini
image

Config error `ConfigEntryNotReady`

As of today I'm getting this error:

2022-09-14 19:55:00 ERROR (MainThread) [homeassistant.setup] Error during setup of component petkit
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 191, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/petkit/__init__.py", line 239, in _async_update_data
dls = await self.account.get_devices()
File "/config/custom_components/petkit/__init__.py", line 216, in get_devices
rsp = await self.request(api)
File "/config/custom_components/petkit/__init__.py", line 163, in request
req = await self.http.request(method, url, **kws)
File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 559, in _request
await resp.start(conn)
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 913, in start
self._continue = None
File "/usr/local/lib/python3.9/site-packages/aiohttp/helpers.py", line 721, in __exit__
raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/config/custom_components/petkit/__init__.py", line 86, in async_setup
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady

Before this error is thrown this warning is raised:

Logger: homeassistant.setup
Source: /usr/local/lib/python3.9/asyncio/events.py:80
First occurred: 19:54:49 (1 occurrences)
Last logged: 19:54:49

Setup of petkit is taking over 10 seconds.

Doesn't work (Install by wget)

安装完成后添加集成时提示无法通过UI添加,手动配置好configuration.yaml也没反应
image
image
I've installed the integrations with wget command, but it so me this device cannot be added from the UI; also, I added it to configurations.yaml as your example it still not works

pet_weight in Puramax is set only the very first time of a day

Hi,

I just noticed that the sensor sensor.t4_XXXXXXXX_pet_weight is evaluated only once a day. This means that if my cats enter the litter multiple times, i just get the weight of the pet entering the litter first after midnight.

Is it something that can be fixed? How can I help?

Screenshot_20221203-091134

Error when calling feeding switch

First of all, thanks for your work with this integration. It has worked great for a couple of years.

Both my feeders stopped working 3 days ago. HA states them as "Offline" for the entity named sensor.feeder_cid_state.
Skärmavbild 2023-08-07 kl  20 28 17

I get this error message in the logs:

2023-08-07 20:11:46.055 ERROR (MainThread) [custom_components.petkit] Petkit feeding failed: {'error': {'code': 1504, 'msg': '喂食器已离线,不能修改喂食计划'}}

The feeder is offline, the feeding schedule cannot be modified
(Translated from 喂食器已离线,不能修改喂食计划)

I can use the Petkit mobile app to trigger a feed, so they should be online.

PURA X Usage Time

Hello, is it possible to get the usage time in the PURA X like the app shows?

Thank you, this integration is great to have in Home Assistant

Warning: App is out of date, please upgrade

From the logs.

Logger: custom_components.petkit
Source: custom_components/petkit/init.py:402
Integration: Petkit (documentation, issues)
First occurred: 4:36:13 PM (3 occurrences)
Last logged: 4:40:16 PM

Got petkit device detail for CAT Water failed: {'error': {'code': 97, 'msg': 'App is out of date, please upgrade'}}

Is this something where we just need to bump a version number somewhere?

Login error code 125

Hello,

I'm getting login error with code 125 and message '手机号未注册', that supposed to be translated to 'Mobile phone number is not registered'
Why mobile number if I'm using email to login in mobile app?

Log:

Logger: custom_components.petkit
Source: custom_components/petkit/__init__.py:87 
Integration: Petkit ([documentation](https://github.com/hasscc/petkit), [issues](https://github.com/hasscc/petkit/issues)) 
First occurred: 14:32:57 (1 occurrences) 
Last logged: 14:32:57

Petkit login [email protected] failed: {'error': {'code': 125, 'msg': '手机号未注册'}}

I got a strange error with the newest version of petkit integration.

Logger: custom_components.petkit
Source: custom_components/petkit/button.py:6
Integration: Petkit (documentation, issues)
First occurred: 17:57:24 (1 occurrences)
Last logged: 17:57:24

Unexpected error fetching petkit-****-devices data: No module named 'homeassistant.components.button'
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/home/homeassistant/.homeassistant/custom_components/petkit/init.py", line 266, in _async_update_data
await self.update_hass_entities(d, dvc)
File "/home/homeassistant/.homeassistant/custom_components/petkit/init.py", line 272, in update_hass_entities
from .button import PetkitButtonEntity
File "/home/homeassistant/.homeassistant/custom_components/petkit/button.py", line 6, in
from homeassistant.components.button import (
ModuleNotFoundError: No module named 'homeassistant.components.button'

pet_weight "unknown" for brief period every scan interval

Hi,

On our PURA X and PURA MAX, every 2 minutes, the pet_weight entity is set to "unknown" for a very short period before being set back to its previous value. It only lasts a fraction of a session, but it results in two extra state changes every two minutes where nothing has actually changed. (It of course only changes the value if a cat uses the box.)

As noted above, it's occurring on both of our petkit litter boxes. I use the default scan_interval, and both boxes show the problem at the same time, so I'm guessing it's happening every scan. I spot checked the "action" and "liquid" entities and they are not exhibiting this behavior; I didn't check the rest.

Happy to provide additional info if it would be helpful. Thanks for any suggestions and for making this integration!

Beginners Guide Request

Hello,

I recently bought a Petkit Pura Max and I really appreciate your work of managing to integrate it in home assistant. It would be great if I could create some automations so my lightbulbs would light in different colors depending on the litter/trash state. However, although I tried to put together all the information I could find about this plugin, in the end I wasn't able to set it up. I only have basic skills when it comes to coding so apart from installing it and trying to edit the config.yaml file, I could not make it show in integrations.

Would any of you be kind enough to make a step by step guide/tutorial that I could follow? It would be very much appreciated, maybe there are more people trying to set this up.

Thank you

Error: 登录会话过期 - Session expired

Hi. I was able to use the custom component for 1 day. After that, I received this error:
Got petkit devices for *********@gmail.com failed: {'error': {'code': 8, 'msg': '登录会话过期,请重新登录'}}
Translated to: Session expired, please login again.
Even restarting HASS doesn't help.
How can I fix this?
Thanks.

喂食器未找到设备,饮水机提示更新软件

喂食器状态显示异常
Petkit feeding failed: {'error': {'code': 703, 'msg': '未找到设备'}}

Got petkit device detail for 智能饮水机 failed: {'error': {'code': 97, 'msg': 'App is out of date, please upgrade'}}

Request: Petkit Pura X integration

Request: It would be nice if this could also gather the sensors of the petkit pura x smart litter box. I think it uses the same API as my installation shows online and I do not have the feeder.

Username needs better explanation

Sample config on README sort of states you need to enter your phone number as username. That's incorrect, not only in my case but at least for this user as well.

I never entered my phone on the app and there's not even a place to fill it! Additionally, the app does ask for a user name - and that's not just "your name", since it's checked for availability. However, that's ALSO not acceptable to login in the API - had a hard time digging through logs to find it. In the end, entering my email worked fine.

Update to new api endpoints

Hey, it seems that the API changed and the integration is not working anymore. The other integration dev does not want to add the only petkit device I have, the P3 fit.

Is there any chance this integration can be updated with the new API endpoints so the data can still be retrieved?

I understand you do not have the time and will most likely not be able to do this, though I figured it's worth asking

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.