-
-
Notifications
You must be signed in to change notification settings - Fork 350
Closed
Labels
Description
Hello, I've found out, that an official Smart Life app shows you deviceId. I've tested that deviceId with tuya OpenAPI and it works (at least for my smart sockets). This means, that you can get localKey from an OpenAPI /v1.0/devices/{{device_id}}.
I think, that this may be useful to simplify tuyapi setup workflow.
The new setup will consist of three steps:
- after creating app on iot.tuya.com and getting key/secret, you need to link your devices, but instead of doing that with
@tuyapi/cli, you should "Link device by Tuya Smart App Account":

- then you can grab id from an app. From the main screen tap on device you interested in, then tap "edit icon" to get to the screen where you can manage/share/rename device. On that screen there is "Device information" menu option, where you can look up for the
deviceId:

- finally request device info from tuya OpenAPI, where you can get
localKeyvalue:

quest and Mathieu2301