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.
- 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.
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.
Run from this repository using docker-compose.yml:
docker compose up -dOpen http://localhost:8000 and log in.
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:latestOpen 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.
Run from this repository:
./setup.sh
.venv/bin/python tuya_devices.pyFollow the QR login prompts. See the CLI guide for options.
- 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.
Tuya Local Key is licensed under the Apache License, Version 2.0. See NOTICE for attribution information.
If this project has been useful to you, consider supporting its continued development.
Thank you for supporting open source! 🙏