Running a CleverPet Hub from Home Assistant through HackerPet's local API
How I connected a CleverPet Hub running HackerPet firmware to Home Assistant with one package and no custom integration, what worked, and what I have not tested yet.
Published
All test notesMethod
- Plugged the Hub back in on November 1, 2026, after more than a year unplugged, and read its local API with plain HTTP requests from a PC before adding anything to Home Assistant.
- Took the command format from the Hub's own web page and the hackerpet_plus source: a POST to /local-api/set_<name> with a one-key JSON body, the same calls the page makes.
- Built one Home Assistant package: a REST sensor that polls the status every 60 seconds, template controls for the game, mode, daily kibble limit and daylight-saving flag, and shell commands that send each change with curl.
- Tested each control from Home Assistant by sending the value the Hub already had, then raised the daily kibble limit by one, checked that the Hub reported the new value, and set it back.
- Checked the clock-wrong indicator against Home Assistant's clock on the night daylight saving ended, and later read Home Assistant's log over 24 hours for failed status requests.
Setup
- Hub
- CleverPet Hub with an original Particle Photon claimed to my own Particle account, which HackerPet's setup requires. Particle Device OS 3.3.1.
- Firmware
- hackerpet_plus, built from library version 0.1.114. The fields and commands here come from that build; other versions may differ.
- Home Assistant
- Home Assistant 2026.10, with one package of REST, template, shell command and automation configuration. No custom integration is involved.
- Evidence
- My notes from November 1, 2026, when the package was built, and a 24-hour log check in early November. Nothing was measured again for this note.
Results
- Reading the Hub
- One GET request returns a single JSON object: hub state (Active or Standby), mode, queued game, playing game, daily kibble limit, kibble detection threshold, kibbles eaten today, time zone, daylight-saving flag, the Hub's clock and its weekday and weekend schedule. Only port 80 was open. Home Assistant reads all of this without a cloud call.
- Commands
- Each command returned HTTP 200 with an empty JSON body. Sending the current value from all four controls left the Hub unchanged. Raising the daily kibble limit by one from Home Assistant reached the Hub, and setting it back did too.
- Queued and playing games
- The API reports the queued game and the playing game separately. The game control follows the queued game, and a separate sensor shows the game being played. Both were the same game during setup.
- Daylight saving
- The Hub's daylight-saving setting is a manual toggle stored on the Hub, not automatic. Daylight saving ended the night I set this up, so without a change the Hub would have run an hour ahead, resetting its kibble day and shifting its schedule by an hour. I turned the flag off by hand. In the hour before the clock change, the clock-wrong indicator correctly reported the mismatch with Home Assistant's clock. A daily automation at 3:05 AM, after either clock change, sets the flag to match, but only when that indicator is on.
- Why curl
- The Hub's small web server reads only the bytes that have already arrived and does not wait for the rest of the request. curl sends the headers and the short body together, as a browser does. I chose curl after reading the firmware; I did not try Home Assistant's own rest_command against the Hub.
- Failed status requests
- A 24-hour log check in early November showed the status request failing about 1.5 times an hour. The controls are set to show as unavailable whenever the status sensor has no value, so a failed poll can briefly take them out of the dashboard.
- Cloud use
- Particle's console showed no cloud functions or variables in use, so the Home Assistant controls are entirely local. The firmware still contacts HackerPet's own web service at startup: it sent a time-zone lookup that included a scan of nearby Wi-Fi networks.
- After a long unplug
- After more than a year without power, the Hub rejoined Wi-Fi on its own and its local API answered without any new setup.
Failures
- I did not test rest_command against the Hub, so I have not shown that it fails. Using curl is a precaution based on the firmware's code.
- The daylight-saving automation has not had to act yet. It was added after I fixed the flag by hand, and the next clock change is in March 2027.
- Game and mode were tested only by sending the value the Hub already had. Switching to a different game or mode from Home Assistant was not checked against what the Hub then did.
- These notes do not compare the kibbles-eaten count with a counted play session.
- I have not found the cause of the failed status requests, and I did not try a different timeout or poll interval.
- The Hub's schedule and kibble detection threshold can be read but have no controls in this package.
- This is one Hub on one firmware build. The command format came from that build's own web page and may change in another version.
Example files
- Example Home Assistant package (YAML)
- The package described here, with the Hub's address replaced by a placeholder. The comments at the top say what to change and how to enable packages.
Removed for privacy
- The Hub's network address, hostname and MAC address
- The Photon's device ID, serial number and the Particle account
- The HackerPet service request details, including the report it sends
- The dashboard layout and where the Hub is in the house
- Clock times of the tests
The example package uses a placeholder address, so it has to be edited before it works. The removed identifiers tie the Hub to my account but do not change the API or the package.