This is a Home Assistant integration for the Philips Pet Series devices. It allows you to control and monitor various aspects of your Philips Pet Series devices through Home Assistant.
Note
Camera support is not yet implemented.
This integration can be installed via HACS.
- Ensure that HACS is installed and configured in your Home Assistant setup.
- Add this repository to HACS:
- Go to HACS in the Home Assistant sidebar.
- Click on the three dots in the top right corner and select "Custom repositories".
- Add the repository URL:
https://github.com/abovecolin/HA-Philips-Pet-Seriesand select the category as "Integration".
- Search for "Philips Pet Series" in HACS and install it.
- Restart Home Assistant.
- Go to the Home Assistant Configuration page.
- Click on "Integrations".
- Click on the "+" button to add a new integration.
- Search for "Philips Pet Series" and follow the setup instructions.
This integration uses OAuth2 tokens (an Access Token and Refresh Token) to authenticate with the PetsSeries API. Follow the steps below to obtain and set up your tokens.
- Login via Web Interface:
- Navigate to PetsSeries Appliance Login.
- Select a PetsSeries product (Search for "PAW"), click on "register your device" and log in with your credentials.
Tip
If you have not registered your device yet, you can do this through either the PhilipsPetSeries app(s) or find your device on the Philips Home Support page and register it with a new account.
-
Retrieve Tokens:
- After logging in, you will be redirected to your account dashboard.
- Open your browser's developer tools (usually by pressing F12 or Ctrl+Shift+I).
- Go to the Application tab and inspect the cookies.
- Locate and copy the values from the
cc-access-tokenandcc-refresh-tokenfield from the cookies.
-
Provide Tokens to the Integration:
- You can provide the
access_tokenandrefresh_tokenwhen setting up the integration.
- You can provide the
After the first run, the tokens will be saved automatically, and you won't need to provide them again unless they are invalidated.
For the following extra functionalities:
- Configuration of settings for the camera
- The functionality to send a feed command
- Set the portion size
Some additional steps are required. Unfortunately, a better approach hasn’t been found yet. Here’s what is needed:
- Pet Feeder Client ID: This can be found in the PetsSeries app's device screen.
- Navigate to: App Home Screen > Your Pet Feeder > Settings > Device ID.
- Pet Feeder IP Address: The IP address of the device.
- Pet Feeder Local Key: See below for extraction instructions.
Obtaining the Local Key requires some additional effort. You can extract it using Frida on a rooted Android device to intercept the localKey at runtime.
Prerequisites:
- A rooted Android device
- USB debugging enabled
- Frida installed on your computer and Frida server on your Android device
Recommended Tool: Use the MagiskFrida module to auto-start Frida on boot, or manually install Frida server on your rooted Android device.
Extraction Steps:
-
Connect your Android device via USB and ensure USB debugging is enabled.
-
Install Frida server on your Android device (if not using MagiskFrida):
# Download frida-server for your Android architecture # Push to device and run: adb push frida-server /data/local/tmp/ adb shell "chmod 755 /data/local/tmp/frida-server" adb shell "/data/local/tmp/frida-server &"
-
Run Frida trace to intercept method calls:
frida-trace -U --decorate \ -j '*!*encodeString*' \ -f com.versuni.nbx.petsseries \ -o output.txt -
Open the Philips Pet Series app on your Android device and navigate to your pet feeder device. This will trigger the app to load device information including the localKey.
-
Search for localKey in the
output.txtfile:grep -i "localkey" output.txtYou'll find a line like:
"localKey":"FceXXX]+$7}9Zl."
The value between the quotes (e.g.,
FceXXX]+$7}9Zl.) is your Local Key.
Note: The Frida trace will capture various method calls. The localKey typically appears in JSON responses or encoded strings. Look for patterns like "localKey": or localKey= in the output.
Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License. See the LICENSE file for details.