☁ Tuya IoT — Setup Guide

Real-Time Energy Monitoring & Insights
How to get Device ID, Local Key & IP

One-time Tuya IoT account setup. After this, Power Trace will find your device automatically via Scan Devices.

1
🌐 Registration on Tuya IoT Platform

Open the Tuya IoT Platform website and create an account:

  • Click Sign Up
  • Register via email or Google
  • Sign in to your account
Login page — iot.tuya.com
Login page — iot.tuya.com
New account registration form
New account registration form
2
🧱 Creating a Cloud Project

After logging in, navigate to:

CloudDevelopment

Click Create Cloud Project and fill in the fields:

Project Name:any name (e.g. “My Devices”)
Industry:Smart Home
Development Method:Smart Home

Select a Data Center region (important!):

Data Center Region Code
China Data Center cn
Central Europe Data Center eu
Western Europe Data Center eu-w
India Data Center in
Western America Data Center us
Eastern America Data Center us-e
Singapore Data Center sg
Create Cloud Project button
Create Cloud Project button
Filling in fields and selecting Data Center
Filling in fields and selecting Data Center
3
🔑 Getting API Keys (Access ID & Secret)

Click Open Project and navigate to the Overview tab. You will find two values:

  • Access ID — the API Key for Power Trace
  • Access Secret — the secret key for authorization

Enter both into Power Trace Settings → Tuya Cloud section.

🔐 In Power Trace these values are stored encrypted and shown only as masked (••••XXXX) on next open.
Overview tab — Access ID and Access Secret
Overview tab — Access ID and Access Secret
4
📱 Linking your Phone Account (mandatory!)
Without this step your devices will not appear in Scan Devices!

In your project navigate to:

DevicesLink App Account
  • Click Add App Account
  • Select Tuya App Account Authorization
  • A QR code will appear

On your phone open Tuya Smart or Smart Life:

MeSettingsScan QR Code
Link App Account — adding an app account
Link App Account — adding an app account
QR code for account linking
QR code for account linking
5
📋 Getting the Device ID

Navigate to:

CloudDevicesAll Devices

Find your device and open it. You will see:

  • Device ID — the unique device identifier
  • Device Name — the device name
💡 In practice the Device ID is retrieved automatically via Scan Devices in the next step.
Device ID in the All Devices list
Device ID in the All Devices list
6
⚡ Getting Local Key & IP via Power Trace Settings

Make sure the API is running and open Power Trace Settings:

  • Expand the Tuya Cloud section
  • Enter Access ID and Access Secret from step 3
  • Click Scan Devices

When the device list appears — select your device and click Use This Device.

Do not forget to click Save Configuration after selecting a device. Access Secret and Local Key are stored encrypted and will not be shown in plain text on next open. Local keys can change when a device is re-paired or its firmware is updated — if a device stops responding, re-run Scan Devices.
Tuya Cloud section in Power Trace Settings
Tuya Cloud section in Power Trace Settings
List of found devices — choose yours
List of found devices — choose yours
Device ID, IP and Local Key auto-filled
Device ID, IP and Local Key auto-filled
7
🔧 Alternative: Local Key via API Explorer & IP via Router
💡 Use this method only if Scan Devices (step 6) did not work, or if you want to retrieve credentials manually without running Power Trace.

Getting the Local Key via API Explorer

After completing steps 1–5, open API Explorer in your project:

CloudAPI Explorer
API Explorer in the Cloud menu
Opening API Explorer — Cloud → API Explorer
  • In the search field type Query Device Details and select it from the list
  • Enter the Device ID from step 5 into the device_id field
  • Click Submit Request
Searching for Query Device Details in API Explorer
Search for Query Device Details in API Explorer
Entering device_id into the request field
Enter the device_id value and click Submit Request

In the server response find the local_key field:

{ "result": { ... "local_key": "xxxxxxxxxxxxxxxx", ... } }
API response containing local_key
API response — find the local_key field

Copy the value of local_key and enter it into the Local Key field in Power Trace Settings.


Getting the IP Address via Router

If Scan Devices could not find the device IP automatically, look it up in your router’s admin panel.

Step 1. Open the router web interface in a browser:

Common addresses:http://192.168.0.1
http://192.168.1.1

Step 2. Find the connected devices list. Depending on your router it may be called: Connected Devices, Client List, DHCP Clients, LAN Clients, Device List, Attached Devices, Network Map, Online Devices.

Step 3. Locate your Tuya device by name, MAC address, manufacturer (Tuya, ESP, Realtek, BK7231), or last connection time.

Step 4. Note the local IP address, e.g. 192.168.0.114, and enter it into the IP Address field in Power Trace Settings.

Device section in Power Trace Settings with IP Address field
Device section in Power Trace Settings — Device ID and IP Address filled in
Tip: to prevent the IP from changing after a router reboot, assign the device a static IP. Look for DHCP Reservation, Address Reservation, Static DHCP, Static Lease, or Bind IP to MAC in your router settings, and bind the device’s MAC address to its current IP.
Device section with Device Name, Device ID and IP Address all filled in
Device section with Device Name, Device ID, and IP Address filled in