Skip to content

About

Get tuya local keys and complete device information for every tuya device via QR code login (no tuya Developer account required). Features a Web UI for Home Assistant and Docker, plus a CLI.

Topics

Resources

Stars

100 stars

Watchers

3 watching

Forks

Latest commit

 

History

126 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sponsor on GitHub Buy me a coffee Build status Docker image downloads

Tuya Local Key

Retrieve local keys for your Smart Life / Tuya devices with QR-code login. No Tuya IoT developer account or cloud project is needed. Use the web UI with Docker or Home Assistant, or run the CLI locally.

Tuya Local Key device list preview with 60 demo devices

Features

  • View and copy local keys, device details, Node IDs, and data points.
  • Find local IP addresses and protocol versions, including across VLANs.
  • Detect changed keys, IP addresses, protocol versions, and devices.
  • Keep encrypted per-device change history across restarts, with change, source, and date filters.
  • Search, filter or exclude devices, export CSV, and keep an encrypted cache across restarts.
  • Get setup values for tuya-local, localtuya, and tinytuya.
  • Troubleshoot local connections with a guided check, network scan, and suggested next steps.
  • Read current values over the local network and compare them with the saved cloud snapshot.
  • Download a support report for troubleshooting.

Quick Start

Home Assistant

On Home Assistant OS, add this repository, then install and start Tuya Local Key from the app store. Open it from the sidebar and log in.

Add repository to Home Assistant

Docker Compose

Run from this repository using docker-compose.yml:

docker compose up -d

Open http://localhost:8000 and log in.

Docker

Run the published Docker image:

docker run -d --name tuya-local-key -p 8000:8000 -v tuya-session:/data ghcr.io/vineetchoudhary/tuya-local-key:latest

Open http://localhost:8000 and log in.

The web UI has no authentication by default, and these commands make port 8000 reachable from your network. Set both AUTH_USERNAME and AUTH_PASSWORD, or use -p 127.0.0.1:8000:8000 for local access only. See the security guidance.

CLI

Run from this repository:

./setup.sh
.venv/bin/python tuya_devices.py

Follow the QR login prompts. See the CLI guide for options.

Documentation

  • Installation: Home Assistant, Docker, Docker Compose, and source setup.
  • Using the app: QR login, filters, device details, local integrations, and Bluetooth devices.
  • Network scanning: Local IPs, protocol versions, VLANs, gateways, and scan statuses.
  • Caching and changes: Saved devices, offline snapshots, change detection, and change history.
  • Configuration: Environment variables and security.
  • CLI: Terminal setup, commands, and flags.
  • Troubleshooting: Common login, key, and connection issues.
  • Screenshots: Light and dark previews.
  • Frontend structure: Templates, stylesheets, JavaScript modules, and development checks.

License

Tuya Local Key is licensed under the Apache License, Version 2.0. See NOTICE for attribution information.

Support

If this project has been useful to you, consider supporting its continued development.

Sponsor on GitHub Buy Me a Coffee

Thank you for supporting open source! 🙏

About

Get tuya local keys and complete device information for every tuya device via QR code login (no tuya Developer account required). Features a Web UI for Home Assistant and Docker, plus a CLI.

Topics

Resources

Stars

100 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages