make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.28k stars 505 forks source link

Request support for Deakon EVI DC Inverter Heat Pump #1794

Closed JackJackattack4 closed 2 months ago

JackJackattack4 commented 6 months ago

Log Message

2024-04-02 21:45:57.267 WARNING (MainThread) [custom_components.tuya_local.config_flow] Device matches poolex_silverline_heatpump with quality of 59%. DPS: {"updated_at": 1712108748.5954516, "1": true, "2": 45, "3": 41, "4": "hot", "5": "Hot", "13": 0, "103": "on", "104": "4", "105": 427, "106": "d04", "107": 5, "109": "32", "110": "15", "111": "16", "112": "16", "113": "30", "114": "30"}
2024-04-02 21:45:57.268 WARNING (MainThread) [custom_components.tuya_local.config_flow] Report this to https://github.com/make-all/tuya-local/issues/
2024-04-02 21:45:57.283 WARNING (MainThread) [homeassistant.components.automation.scan_chaud_inquirable_ids] scan chaud inquirable IDs: Already running
2024-04-02 21:45:57.284 WARNING (MainThread) [homeassistant.components.automation.scan_chaud_froid_inquirable_ids] scan chaud_froid inquirable IDs: Already running
2024-04-02 21:45:57.288 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities select.deakon_hp_chaud_inquire_id are missing or not currently available
2024-04-02 21:46:00.241 WARNING (MainThread) [homeassistant.components.automation.scan_chaud_inquirable_ids] scan chaud inquirable IDs: Already running
2024-04-02 21:46:00.297 WARNING (MainThread) [homeassistant.components.automation.scan_chaud_froid_inquirable_ids] scan chaud_froid inquirable IDs: Already running
2024-04-02 21:46:00.299 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities select.deakon_hp_chaud_inquire_id are missing or not currently available
2024-04-02 21:46:28.248 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities select.deakon_hp_chaud_inquire_id are missing or not currently available
2024-04-02 21:46:31.254 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities select.deakon_hp_chaud_inquire_id are missing or not currently available
2024-04-02 21:46:33.493 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop by custom integration 'tuya_local' at custom_components/tuya_local/device.py, line 77: self._api = tinytuya.Device(dev_id, address, local_key), please create a bug report at https://github.com/make-all/tuya-local/issues
2024-04-02 21:46:33.636 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.tuya_local.climate.TuyaLocalClimate'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please create a bug report at https://github.com/make-all/tuya-local/issues
2024-04-02 21:46:33.636 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.tuya_local.climate.TuyaLocalClimate'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please create a bug report at https://github.com/make-all/tuya-local/issues

Information about DPS mappings

{
  "result": {
    "model": "{\"modelId\":\"0000003jo6\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"\",\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"temp_set\",\"description\":\"\",\"name\":\"目标温度\",\"typeSpec\":{\"max\":60,\"min\":5,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":5,\"unit\":\"°C\"}},
{\"abilityId\":3,\"accessMode\":\"ro\",\"code\":\"temp_current\",\"description\":\"\",\"name\":\"当前温度\",\"typeSpec\":{\"max\":100,\"min\":-100,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-100,\"unit\":\"°C\"}},
{\"abilityId\":4,\"accessMode\":\"rw\",\"code\":\"mode\",\"description\":\"制热,制冷,热水,制热+热水,制冷+热水\",\"name\":\"工作模式\",\"typeSpec\":{\"range\":[\"hot\",\"cold\",\"hotwater\",\"hot_hotwater\",\"cold_hotwater\"],\"type\":\"enum\",\"typeDefaultValue\":\"hot\"}},
{\"abilityId\":5,\"accessMode\":\"rw\",\"code\":\"level\",\"description\":\"热水,制热,制冷,////不显示(NonDisplay)\",\"name\":\"设定温度类型\",\"typeSpec\":{\"range\":[\"HotWater\",\"Hot\",\"Cold\"],\"type\":\"enum\",\"typeDefaultValue\":\"HotWater\"}},
{\"abilityId\":13,\"accessMode\":\"ro\",\"code\":\"fault\",\"description\":\"传感器故障,系统故障,驱动故障等。根据产品实际功能进行设定。\",\"extensions\":{\"scope\":\"fault\"},\"name\":\"故障告警\",\"typeSpec\":{\"label\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\"],\"maxlen\":30,\"type\":\"bitmap\",\"typeDefaultValue\":0}},
{\"abilityId\":103,\"accessMode\":\"ro\",\"code\":\"run_status\",\"description\":\"开机,关机,除霜,防冻\",\"name\":\"运行状态\",\"typeSpec\":{\"range\":[\"on\",\"off\",\"defrost\",\"antifrozen\"],\"type\":\"enum\",\"typeDefaultValue\":\"on\"}},
{\"abilityId\":104,\"accessMode\":\"rw\",\"code\":\"Inquire_ID\",\"description\":\"查询的31的参数ID值\",\"name\":\"查询实时ID\",\"typeSpec\":{\"range\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"],\"type\":\"enum\",\"typeDefaultValue\":\"1\"}},
{\"abilityId\":105,\"accessMode\":\"ro\",\"code\":\"Inquire_Value\",\"description\":\"\",\"name\":\"查询实时值\",\"typeSpec\":{\"max\":16777215,\"min\":-100,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-100,\"unit\":\"\"}},
{\"abilityId\":106,\"accessMode\":\"rw\",\"code\":\"Set_ID\",\"description\":\"\",\"name\":\"设置参数ID\",\"typeSpec\":{\"range\":[\"d01\",\"d02\",\"d03\",\"d04\",\"d05\",\"d06\",\"d07\",\"d08\",\"d09\",\"d10\",\"d11\",\"d12\",\"d13\",\"d14\",\"d15\"],\"type\":\"enum\",\"typeDefaultValue\":\"d01\"}},
{\"abilityId\":107,\"accessMode\":\"rw\",\"code\":\"Set_Value\",\"description\":\"\",\"name\":\"设置参数值\",\"typeSpec\":{\"max\":999,\"min\":-100,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":-100,\"unit\":\"\"}},
{\"abilityId\":109,\"accessMode\":\"rw\",\"code\":\"Error_Code_Table\",\"description\":\"故障代码表(煤改电)\",\"name\":\"故障代码表\",\"typeSpec\":{\"range\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\",\"32\"],\"type\":\"enum\",\"typeDefaultValue\":\"1\"}},
{\"abilityId\":110,\"accessMode\":\"rw\",\"code\":\"Error_Code_Table2\",\"description\":\"故障代码表2(煤改电)\",\"name\":\"故障代码表2\",\"typeSpec\":{\"range\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\"],\"type\":\"enum\",\"typeDefaultValue\":\"1\"}},
{\"abilityId\":111,\"accessMode\":\"ro\",\"code\":\"Driver_Error_Code1\",\"description\":\"\",\"name\":\"驱动实时故障代码1\",\"typeSpec\":{\"range\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\"],\"type\":\"enum\",\"typeDefaultValue\":\"1\"}},
{\"abilityId\":112,\"accessMode\":\"ro\",\"code\":\"Driver_Error_Code2\",\"description\":\"\",\"name\":\"驱动实时故障代码2\",\"typeSpec\":{\"range\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\"],\"type\":\"enum\",\"typeDefaultValue\":\"1\"}},
{\"abilityId\":113,\"accessMode\":\"ro\",\"code\":\"Sen_Sys_ErrCode1\",\"description\":\"\",\"name\":\"传感、系统实时故障码1\",\"typeSpec\":{\"range\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"],\"type\":\"enum\",\"typeDefaultValue\":\"1\"}},
{\"abilityId\":114,\"accessMode\":\"ro\",\"code\":\"Sen_Sys_ErrCode2\",\"description\":\"\",\"name\":\"传感、系统实时故障码2\",\"typeSpec\":{\"range\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"],\"type\":\"enum\",\"typeDefaultValue\":\"1\"}}]}]}"
  },
  "success": true,
  "t": 1699816164111,
  "tid": "fdda8fe4818e11ee8610628db7d12265"
}

Product ID

I have two exactly identical devices and they do not have the same product ID One has the following ID: eb313fb004c523375cxgzw The other has this other ID: eb9a44bd30916d3150ftup

Information about how the device functions

See the 3 tabs in the excel file attached, Deakon Heatpump.xlsx

Also, please find a manual of the device attached, Manual A2 Pro-2(2.1).pdf

There is an element of challenge in supporting these devices: they are configured in such a way that some parameters and their values are separated in two DPIDs, have a look into the script of the device I created attached below, I added comments.

I have created and used successfully within a local version of Tuya-Local the following script under the already existing component named "Poolex_Silverline_heatpump" (I used this name because this is the only one I could pick from the drop-down menu when adding the Tuya device in Tuya-local).

EVI DC Inverter Heat Pump script.txt

make-all commented 6 months ago

The "product id" you have given appears to be the device id (unique per device), not the product id. Only the product id is of use to the integration, the device id is used to configure your specific device.

JackJackattack4 commented 6 months ago

You are right.

Here is the device ID : 02ek8thasvo40fmd

It is the same for both identical devices.

make-all commented 3 months ago

Similar to fisher_water_heatpump, in that it mixes heating and cooling with hot water functions. Although perfect support is not really possible without some special enhancements to cater specifically for this type of device, we can implement support of the climate functions assuming hot water is always on, and providing an extra select for full mode control if that assumption is not valid.

JackJackattack4 commented 3 months ago

In my case, hotwater is never on, but an extra select for full mode control is a good solution.