make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.35k stars 521 forks source link

Request support for <USB LED Strip ZSNYLY> #2406

Closed MIRORSTAR closed 2 weeks ago

MIRORSTAR commented 2 weeks ago

Log message

2024-10-17 18:10:23.749 DEBUG (SyncWorker_44) [custom_components.tuya_local.device] Test refreshed device state: null
2024-10-17 18:10:23.750 DEBUG (MainThread) [custom_components.tuya_local.device] Retrying after exception <class 'TypeError'> argument of type 'NoneType' is not iterable (2/3)
2024-10-17 18:10:23.750 ERROR (MainThread) [custom_components.tuya_local.device] Failed to refresh device state for Test.
2024-10-17 18:10:23.750 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3
2024-10-17 18:10:27.427 DEBUG (MainThread) [custom_components.tuya_local.device] Refreshing device state for Test
2024-10-17 18:10:27.427 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3
2024-10-17 18:10:32.646 DEBUG (SyncWorker_50) [custom_components.tuya_local.device] Test refreshed device state: null
2024-10-17 18:10:32.647 DEBUG (MainThread) [custom_components.tuya_local.device] Retrying after exception <class 'TypeError'> argument of type 'NoneType' is not iterable (0/3)
2024-10-17 18:10:32.647 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3
2024-10-17 18:10:37.887 DEBUG (SyncWorker_1) [custom_components.tuya_local.device] Test refreshed device state: null
2024-10-17 18:10:37.888 DEBUG (MainThread) [custom_components.tuya_local.device] Retrying after exception <class 'TypeError'> argument of type 'NoneType' is not iterable (1/3)
2024-10-17 18:10:37.888 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3
2024-10-17 18:10:40.033 DEBUG (MainThread) [custom_components.tuya_local.device] Tuya Local smartplug received {"1": true, "9": 0, "18": 0, "19": 0, "20": 2348, "21": 1, "22": 650, "23": 31060, "24": 17955, "25": 1160, "full_poll": true}
2024-10-17 18:10:40.034 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['on', 'off', 'memory']
2024-10-17 18:10:40.035 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] option values: ['State', 'Position', 'Off', 'On']
2024-10-17 18:10:40.035 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for range of value
2024-10-17 18:10:40.036 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for range of value
2024-10-17 18:10:40.036 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Considering mapping for step of value
2024-10-17 18:10:40.036 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Step for value is 60 with scale 60
2024-10-17 18:10:40.036 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Advanced energy monitoring smartplug: Mapped dps 9 value from 0 to 0.0
2024-10-17 18:10:40.036 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Advanced energy monitoring smartplug: Mapped dps 9 value from 0 to 0.0
2024-10-17 18:10:40.037 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 17 (sensor), unable to determine valid values
2024-10-17 18:10:40.037 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] No mapping for dpid 18 (sensor), unable to determine valid values
2024-10-17 18:10:40.037 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Advanced energy monitoring smartplug: Mapped dps 19 value from 0 to 0.0
2024-10-17 18:10:40.037 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Advanced energy monitoring smartplug: Mapped dps 19 value from 0 to 0.0
2024-10-17 18:10:40.038 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] sensor values: []
2024-10-17 18:10:40.038 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Advanced energy monitoring smartplug: Mapped dps 20 value from 2348 to 234.8
2024-10-17 18:10:40.038 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Advanced energy monitoring smartplug: Mapped dps 20 value from 2348 to 234.8
2024-10-17 18:10:40.038 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] sensor values: []
2024-10-17 18:10:40.039 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Advanced energy monitoring smartplug: Mapped dps 26 value from None to False
2024-10-17 18:10:40.039 DEBUG (MainThread) [custom_components.tuya_local.helpers.device_config] Advanced energy monitoring smartplug: Mapped dps 26 value from None to False
2024-10-17 18:10:42.919 DEBUG (SyncWorker_39) [custom_components.tuya_local.device] Test refreshed device state: null
2024-10-17 18:10:42.921 DEBUG (MainThread) [custom_components.tuya_local.device] Retrying after exception <class 'TypeError'> argument of type 'NoneType' is not iterable (2/3)
2024-10-17 18:10:42.921 ERROR (MainThread) [custom_components.tuya_local.device] Failed to refresh device state for Test.
2024-10-17 18:10:42.921 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3

DPS information

{ "result": { "category": "dd", "functions": [ { "code": "switch_led", "desc": "{}", "name": "开关", "type": "Boolean", "values": "{}" }, { "code": "work_mode", "desc": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}", "name": "模式", "type": "Enum", "values": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}" }, { "code": "colour_data", "desc": "{\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}", "name": "彩光", "type": "Json", "values": "{\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}" }, { "code": "scene_data", "desc": "{\"scene_num\":{\"min\":1,\"scale\":0,\"max\":8,\"step\":1},\"scene_units\": {\"unit_change_mode\":{\"range\":[\"static\",\"jump\",\"gradient\"]},\"unit_switch_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"unit_gradient_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"bright\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"temperature\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}}", "name": "场景", "type": "Json", "values": "{\"scene_num\":{\"min\":1,\"scale\":0,\"max\":8,\"step\":1},\"scene_units\": {\"unit_change_mode\":{\"range\":[\"static\",\"jump\",\"gradient\"]},\"unit_switch_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"unit_gradient_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"bright\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"temperature\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}}" }, { "code": "countdown", "desc": "{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}", "name": "倒计时剩余时间", "type": "Integer", "values": "{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" }, { "code": "music_data", "desc": "{\"change_mode\":{\"range\":[\"direct\",\"gradient\"]}, \"bright\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"temperature\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}", "name": "音乐灯", "type": "Json", "values": "{\"change_mode\":{\"range\":[\"direct\",\"gradient\"]}, \"bright\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"temperature\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}" }, { "code": "control_data", "desc": "{\"change_mode\":{\"range\":[\"direct\",\"gradient\"]}, \"bright\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"temperature\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}", "name": "调节", "type": "Json", "values": "{\"change_mode\":{\"range\":[\"direct\",\"gradient\"]}, \"bright\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"temperature\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}, \"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":255,\"step\":1}}" } ], "status": [ { "code": "switch_led", "name": "开关", "type": "Boolean", "values": "{}" }, { "code": "work_mode", "name": "模式", "type": "Enum", "values": "{\"range\":[\"white\",\"colour\",\"scene\",\"music\"]}" }, { "code": "colour_data", "name": "彩光", "type": "Json", "values": "{\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}" }, { "code": "scene_data", "name": "场景", "type": "Json", "values": "{\"scene_num\":{\"min\":1,\"scale\":0,\"max\":8,\"step\":1},\"scene_units\": {\"unit_change_mode\":{\"range\":[\"static\",\"jump\",\"gradient\"]},\"unit_switch_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"unit_gradient_duration\":{\"min\":0,\"scale\":0,\"max\":100,\"step\":1},\"bright\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"temperature\":{\"min\":0,\"scale\":0,\"max\":1000,\"step\":1},\"h\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":360,\"step\":1},\"s\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1},\"v\":{\"min\":0,\"scale\":0,\"unit\":\"\",\"max\":1000,\"step\":1}}}" }, { "code": "countdown", "name": "倒计时剩余时间", "type": "Integer", "values": "{\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}" } ] }, "success": true, "t": 1729195159470, "tid": "4bb1c9cc8cc211efa275ae5eef09f401" }

{
  "result": {
    "active_time": 1729154144,
    "bind_space_id": "16295242",
    "category": "dd",
    "create_time": 1617021596,
    "custom_name": "",
    "icon": "smart/icon/001460162698766TR4v1/b073bca71412e99fb56b546001596ac3.png",
    "id": "bff058e8ec792a150feow2",
    "ip": "хххххх",
    "is_online": true,
    "lat": "47.15",
    "local_key": "-I(&[7TICq{&qzMz",
    "lon": "39.71",
    "model": "",
    "name": "Smart led Strip",
    "product_id": "c6jljbgx0duknniw",
    "product_name": "TC0315_TW03_STRIP3_IRRGB_P0",
    "sub": false,
    "time_zone": "+03:00",
    "update_time": 1729156017,
    "uuid": "83834163286dcd0d198c"
  },
  "success": true,
  "t": 1729177960200,
  "tid": "402b5be48c9a11efb000f6a6af395115"
}

Product ID

"product_id": "c6jljbgx0duknniw"

Product Name

"product_name": "TC0315_TW03_STRIP3_IRRGB_P0"

Information about how the device functions

https://sl.aliexpress.ru/p?key=SQkHrow

make-all commented 2 weeks ago

The log has failed to capture any communication with this device, so I am not sure it can work. Please send only the WARNING level message that contains the dps when you attempt to add it. DEBUG messages and messages from other devices are not needed.

MIRORSTAR commented 2 weeks ago

WARNING

2024-10-18 02:46:14.232 DEBUG (MainThread) [custom_components.tuya_local.config_flow] Device count: 2 2024-10-18 02:46:14.233 DEBUG (MainThread) [custom_components.tuya_local.config_flow] Hub count: 0 2024-10-18 02:46:18.919 DEBUG (MainThread) [custom_components.tuya_local.config_flow] Scanning network to get IP address for bff058e8ec792a150feow2. 2024-10-18 02:46:19.132 DEBUG (MainThread) [custom_components.tuya_local.config_flow] Found: {'ip': '192.168.0.176', 'version': '3.3', 'id': 'bff058e8ec792a150feow2', 'product_id': 'c6jljbgx0duknniw', 'data': {'ip': '192.168.0.176', 'gwId': 'bff058e8ec792a150feow2', 'active': 2, 'encrypt': True, 'productKey': 'c6jljbgx0duknniw', 'version': '3.3', 'name': '', 'key': '', 'mac': '', 'id': 'bff058e8ec792a150feow2', 'ability': 0, 'token': '', 'wf_cfg': '', 'dev_type': 'default', 'origin': 'broadcast'}}

2024-10-18 02:46:35.420 WARNING (SyncWorker_8) [custom_components.tuya_local.device] Test protocol error 904: Unexpected Payload from Device

make-all commented 2 weeks ago

It seems your device is not returning any data locally, which means it cannot be supported by this integration.

2024-10-17 18:10:32.647 INFO (MainThread) [custom_components.tuya_local.device] Setting protocol version for Test to 3.3
2024-10-17 18:10:37.887 DEBUG (SyncWorker_1) [custom_components.tuya_local.device] Test refreshed device state: null