PetKit Smart-Home-Integration, kostenlos und Open Source

PetKit feeders, litter boxes and fountains: food, litter, water, filter, pets, alerts.
Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.
This integration brings the connected PetKit devices into Gladys: feeders (Fresh Element, YumShare), automatic litter boxes (Pura X, Pura Max, Purobot) and Eversweet water fountains, through the PetKit cloud (the one of the PetKit app). Unofficial, not affiliated with PetKit.
Development version (0.1). Built from the community clients of the PetKit API (py-petkit-api, used by the Home Assistant integration) and tested with simulated answers, not with a real account yet. Feedback is welcome on the GitHub repository.
Before you start: a second PetKit account
PetKit allows one session per account: when the PetKit app signs in with the account Gladys uses, Gladys's session is closed, and the other way round. So, like the Home Assistant integration recommends, give Gladys its own PetKit account, added to your family:
- In the PetKit app, create a second account (sign up with another e-mail address or phone number), in the same country as your main account. You can do it on another phone, or sign out of your main account first.
- Sign in to the PetKit app with your main account.
- At the top of the home screen, tap Family management, then Create family and follow the instructions (skip this if you already have a family).
- In the family, tap Add family member and add your second account.
- In Gladys, enter the e-mail (or phone number) and password of the second account.
The devices and pets of the family then show up in Gladys, and the PetKit app stays signed in on your phone. If you use the same account in both places anyway, the integration notices that its session keeps being closed: it waits 15 minutes, tries once more, then stops and asks for a second account.
What you get
One Gladys device per PetKit device, and one per pet when the account has a litter box:
| Device | In Gladys |
|---|---|
| Feeder | "Feed one portion" button (one per hopper on two-hopper feeders), food level (low/normal), food left % when reported, dispensed today, last meal, desiccant days left, battery, online, error |
| Litter box | "Clean now" button, "Deodorize now" button (Pura X, Pura Max with its deodorizer, Purobot Max Pro, Crystal Duo), state (idle, cleaning, paused…), litter level %, litter low, waste bin (normal, high when full), deodorizer days left, uses today, last used by, online, error |
| Eversweet fountain | water level (low/normal), filter %, filter days left (Ultra), pump running, drinks today and waste water tank (Ultra), battery (cordless models) |
| Each pet (with a litter box) | weight measured by the litter box (kg), duration of its last visit, visits today |
- Levels use the Gladys level state: low, normal, high (a full waste bin reads "high").
- Food amounts are generic sensors with their unit in the name: grams on the single-hopper feeders, portions on the two-hopper ones (Gemini, YumShare Dual-hopper). Gladys has no mass unit.
- The last meal, the last visit of a litter box and the weight of a pet are dated with the time they happened, not with the time of the reading.
- The badge of each device shows
cloud;unreachablewith an orange dot when PetKit reports the device offline, plainunreachablewhen PetKit does not answer.
Supported models
- Feeders: Fresh Element, Fresh Element Mini Pro, Fresh Element Infinity, Fresh Element Solo, Fresh Element Gemini, YumShare Solo (and Solo 2), YumShare Dual-hopper (and Dual-hopper 2).
- Litter boxes: Pura X, Pura Max (and Max 2), Purobot Max Pro (and Pro 2), Purobot Ultra, Purobot Crystal Duo.
- Fountains: Eversweet Ultra AI (Wi-Fi), and the Bluetooth fountains (Eversweet Solo 2, Eversweet 3 Pro and 3 Pro UVC, Eversweet 5 Mini, Eversweet Max, Max 2 and Max 2 UVC).
Bluetooth fountains do not reach the cloud by themselves: PetKit only knows what another PetKit device acting as a Bluetooth relay (a feeder or a litter box nearby) or the app last synced. Gladys shows that last state. The Eversweet Ultra AI has Wi-Fi and is read directly.
Not supported yet: the air purifiers (Air Magicube, Air Smart Spray on their own), photos, videos and the live stream.
Installation
- Install the integration from the Gladys store.
- In the Configuration tab, enter the e-mail (or phone number) and the password of the PetKit account (preferably the second account, see above).
- Choose the PetKit server of the country of the account: Europe (France, Belgium, Switzerland, United Kingdom…), International (Americas, Australia…), Asia, Russia or China. Save.
- The status says "Connected to PetKit: 5 devices, 2 pets" and the end date of the session.
- Open the Discovery tab and add the devices and pets you want to follow. Their values arrive as soon as they are added.
The Test the connection button signs in again if needed, reads the account and lists its devices and pets.
Buttons and feeding from a scene
- Feed one portion dispenses the smallest amount the feeder accepts: 10 g on the Fresh Element Solo and YumShare Solo, 5 g on the Mini and the Infinity, 20 g on the Fresh Element, 1 portion per hopper on the Gemini and the YumShare Dual-hopper.
- The Feed with a PetKit feeder scene action dispenses any amount the feeder accepts: 10 to 50 g by 10 (Solo, YumShare Solo), 5 to 50 g by 5 (Mini), 5 to 200 g (Infinity), 20 to 400 g by 20 (Fresh Element), 1 to 10 portions from hopper 1 or 2 (Gemini, YumShare Dual-hopper). Another amount fails with the list of the accepted ones.
- Clean now starts a cleaning cycle of the litter box; Deodorize now starts its deodorizer. PetKit refuses them while the box works or a cat is inside: the error message shows in Gladys.
A meal asked from Gladys does not fire the "Meal dispensed" trigger, so a scene cannot loop on it.
Scenes
Three scene triggers:
- Litter box used: a litter box recorded a visit. Variables
pet_name("Unknown pet" when the box did not recognize the cat),weight(kg),duration(seconds),litter_box_nameandat(UTC). The filter can target a litter box and a pet. - Meal dispensed: a feeder dispensed a meal of its plan, from the app or
from its own button. Variables
feeder_name,amount,unit(gorportions),source(plan,app,feeder) andat. - PetKit alert: a device starts reporting a problem: food running low,
waste bin full, litter running low, deodorizer liquid low, water running
low, filter to change, or a device error. The filter can target a device
and some alerts; variables
device_nameandmessage. An alert fires once when it starts, again only after it cleared.
The first reading after a start fires nothing, and records older than 15 minutes found after an outage are only recorded. The other values work with the usual "Device state changed" trigger.
How often it reads
Every 2 minutes by default (60 to 900 seconds): one request per device, plus one for the records of the day of each feeder and litter box. The device list is read again every 30 minutes and on a Discovery scan. On errors the integration waits 1, 2, 5, 10 then 15 minutes; when PetKit says it is busy, 5 minutes. It signs in at most once every 15 minutes and keeps its session across restarts.
Options
| Option | Default | Purpose |
|---|---|---|
| E-mail or phone, password | — | a PetKit account, preferably a second one in your family |
| PetKit server | Europe | the server of the country of the account |
| Time zone of the devices | Gladys's zone | the days and feeding times of PetKit (IANA name) |
| Refresh interval (s) | 120 | how often the devices are read |
| Language of the feature names | French | names of the features, litter box states, alert messages |
Troubleshooting
- "PetKit refused the e-mail or password": check them in the PetKit app. The integration does not retry by itself: it waits for a change or a click on Test the connection.
- "PetKit knows no such account on its … server": choose the server of the country the account was created in.
- "PetKit closed the session right after the sign-in": the same account is signed in to the PetKit app. Use a second account added to your family.
- A Bluetooth fountain never changes: no relay device synced it. Check in the PetKit app that a feeder or a litter box relays it.
- A device is
unreachablewith an orange dot: PetKit reports it offline (Wi-Fi, power). Check it in the app. - A model is missing: purifiers and other devices are not supported yet; the test button lists them. Open an issue on the GitHub repository.
Privacy
The e-mail and password are stored by Gladys as a secret (never sent back to
the browser). The integration sends the e-mail and an MD5 hash of the
password to the PetKit server of the chosen region to open a session, like the
app does; it keeps the session in its /data folder. PetKit, Fresh Element,
YumShare, Pura, Purobot and Eversweet are trademarks of their owner; this
integration is not affiliated with PetKit.
Konfigurationseinstellungen
Diese Einstellungen fragt PetKit in seinem Konfigurationsbildschirm in Gladys ab.
| Einstellung | Typ | Pflichtfeld | Beschreibung |
|---|---|---|---|
| Your PetKit account | section | Nein | Brings your PetKit devices into Gladys through the PetKit cloud: food level and food dispensed by the feeders (Fresh Element, YumShare…), litter level, waste bin and visits of the litter boxes (Pura X, Pura Max, Purobot…) with the weight of each cat, water level, filter and pump of the Eversweet fountains, plus feeding, cleaning and deodorizing buttons and scene triggers. PetKit allows one session per account: use a second PetKit account added to your family in the PetKit app (see the guide), otherwise the app and Gladys sign each other out. Choose the PetKit server of your account, then add the devices from the Discovery tab. Unofficial, not affiliated with PetKit. |
| PetKit e-mail or phone number | string | Ja | |
| PetKit password | secret | Ja | |
| PetKit server | select | Ja | The server of the country chosen when the account was created: Europe (France, Belgium, Switzerland, United Kingdom…), International (Americas, Australia…), Asia, Russia or China. |
| Time zone of the devices | string | Nein | Leave empty to use the time zone of Gladys. Otherwise an IANA name such as Europe/Paris. |
| Refresh interval (s) | number | Nein | How often the devices are read, in seconds (60 to 900). Two requests per feeder or litter box, one per fountain. |
| Language of the feature names | select | Nein | Used for the names of the features, the litter box states and the alert messages. |
So installierst du PetKit in Gladys
- Öffne in Gladys Integrationen: PetKit erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
- Klicke auf Installieren. Gladys lädt das Docker-Image (
ghcr.io/lm1lc3n7/gladys-petkit:0.1.1) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration). - Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
- Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/LM1LC3N7/gladys-petkit.
PetKit benötigt Gladys >=5.1.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.
Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.
Über externe Integrationen
PetKit ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von LM1LC3N7 veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.
- Alle Integrationen durchsuchen, native und aus der Community
- Deine eigene externe Integration bauen und veröffentlichen
- Quellcode auf GitHub — Quelle dieser Dokumentation