Skip to content

Alex-mar124/Powerpall-Auth-Extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Powerpal Auth Extractor

Because the powerpal mobile app is not open source, and does not provide a way to extract the API key and serial number from the device, this script was created to extract the API key and serial number from the device directly via Bluetooth Low Energy (BLE).

Once extracted, these credentials can be used to query your home's energy usage data straight from the official Powerpal API endpoints. Can be used with integrations like Home Assistant, Grafana, etc.

What it does

This script uses your computer's Bluetooth to connect to your Powerpal. It authenticates using your 6-digit pairing code, reads the specific GATT characteristics holding your Device Serial Number and API Key (UUID), and formats them for use.

Prerequisites

  • Python 3.7+
  • A computer with Bluetooth enabled (Windows, macOS, or Linux)
  • Your Powerpal's MAC Address (Format: 12:34:56:78:9A:BC)
  • Your Powerpal's 6-digit Pairing Code

Note: The MAC address and pairing code can typically be found printed on the device itself, on the original packaging card, or mostly within the settings of You can also find the MAC address within bluetooth settings on your phone or computer.

Installation

  1. Clone or download this repository.
  2. Install the required dependencies:
pip install -r requirements.txt

How to use it

IMPORTANT: When and How to Connect via Bluetooth

DO NOT try to pair or connect to the Powerpal device through your computer's operating system Bluetooth menu.

The Powerpal device can only maintain one active Bluetooth connection at a time. In order for this script to work, you must ensure the Powerpal is completely disconnected from any other devices.

Before running the script:

  1. Ensure your computer's Bluetooth hardware is turned on.
  2. Disconnect your phone from the Powerpal device. The easiest way to do this is to fully close/kill the Powerpal mobile app on your smartphone, or temporarily turn off Bluetooth on your phone altogether.
  3. The Python script will handle the Bluetooth connection directly. make sure you are within range of the Powerpal device

Running the script

You can run the script and manually enter the information when prompted:

python retrieve_api_key.py

Or you can provide your MAC address and Pairing code directly as command-line arguments:

python retrieve_api_key.py 12:34:56:78:9A:BC 123456

Script Execution

  1. The script will pause and ask you to confirm that no other devices (like your phone) are currently connected to the Powerpal. Hit Enter to proceed.
  2. It attempts to connect to the Powerpal via BLE and authenticates with your pairing code.
  3. It grabs your Device Serial.
  4. It grabs your API Key (UUID).
  5. It will finally ask (y/n) if you'd like to test the credentials against https://readings.powerpal.net/api/v1/device/{serial}.
  6. If the request succeeds, your Powerpal's configuration metadata will be printed to the console, and you now have the required keys to build your own integrations (like Home Assistant, Grafana, etc.).

About

Extract your Powerpal API key and serial number directly via Bluetooth (BLE) for custom integrations like Home Assistant and Grafana.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages