Originally, when this project began in 2021, the Pet Hub firmware was version 2.43
. Crucially, this version didn’t verify the certificates of the hosts it connected to. This oversight allowed for simple DNS poisoning, enabling the hub to connect directly to PetHubLocal. Following my publications in the Home Assistant community regarding the development of PetHubLocal, SurePetCare released firmware update 2.201
. A significant change in this update was the implementation of certificate checking. Whether my work influenced this security enhancement is uncertain.
Regardless, to utilize PetHubLocal, your pet hub must operate on firmware version 2.43
.
Verifying Your Pet Hub Firmware Version
You can easily check your current firmware version through the pethubconfig.json
file. Once the configuration is set up, you’ll find the firmware version listed under your hub’s serial number.
"Devices": { "H0xx-0xxxxxx": { "Hub": { ... "Device": { "Firmware": "2.43"
Alternatively, you can find this information in the app API response from https://app.api.surehub.io/api/me/start, which the app retrieves.
{ "data": { "devices": [ { "product_id": 1, "serial_number": "H0xx-0xxxxxx", ... "status": { "version": { "device": { "firmware": 2.43
If your firmware version is not 2.43
, and is 2.201
or higher, you’ll need to downgrade to the older firmware to enable PetHubLocal functionality. Fortunately, the process is designed to be straightforward. During the setup, when downloading the current firmware from SurePetCare, the script automatically identifies the XOR key for that firmware. Since the project includes the DeXORed 2.43
firmware, it can build a hub-specific image using the newly found XOR key.
After completing the pethublocal setup
, your current directory should contain two sets of firmware images:
H0xx-0xxxxxx-2.43-nn.bin
and
H0xx-0xxxxxx-1.177-nn.bin
Here, H0xx-0xxxxxx
represents your Hub Serial Number. The 2.43
version files constitute the custom firmware tailored to your pet hub, while 1.177
is the version downloaded from Sure Pet, from which the XOR key was extracted. Note that 1.177
is also the bootloader version on the hub. Let’s hope SurePetCare doesn’t upgrade this bootloader, which could potentially prevent this downgrading method!
The pet hub requests firmware updates via HTTP on port 80
to hub.api.surehub.io
. This is advantageous as it doesn’t involve certificate validation over HTTPS. This lack of certificate checking is why we can downgrade and upgrade firmware without certificate-related issues, seamlessly downloading from PetHubLocal.
Step-by-Step Guide to Downgrading Your Pet Hub Firmware to 2.43
To initiate the firmware downgrade to version 2.43, follow these steps:
- Power Down: Disconnect the power supply to your pet hub.
- Reset Button: Press and hold the reset button located underneath the hub.
- Power Up: While holding the reset button, reconnect the power supply to the hub.
- Release Reset: Continue holding the reset button until the hub’s “ears” turn solid red, then release the button.
At this point, the pet hub will attempt to download firmware from hub.api.surehub.io
, which, thanks to your PetHubLocal setup, now points to your local PetHubLocal instance. PetHubLocal will check its local directory for firmware files corresponding to your Hub Serial Number and serve the pre-built 2.43
version if the H0xx-0xxxxxx-2.43-nn.bin
files are present.
The firmware upgrade/downgrade process typically takes around 5 minutes. It’s crucial to allow it to complete without interruption.
Important Warning: Interrupting the firmware flashing process could potentially brick your pet hub. Proceed with caution and understand that you are undertaking this process at your own risk. While every effort has been made to minimize potential issues, unforeseen complications can occur.
Reverting to SureFlap Firmware
Should you decide to discontinue using PetHubLocal and revert to the official SureFlap firmware, you can easily do so.
- Relocate Custom Firmware: Move the
H0xx-0xxxxxx-2.43-nn.bin
files to a different location, ensuring they are no longer in the directory PetHubLocal is serving. - Leave Original Firmware: Ensure the
H0xx-0xxxxxx-1.177-nn.bin
files remain in their original location. - Repeat Downgrade Process: Repeat the firmware upgrade process using the reset button method described earlier.
This time, the pet hub will flash back to the H0xx-0xxxxxx-1.177-nn.bin
firmware, effectively restoring it to version 2.201
or whichever firmware version was initially downloaded from hub.api.surehub.io
during your PetHubLocal setup.
Again, it is vital not to interrupt the firmware update process to prevent potentially bricking your pet hub.
Understanding iHB v1 vs iHB v2 Pet Hub Versions
SurePetCare has developed a new iteration of their pet hub, known as “iHB v2”. While I haven’t personally examined one, information and documentation are available on the FCC website.
iHB V1 Pet Hub
Below are photographs of the original V1 Hub:
iHB V1 Front iHB V1 Back
Image of the back of the iHB V1 Pet Hub, highlighting its design and features.
iHB V2 Pet Hub
FCC documentation for the V2 Hub can be found here: https://fccid.io/XO9-IHB002
V2 Front V2 Back V2 Mounted V2 Underneath
Image showcasing the back of the iHB v2 Pet Hub, illustrating design differences.
Image displaying the iHB v2 Pet Hub in a mounted configuration, showing its typical placement.
Image of the underside of the iHB v2 Pet Hub, revealing the iHB002 identification.
Visually, the iHB v2 pet hub appears nearly identical to the v1 from the outside, except for the underside, which is labeled with “iHB002”. Intriguingly, I have managed to download the firmware for this serial number – a substantial 256 pages of data. It’s evident that the iHB v2 is fundamentally different, seemingly powered by an Arm Cortex MIMXRT1021 processor.
Therefore, if you own an iHB v2 pet hub, the firmware downgrading procedures outlined in this guide are unlikely to be applicable. Further investigation and potentially different methods may be required for compatibility with PetHubLocal on the newer hardware version.