tuya / tuya-homebridge

Homebridge custom plugin for controlling Powered by Tuya (PBT) devices in HomeKit. This plugin is officially maintained by the Tuya Developer Team.
MIT License
338 stars 171 forks source link

Tuya Smart LED Strip Controller "error from the characteristic" #39

Closed aftrmth728 closed 3 years ago

aftrmth728 commented 3 years ago

Hi,

Turning this LED strip controller on/off works fine but there is no brightness slider and trying to change colours in the Home app produce errors in the Homebridge log:

[homebridge-tuya-platform] This plugin threw an error from the characteristic 'Hue': Unhandled error thrown inside write handler for characteristic: Cannot read property 'max' of undefined. See https://git.io/JtMGR for more info.

and this at startup:

[homebridge-tuya-platform] This plugin threw an error from the characteristic 'Hue': Unhandled error thrown inside write handler for characteristic: Cannot read property 'max' of undefined. See https://git.io/JtMGR for more info.

Hanh94 commented 3 years ago

Hi @aftrmth728 ,Thank you for your feedback. This looks like the default range is not initialized. By default we will initialize the default range to the 'colour_data', 'colour_data_v2' property in the 'dj', 'xdd', 'fwd' category. Please provide the details of this device, as well as the error details, and we will help you solve this issue as soon as possible.

aftrmth728 commented 3 years ago

Hey thanks for the quick response. What information do you need? And how can I get the error details? All I saw were entries in the Homebridge log

Thanks

On 21 Jun 2021, at 09:39, Hanh94 @.***> wrote:

 Hi @aftrmth728 ,Thank you for your feedback. This looks like the default range is not initialized. By default we will initialize the default range to the 'colour_data', 'colour_data_v2' property in the 'dj', 'xdd', 'fwd' category. Please provide the details of this device, as well as the error details, and we will help you solve this issue as soon as possible.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Hanh94 commented 3 years ago

Hey thanks for the quick response. What information do you need? And how can I get the error details? All I saw were entries in the Homebridge log Thanks On 21 Jun 2021, at 09:39, Hanh94 @.***> wrote:  Hi @aftrmth728 ,Thank you for your feedback. This looks like the default range is not initialized. By default we will initialize the default range to the 'colour_data', 'colour_data_v2' property in the 'dj', 'xdd', 'fwd' category. Please provide the details of this device, as well as the error details, and we will help you solve this issue as soon as possible. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Please set 'debug' to true in the 'options' in the 'config.json' file You can see the corresponding device information in the console log. Please find the LED Strip Controller device information And show us a complete error stack of This plugin threw an error from the characteristic 'Hue'.

aftrmth728 commented 3 years ago

In debug mode this is all I can see that seems to relate to the LED controller:

TuyaOpenAPI response: {"result":[{"category":"dj","devices":["bf1b7b3fb06c08df31q9bd"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"},{"code":"music_data","desc":"music data","name":"music data","type":"Json","values":"{}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"akpsa6jqvah6g39p"},{"category":"dj","devices":["54560020d8f15be21bd5"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"bright_value","desc":"bright value","name":"bright value","type":"Integer","values":"{\"min\":25,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\"]}"},{"code":"temp_value","desc":"temp value","name":"temp value","type":"Integer","values":"{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"},{"code":"colour_data","desc":"colour data","name":"colour data","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"scene_data","desc":"scene data","name":"scene data","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_1","desc":"flash scene 1","name":"flash scene 1","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_2","desc":"flash scene 2","name":"flash scene 2","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_3","desc":"flash scene 3","name":"flash scene 3","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_4","desc":"flash scene 4","name":"flash scene 4","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"}],"product_id":"8UhAGZyCrYqYAcEc"},{"category":"cz","devices":["bfa51f14de314caf29mqjc"],"functions":[{"code":"switch_1","desc":"switch 1","name":"switch 1","type":"Boolean","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"}],"product_id":"e5crkz8lzrdhcoad"},{"category":"dj","devices":["22462063c4dd5716bced","22462063c4dd5716ba76","2246206340f520f6be94","2246206340f520f619ed"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"},{"code":"bright_value_v2","desc":"bright value v2","name":"bright value v2","type":"Integer","values":"{\"min\":10,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"unit\":\"\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"ivik4oqocrpglbrm"}],"success":true,"t":1624278037338} path = /v1.0/devices/functions

aftrmth728 commented 3 years ago

Here are some other things in the log I found relating to the LED controller.

Adding: TV LED (dj / bf1b7b3fb06c08df31q9bd)
Existing Accessory found TV LED  bf1b7b3fb06c08df31q9bd 3d210401-4d06-4150-b8d7-d34f39644c30

This is the response in the log when turning the device on and then attempting to change the colour:

TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaeu.com, path = /v1.0/devices/bf1b7b3fb06c08df31q9bd/commands, params = null, body = {"commands":[{"code":"switch_led","value":true}]}, headers = {"t":"1624278622489","client_id":"k7vsr884aoq2i1fxzecf","sign":"C386DB027307018536A98742082D3A155EAF1AEFCB86E8C434FB4495C43FDC2B","sign_method":"HMAC-SHA256","access_token":"6ebabb44cce0e0af82939436dcd36abe","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.1.9"}
TuyaOpenAPI response: {"result":true,"success":true,"t":1624278622636} path = /v1.0/devices/bf1b7b3fb06c08df31q9bd/commands
TuyaOpenMQ onMessage: topic = cloud/token/in/8a440b15b542c17cd9c6dfa862b7eb27, message = {"data":{"dataId":"3ddac8d9-7523-4a46-a9e0-9bb75193d1f8","devId":"bf1b7b3fb06c08df31q9bd","productKey":"akpsa6jqvah6g39p","status":[{"20":true,"code":"switch_led","t":"1624278622","value":true}]},"protocol":4,"pv":"2.0","sign":"dd468fda8f2851756460b649d8b01aea","t":1624278622}

[21/06/2021, 13:30:28] [homebridge-tuya-platform] This plugin threw an error from the characteristic 'Hue': Unhandled error thrown inside write handler for characteristic: Cannot read property 'max' of undefined. See https://git.io/JtMGR for more info.
Hanh94 commented 3 years ago

Here are some other things in the log I found relating to the LED controller.

Adding: TV LED (dj / bf1b7b3fb06c08df31q9bd)
Existing Accessory found TV LED  bf1b7b3fb06c08df31q9bd 3d210401-4d06-4150-b8d7-d34f39644c30

This is the response in the log when turning the device on and then attempting to change the colour:

TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaeu.com, path = /v1.0/devices/bf1b7b3fb06c08df31q9bd/commands, params = null, body = {"commands":[{"code":"switch_led","value":true}]}, headers = {"t":"1624278622489","client_id":"k7vsr884aoq2i1fxzecf","sign":"C386DB027307018536A98742082D3A155EAF1AEFCB86E8C434FB4495C43FDC2B","sign_method":"HMAC-SHA256","access_token":"6ebabb44cce0e0af82939436dcd36abe","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.1.9"}
TuyaOpenAPI response: {"result":true,"success":true,"t":1624278622636} path = /v1.0/devices/bf1b7b3fb06c08df31q9bd/commands
TuyaOpenMQ onMessage: topic = cloud/token/in/8a440b15b542c17cd9c6dfa862b7eb27, message = {"data":{"dataId":"3ddac8d9-7523-4a46-a9e0-9bb75193d1f8","devId":"bf1b7b3fb06c08df31q9bd","productKey":"akpsa6jqvah6g39p","status":[{"20":true,"code":"switch_led","t":"1624278622","value":true}]},"protocol":4,"pv":"2.0","sign":"dd468fda8f2851756460b649d8b01aea","t":1624278622}

[21/06/2021, 13:30:28] [homebridge-tuya-platform] This plugin threw an error from the characteristic 'Hue': Unhandled error thrown inside write handler for characteristic: Cannot read property 'max' of undefined. See https://git.io/JtMGR for more info.

Hi @aftrmth728 ,Sorry that I did not describe it clearly. Please provide the data in the middle of TuyaOpenAPI response: ~~~ path = /v1.0/iot-01/associated-users/devices, because the plugin obtains the default range according to this data

aftrmth728 commented 3 years ago

Hello @Hanh94, I only see one entry for /v1.0/iot-01/associated-users/devices, sorry if I have again provided the wrong thing here, I am somewhat new to this and don't fully understand what I'm looking at.

TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaeu.com, path = /v1.0/devices/functions, params = {"device_ids":"22462063c4dd5716bced,bfa51f14de314caf29mqjc,2246206340f520f6be94,22462063c4dd5716ba76,bf1b7b3fb06c08df31q9bd,2246206340f520f619ed,54560020d8f15be21bd5"}, body = null, headers = {"t":"1624281612275","client_id":"k7vsr884aoq2i1fxzecf","sign":"891B698B6600F4F9C0D172110B5A115EF902920E62EC3B090E6F5CEB2CE763F8","sign_method":"HMAC-SHA256","access_token":"da359759486ba868cd2324e647c01597","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.1.9"}
TuyaOpenAPI response: {"result":[{"category":"dj","devices":["bf1b7b3fb06c08df31q9bd"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"},{"code":"music_data","desc":"music data","name":"music data","type":"Json","values":"{}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"akpsa6jqvah6g39p"},{"category":"dj","devices":["54560020d8f15be21bd5"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"bright_value","desc":"bright value","name":"bright value","type":"Integer","values":"{\"min\":25,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\"]}"},{"code":"temp_value","desc":"temp value","name":"temp value","type":"Integer","values":"{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"},{"code":"colour_data","desc":"colour data","name":"colour data","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"scene_data","desc":"scene data","name":"scene data","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_1","desc":"flash scene 1","name":"flash scene 1","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_2","desc":"flash scene 2","name":"flash scene 2","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_3","desc":"flash scene 3","name":"flash scene 3","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_4","desc":"flash scene 4","name":"flash scene 4","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"}],"product_id":"8UhAGZyCrYqYAcEc"},{"category":"cz","devices":["bfa51f14de314caf29mqjc"],"functions":[{"code":"switch_1","desc":"switch 1","name":"switch 1","type":"Boolean","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"}],"product_id":"e5crkz8lzrdhcoad"},{"category":"dj","devices":["22462063c4dd5716bced","2246206340f520f6be94","22462063c4dd5716ba76","2246206340f520f619ed"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"},{"code":"bright_value_v2","desc":"bright value v2","name":"bright value v2","type":"Integer","values":"{\"min\":10,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"unit\":\"\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"ivik4oqocrpglbrm"}],"success":true,"t":1624281612478} path = /v1.0/devices/functions
Hanh94 commented 3 years ago

Hello @Hanh94, I only see one entry for /v1.0/iot-01/associated-users/devices, sorry if I have again provided the wrong thing here, I am somewhat new to this and don't fully understand what I'm looking at.

TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaeu.com, path = /v1.0/devices/functions, params = {"device_ids":"22462063c4dd5716bced,bfa51f14de314caf29mqjc,2246206340f520f6be94,22462063c4dd5716ba76,bf1b7b3fb06c08df31q9bd,2246206340f520f619ed,54560020d8f15be21bd5"}, body = null, headers = {"t":"1624281612275","client_id":"k7vsr884aoq2i1fxzecf","sign":"891B698B6600F4F9C0D172110B5A115EF902920E62EC3B090E6F5CEB2CE763F8","sign_method":"HMAC-SHA256","access_token":"da359759486ba868cd2324e647c01597","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.1.9"}
TuyaOpenAPI response: {"result":[{"category":"dj","devices":["bf1b7b3fb06c08df31q9bd"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"},{"code":"music_data","desc":"music data","name":"music data","type":"Json","values":"{}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"akpsa6jqvah6g39p"},{"category":"dj","devices":["54560020d8f15be21bd5"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"bright_value","desc":"bright value","name":"bright value","type":"Integer","values":"{\"min\":25,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\"]}"},{"code":"temp_value","desc":"temp value","name":"temp value","type":"Integer","values":"{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"},{"code":"colour_data","desc":"colour data","name":"colour data","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"scene_data","desc":"scene data","name":"scene data","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_1","desc":"flash scene 1","name":"flash scene 1","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_2","desc":"flash scene 2","name":"flash scene 2","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_3","desc":"flash scene 3","name":"flash scene 3","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_4","desc":"flash scene 4","name":"flash scene 4","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"}],"product_id":"8UhAGZyCrYqYAcEc"},{"category":"cz","devices":["bfa51f14de314caf29mqjc"],"functions":[{"code":"switch_1","desc":"switch 1","name":"switch 1","type":"Boolean","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"}],"product_id":"e5crkz8lzrdhcoad"},{"category":"dj","devices":["22462063c4dd5716bced","2246206340f520f6be94","22462063c4dd5716ba76","2246206340f520f619ed"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"},{"code":"bright_value_v2","desc":"bright value v2","name":"bright value v2","type":"Integer","values":"{\"min\":10,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"unit\":\"\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"ivik4oqocrpglbrm"}],"success":true,"t":1624281612478} path = /v1.0/devices/functions

Hi @aftrmth728, It doesn't matter. Please provide the following code, which looks a bit long, starting with TuyaOpenAPI response: and ending with path = /v1.0/iot-01/associated-users/devices.

TuyaOpenAPI response: {"result":{"devices":[{"active_time":1622126980,"biz_type":0,"category":"fs","create_time":1611308569,"icon":"smart/icon/ay1557969575669BOV02/fbb375c0fa383e327c2eac51c35bada2.png","id":"6cb2c761afc1e455d3rakk","ip":"115.236.167.102","lat":"30.30273524180643","local_key":"e4ed7b578e68f655","lon":"120.0638771470137","name":"充电式电风扇","online":true,"owner_id":"26401743","product_id":"ybznohgystymcfpt","product_name":"充电式风扇","status":[{"code":"switch","value":true},{"code":"fan_speed_percent","value":1}],"sub":false,"time_zone":"+08:00","uid":"ay16028420091494MSJe","update_time":1624246450,"uuid":"789ffde261801a6e"},{"active_time":1623835970,"biz_type":0,"category":"qn","create_time":1564810111,"icon":"smart/icon/ay1531317374343k75lf/de84f12d434fd8a4d7ac7fe5b1ae1c15.png","id":"36034734bcddc236ed8a","ip":"101.68.86.253","lat":"30.30278881591692","local_key":"f1ea06cbff3f2739","lon":"120.0638193244153","model":"","name":"智能取暖器","online":false,"owner_id":"26401743","product_id":"MfGFAyoGy2hALoFq","product_name":"Smart Heater","status":[{"code":"switch","value":false},{"code":"temp_set_f","value":83},{"code":"temp_current_f","value":73},{"code":"c_f","value":"F"}],"sub":false,"time_zone":"+08:00","uid":"ay16028420091494MSJe","update_time":1624010021,"uuid":"36034734bcddc236ed8a"},{"active_time":1623743358,"biz_type":0,"category":"jtmspro","create_time":1623743358,"icon":"smart/icon/bay1598434490879Eyfe/d8b1c3215f7eaaddcbfa92126b6dbaa7.png","id":"vdevo162374335845377","ip":"101.68.86.250","lat":"30.30281124458973","local_key":"bbf33d9dab7009a3","lon":"120.0638277534634","name":"蓝牙智能锁-vdevo","online":true,"owner_id":"26401743","product_id":"my5yisyw","product_name":"蓝牙智能锁","status":[{"code":"residual_electricity","value":0},{"code":"battery_state","value":"high"},{"code":"child_lock","value":false},{"code":"unlock_fingerprint","value":0},{"code":"unlock_password","value":0},{"code":"unlock_dynamic","value":0},{"code":"unlock_key","value":0}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1623743358,"uuid":"vdevo162374335845377"},{"active_time":1623221136,"biz_type":0,"category":"dj","create_time":1531824736,"icon":"smart/icon/1467167733_0.png","id":"41803548bcddc2e4ea0f","ip":"115.236.167.100","lat":"30.30275883230975","local_key":"c6bae5c9b83c3b97","lon":"120.0638594148594","model":"","name":"A70RGBW","online":false,"owner_id":"26401743","product_id":"jQRc7Cgy8OVzwSRG","product_name":"A70RGBW","status":[{"code":"switch_led","value":true},{"code":"work_mode","value":"colour"},{"code":"bright_value","value":130},{"code":"temp_value","value":163},{"code":"colour_data","value":"{\"h\":106.0,\"s\":191.0,\"v\":212.9}"},{"code":"scene_data","value":"{\"h\":0.0,\"s\":0.0,\"v\":0.0}"},{"code":"flash_scene_1","value":"{\"bright\":255,\"frequency\":80,\"hsv\":[{\"h\":120.0,\"s\":255.0,\"v\":255.0}],\"temperature\":255}"},{"code":"flash_scene_2","value":"{\"bright\":255,\"frequency\":128,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0},{\"h\":120.0,\"s\":255.0,\"v\":255.0},{\"h\":240.0,\"s\":255.0,\"v\":255.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0}],\"temperature\":255}"},{"code":"flash_scene_3","value":"{\"bright\":255,\"frequency\":80,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0}],\"temperature\":255}"},{"code":"flash_scene_4","value":"{\"bright\":255,\"frequency\":5,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0},{\"h\":120.0,\"s\":255.0,\"v\":255.0},{\"h\":60.0,\"s\":255.0,\"v\":255.0},{\"h\":300.0,\"s\":255.0,\"v\":255.0},{\"h\":240.0,\"s\":255.0,\"v\":255.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0}],\"temperature\":255}"}],"sub":false,"time_zone":"+08:00","uid":"ay16028420091494MSJe","update_time":1623406794,"uuid":"41803548bcddc2e4ea0f"},{"active_time":1623401078,"biz_type":0,"category":"qn","create_time":1623401078,"icon":"smart/icon/bay1598434490879Eyfe/5fe397842d21343b30bf48c8d19802b4.png","id":"vdevo162340107809793","ip":"115.236.167.100","lat":"30.30275883230975","local_key":"0eedb89a77f9c182","lon":"120.0638594148594","model":"","name":"取暖器-vdevo","online":true,"owner_id":"26401743","product_id":"0y2ne2lrm2hjr091","product_name":"取暖器","status":[{"code":"switch","value":false},{"code":"temp_set","value":40},{"code":"temp_current","value":-20},{"code":"mode","value":"smart"},{"code":"level","value":"1"},{"code":"lock","value":true},{"code":"shake","value":false},{"code":"work_state","value":"heating"},{"code":"work_power","value":0},{"code":"temp_unit_convert","value":"c"}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1623401078,"uuid":"vdevo162340107809793"},{"active_time":1623328415,"biz_type":0,"category":"pc","create_time":1623328415,"icon":"smart/icon/bay1598434490879Eyfe/4022c9fd87150edbc8d0f9176fd597f9.png","id":"vdevo162332841514446","ip":"115.236.167.101","lat":"30.30275106350233","local_key":"109ed4f914b9c8a3","lon":"120.0640266205451","model":"","name":"六路排插-vdevo","online":true,"owner_id":"26401743","product_id":"znekanrkbh43ffpl","product_name":"六路排插","status":[{"code":"switch_1","value":false},{"code":"switch_2","value":true},{"code":"switch_3","value":false},{"code":"switch_4","value":false},{"code":"switch_5","value":false},{"code":"switch_6","value":true},{"code":"countdown_1","value":0},{"code":"countdown_2","value":0},{"code":"countdown_3","value":0},{"code":"countdown_4","value":0},{"code":"countdown_5","value":0},{"code":"countdown_6","value":0}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1623328415,"uuid":"vdevo162332841514446"},{"active_time":1622530007,"biz_type":0,"category":"kg","create_time":1622530007,"icon":"smart/icon/bay1598434490879Eyfe/0c3a28492ba9b01af521384f5b5b6a8b.png","id":"vdevo162253000699035","ip":"223.104.246.169","lat":"30.30272705293626","local_key":"852bac7923520f4e","lon":"120.0638450872244","name":"三路开关-vdevo","online":true,"owner_id":"26401743","product_id":"fmwg7tnoyaydxujr","product_name":"三路开关","status":[{"code":"switch_1","value":false},{"code":"switch_2","value":false},{"code":"switch_3","value":true},{"code":"countdown_1","value":0},{"code":"countdown_2","value":0},{"code":"countdown_3","value":0}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1622530007,"uuid":"vdevo162253000699035"},{"active_time":1622109177,"biz_type":0,"category":"kj","create_time":1578106287,"icon":"smart/icon/bay1583223382813Ktn5/6c60476a95805850264da8e4915e73ba.png","id":"12228800840d8e62ef5a","ip":"115.236.167.102","lat":"30.30273524180643","local_key":"67d703b8ea81c9cc","lon":"120.0638771470137","model":"HALO","name":"air","online":false,"owner_id":"26401743","product_id":"xbwu1pxknjob6ca7","product_name":"Invitop-air purifier","status":[{"code":"switch","value":true},{"code":"speed","value":"2"},{"code":"filter_reset","value":false},{"code":"countdown_set","value":"cancle"},{"code":"countdown_left","value":0}],"sub":false,"time_zone":"+08:00","uid":"ay16028420091494MSJe","update_time":1622184909,"uuid":"12228800840d8e62ef5a"},{"active_time":1622126423,"biz_type":0,"category":"dj","create_time":1620468953,"icon":"smart/program_category_icon/dj.png","id":"vdevo162046895384614","ip":"115.236.167.102","lat":"30.30274039147235","local_key":"a47e3d260a1fc826","lon":"120.0639108908814","model":"","name":"smart bulb 800lm rgb+cct-vdevo","online":true,"owner_id":"26401743","product_id":"yju2e6dooxujr5zx","product_name":"意博公版5路CCT-TYLC6E","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"colour"},{"code":"bright_value_v2","value":633},{"code":"temp_value_v2","value":0},{"code":"colour_data_v2","value":"{\"h\":137,\"s\":640,\"v\":653}"},{"code":"scene_data_v2","value":""},{"code":"countdown_1","value":0},{"code":"control_data","value":"{\"bright\":0,\"change_mode\":\"gradient\",\"h\":189,\"s\":1000,\"temperature\":0,\"v\":1000}"}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1622126423,"uuid":"vdevo162046895384614"},{"active_time":1622125751,"biz_type":0,"category":"cz","create_time":1620457452,"icon":"smart/icon/ay1537005524478pGtw5/1582460209bdd87879955.jpg","id":"vdevo162045745277206","ip":"183.129.184.214","lat":"30.30273950553484","local_key":"2d906c58e7bf0d0c","lon":"120.0638540845304","name":"智能Wi-Fi插座-vdevo","online":true,"owner_id":"26401743","product_id":"4vyFlNarPqM5IofI","product_name":"智能Wi-Fi插座","status":[{"code":"switch_1","value":false},{"code":"countdown_1","value":0}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1622125751,"uuid":"vdevo162045745277206"},{"active_time":1622036407,"biz_type":0,"category":"fs","create_time":1622036407,"icon":"smart/icon/bay1598434490879Eyfe/dfa46959395069804aeea72d3892627c.png","id":"6cc955cba6bf32414ed3ap","ip":"183.129.184.214","lat":"30.30270847123075","local_key":"4e240b1985d883c3","lon":"120.0638571396849","name":"Fan1111 2","online":false,"owner_id":"26401743","product_id":"kkku63uzvsygxcm0","product_name":"Fan1111","status":[],"sub":false,"time_zone":"+08:00","uid":"ay16028420091494MSJe","update_time":1622036634,"uuid":"140e86398a2201a7"},{"active_time":1622036110,"biz_type":0,"category":"fs","create_time":1622036110,"icon":"smart/icon/bay1598434490879Eyfe/dfa46959395069804aeea72d3892627c.png","id":"vdevo162203611053951","ip":"115.236.167.102","lat":"30.30274469576294","local_key":"ff28d8a6327019f1","lon":"120.0639102618863","name":"Fan1111-vdevo","online":true,"owner_id":"26401743","product_id":"kkku63uzvsygxcm0","product_name":"Fan1111","status":[],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1622036110,"uuid":"vdevo162203611053951"},{"active_time":1622027878,"biz_type":0,"category":"kg","create_time":1622027878,"icon":"smart/icon/bay15839124763268PqC/9f9a50e70f9fd2c98cbf15c924e1fc80.png","id":"vdevo162202787804733","ip":"115.236.167.102","lat":"30.30291731942682","local_key":"eb77c7e97b7efb14","lon":"120.0634710654024","name":"火线开关-vdevo","online":true,"owner_id":"26401743","product_id":"ndhagmam","product_name":"火线开关","status":[],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1622027878,"uuid":"vdevo162202787804733"},{"active_time":1622026670,"biz_type":0,"category":"kg","create_time":1622026671,"icon":"smart/icon/bay15839124763268PqC/0d286ef8cb2b2e5849351c0e673cc3ec.png","id":"vdevo162202667091084","ip":"101.68.86.253","lat":"30.30279915536483","local_key":"45405e9a7136c8be","lon":"120.0646292316386","name":"开关-vdevo","online":true,"owner_id":"26401743","product_id":"sk4h2itvu5nhvvns","product_name":"开关","status":[{"code":"switch_1","value":true},{"code":"countdown_1","value":0}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1622026671,"uuid":"vdevo162202667091084"},{"active_time":1622022635,"biz_type":0,"category":"kg","create_time":1622022635,"icon":"smart/icon/bay15839124763268PqC/0b0faa42ba5a592e89507da19d8493f9.png","id":"vdevo162202263518228","ip":"101.68.86.253","lat":"30.30270717312711","local_key":"e11ea3b09cc6c647","lon":"120.0639101966836","name":"一路开关-vdevo","online":true,"owner_id":"26401743","product_id":"bpkf4jdsuxhnmlg3","product_name":"一路开关","status":[{"code":"switch_1","value":false},{"code":"countdown_1","value":0}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1622022635,"uuid":"vdevo162202263518228"},{"active_time":1622021715,"biz_type":0,"category":"cl","create_time":1622021715,"icon":"smart/icon/bay15839124763268PqC/113849444fca59b15a8d732da68b60de.png","id":"vdevo162202171518573","ip":"115.236.167.101","lat":"30.3027208441529","local_key":"c3b613deb9cb4546","lon":"120.0638921010274","name":"chuanglian-vdevo","online":true,"owner_id":"26401743","product_id":"lhcosaeuwqlcf5kw","product_name":"chuanglian","status":[{"code":"control","value":"open"},{"code":"percent_control","value":0},{"code":"percent_state","value":0},{"code":"mode","value":"morning"},{"code":"control_back_mode","value":"forward"},{"code":"auto_power","value":false},{"code":"work_state","value":"opening"},{"code":"countdown_set","value":"cancel"},{"code":"countdown_left","value":0},{"code":"time_total","value":0},{"code":"situation_set","value":"fully_open"},{"code":"battery_percentage","value":0},{"code":"border","value":"up"},{"code":"position_best","value":0},{"code":"click_control","value":"up"},{"code":"angle_horizontal","value":0}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1622021715,"uuid":"vdevo162202171518573"},{"active_time":1622020503,"biz_type":0,"category":"cz","create_time":1622020503,"icon":"smart/icon/bay1582627358786OaI5/012d196f465792fe97758760b71944f5.png","id":"vdevo162202050388321","ip":"115.236.167.101","lat":"30.30272440567163","local_key":"38594cdcdd1d0068","lon":"120.063877965945","name":"234-vdevo","online":true,"owner_id":"26401743","product_id":"vljzxg8omklkco9n","product_name":"234","status":[{"code":"switch_1","value":false},{"code":"countdown_1","value":0},{"code":"relay_status","value":"power_off"},{"code":"light_mode","value":"relay"},{"code":"child_lock","value":false}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1622020504,"uuid":"vdevo162202050388321"},{"active_time":1622020043,"biz_type":0,"category":"fskg","create_time":1622020043,"icon":"smart/icon/ay1579313101495D3AQH/627cb4ec1cddabe4df19d874ffbbc80d.png","id":"vdevo162202004354402","ip":"115.236.167.101","lat":"30.30270827826455","local_key":"bbad63182216a8bd","lon":"120.0638864309319","name":"风扇开关-vdevo","online":true,"owner_id":"26401743","product_id":"mvvkvj9gclwpgaol","product_name":"复制-嘿哈","status":[{"code":"switch_fan","value":false}],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1622020043,"uuid":"vdevo162202004354402"},{"active_time":1620632482,"biz_type":0,"category":"ks","create_time":1620632482,"icon":"smart/icon/bay1598434490879Eyfe/5f492ac4216b91e60de0cad5cf28f0ce.png","id":"vdevo162063248244372","ip":"183.129.184.212","lat":"30.30277413249184","local_key":"47226cb6128a7ab7","lon":"120.0643188582989","model":"","name":"Air Cooler-vdevo","online":true,"owner_id":"26401743","product_id":"ufu9akgwrc3zpeft","product_name":"Air Cooler","status":[],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1620632482,"uuid":"vdevo162063248244372"},{"active_time":1620615692,"biz_type":0,"category":"ywbj","create_time":1620615201,"icon":"smart/icon/bay1598434490879Eyfe/fde07957869cc48f0f1d34591143ebda.png","id":"vdevo162061520113379","ip":"183.129.184.211","lat":"30.30268327572867","local_key":"f16bf47fab8f01f1","lon":"120.0638888195016","name":"烟雾报警器-vdevo","online":true,"owner_id":"26401743","product_id":"udg4ggzjyxterrni","product_name":"烟雾报警器","status":[],"sub":false,"time_zone":"","uid":"ay16028420091494MSJe","update_time":1620615692,"uuid":"vdevo162061520113379"}],"has_more":true,"last_row_key":"A00B57B0D7B0903080DD3D6998E82994","total":24},"success":true,"t":1624279674527} path = /v1.0/iot-01/associated-users/devices

aftrmth728 commented 3 years ago

Hi @Hanh94 I believe this:

TuyaOpenAPI response: {"result":[{"category":"dj","devices":["bf1b7b3fb06c08df31q9bd"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"},{"code":"music_data","desc":"music data","name":"music data","type":"Json","values":"{}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"akpsa6jqvah6g39p"},{"category":"dj","devices":["54560020d8f15be21bd5"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"bright_value","desc":"bright value","name":"bright value","type":"Integer","values":"{\"min\":25,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\"]}"},{"code":"temp_value","desc":"temp value","name":"temp value","type":"Integer","values":"{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}"},{"code":"colour_data","desc":"colour data","name":"colour data","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"scene_data","desc":"scene data","name":"scene data","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_1","desc":"flash scene 1","name":"flash scene 1","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_2","desc":"flash scene 2","name":"flash scene 2","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_3","desc":"flash scene 3","name":"flash scene 3","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"},{"code":"flash_scene_4","desc":"flash scene 4","name":"flash scene 4","type":"Json","values":"{\"h\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":1,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}"}],"product_id":"8UhAGZyCrYqYAcEc"},{"category":"cz","devices":["bfa51f14de314caf29mqjc"],"functions":[{"code":"switch_1","desc":"switch 1","name":"switch 1","type":"Boolean","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"}],"product_id":"e5crkz8lzrdhcoad"},{"category":"dj","devices":["22462063c4dd5716bced","22462063c4dd5716ba76","2246206340f520f6be94","2246206340f520f619ed"],"functions":[{"code":"switch_led","desc":"switch led","name":"switch led","type":"Boolean","values":"{}"},{"code":"work_mode","desc":"work mode","name":"work mode","type":"Enum","values":"{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}"},{"code":"bright_value_v2","desc":"bright value v2","name":"bright value v2","type":"Integer","values":"{\"min\":10,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}"},{"code":"colour_data_v2","desc":"colour data v2","name":"colour data v2","type":"Json","values":"{}"},{"code":"scene_data_v2","desc":"scene data v2","name":"scene data v2","type":"Json","values":"{}"},{"code":"countdown_1","desc":"countdown 1","name":"countdown 1","type":"Integer","values":"{\"unit\":\"\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"},{"code":"control_data","desc":"control data","name":"control data","type":"Json","values":"{}"}],"product_id":"ivik4oqocrpglbrm"}],"success":true,"t":1624287845776} path = /v1.0/devices/functions

aftrmth728 commented 3 years ago

@Hanh94 or this

TuyaOpenAPI response: {"result":{"devices":[{"active_time":1616002414,"biz_type":0,"category":"dj","create_time":1611752002,"icon":"smart/icon/ay1545812972898u8wAi/4dabb84e6866f22301ec86ea658b2808.jpg","id":"22462063c4dd5716bced","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"e7ed12c041acb392","lon":"-1.303841907125888","name":"Living Room ML 4","online":true,"owner_id":"20410128","product_id":"ivik4oqocrpglbrm","product_name":"LE-RGBWgu10","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":470},{"code":"colour_data_v2","value":"{\"h\":0,\"s\":1000,\"v\":1000}"},{"code":"scene_data_v2","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":1000,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624246958,"uuid":"22462063c4dd5716bced"},{"active_time":1616002725,"biz_type":0,"category":"cz","create_time":1592950085,"icon":"smart/icon/ay1531122507771gALCb/1568011914064a9be8f2e.png","id":"bfa51f14de314caf29mqjc","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"dfc29e0b9bf23a6f","lon":"-1.303841907125888","model":"祥森英规-计量插座T106","name":"Living Room Lamp","online":true,"owner_id":"20410128","product_id":"e5crkz8lzrdhcoad","product_name":"Smart Socket","status":[{"code":"switch_1","value":false},{"code":"countdown_1","value":0},{"code":"add_ele","value":3},{"code":"cur_current","value":0},{"code":"cur_power","value":0},{"code":"cur_voltage","value":2421}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624199788,"uuid":"0d95a9b1d32661b2"},{"active_time":1616002415,"biz_type":0,"category":"dj","create_time":1611751780,"icon":"smart/icon/ay1545812972898u8wAi/4dabb84e6866f22301ec86ea658b2808.jpg","id":"22462063c4dd5716ba76","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"e7a50adad1141de8","lon":"-1.303841907125888","name":"Living Room ML 1","online":true,"owner_id":"20410128","product_id":"ivik4oqocrpglbrm","product_name":"LE-RGBWgu10","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":470},{"code":"colour_data_v2","value":"{\"h\":0,\"s\":1000,\"v\":1000}"},{"code":"scene_data_v2","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":1000,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624199786,"uuid":"22462063c4dd5716ba76"},{"active_time":1616002423,"biz_type":0,"category":"dj","create_time":1611752000,"icon":"smart/icon/ay1545812972898u8wAi/4dabb84e6866f22301ec86ea658b2808.jpg","id":"2246206340f520f6be94","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"cc36e71d03b91be1","lon":"-1.303841907125888","name":"Living Room ML 2","online":true,"owner_id":"20410128","product_id":"ivik4oqocrpglbrm","product_name":"LE-RGBWgu10","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":470},{"code":"colour_data_v2","value":"{\"h\":0,\"s\":1000,\"v\":1000}"},{"code":"scene_data_v2","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":1000,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624199786,"uuid":"2246206340f520f6be94"},{"active_time":1616002415,"biz_type":0,"category":"dj","create_time":1611751780,"icon":"smart/icon/ay1545812972898u8wAi/4dabb84e6866f22301ec86ea658b2808.jpg","id":"2246206340f520f619ed","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"ee1783730345603f","lon":"-1.303841907125888","name":"Living Room ML 3","online":true,"owner_id":"20410128","product_id":"ivik4oqocrpglbrm","product_name":"LE-RGBWgu10","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":470},{"code":"colour_data_v2","value":"{\"h\":0,\"s\":1000,\"v\":1000}"},{"code":"scene_data_v2","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":1000,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624199785,"uuid":"2246206340f520f619ed"},{"active_time":1624199487,"biz_type":0,"category":"dj","create_time":1608401239,"icon":"smart/icon/ay1488250737181CTA8y/1f4a8782a27fad614aa03b23ec50dbf6.png","id":"bf1b7b3fb06c08df31q9bd","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"980ecfa729750ece","lon":"-1.303841907125888","name":"TV LED","online":true,"owner_id":"20410128","product_id":"akpsa6jqvah6g39p","product_name":"32.8ft SL1","status":[{"code":"switch_led","value":true},{"code":"work_mode","value":"colour"},{"code":"colour_data_v2","value":"{\"h\":298,\"s\":864,\"v\":911}"},{"code":"scene_data_v2","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":0,\"h\":46,\"s\":1000,\"temperature\":0,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":716}]}"},{"code":"countdown_1","value":0},{"code":"music_data","value":""},{"code":"control_data","value":""}],"sub":false,"time_zone":"+01:00","uid":"eu1606968447820dpoEB","update_time":1624199785,"uuid":"d41893dcfba77ba6"},{"active_time":1616004535,"biz_type":0,"category":"dj","create_time":1607095911,"icon":"smart/product_icon/dj.png","id":"54560020d8f15be21bd5","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"0ac3709a3c6508c9","lon":"-1.303841907125888","name":"Bedroom light ","online":true,"owner_id":"20410128","product_id":"8UhAGZyCrYqYAcEc","product_name":"smart lighting-RGBCW-E2S","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value","value":255},{"code":"temp_value","value":239},{"code":"colour_data","value":"{\"h\":0.0,\"s\":0.0,\"v\":220.1}"},{"code":"scene_data","value":"{\"h\":0.0,\"s\":0.0,\"v\":0.0}"},{"code":"flash_scene_1","value":"{\"bright\":255,\"frequency\":80,\"hsv\":[{\"h\":120.0,\"s\":255.0,\"v\":255.0}],\"temperature\":255}"},{"code":"flash_scene_2","value":"{\"bright\":255,\"frequency\":1,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0},{\"h\":120.0,\"s\":255.0,\"v\":255.0},{\"h\":240.0,\"s\":255.0,\"v\":255.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0}],\"temperature\":255}"},{"code":"flash_scene_3","value":"{\"bright\":255,\"frequency\":80,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0}],\"temperature\":255}"},{"code":"flash_scene_4","value":"{\"bright\":255,\"frequency\":5,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0},{\"h\":120.0,\"s\":255.0,\"v\":255.0},{\"h\":60.0,\"s\":255.0,\"v\":255.0},{\"h\":300.0,\"s\":255.0,\"v\":255.0},{\"h\":240.0,\"s\":255.0,\"v\":255.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0}],\"temperature\":255}"}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624199784,"uuid":"54560020d8f15be21bd5"}],"has_more":false,"last_row_key":"A74F6FC24E54E7163226B4CDA54638BC","total":7},"success":true,"t":1624287845319} path = /v1.0/iot-01/associated-users/devices

Hanh94 commented 3 years ago

Hi @aftrmth728 , Based on the information you provided, I searched our cloud log and obtained the following information:

This is your device information in our cloud, this is a correct JSON format data, and I started the plugin with this data, and it worked perfectly

The difference between this and the data in your supplied log is that: The data you provided is not in the correct JSON format, such as {"code":"colour_data_v2","value":"{"h":298,"s":864,"v":911} "}, The correct data format looks like this : {"code":"colour_data_v2","value":"{ \ "h\ ":298, \ "s \ ":864, \ "v \ ":911}"} ,we are not yet sure if the data format you got is wrong, There are still errors in the format of the printed data.

If that doesn't help you ,please provide your TuyaSmart APP user name and password and your cloud project's Authorization ID and Key by creating a Technical ticket : https://service.console.tuya.com/8/2/list?source=content_feedback and We will help you solve this problem.

{"result":{"devices":[{"active_time":1616002414,"biz_type":0,"category":"dj","create_time":1611752002,"icon":"smart/icon/ay1545812972898u8wAi/4dabb84e6866f22301ec86ea658b2808.jpg","id":"22462063c4dd5716bced","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"e7ed12c041acb392","lon":"-1.303841907125888","name":"Living Room ML 4","online":true,"owner_id":"20410128","product_id":"ivik4oqocrpglbrm","product_name":"LE-RGBWgu10","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":470},{"code":"colour_data_v2","value":"{\"h\":0,\"s\":1000,\"v\":1000}"},{"code":"scene_data_v2","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":1000,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624246958,"uuid":"22462063c4dd5716bced"},{"active_time":1616002725,"biz_type":0,"category":"cz","create_time":1592950085,"icon":"smart/icon/ay1531122507771gALCb/1568011914064a9be8f2e.png","id":"bfa51f14de314caf29mqjc","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"dfc29e0b9bf23a6f","lon":"-1.303841907125888","model":"祥森英规-计量插座T106","name":"Living Room Lamp","online":true,"owner_id":"20410128","product_id":"e5crkz8lzrdhcoad","product_name":"Smart Socket","status":[{"code":"switch_1","value":false},{"code":"countdown_1","value":0},{"code":"add_ele","value":3},{"code":"cur_current","value":0},{"code":"cur_power","value":0},{"code":"cur_voltage","value":2421}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624199788,"uuid":"0d95a9b1d32661b2"},{"active_time":1616002415,"biz_type":0,"category":"dj","create_time":1611751780,"icon":"smart/icon/ay1545812972898u8wAi/4dabb84e6866f22301ec86ea658b2808.jpg","id":"22462063c4dd5716ba76","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"e7a50adad1141de8","lon":"-1.303841907125888","name":"Living Room ML 1","online":true,"owner_id":"20410128","product_id":"ivik4oqocrpglbrm","product_name":"LE-RGBWgu10","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":470},{"code":"colour_data_v2","value":"{\"h\":0,\"s\":1000,\"v\":1000}"},{"code":"scene_data_v2","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":1000,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624199786,"uuid":"22462063c4dd5716ba76"},{"active_time":1616002423,"biz_type":0,"category":"dj","create_time":1611752000,"icon":"smart/icon/ay1545812972898u8wAi/4dabb84e6866f22301ec86ea658b2808.jpg","id":"2246206340f520f6be94","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"cc36e71d03b91be1","lon":"-1.303841907125888","name":"Living Room ML 2","online":true,"owner_id":"20410128","product_id":"ivik4oqocrpglbrm","product_name":"LE-RGBWgu10","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":470},{"code":"colour_data_v2","value":"{\"h\":0,\"s\":1000,\"v\":1000}"},{"code":"scene_data_v2","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":1000,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624199786,"uuid":"2246206340f520f6be94"},{"active_time":1616002415,"biz_type":0,"category":"dj","create_time":1611751780,"icon":"smart/icon/ay1545812972898u8wAi/4dabb84e6866f22301ec86ea658b2808.jpg","id":"2246206340f520f619ed","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"ee1783730345603f","lon":"-1.303841907125888","name":"Living Room ML 3","online":true,"owner_id":"20410128","product_id":"ivik4oqocrpglbrm","product_name":"LE-RGBWgu10","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value_v2","value":470},{"code":"colour_data_v2","value":"{\"h\":0,\"s\":1000,\"v\":1000}"},{"code":"scene_data_v2","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":200,\"h\":0,\"s\":0,\"temperature\":1000,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":0}]}"},{"code":"countdown_1","value":0},{"code":"control_data","value":""}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624199785,"uuid":"2246206340f520f619ed"},{"active_time":1624199487,"biz_type":0,"category":"dj","create_time":1608401239,"icon":"smart/icon/ay1488250737181CTA8y/1f4a8782a27fad614aa03b23ec50dbf6.png","id":"bf1b7b3fb06c08df31q9bd","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"980ecfa729750ece","lon":"-1.303841907125888","name":"TV LED","online":true,"owner_id":"20410128","product_id":"akpsa6jqvah6g39p","product_name":"32.8ft SL1","status":[{"code":"switch_led","value":true},{"code":"work_mode","value":"colour"},{"code":"colour_data_v2","value":"{\"h\":298,\"s\":864,\"v\":911}"},{"code":"scene_data_v2","value":"{\"scene_num\":1,\"scene_units\":[{\"bright\":0,\"h\":46,\"s\":1000,\"temperature\":0,\"unit_change_mode\":\"static\",\"unit_gradient_duration\":13,\"unit_switch_duration\":14,\"v\":716}]}"},{"code":"countdown_1","value":0},{"code":"music_data","value":""},{"code":"control_data","value":""}],"sub":false,"time_zone":"+01:00","uid":"eu1606968447820dpoEB","update_time":1624199785,"uuid":"d41893dcfba77ba6"},{"active_time":1616004535,"biz_type":0,"category":"dj","create_time":1607095911,"icon":"smart/product_icon/dj.png","id":"54560020d8f15be21bd5","ip":"86.4.93.84","lat":"53.4726007695321","local_key":"0ac3709a3c6508c9","lon":"-1.303841907125888","name":"Bedroom light ","online":true,"owner_id":"20410128","product_id":"8UhAGZyCrYqYAcEc","product_name":"smart lighting-RGBCW-E2S","status":[{"code":"switch_led","value":false},{"code":"work_mode","value":"white"},{"code":"bright_value","value":255},{"code":"temp_value","value":239},{"code":"colour_data","value":"{\"h\":0.0,\"s\":0.0,\"v\":220.1}"},{"code":"scene_data","value":"{\"h\":0.0,\"s\":0.0,\"v\":0.0}"},{"code":"flash_scene_1","value":"{\"bright\":255,\"frequency\":80,\"hsv\":[{\"h\":120.0,\"s\":255.0,\"v\":255.0}],\"temperature\":255}"},{"code":"flash_scene_2","value":"{\"bright\":255,\"frequency\":1,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0},{\"h\":120.0,\"s\":255.0,\"v\":255.0},{\"h\":240.0,\"s\":255.0,\"v\":255.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0}],\"temperature\":255}"},{"code":"flash_scene_3","value":"{\"bright\":255,\"frequency\":80,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0}],\"temperature\":255}"},{"code":"flash_scene_4","value":"{\"bright\":255,\"frequency\":5,\"hsv\":[{\"h\":0.0,\"s\":255.0,\"v\":255.0},{\"h\":120.0,\"s\":255.0,\"v\":255.0},{\"h\":60.0,\"s\":255.0,\"v\":255.0},{\"h\":300.0,\"s\":255.0,\"v\":255.0},{\"h\":240.0,\"s\":255.0,\"v\":255.0},{\"h\":0.0,\"s\":0.0,\"v\":0.0}],\"temperature\":255}"}],"sub":false,"time_zone":"+00:00","uid":"eu1606968447820dpoEB","update_time":1624199784,"uuid":"54560020d8f15be21bd5"}],"has_more":false,"last_row_key":"A74F6FC24E54E7163226B4CDA54638BC","total":7},"success":true,"t":1624287845319}

aftrmth728 commented 3 years ago

@Hanh94 Thanks, is it possible for me to replace with the correct format?

Hanh94 commented 3 years ago

@Hanh94 Thanks, is it possible for me to replace with the correct format?

Hi @aftrmth728 ,Sorry for taking so long to reply. We have corrected your data and it is perfect to run with your data on the plugin. Please try again. If you have any questions, please timely feedback to us.

aftrmth728 commented 3 years ago

Hi again,

It seems that none of my Tuya linked devices are functioning now through the Home app. They still work via Tuya app but no functionality via Home. There are also no errors in the log and the icons in Home app show on/off as if there is no issue.

Thanks

On 28 Jun 2021, at 10:53, Hanh94 @.***> wrote:

 @Hanh94 Thanks, is it possible for me to replace with the correct format?

Hi @aftrmth728 ,Sorry for taking so long to reply. We have corrected your data and it is perfect to run with your data on the plugin. Please try again. If you have any questions, please timely feedback to us.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

aftrmth728 commented 3 years ago

Just to update @Hanh94 , all my Tuya devices have disappeared from Home now. Other devices from separate plugins are fine but no Tuya usage currently. No errors in logs in debug mode, only at reboot it states: configuring 3 devices.

thanks

aftrmth728 commented 3 years ago
TuyaOpenAPI response: {"code":1106,"msg":"permission deny","success":false,"t":1624917497595} path = /v1.0/iot-01/associated-users/actions/authorized-login
Please confirm that the Access ID and Access Secret of the Smart Home PaaS project you are using were created after May 25, 2021.
Please linked devices by using Tuya Smart or Smart Life app in your cloud project.
Failed to get device information. Please check if the config.json is correct.

I have checked the config, all details are correct and have not changed since they were last working.

Hanh94 commented 3 years ago

Hi @aftrmth728 ,Sorry for the late reply.

Recently, our team has been sorting out interface issues such as code 2406, code 1106. The same country code for Tuya SmartLife apps on different phones may correspond to different Availability zones. Therefore, we recommend that you select all available Availability Zones in the cloud project, and we will improve the plugin login experience as soon as possible. Hope this doc has been helpful: https://developer.tuya.com/en/docs/iot/Tuya_Homebridge_Plugin?id=Kamcldj76lhzt. Any questions, please contact us.

aftrmth728 commented 3 years ago

@Hanh94 Hi, thanks for your continued support. Currently I am receiving error code 1004:

TuyaOpenAPI response: {"code":1004,"msg":"sign invalid","success":false,"t":1625161079132} path = /v1.0/iot-01/associated-users/actions/authorized-login Please confirm that the Access ID and Access Secret of the Smart Home PaaS project you are using were created after May 25, 2021. Please linked devices by using Tuya Smart or Smart Life app in your cloud project. Failed to get device information. Please check if the config.json is correct.

I have selected all Availability Zones in the cloud project. Is this an ongoing issue or something I can fix within my config?

Thanks

Hanh94 commented 3 years ago

Hi @aftrmth728 ,Please try again.

aftrmth728 commented 3 years ago

Hi @Hanh94 , I have 1106: TuyaOpenAPI response: {"code":1106,"msg":"permission deny","success":false,"t":1625232467499} path = /v1.0/iot-01/associated-users/actions/authorized-login Please confirm that the Access ID and Access Secret of the Smart Home PaaS project you are using were created after May 25, 2021. Please linked devices by using Tuya Smart or Smart Life app in your cloud project. Failed to get device information. Please check if the config.json is correct.

Hanh94 commented 3 years ago

Hi @aftrmth728, See Success log that You requested On July 1:

And false log On July 2 :

The password are different, You should use the password that was successfully requested

Hanh94 commented 3 years ago

See more error code information: https://developer.tuya.com/en/docs/iot/Tuya_Homebridge_Plugin?id=Kamcldj76lhzt#title-6-Error%20code%20and%20troubleshooting

Hanh94 commented 3 years ago

Hi @aftrmth728 , For a better login experience, in version 1.3.0, the login interface is published in all regions. Therefore, you can use the endPoint of any region to log in. After a successful login, the endPoint of the region where the account resides is returned to obtain device information.

If the login issue has been resolved, we will close the issue.

Any questions, please contact us.