PetKit Custom Integration

Im just looking at Petkit Solo, and cant see from the standard spec page whether it requires a bluetooth gateway or not.
Can someone tell me if it will work just on wireless and no gateway?

The only product that requires one of the compatible PETKIT devices to act as an in-between BLE relay is the Bluetooth water fountain. The feeders, such as the solo, are WiFi and work standalone with the integration.

Hi,

Quick question, do you know if your integration will work with the Petkit Fresh Element 3 model?

Thanks in advance!

Based on a quick search, the Fresh Element 3 looks to be what is known as the Fresh Element Infinity in other markets. If thatā€™s the case, then yes.

Awesome integration thanks a lot!
One stupid question: how can I make a button that just gives the minimum portion of kibbles on my fresh element solo?
Calling service select.select_first on the select.feeder_manual_feed entity returns ā€œPetkit error 3: Request is incorrectā€.
When I use the dropdown in the entity and select an option, it always works.

that would be awesome. I received the Eversweet 3 Pro around Christmas and would be awesome to get it controlled with Homeassistant, as its the only Petkit Device I own. Hoping for the Best :wink:

@RobertD502 does this; or could this support the PetKit YumShare Dual Hopper (this) ?, it basically looks like a newer version of the PetKit Element Gemini, but with an inbuilt 1080p camera?

Thanks

The yumshare feeders will be supported in the future. The livestream from the camera will not be available in Home Assistant on the account that PetKit uses a proprietary platform to deliver its video streams, which is not compatible with Home Assistant.

1 Like

Do you need/want a yumshare feeder to test with? Iā€™m more than happy to connect with you on mine for testing and integration purposes. Or if you want a sample of the ā€˜device_detailā€™ response?

I installed via HACS, but during integration I get an error:

Failed to load setup wizard: <html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>Web server</center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page -->


Hello,
Iā€™m new in Home Assistant.
After I read about your Petkit integration I ordered a full set of Petkit device: Feeder (Element Solo), Water Fountain (Eversweet 3 Pro) and Pura Max

Now Iā€™m trying to add your integration and with big surprise seems that doesnā€™t exist in the Addon Store.

What Iā€™m missing ? There is a way to download the source from Github and install it manually ?

Iā€™m running HAOS 12.1 Core 2024.3.3 on Wyse 5070

Thanks in advance

Integrations arenā€™t accessible in the ā€œnativeā€ addons store (addons are different from integratrions). Youā€™ll need to install HACS first (see https://hacs.xyz/), and you should then be able to install from there.

Itā€™s exactly what I was missing. Thanks infinite!
D.

I opened Eversweet 3 Pro today to check what SoC they use and itā€™s Telink TLSR8258. Thatā€™s the same chip as in Mija Thermometers, and a custom firmware for those is available at GitHub - pvvx/ATC_MiThermometer: Custom firmware for the Xiaomi Thermometers and Telink Flasher

I wonder if thereā€™s any value in doing something similar with the water fountains? At the very least it should get easier to talk to them directly, without relaying through another device. I asked at Mija repo for any clues: Off topic: hacking TLSR8258 based PETKIT water fountain Ā· Issue #504 Ā· pvvx/ATC_MiThermometer Ā· GitHub

It would actually be interesting to have it converted into a Zigbee device, considering how little functionality is expected of it.

1 Like

Thanks For opening the device. I have 2x Eversweet Solo 2 at home and no other petkit Devices. So i canā€™t integrate them without a etkit BLE Gateway (when i understod this correctly)

I have exactly this mi temp&humid Sensors flashed (BT Version) and they use my Shelly1plus as Bluetooth gateway. So my guess is, if i can load a custom Firmware on the water fontain, it should also be possible to use the Same gateway instead of a petkit Devices. This would be amazing

How can i help to get a custom Firmware to be developed?
(I understand electronics & IT and Work with it in my job. No Skills in writing Software yet, but can understand Code with Google/chatgpt)

Writing custom firmware for the devices themselves is not something that I intend to undertake. However, there may be a community out there that is already looking into this and willing to work on it.

If someone does manage to get a custom firmware made and flashed, the device(s) wouldnā€™t be controlled by this integration - this integration specifically uses PetKitā€™s cloud API.

I actually looked into your code and othersā€™ reports on BLE in this thread and considering how fairly simple it is, it would be pointless to write a separate firmware for the fountain. Ideally, we should be able to query fountain directly using BLE support in Home Assistant. Iā€™d be happy to help with testing if you decide to move the BLE portion to a separate extension, as you previously mentioned.

First of all, do you need to explicitly ask the fountain for an updated status, or does it advertise it frequently on its own?

How simple it is would depend on a couple of factors:

  1. Youā€™d have to investigate if a first-time setup process is required (like what is done when adding the fountain to the PetKit app) or if the setup process is just something that stores details about the fountains to the PetKit database - my reverse engineering of the protocol was on a fountain that was already associated with my PetKit account.

  2. I have not investigated if the fountain advertises its data passively, but Iā€™d assume an active connection is required since, even with petkitā€™s BLE relay, an active connection to the fountain is made before any data is sent to the relay device. It would also explain why the PetKit app wonā€™t update any fountain data / notify you about the water level being empty unless it is open and establishes an active connection to the water fountain.

  3. If direct BLE integration is desired, then it will need to be a separate BLE only integration - I would not want to juggle both the API and a local connection all within the current PetKit integration.

If someone is itching to build a BLE integration, they can feel free to use what I already know about the BLE communication from my current petkitaio library and adapt it to their BLE integration code.

As of today, the likelihood of me building out a BLE integration is slim as I donā€™t have the time and mainly because I wonā€™t really benefit from it since I have moved over to using a petlibro water fountain flashed with my own custom ESPHome firmware (which provides much more granular data than the petkit water fountain).

I literally just found out about that fountain and ESPHome and am in the process of buying it, then see you mention it as well.

Keeping things simple wins, I guess!

Pretty much! I came across the project and decided to give it a try. I ended up revamping the code to make usage more user-friendly and added features that it is missing:

  1. Easy minimum and maximum water level calibration using buttons (instead of manually entering in the water level measurements from the HX711)
  2. Buttons for calibrating a known water measurement (in mL) so you can also estimate how much water is left in mL / track how much was consumed.
  3. Button that will set the filter as having been changed that is then used along with the filter change frequency you have set in a select entity (2 weeks, 4 weeks, etc) and calculates how many days until you need to change the filter presented in a sensor entity, etc.

Iā€™ll eventually create a PR to the maintainerā€™s repo to have those features be available to other users.

2 Likes