codetheweb / tuyapi

🌧 An easy-to-use API for devices that use Tuya's cloud services. Documentation: https://codetheweb.github.io/tuyapi.
MIT License
2.04k stars 332 forks source link

No datapoint found #612

Open jonas8ace opened 1 year ago

jonas8ace commented 1 year ago

Describe the bug

Hi, i bound in the normal tuya iot cloud in my HASSIO and after a month i got three useless entitys because my "iot core plan" is expired. So i search an other way and found the localtuya integration for HASSIO. I have only 3 lamps. And i follow the normal setup and register my iot account in the integration, so far as good, and if i try to chose one of the 3 lamps the key and id of the device is still signed. i chose the script version (no matter which version i try 3.1 or 3.3... same result) i become every time by each of this 3 devices the same Error: Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists.

tuya local

Config_entry-localtuya

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.11.4", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.7", "docker": true, "arch": "x86_64", "timezone": "Europe/Amsterdam", "os_name": "Linux", "os_version": "5.15.74", "supervisor": "2022.10.2", "host_os": "Home Assistant OS 9.3", "docker_version": "20.10.18", "chassis": "vm", "run_as_root": true }, "custom_components": { "sonoff": { "version": "3.3.1", "requirements": [ "pycryptodome>=3.6.6" ] }, "hacs": { "version": "1.28.3", "requirements": [ "aiogithubapi>=22.2.4" ] }, "govee": { "version": "0.2.2", "requirements": [ "govee-api-laggat==0.2.2", "dacite==1.6.0" ] }, "localtuya": { "version": "4.1.1", "requirements": [] } }, "integration_manifest": { "domain": "localtuya", "name": "LocalTuya integration", "version": "4.1.1", "documentation": "https://github.com/rospogrigio/localtuya/", "dependencies": [], "codeowners": [ "@rospogrigio", "@postlund" ], "issue_tracker": "https://github.com/rospogrigio/localtuya/issues", "requirements": [], "config_flow": true, "iot_class": "local_push", "is_built_in": false }, "data": { "region": "eu", "username": "localtuya", "no_cloud": false, "client_id": "m8j...sg3", "client_secret": "e2b...14d", "user_id": "eu1...9FX", "devices": {}, "cloud_devices": { "bf2f3b6b581dd285128ame": { "active_time": 1668868533, "biz_type": 0, "category": "dj", "create_time": 1668868533, "icon": "smart/icon/bay1605268422699KhXq/948617d76d94dd0671f230e3e01a8a61.png", "id": "bf2f3b6b581dd285128ame", "ip": "79.241.250.78", "lat": "48.5698", "local_key": "420...db3", "lon": "10.4140", "model": "ST64-SF-WIFILIC-TY-RGBW 4.9W", "name": "Filament TV rechts", "online": true, "owner_id": "71526931", "product_id": "dridviyxrbroyttp", "product_name": "", "status": [ { "code": "switch_led", "value": false }, { "code": "work_mode", "value": "white" }, { "code": "bright_value_v2", "value": 1000 }, { "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": "music_data", "value": "" }, { "code": "control_data", "value": "" }, { "code": "rhythm_mode", "value": "AAAAAAA=" }, { "code": "sleep_mode", "value": "AAA=" }, { "code": "wakeup_mode", "value": "AAA=" } ], "sub": false, "time_zone": "+01:00", "uid": "eu1668868496635zt9FX", "update_time": 1668868644, "uuid": "70114abd9a5ff86f" }, "bfd7abdc3a614b7647m6rz": { "active_time": 1668868516, "biz_type": 0, "category": "dj", "create_time": 1668868516, "icon": "smart/icon/bay1605268422699KhXq/948617d76d94dd0671f230e3e01a8a61.png", "id": "bfd7abdc3a614b7647m6rz", "ip": "79.241.250.78", "lat": "48.5698", "local_key": "145...6bf", "lon": "10.4140", "model": "ST64-SF-WIFILIC-TY-RGBW 4.9W", "name": "Filament TV Mitte ", "online": true, "owner_id": "71526931", "product_id": "dridviyxrbroyttp", "product_name": "", "status": [ { "code": "switch_led", "value": false }, { "code": "work_mode", "value": "white" }, { "code": "bright_value_v2", "value": 1000 }, { "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": "music_data", "value": "" }, { "code": "control_data", "value": "" }, { "code": "rhythm_mode", "value": "AAAAAAA=" }, { "code": "sleep_mode", "value": "AAA=" }, { "code": "wakeup_mode", "value": "AAA=" } ], "sub": false, "time_zone": "+01:00", "uid": "eu1668868496635zt9FX", "update_time": 1668868617, "uuid": "eafbd402f8380957" }, "bf3c79b5105731f62etrjh": { "active_time": 1668868524, "biz_type": 0, "category": "dj", "create_time": 1668868524, "icon": "smart/icon/bay1605268422699KhXq/948617d76d94dd0671f230e3e01a8a61.png", "id": "bf3c79b5105731f62etrjh", "ip": "79.241.250.78", "lat": "48.5698", "local_key": "6ab...eb7", "lon": "10.4140", "model": "ST64-SF-WIFILIC-TY-RGBW 4.9W", "name": "Filament TV links", "online": true, "owner_id": "71526931", "product_id": "dridviyxrbroyttp", "product_name": "", "status": [ { "code": "switch_led", "value": false }, { "code": "work_mode", "value": "white" }, { "code": "bright_value_v2", "value": 1000 }, { "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": "music_data", "value": "" }, { "code": "control_data", "value": "" }, { "code": "rhythm_mode", "value": "AAAAAAA=" }, { "code": "sleep_mode", "value": "AAA=" }, { "code": "wakeup_mode", "value": "AAA=" } ], "sub": false, "time_zone": "+01:00", "uid": "eu1668868496635zt9FX", "update_time": 1668868592, "uuid": "63c6565ea61822f3" } } } }

koger23 commented 1 year ago

I have the same problem in hassios. You can add your device if you define DPS manually, but in my case it does not work.

I tried several libraries to try to communicate with my LED controllers, but no success. It seems it returns encoded payload, which cannot be handled by any libs I tried.

This is returned by the example code: image

I also tried TuyaFacer and localtuya (which uses pytuya), but no break through.

There is an older thread for localtuya as well: https://github.com/rospogrigio/localtuya/issues/1044