npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

smarterpool-auth

v0.1.1

Published

Read-only helper to recover Tuya local credentials from Smarter Pool OEM accounts

Readme

smarterpool-auth

Read-only CLI helper to recover Tuya device information from a Smarter Pool account, mainly for configuring Home Assistant local Tuya integrations.

The primary use case is retrieving the Tuya deviceId, localKey, DPS values, and schema for Smarter Pool / Garden PAC InverTech pool heat pumps without re-pairing the device.

Who Is This For?

Use this tool if your pool heat pump is controlled by the Smarter Pool Android app and you want to integrate it locally with Home Assistant, tuya-local, localtuya, or TinyTuya.

It is especially useful when the device is paired with the Smarter Pool OEM app and is not visible from Tuya Smart / Smart Life without re-pairing. Re-pairing can change the Tuya localKey and may risk losing app-specific functionality, so this CLI reads the needed local credentials from the existing Smarter Pool account instead.

Search terms this project is meant to cover: Smarter Pool Home Assistant, Smarter Pool Tuya localKey, Garden PAC Tuya, Garden PAC InverTech Home Assistant, pool heat pump local Tuya.

Status

Experimental. It was built from reverse engineering of the Smarter Pool Android app and the Tuya OEM mobile API. The tool only performs login and read-only device information requests.

The Smarter Pool Android app credentials for version 1.0.3 international are bundled as the default app profile, so normal users should only need their Smarter Pool account credentials.

Tested With

  • Smarter Pool Android app 1.0.3 international
  • Garden PAC InverTech GHD-150-0356 swimming pool heat pump
  • Tuya product ID koAASpds906awojG
  • Home Assistant with tuya-local

Usage

npx smarterpool-auth [email protected] 'password'

For local use, prefer a .env file:

cp examples/smarterpool.env.example .env
$EDITOR .env
npx smarterpool-auth --env .env

By default the output redacts secrets, including localKey, session tokens, app secrets, and passwords. To print values needed by Home Assistant:

npx smarterpool-auth --env .env --show-secrets

Use --output to write the report to a file:

npx smarterpool-auth --env .env --show-secrets --output smarterpool-device.local.json

Files ending in .local.json are ignored by Git in this repository.

Required Configuration

Account credentials:

  • SMARTERPOOL_LOGIN: Smarter Pool email or phone number.
  • SMARTERPOOL_PASSWORD: Smarter Pool password.
  • SMARTERPOOL_COUNTRY_CODE: phone country code, defaults to 33.
  • SMARTERPOOL_DEVICE_ID: optional Tuya device id. If omitted, the CLI tries discovery. If exactly one device is discovered, it is inspected automatically.

Optional Tuya OEM app credential overrides:

  • SMARTERPOOL_APP_KEY
  • SMARTERPOOL_APP_SECRET
  • SMARTERPOOL_SECRET2
  • SMARTERPOOL_CERT_SIGN
  • SMARTERPOOL_REGION
  • SMARTERPOOL_TTID

The bundled default profile comes from the public Smarter Pool Android app 1.0.3 international. These values are not user account credentials, but they may stop working if Smarter Pool rotates app credentials in a future release. Use the override variables if you need to test another APK version.

Home Assistant

The output is useful for local integrations that need a Tuya deviceId and localKey:

For tuya-local, configure the device with:

  • Host: the local IP address of the pool heat pump.
  • Device ID: device.deviceId from smarterpool-auth --show-secrets.
  • Local key: device.localKey from smarterpool-auth --show-secrets.
  • Protocol version: device.protocolVersion, or auto if the integration supports it.

For localtuya, use the same deviceId, localKey, IP address, protocol version and DPS values. The device.dps and device.schema fields can help identify which DPS should be mapped to Home Assistant entities.

Example command for local integration setup:

npx smarterpool-auth --env .env --show-secrets --output smarterpool-device.local.json

Do not paste smarterpool-device.local.json into public issues, because it contains the Tuya localKey.

Example Redacted Output

{
  "tool": {
    "name": "smarterpool-auth",
    "version": "0.1.1"
  },
  "account": {
    "accountType": "email",
    "appProfile": "smarter-pool-1.0.3-international",
    "countryCode": "33",
    "region": "EU"
  },
  "device": {
    "name": "Pool heat pump",
    "deviceId": "abcd...7890",
    "localKey": "1234...cdef",
    "protocolVersion": "3.3",
    "productId": "exampleProductId"
  }
}

CLI Reference

smarterpool-auth [login] [password] [options]

Options:
  --login <value>             Smarter Pool email or phone login
  --password <value>          Smarter Pool password
  --country-code <value>      Account country code, default 33
  --device-id <value>         Tuya device id to inspect
  --app-key <value>           Tuya OEM app key override
  --app-secret <value>        Tuya OEM app secret override
  --secret2 <value>           Tuya OEM secret2 override
  --cert-sign <value>         Tuya OEM cert sign override
  --region <value>            Tuya region override
  --ttid <value>              Tuya ttid override
  --env <path>                Load an env file, default .env when present
  --output <path>             Write JSON output to a file
  --raw                       Include raw API action results
  --show-secrets              Do not redact localKey/tokens/secrets
  --help                      Show help
  --version                   Show package version

Security Notes

  • Do not paste --show-secrets output into GitHub issues.
  • Treat Tuya localKey like a password for local network control of the device.
  • Rotate the device key by re-pairing the device if it was exposed.