Get Tuya Local Key Without Tuya IoT Developer Portal

If you're using Home Assistant with LocalTuya, TuyaLocal, or another local Tuya integration, chances are you never had to manually find your device's local key. Most integrations can retrieve it automatically during the initial setup.

The problem comes later.

When you factory reset a tuya device and pair it again, the Local Key changes. Your existing Home Assistant integration can no longer communicate with the device until you update the Local Key.

Unfortunately, many integrations don't offer a simple way to refresh the key. Instead, to get the latest local key, you have to go through the Tuya IoT Developer Portal, where you have to create a cloud project, link your account, and navigate multiple pages just to retrieve a new key.

I built Tuya Local Key to make this much easier.

No Tuya IoT Developer Account Required

The project uses Tuya's official device-sharing SDK through Home Assistant's public app registration.

Getting started only takes a few seconds:

  1. Enter your Smart Life or Tuya Smart User Code
  2. Scan the generated QR code from the Smart Life or Tuya Smart app
  3. Tap Confirm Login
  4. Your devices are listed instantly

The login session is cached, so you won't need to repeat the process every time.

Install It Your Way

Choose whichever fits your setup:

  • 🏠 Home Assistant App (Add-on)
  • 🐳 Docker container
  • 💻 Command Line (CLI)

If you're already running Home Assistant, you can add the add-on repository with a single click.


Open your Home Assistant instance and show the add add-on repository dialog with this repository URL pre-filled.


GitHub: https://github.com/vineetchoudhary/tuya-local-key

If it saves you some time, consider giving it a ⭐ on GitHub. Feedback, bug reports, and pull requests are always welcome.

Screenshots

User Code

QR Login

Device Table

Filtering


You've successfully subscribed to Developer Insider
Great! Next, complete checkout for full access to Developer Insider
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.