
If LocalTuya cannot connect to a Tuya device, or Home Assistant discovers it but commands fail, the most common cause is an incorrect or outdated local key. The device ID may also belong to a different device or account, so verify both values before changing network or protocol settings.
Why this happens
A local Tuya integration authenticates with the device over your home network; the official Tuya integration uses Tuya’s cloud service and does not provide the same local-control setup. A key can change after a device is removed and paired again, and some products do not expose the same controls or local protocol as others.
- ID mismatch: The ID identifies a specific device in your Tuya account, not necessarily the name or room you expect.
- Stale key: Re-pairing or resetting a device can invalidate a previously saved local key.
- Network or compatibility issue: Local control requires the Home Assistant host to reach the device, and supported features depend on the model and integration.
1. Confirm which Tuya integration you are using
In Home Assistant, open Settings > Devices & services and inspect the Tuya entry. The official Tuya integration is cloud based; LocalTuya is a separate custom integration for local device connections. If the device is listed only under the official integration, installing or configuring LocalTuya is a separate step. Confirm the integration name before looking for a local key field.
2. Match the device ID to the correct device
Open the Smart Life or Tuya Smart app and check the device’s details. Then sign in to the Tuya IoT Platform, open your cloud project, and use Device Management to locate the device associated with your app account. Compare its device ID with the one entered in LocalTuya. The ID should identify the same physical device, even if its display name differs.
If the device is absent from the project, check the project’s linked app account and region. The app account must be linked to the correct cloud project, and the project must use the region where that account’s devices are registered.
3. Retrieve the current local key from Tuya
In the Tuya IoT Platform, open the cloud project linked to your Smart Life or Tuya Smart account, then go to Device Management and open the device details. Look for its local key in the device information. Tuya’s interface and project requirements can change, so check the current platform menus if the field is not shown.
Copy the key exactly, without spaces before or after it, and update the matching LocalTuya device in Home Assistant. Treat the key like a password: do not paste it into public logs or screenshots. A successful connection after replacing the saved value confirms that the old key was stale or entered incorrectly.
4. Check the project and account link
In the Tuya IoT Platform project, confirm that the Smart Life or Tuya Smart account is linked and that the device appears under the expected project. Verify the project’s data center or region against the account’s region. If you changed accounts, projects, or regions, relink the correct app account and refresh the device list. Seeing the intended device in the project is the confirmation that the platform is looking at the right account.
5. Verify local network reachability
Make sure Home Assistant and the Tuya device are on networks that can communicate. Guest Wi-Fi, client isolation, VLAN rules, or firewall settings can block device-to-device traffic even while both devices have internet access. Check your router’s client list for the device’s current IP address, and confirm that Home Assistant can reach that network. If you recently changed Wi-Fi or router settings, restore access between the two networks and retry.
6. Reconfigure the device and check its protocol settings
In LocalTuya, open the device configuration and confirm the device ID, local key, and IP address. If the integration asks for a protocol version, use the value supported by your device and LocalTuya setup; do not assume that one value works for every model. If you do not know it, check the device’s documentation or the integration’s current guidance. A successful connection and available controls after saving the matching settings indicate that the local session is working.
7. Check whether the product is supported for local control
Some Tuya-branded devices expose limited datapoints, behave differently after firmware updates, or rely on a gateway or cloud function. Check the device model and its integration support notes. Zigbee devices paired to Zigbee2MQTT use their Zigbee coordinator and do not need a Tuya Wi-Fi local key for that connection. ESPHome and Matter devices also use their own integration paths; confirm which system currently owns the device before troubleshooting LocalTuya.
| Cause | Symptom | Quick test |
| Wrong device ID | LocalTuya targets another device or cannot find it | Compare the configured ID with the Tuya project’s device details |
| Old local key | Device is known, but local connection fails | Retrieve the current key and replace the saved one |
| Network isolation | Cloud control works but local control does not | Check Wi-Fi isolation, VLAN, and firewall access |
| Different device protocol | Connection works but controls or datapoints are missing | Confirm model support and the integration’s protocol setting |
FAQ
Where do I find my Tuya device ID?
Check the device details in the Tuya IoT Platform project linked to your Smart Life or Tuya Smart account. Match the ID there to the device configured in LocalTuya; app names alone can be ambiguous.
Why did my Tuya local key stop working?
A saved key may no longer match after the device is reset, removed, or paired again. Retrieve the key currently shown for that device in the Tuya platform and update LocalTuya.
Does the Home Assistant Tuya integration use a local key?
The official Tuya integration connects through Tuya’s cloud and does not use LocalTuya’s device ID and local key setup. For local control, use a compatible local integration and check whether your specific model is supported.
Most cases of tuya local not working come down to pairing the right device ID with its current local key, then allowing Home Assistant to reach it on the LAN. If those checks do not restore control, note the device model, integration name, and relevant logs, then consult that integration’s current compatibility guidance.
Photo: iSys.PL / Attribution (Wikimedia Commons)