make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.42k stars 544 forks source link

Request support for GHome Smart Ceiling Fan Light Switch SW19 #2466

Closed KyleStilkey closed 2 days ago

KyleStilkey commented 2 weeks ago

Log message

This error originated from a custom integration.

Logger: custom_components.tuya_local.config_flow
Source: custom_components/tuya_local/config_flow.py:485
integration: Tuya Local (documentation, issues)
First occurred: 4:12:56 PM (2 occurrences)
Last logged: 4:18:41 PM

Device matches treatlife_ds02_fan with quality of 38%. DPS: {"updated_at": 1730841171.467292, "1": false, "2": 0, "3": "level_4", "5": true, "6": 1000, "7": 0, "11": "memory", "12": "relay"}
Device matches treatlife_ds02_fan with quality of 38%. DPS: {"updated_at": 1730841517.0116332, "1": false, "2": 0, "3": "level_4", "5": true, "6": 1000, "7": 0, "11": "memory", "12": "relay"}

Product ID

j11gop7l2l3sblc2

Product Name

SW19

DPS information

{
  "result": {
    "model": "{\"modelId\":\"fhsxig\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch_fan\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power\",\"attribute\":\"1669\"},\"name\":\"风扇开关\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"countdown_fan\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time2\",\"attribute\":\"1152\"},\"name\":\"风扇倒计时\",\"typeSpec\":{\"type\":\"value\",\"max\":86400,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"s\"}},
{\"abilityId\":3,\"accessMode\":\"rw\",\"code\":\"fan_speed_enum\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-FanSpeed\",\"attribute\":\"1152\"},\"name\":\"风速\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"level_1\",\"level_2\",\"level_3\",\"level_4\"]}},
{\"abilityId\":5,\"accessMode\":\"rw\",\"code\":\"switch_led\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power\",\"attribute\":\"1157\"},\"name\":\"风扇灯开关\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":6,\"accessMode\":\"rw\",\"code\":\"bright_value\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_half\",\"attribute\":\"1152\"},\"name\":\"亮度值\",\"typeSpec\":{\"type\":\"value\",\"max\":1000,\"min\":10,\"scale\":0,\"step\":1,\"unit\":\"\"}},
{\"abilityId\":7,\"accessMode\":\"rw\",\"code\":\"countdown_1\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time2\",\"attribute\":\"1152\"},\"name\":\"风扇灯倒计时\",\"typeSpec\":{\"type\":\"value\",\"max\":86400,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"s\"}},
{\"abilityId\":11,\"accessMode\":\"rw\",\"code\":\"relay_status\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_circle\",\"attribute\":\"1152\"},\"name\":\"上电状态设置\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"off\",\"on\",\"memory\"]}},
{\"abilityId\":12,\"accessMode\":\"rw\",\"code\":\"light_mode\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-deng\",\"attribute\":\"1152\"},\"name\":\"指示灯状态设置\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"none\",\"relay\",\"pos\"]}},
{\"abilityId\":101,\"accessMode\":\"ro\",\"code\":\"over_temp\",\"description\":\"\",\"extensions\":{\"scope\":\"fault\"},\"name\":\"过温保护\",\"typeSpec\":{\"type\":\"bitmap\",\"label\":[\"nomal\",\"over_temp\"],\"maxlen\":2}}]}]}"
  },
  "success": true,
  "t": 1730856937719,
  "tid": "6cbf4e019bdf11efaac65eda0d325064"
}
`{"1":"Fan switch","2":"Fan countdown","3":"Fan speed","5":"Fan light switch","6":"Brightness value","7":"Fan light countdown","11":"Power-on state setting","12":"Indicator status setting","101":"Overtemperature warning"}`

Information about how the device functions

Works very similar to the DS02 it tries to use, but the DSO2 doesn't function right with this, I can only turn the fan off and on, I can't control anything else.

I also am not 100% sure if the DPS Information is correct but i followed the steps provided zigbee2mqtt and that's all that came back in the command console after hovering over each DP ID.

If the info is wrong, please let me know how I can fix this for you and help get support for this device added. Thanks!

make-all commented 2 weeks ago

The dps information is insufficient to make a config. Ranges or lists of possible values are needed for all dps that are not read-only. Any dps not appearing in the log will need type information also.

If you have access to iot.tuya.com, then the best detail is from the "Query Things Data Model" result (under DeviceControl in the API Explorer)

KyleStilkey commented 2 weeks ago
{
  "result": {
    "model": "{\"modelId\":\"fhsxig\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch_fan\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power\",\"attribute\":\"1669\"},\"name\":\"风扇开关\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"countdown_fan\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time2\",\"attribute\":\"1152\"},\"name\":\"风扇倒计时\",\"typeSpec\":{\"type\":\"value\",\"max\":86400,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"s\"}},{\"abilityId\":3,\"accessMode\":\"rw\",\"code\":\"fan_speed_enum\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-FanSpeed\",\"attribute\":\"1152\"},\"name\":\"风速\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"level_1\",\"level_2\",\"level_3\",\"level_4\"]}},{\"abilityId\":5,\"accessMode\":\"rw\",\"code\":\"switch_led\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power\",\"attribute\":\"1157\"},\"name\":\"风扇灯开关\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":6,\"accessMode\":\"rw\",\"code\":\"bright_value\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_half\",\"attribute\":\"1152\"},\"name\":\"亮度值\",\"typeSpec\":{\"type\":\"value\",\"max\":1000,\"min\":10,\"scale\":0,\"step\":1,\"unit\":\"\"}},{\"abilityId\":7,\"accessMode\":\"rw\",\"code\":\"countdown_1\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time2\",\"attribute\":\"1152\"},\"name\":\"风扇灯倒计时\",\"typeSpec\":{\"type\":\"value\",\"max\":86400,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"s\"}},{\"abilityId\":11,\"accessMode\":\"rw\",\"code\":\"relay_status\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_circle\",\"attribute\":\"1152\"},\"name\":\"上电状态设置\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"off\",\"on\",\"memory\"]}},{\"abilityId\":12,\"accessMode\":\"rw\",\"code\":\"light_mode\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-deng\",\"attribute\":\"1152\"},\"name\":\"指示灯状态设置\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"none\",\"relay\",\"pos\"]}},{\"abilityId\":101,\"accessMode\":\"ro\",\"code\":\"over_temp\",\"description\":\"\",\"extensions\":{\"scope\":\"fault\"},\"name\":\"过温保护\",\"typeSpec\":{\"type\":\"bitmap\",\"label\":[\"nomal\",\"over_temp\"],\"maxlen\":2}}]}]}"
  },
  "success": true,
  "t": 1730856937719,
  "tid": "6cbf4e019bdf11efaac65eda0d325064"
}

This is my result from iot.tuya.com, hope this provides enough details.