make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.41k stars 542 forks source link

Request support for Eightree ET31 #2498

Closed sshaikh closed 1 week ago

sshaikh commented 1 week ago

Log message

2024-11-13 16:06:10.820 WARNING (SyncWorker_22) [custom_components.tuya_local.device] Test protocol error 904: Unexpected Payload from Device
2024-11-13 16:10:42.983 WARNING (SyncWorker_48) [custom_components.tuya_local.device] Test protocol error 914: Check device key or version

Product ID

cz Smart Plug

Product Name

Eightree ET31

DPS information

{
  "result": {
    "model": "{\"modelId\":\"ew6r5s\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch_1\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power2\",\"attribute\":\"641\"},\"name\":\"开关1\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":9,\"accessMode\":\"rw\",\"code\":\"countdown_1\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time2\",\"attribute\":\"736\"},\"name\":\"开关1倒计时\",\"typeSpec\":{\"type\":\"value\",\"max\":86400,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"s\"}},{\"abilityId\":17,\"accessMode\":\"ro\",\"code\":\"add_ele\",\"description\":\"\",\"extensions\":{\"attribute\":\"704\"},\"name\":\"增加电量\",\"typeSpec\":{\"type\":\"value\",\"max\":50000,\"min\":0,\"scale\":3,\"step\":100}},{\"abilityId\":18,\"accessMode\":\"ro\",\"code\":\"cur_current\",\"description\":\"\",\"extensions\":{\"attribute\":\"704\"},\"name\":\"当前电流\",\"typeSpec\":{\"type\":\"value\",\"max\":30000,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"mA\"}},{\"abilityId\":19,\"accessMode\":\"ro\",\"code\":\"cur_power\",\"description\":\"\",\"extensions\":{\"attribute\":\"704\"},\"name\":\"当前功率\",\"typeSpec\":{\"type\":\"value\",\"max\":80000,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"W\"}},{\"abilityId\":20,\"accessMode\":\"ro\",\"code\":\"cur_voltage\",\"description\":\"\",\"extensions\":{\"attribute\":\"704\"},\"name\":\"当前电压\",\"typeSpec\":{\"type\":\"value\",\"max\":5000,\"min\":0,\"scale\":1,\"step\":1,\"unit\":\"V\"}},{\"abilityId\":21,\"accessMode\":\"ro\",\"code\":\"test_bit\",\"description\":\"\",\"extensions\":{\"attribute\":\"736\"},\"name\":\"产测结果位\",\"typeSpec\":{\"type\":\"value\",\"max\":5,\"min\":0,\"scale\":0,\"step\":1}},{\"abilityId\":22,\"accessMode\":\"ro\",\"code\":\"voltage_coe\",\"description\":\"\",\"extensions\":{\"attribute\":\"736\"},\"name\":\"电压校准系数\",\"typeSpec\":{\"type\":\"value\",\"max\":1000000,\"min\":0,\"scale\":0,\"step\":1}},{\"abilityId\":23,\"accessMode\":\"ro\",\"code\":\"electric_coe\",\"description\":\"\",\"extensions\":{\"attribute\":\"736\"},\"name\":\"电流校准系数\",\"typeSpec\":{\"type\":\"value\",\"max\":1000000,\"min\":0,\"scale\":0,\"step\":1}},{\"abilityId\":24,\"accessMode\":\"ro\",\"code\":\"power_coe\",\"description\":\"\",\"extensions\":{\"attribute\":\"736\"},\"name\":\"功率校准系数\",\"typeSpec\":{\"type\":\"value\",\"max\":1000000,\"min\":0,\"scale\":0,\"step\":1}},{\"abilityId\":25,\"accessMode\":\"ro\",\"code\":\"electricity_coe\",\"description\":\"\",\"extensions\":{\"attribute\":\"736\"},\"name\":\"电量校准系数\",\"typeSpec\":{\"type\":\"value\",\"max\":1000000,\"min\":0,\"scale\":0,\"step\":1}},{\"abilityId\":26,\"accessMode\":\"ro\",\"code\":\"fault\",\"description\":\"\",\"extensions\":{\"attribute\":\"640\"},\"name\":\"故障告警\",\"typeSpec\":{\"type\":\"bitmap\",\"label\":[\"ov_cr\",\"ov_vol\",\"ov_pwr\",\"ls_cr\",\"ls_vol\",\"ls_pow\"],\"maxlen\":6}},{\"abilityId\":38,\"accessMode\":\"rw\",\"code\":\"relay_status\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-zhuangtai\",\"attribute\":\"736\"},\"name\":\"上电状态设置\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"off\",\"on\",\"memory\"]}},{\"abilityId\":39,\"accessMode\":\"rw\",\"code\":\"overcharge_switch\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"过充保护\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":40,\"accessMode\":\"rw\",\"code\":\"light_mode\",\"description\":\"\",\"extensions\":{\"iconName\":\"tcl_function_light\",\"attribute\":\"224\"},\"name\":\"指示灯状态设置\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"relay\",\"pos\",\"none\",\"on\"]}},{\"abilityId\":41,\"accessMode\":\"rw\",\"code\":\"child_lock\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power2\",\"attribute\":\"128\"},\"name\":\"童锁开关\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":42,\"accessMode\":\"rw\",\"code\":\"cycle_time\",\"description\":\"涂鸦协议\",\"extensions\":{\"iconName\":\"icon-dp_time3\",\"attribute\":\"224\"},\"name\":\"循环定时\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},{\"abilityId\":43,\"accessMode\":\"rw\",\"code\":\"random_time\",\"description\":\"涂鸦协议\",\"extensions\":{\"iconName\":\"icon-dp_time2\",\"attribute\":\"224\"},\"name\":\"随机定时\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}},{\"abilityId\":44,\"accessMode\":\"rw\",\"code\":\"switch_inching\",\"description\":\"涂鸦协议\",\"extensions\":{\"attribute\":\"224\"},\"name\":\"点动开关\",\"typeSpec\":{\"type\":\"string\",\"maxlen\":255}}]}]}"
  },
  "success": true,
  "t": 1731514775240,
  "tid": "127ca03ea1db11ef8851a6e2b97567ba"
}

Information about how the device functions

Is a UK smart socket with energy monitoring: https://www.amazon.co.uk/dp/B0B712GY64.

From Tuya it has:

Table of Instructions
  switch_1
  countdown_1
  add_ele
  cur_current
  cur_power
  cur_voltage
  relay_status
  overcharge_switch
  light_mode
  child_lock
  cycle_time
  random_time
  switch_inching

Apologies I can't seem to find the product index or type and there are no DPS in the logs.

sshaikh commented 1 week ago

Was there something I did incorrectly?

make-all commented 1 week ago

You did not report any log message containing dps, so there is no indication that any change is needed to support this device.

sshaikh commented 1 week ago

I tried all protocols and none of them responded with DPs. All responded with one or both of the errors in the OP.

Is there something particular I should do to generate the DPs?