make-all / tuya-local

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

Request support for [CNC YCB9ZF-100W Circuit Breaker] #1375

Closed tsaouste closed 10 months ago

tsaouste commented 11 months ago

Log Message

This error originated from a custom integration.

Logger: custom_components.tuya_local.device
Source: custom_components/tuya_local/device.py:546
Integration: Tuya Local (documentation, issues)
First occurred: December 2, 2023 at 18:30:19 (11 occurrences)
Last logged: December 2, 2023 at 18:33:39

Failed to fetch device status for Water Heater

Information about DPS mappings

{
  "result": {
    "model": "{\"modelId\":\"0000004l3t\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch_1\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-power\"},\"name\":\"开关1\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":22,\"accessMode\":\"ro\",\"code\":\"cur_voltage\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dianliang\"},\"name\":\"当前电压\",\"typeSpec\":{\"max\":5000,\"min\":0,\"scale\":1,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"V\"}},
{\"abilityId\":25,\"accessMode\":\"ro\",\"code\":\"voltage_coe\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-a_function_hs\"},\"name\":\"电压校准系数\",\"typeSpec\":{\"max\":1000000,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0}},
{\"abilityId\":101,\"accessMode\":\"ro\",\"code\":\"Event\",\"description\":\"合闸分闸事件表示\",\"name\":\"事件名称\",\"typeSpec\":{\"maxlen\":255,\"type\":\"string\",\"typeDefaultValue\":\"\"}},
{\"abilityId\":102,\"accessMode\":\"rw\",\"code\":\"GY_Per\",\"description\":\"\",\"name\":\"过压百分比\",\"typeSpec\":{\"max\":200,\"min\":110,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":110,\"unit\":\"%\"}},
{\"abilityId\":103,\"accessMode\":\"rw\",\"code\":\"QY_Per\",\"description\":\"\",\"name\":\"欠压百分比\",\"typeSpec\":{\"max\":90,\"min\":50,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":50,\"unit\":\"%\"}},
{\"abilityId\":104,\"accessMode\":\"rw\",\"code\":\"RateVol\",\"description\":\"\",\"name\":\"额定电压\",\"typeSpec\":{\"max\":300,\"min\":150,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":150,\"unit\":\"V\"}},
{\"abilityId\":105,\"accessMode\":\"rw\",\"code\":\"GY_Fuc\",\"description\":\"\",\"name\":\"过压功能\",\"typeSpec\":{\"range\":[\"Shut\",\"Alarm\",\"Trip\"],\"type\":\"enum\",\"typeDefaultValue\":\"Shut\"}},
{\"abilityId\":106,\"accessMode\":\"rw\",\"code\":\"QY_Fuc\",\"description\":\"\",\"name\":\"欠压功能\",\"typeSpec\":{\"range\":[\"Shut\",\"Alarm\",\"Trip\"],\"type\":\"enum\",\"typeDefaultValue\":\"Shut\"}},
{\"abilityId\":107,\"accessMode\":\"rw\",\"code\":\"GY_Time\",\"description\":\"\",\"name\":\"过压延时\",\"typeSpec\":{\"max\":10000,\"min\":100,\"scale\":0,\"step\":100,\"type\":\"value\",\"typeDefaultValue\":100,\"unit\":\"ms\"}},
{\"abilityId\":108,\"accessMode\":\"rw\",\"code\":\"QY_Time\",\"description\":\"\",\"name\":\"欠压延时\",\"typeSpec\":{\"max\":10,\"min\":1,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":1,\"unit\":\"s\"}},
{\"abilityId\":109,\"accessMode\":\"rw\",\"code\":\"AutoClose\",\"description\":\"\",\"name\":\"自动合闸\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":110,\"accessMode\":\"ro\",\"code\":\"Version\",\"description\":\"\",\"name\":\"固件版本\",\"typeSpec\":{\"maxlen\":255,\"type\":\"string\",\"typeDefaultValue\":\"\"}}]}]}"
  },
  "success": true,
  "t": 1701644863694,
  "tid": "c3cc4a2c923011ee82d73e55532a4cc5"
}

"dps": { "1": false, "22": 2369, "25": 230, "101": "The remote Open", "102": 110, "103": 80, "104": 230, "105": "Shut", "106": "Shut", "107": 1000, "108": 10, "109": false }

Product ID

bf3bfd4f38ceaa8fd5uaqf

Information about how the device functions

http://www.faens.cn/content/?35.html

The snapshot file from tinytuya gives the model FSZN03-100AP 2P which is the above link. A circuit breaker with voltage monitoring, time scheduling, over/under voltage protection with settings for the voltage limits, what actions to do, how much time to do the action

Screenshot_20231204-013549_Tuya_Smart Screenshot_20231204-013604_Tuya_Smart

make-all commented 10 months ago

Can you double check the product id. The value you supplied looks more like the format used for device id. The product id should be listed in the same iot.tuya.com result as you found your local key, either as product_id or productKey (depending which API function's results you are looking at).

Device id is unique to your device, so it does not make sense to include in the config file that goes out to everyone. Product id is common to all CNC YCB9ZF-100W circuit breakers with the same hardware and software revision.

tsaouste commented 10 months ago

I think you mean "bryydwbntbjkq8pk"

make-all commented 10 months ago

Yes, that looks more like a product id. Thanks.