make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.3k stars 512 forks source link

Request support for Mellerware Comfy Wifi Mediuam #1506

Closed madmalkav closed 8 months ago

madmalkav commented 9 months ago

Log Message

Log message is pretty small:

2024-01-10 18:50:46.477 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches arlec_panel_heater_v2 with quality of 60%. DPS: {"updated_at": 1704909044.8330848, "1": true, "2": 24, "3": 16, "4": "CF", "7": true, "11": "working", "19": "cancel", "20": 0, "104": false, "105": false}

I add tinytuya output, that is far more complete:

"product_id": "5jidkruwamydvcfk" ``` { "name": "COMFY", "id": "", "key": "", "mac": "", "uuid": "", "sn": "", "category": "qn", "product_name": "COMFY", "product_id": "5jidkruwamydvcfk", "biz_type": 18, "model": "Comfy", "sub": false, "icon": "https://images.tuyaeu.com/smart/icon/ay15542765875241gQX6/a303e84bc107a1c77770ae005e2b6a21.jpg", "mapping": { "1": { "code": "switch", "type": "Boolean", "values": {} }, "2": { "code": "temp_set", "type": "Integer", "values": { "unit": "\u00b0C", "min": 1, "max": 35, "scale": 0, "step": 1 } }, "3": { "code": "temp_current", "type": "Integer", "values": { "unit": "\u00b0C", "min": -20, "max": 50, "scale": 0, "step": 1 } }, "7": { "code": "lock", "type": "Boolean", "values": {} }, "19": { "code": "countdown_set", "type": "Enum", "values": { "range": [ "cancel", "1h", "2h", "3h", "4h", "5h", "6h" ] } }, "20": { "code": "countdown_left", "type": "Integer", "values": { "unit": "min", "min": 0, "max": 1440, "scale": 0, "step": 1 } } }, "ip": "192.168.1.62", "version": "3.4" } ```

Information about DPS mappings

{
  "result": {
    "model": "{\"modelId\":\"0000039krf\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power2\"},\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"temp_set\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-set\"},\"name\":\"目标温度\",\"typeSpec\":{\"max\":35,\"min\":1,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":1,\"unit\":\"℃\"}},
{\"abilityId\":3,\"accessMode\":\"ro\",\"code\":\"temp_current\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_c\"},\"name\":\"当前温度\",\"typeSpec\":{\"max\":50,\"min\":-20,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-20,\"unit\":\"℃\"}},
{\"abilityId\":4,\"accessMode\":\"rw\",\"code\":\"mode\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_mode\"},\"name\":\"工作模式\",\"typeSpec\":{\"range\":[\"CF\",\"EC\",\"P1\",\"P2\",\"P3\",\"AF\",\"ST\"],\"type\":\"enum\",\"typeDefaultValue\":\"CF\"}},
{\"abilityId\":7,\"accessMode\":\"rw\",\"code\":\"child_lock\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power2\"},\"name\":\"童锁\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":11,\"accessMode\":\"ro\",\"code\":\"work_state\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-zhuangtai\",\"attribute\":\"128\"},\"name\":\"工作状态\",\"typeSpec\":{\"range\":[\"working\",\"standby\"],\"type\":\"enum\",\"typeDefaultValue\":\"working\"}},
{\"abilityId\":19,\"accessMode\":\"rw\",\"code\":\"countdown_set\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time2\"},\"name\":\"倒计时\",\"typeSpec\":{\"range\":[\"cancel\",\"1h\",\"2h\",\"3h\",\"4h\",\"5h\",\"6h\",\"7h\",\"8h\",\"9h\",\"10h\",\"11h\",\"12h\",\"13h\",\"14h\",\"15h\",\"16h\",\"17h\",\"18h\",\"19h\",\"20h\",\"21h\",\"22h\",\"23h\",\"24h\"],\"type\":\"enum\",\"typeDefaultValue\":\"cancel\"}},
{\"abilityId\":20,\"accessMode\":\"ro\",\"code\":\"countdown_left\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time2\"},\"name\":\"倒计时剩余时间\",\"typeSpec\":{\"max\":1440,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"min\"}},
{\"abilityId\":21,\"accessMode\":\"ro\",\"code\":\"fault\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-baojing\",\"attribute\":\"128\"},\"name\":\"故障告警\",\"typeSpec\":{\"label\":[\"motor_fault\"],\"maxlen\":1,\"type\":\"bitmap\",\"typeDefaultValue\":0}},
{\"abilityId\":26,\"accessMode\":\"rw\",\"code\":\"week_program9\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-zhouchengxu\",\"attribute\":\"1152\"},\"name\":\"周程序(开关)\",\"typeSpec\":{\"maxlen\":128,\"type\":\"raw\"}},
{\"abilityId\":103,\"accessMode\":\"wr\",\"code\":\"night_mode\",\"description\":\"\",\"name\":\"夜间模式\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":104,\"accessMode\":\"rw\",\"code\":\"window_check\",\"description\":\"\",\"name\":\"开窗检测开关\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":105,\"accessMode\":\"ro\",\"code\":\"window_reminder\",\"description\":\"\",\"name\":\"开窗提醒\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":106,\"accessMode\":\"rw\",\"code\":\"temp_calibration\",\"description\":\"\",\"name\":\"温度校准\",\"typeSpec\":{\"max\":40,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"℃\"}}]}]}"
  },
  "success": true,
  "t": 1704910005190,
  "tid": "03c2f603afe311eeb846e2ba4cc47aff"
}

Product ID

{
  "result": [
    {
      "active_time": 1704907211,
      "bind_space_id": "",
      "category": "qn",
      "create_time": 1702489176,
      "custom_name": "",
      "icon": "smart/icon/ay15542765875241gQX6/a303e84bc107a1c77770ae005e2b6a21.jpg",
      "id": "",
      "ip": "",
      "is_online": true,
      "lat": "",
      "local_key": "",
      "lon": "",
      "model": "Comfy",
      "name": "COMFY",
      "product_id": "5jidkruwamydvcfk",
      "product_name": "Comfy",
      "sub": false,
      "time_zone": "+01:00",
      "update_time": 1704907844,
      "uuid": ""
    }
  ],
  "success": true,
  "t": 1704910061843,
  "tid": ""
}

Information about how the device functions

Thermal Emitter. There are three sizes, dunno if the configuration would be the same for all, I have only the medium one.

https://mellerware.com/en/products/emisor-termico-comfy-wifi-medium

madmalkav commented 4 months ago

Sorry for not giving any signs of live since January. I have just installed Main branch of the plugin on Home Assistant and trying to add the device, but the options I get are the following ones:

image

make-all commented 4 months ago

I will need the log message (as at the top of the page) to debug this. The previous log message is a perfect match for the mellerware config, but it is not unusual for Tuya devices to be inconsistent about reporting dps.

madmalkav commented 4 months ago

It worked ok now ...

Device matches mellerware_comfy_radiator with quality of 100%. DPS: {"updated_at": 1716617368.6474848, "1": false, "2": 25, "3": 20, "4": "CF", "7": false, "11": "standby", "19": "cancel", "20": 0, "104": true, "105": false}

I no longer have the log entry from yesterday (restarted HA several times for things unrelated to this).