Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Ferroli titano twin water heater #1318

Merged
merged 11 commits into from
Nov 25, 2023

Conversation

zrcz180
Copy link
Contributor

@zrcz180 zrcz180 commented Nov 17, 2023

Added ferroli titano twin water heater

Log from tuya cloud to add this device:

{
"result": {
"active_time": 1699199144,
"category": "rs",
"create_time": 1662056486,
"custom_name": "",
"icon": "smart/icon/ay1559825824224fhsJk/d5341937f24e6c66cf211b17e0b918aa.png",
"id": "xxxxxxxxxxxxxxxxx",
"ip": "xxx.xxx.xxx.xxx",
"is_online": true,
"lat": "xx..xxxx",
"local_key": "local_key",
"lon": "x.xxxx",
"model": "",
"name": "DT EWH",
"product_id": "lci0ebsz7ftaruaf",
"product_name": "DT EWH",
"sub": false,
"time_zone": "+00:00",
"update_time": 1699199510,
"uuid": "uuid"
},
"success": true,
"t": 1699200652871,
"tid": "e49f8b057bf511ee95454a52bad04d54"
}

***** Parameters ************

{
"result": {
"properties": [
{
"code": "switch",
"custom_name": "",
"dp_id": 1,
"time": 1699201081794,
"value": true
},
{
"code": "mode",
"custom_name": "",
"dp_id": 2,
"time": 1699199150010,
"value": "manual"
},
{
"code": "disinfection",
"custom_name": "",
"dp_id": 4,
"time": 1699199150010,
"value": true
},
{
"code": "temp_set",
"custom_name": "",
"dp_id": 9,
"time": 1699199150010,
"value": 70
},
{
"code": "temp_current",
"custom_name": "",
"dp_id": 10,
"time": 1699201294437,
"value": 37
},
{
"code": "Fault",
"custom_name": "",
"dp_id": 101,
"time": 1699199150010,
"value": 0
},
{
"code": "WorkState",
"custom_name": "", "
dp_id": 102,
"time": 1699201081952,
"value": "Heating"
},
{
"code": "AntifreezeState",
"custom_name": "", "
dp_id": 103,
"time": 1699199150010,
"value": false
},
{
"code": "t_tar",
"custom_name": "",
"dp_id": 104,
"time": 1699199150010,
"value": 70
}
]
},
"success": true, "t": 1699201297475,
"tid": "64daa6247bf711eea27736b6a8027804"
}

work like the tuya cloud card

manual: ttps://www.ferroli.com/media/Manual_TITANO%20TWIN_Rev%2005_0922_EN%20ES%20PT%20RO%20IT%20FR_A5.pdf

@zrcz180 zrcz180 changed the title added Ferroli titano twin water heater add Ferroli titano twin water heater Nov 17, 2023
name: preset_mode
type: string
mapping:
- dps_val: eco
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no point to have a preset mode with only one option. It is essentially hardcoded.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Water heater does not have a preset_mode, so the mapping can be removed and hidden: true added in its place, as all control will be through operation_mode.

- id: lci0ebsz7ftaruaf
name: DT EWH
primary_entity:
entity: climate
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This device seems to be a water_heater rather than a climate device, and should probably use that entity instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In tuya cloud the device is recognized as a climate device. i try to make the same.
Screenshot 2023-11-19 160953
Upper image tuya cloud
Bottom image tuya-local

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The objective of this integration is not to accept the same limitations as the cloud tuya integration, but to provide the best integration of devices possible. Water heater clearly fits this device better than climate.

entity: climate
dps:
- id: 1
name: hvac_mode
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for water_heater, this should become operation_mode, and I suggest mapping manual to electric and eco to eco.

mapping:
- step: 5
unit: C
step: 5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The step: 5 belongs under mapping, so remove this one.

name: workstate
- id: 103
type: boolean
name: antifreeze
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For water_heater, this should be away_mode, with no mapping to strings.

value: "on"
- id: 104
type: integer
name: target_temperature
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last line should end with a newline.

value: "off"
- dps_val: true
value: "on"
- id: 104
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between this target_temperature and the temperature above?

@zrcz180
Copy link
Contributor Author

zrcz180 commented Nov 22, 2023

TODO
In the control temperature the + and - button increase/decrease 0.5C. i tried using:
mapping:

  • step: 5
    to increase/decrease 5C, but not working. is this function working in water-heater?

- entity: sensor
name: Working status
class: enum
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better as a binary_sensor with class "running", I think (mappings would then have to map to values true and false). Unless there are more than the two statuses mentioned in mappings (but the HA requirements for enum sensors are that the list of possible values is fixed and known).

icon: "mdi:water-boiler-off"
- entity: binary_sensor
name: Antifreeze
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Antifreeze is a chemical that you add to your radiator to reduce the freezing temperature. Normally a feature that turns the heat on to prevent freezing is called Anti-frost.

mapping:
- dps_val: true
icon: "mdi:snowflake-alert"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class: cold should take care of icons.

@make-all
Copy link
Owner

It seems the temperature step is missing from the underlying platform. There is a "precision" attribute, but that is for display, and previous experiments showed that it only accepts 0.1, 0.5 and 1.0 as values.

@zrcz180
Copy link
Contributor Author

zrcz180 commented Nov 24, 2023

Ferroli titano twin Query Things Data Model:

{
"result": { 
"model": "{\"modelId\":\"000001u7eb\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"mode\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"模式\",\"typeSpec\":{\"range\":[\"manual\",\"eco\"],\"type\":\"enum\",\"typeDefaultValue\":\"manual\"}},
{\"abilityId\":4,\"accessMode\":\"rw\",\"code\":\"disinfection\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"高温杀菌\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":9,\"accessMode\":\"rw\",\"code\":\"temp_set\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"温度设置\",\"typeSpec\":{\"max\":80,\"min\":40,\"scale\":0,\"step\":5,\"type\":\"value\",\"typeDefaultValue\":40,\"unit\":\"℃\"}},
{\"abilityId\":10,\"accessMode\":\"ro\",\"code\":\"temp_current\",\"description\":\"\",\"extensions\":{\"attribute\":\"128\"},\"name\":\"当前温度\",\"typeSpec\":{\"max\":99,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"℃\"}},
{\"abilityId\":101,\"accessMode\":\"ro\",\"code\":\"Fault\",\"description\":\"1 - E2干烧报警\\n2 - E3传感器故障报警\\n4 - E4超温报警\\n16-E6时钟RTC故障\",\"extensions\":{\"scope\":\"fault\"},\"name\":\"故障\",\"typeSpec\":{\"label\":[\"1\",\"2\",\"4\",\"16\"],\"maxlen\":4,\"type\":\"bitmap\",\"typeDefaultValue\":0}},
{\"abilityId\":102,\"accessMode\":\"ro\",\"code\":\"WorkState\",\"description\":\"\",\"name\":\"工作状态\",\"typeSpec\":{\"range\":[\"Standby\",\"Heating\"],\"type\":\"enum\",\"typeDefaultValue\":\"Standby\"}},
{\"abilityId\":103,\"accessMode\":\"ro\",\"code\":\"AntifreezeState\",\"description\":\"\",\"name\":\"防冻状态\",\"typeSpec\":{\"type\":\"bool\",\"typeDefaultValue\":false}},
{\"abilityId\":104,\"accessMode\":\"ro\",\"code\":\"t_tar\",\"description\":\"\",\"name\":\"目标温度\",\"typeSpec\":{\"max\":99,\"min\":0,\"scale\":0,\"step\":1,\"type\":\"value\",\"typeDefaultValue\":0,\"unit\":\"℃\"}}]}]}" }, "success": true, "t": 1700503966971, "tid": "685919bf87d011ee84348eb4ac57fb36" }  

@zrcz180
Copy link
Contributor Author

zrcz180 commented Nov 24, 2023

ferroli cards:

image
image

@make-all make-all self-assigned this Nov 25, 2023
- Move branding under products
- follow HA naming convention
- add mapping to string binary sensor to map to boolean
@make-all make-all merged commit 0de7e6e into make-all:main Nov 25, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants