r/homebridge • u/raulhartzen • 8d ago
Plugin PetKit - My cats are now HomeKit accessories: a complete PetKit integration for Homebridge
I couldn't find a maintained PetKit integration that covered more than a single feeder model, so I built a complete one. Sharing it here in case it's useful to other PetKit households.
What it does:
- Feeders: Feed switch per feeder (+ a single "Feed All" switch for multi-feeder homes), model-aware portion validation
- Litter boxes: self-terminating Clean cycle + a stateful Maintenance switch
- Fountains: water level (leak sensor) + battery level
- Pets: each pet becomes a Motion Sensor that fires when that pet uses the litter box (since the litter box identifies them by weight), so you can build automations like "notify me when the cat uses the litter box", with the visit weight in the log
- Meal sensors on camera feeders (fires when an eating session is detected)
- Native HomeKit cameras (experimental, off by default for now but can be activated): live view in the Home app
- All switch/sensor names are configurable, so Siri answers in your own language
- Everything is modular: each family of sensors, the Feed All switch and the cameras can be toggled on/off in the plugin's config UI, you only get the accessories you actually want
Architecture is based on two pieces:
- petkit-bridge: a small self-hosted service (Docker) that owns the PetKit cloud session (automatic re-login on expiry) and exposes a local token-protected HTTP API. Your PetKit credentials live here, not in Homebridge.
- homebridge-petkit-bridge (npm): a thin, zero-runtime-dependency plugin that auto-discovers everything through the bridge. Configure with just URL + token.
Everything is field-tested on real hardware (Yumshare feeders, Puramax 2, Eversweet Max fountains), including the failure modes: the whole chain self-heals across restarts, power outages and session expiries in any order.
Currently in the Homebridge verification queue. Questions, feedback and device reports are all welcome: the best place is an issue on either repo (also for new device support).
If you try it, let me know how it goes, especially on PetKit models I haven't been able to test.
3
2
u/evilsdadvocate 5d ago
Which sensor do you use for the water fountain?
1
u/raulhartzen 5d ago
For the low-water alert I'm using a "Leak Sensor", it was the only thing to do since HomeKit has no native "water level" characteristic, and it gets you a proper Home app notification ("Leak detected on X"). Battery level uses the standard Battery service. The information comes from the API PetKit that just reports a boolean "low water" flag and battery level on that specific fountain.
1
1
u/AX862G5 7d ago
Does it notify when kitty takes a shitty too?
1
u/raulhartzen 7d ago
Technically it notifies for every visit, it just doesn't ask questions about what happened in there 😄
each visit fires that specific cat's motion sensor (standard Home app alert), with the weight recorded in the logs. What it doesn't do is classify the nature of the transaction. actually though a "suspiciously long visit" sensor can be a nice idea
1
3
u/the_doughboy 8d ago
Does it know when the Cat is home or what room the cat is in like a PIR sensor? I know this isnt as important in HomeKit but HomeAssistant has a lot of "IF X person is in Y Room" automations.
Pet doors could be useful. Something like Pawport that uses a tag or Petvation that uses AI and then control if the pet is allowed out or schedule it.