Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Capture using Charles

elfive edited this page Feb 19, 2021 · 9 revisions
  1. Configure On your PC/Mac

    Launch Charles, goto Proxy->Proxy Settings->HTTP Proxy,

    set a proxy listen port(e.g. 8888), and enable transparent HTTP proxying.

  1. Configure On your Phone

    Goto Settings->WLAN->"i" icon->Configure Proxy,

    setup a Manual proxy type, enter the PC/Mac IP address and the proxy listen port you set early(e.g. 8888).

  1. Start recording

    Click the start recording icon on the toolbar, and select allow incoming connection

  1. Launch Petkit App, click your petkit feeder device and then click settings icon on the top right corner.

  2. Stop recording

    Click the start recording icon on the toolbar.

  3. Goto Sequence page, you will find petkit http request and response records, find the one request url ends with "discovery/device_roster".

    note: if you're unable to find this request, please make sure your Petkit App is not running in background and start from step 1 again. when tried several times, and still cannot find this request, please goto issues to find solutions or submit an issue.

  4. In the http request Contents->Headers page, you will find your own X-Session value and other request headers.

    It's recommend that you enter all your headers in the plugin setting(Except Host)

  1. In the JSON/JSON Text page, you'll able to retrieve all the device information of your device, include deviceId and deviceType.
    • deviceID locate at: result->devices->data->id, which should be a 6-digit number.
    • deviceType locate at: result->devices->data->type, for Petkit feeder mini, it's FeederMini.
Clone this wiki locally