Skip to content

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.

Notifications You must be signed in to change notification settings

AboveColin/HA-Philips-Pet-Series

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Philips Pet Series Integration

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.

Features

Screenshot 2024-10-11 at 17 43 06 Screenshot 2024-10-11 at 17 43 25 Screenshot 2024-10-11 at 17 42 48

Note

Camera support is not yet implemented.

Installation

This integration can be installed via HACS.

  1. Ensure that HACS is installed and configured in your Home Assistant setup.
  2. 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-Series and select the category as "Integration".
  3. Search for "Philips Pet Series" in HACS and install it.
  4. Restart Home Assistant.

Configuration

  1. Go to the Home Assistant Configuration page.
  2. Click on "Integrations".
  3. Click on the "+" button to add a new integration.
  4. Search for "Philips Pet Series" and follow the setup instructions.

Authentication

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.

Obtaining Tokens

  1. 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.

  1. 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-token and cc-refresh-token field from the cookies.
  2. Provide Tokens to the Integration:

    • You can provide the access_token and refresh_token when setting up the integration.

After the first run, the tokens will be saved automatically, and you won't need to provide them again unless they are invalidated.

Extra Functionality (Optional)

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:

Required Information:

  • 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.

Extracting the Local Key:

Obtaining the Local Key requires some additional effort. You can extract it using a rooted Android phone and running frida-trace as shown below.

Recommended Tool:

Use the MagiskFrida module to auto-start Frida on boot.

Extraction Steps:

frida-trace -U --decorate \
  -j '*!*encodeString*' \
  -f com.versuni.nbx.petsseries \
  -o output.txt

Once you’ve run the above command, search for the localKey in the output.txt file. For example:

"localKey":"FceXXX]+$7}9Zl."

In this case, the LocalKey is:

FceXXX]+$7}9Zl.

It might also be possible to obtain a key by registering the device via the tuya app and obtaining the key in the developer console on the Tuya website. But I haven't looked into that method myself yet.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

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.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages