Here is the process how to get Device ID and Local Key for Tuya device.
- Create a Tuya Developer Account
- Go to https://iot.tuya.com and register for a developer account.
- Create a Cloud Project
- Link Tuya App Account
- In your cloud project, navigate to the "Devices" tab and select "Link Tuya App Account." You'll typically scan a QR code with your Immax NEO PRO app (or Tuya Smart/Smart Life app) to authorize the link.
- Get Device ID
- Once linked, your devices from the app should appear under the "Devices" tab in your cloud project. Note down the "Device ID" for each Tuya device you want to control.
- Create API Subscription
- Go to "Cloud" > "Cloud Services"
- Subscribe to
- IoT Core Services
- Still within the "Cloud Services" section, after subscribing, click on "My Service"
- For each of the services you just subscribed to, click "View Details"
- Go to the "Authorized Projects" tab
- Ensure your specific cloud project is listed and authorized here. If not, you may need to click "Add Authorization" and select your project.
- Get Local Key
- Go to "Cloud" -> "API Explorer."
- Under "Smart Home Device Control" (or similar), look for an option like "Query Device Details in Bulk" or "Get Device Specification Attribute."
- Device Management > Query Device Details
- Input your Device ID and submit the request.
- The "Local Key" should be in the JSON response.