Closed VladimirTuzovGitHub closed 1 month ago
I was given access to the iot platform, I receive all the necessary DPS information. { "result": [ { "active_time": 1722859507, "bind_space_id": "52420419", "category": "bgl", "create_time": 1722859507, "custom_name": "Kiturami Gas Boiler", "icon": "smart/icon/bay16046358257045vsD/2a13de58e223ef21a334b105861e1c09.png", "id": "bfc6d1959b288a680ak5ga", "ip": "188.124.234.", "is_online": true, "lat": "49.82", "local_key": "wd#IB0w.BL60LBV", "lon": "73.12", "model": "NCTR-100WR", "name": "Котел", "product_id": "7vjtrn5888247ol8", "product_name": "Kiturami Russia", "sub": false, "time_zone": "+05:00", "update_time": 1727547586, "uuid": "b7a5903214f0ffd4" } ], "success": true, "t": 1727550245265, "tid": "6e7056737dcc11efb77736033862a1ba" }
{ "result": { "category": "bgl", "functions": [ { "code": "switch", "desc": "{}", "name": "开关", "type": "Boolean", "values": "{}" }, { "code": "dhw_temp_set", "desc": "{\"unit\":\"℃\",\"min\":35,\"max\":60,\"scale\":0,\"step\":1}", "name": "生活用水温度设置", "type": "Integer", "values": "{\"unit\":\"℃\",\"min\":35,\"max\":60,\"scale\":0,\"step\":1}" }, { "code": "temp_set", "desc": "{\"unit\":\"℃\",\"min\":10,\"max\":45,\"scale\":0,\"step\":1}", "name": "供暖温度设置", "type": "Integer", "values": "{\"unit\":\"℃\",\"min\":10,\"max\":45,\"scale\":0,\"step\":1}" } ], "status": [ { "code": "switch", "name": "开关", "type": "Boolean", "values": "{}" }, { "code": "dhw_temp_set", "name": "生活用水温度设置", "type": "Integer", "values": "{\"unit\":\"℃\",\"min\":35,\"max\":60,\"scale\":0,\"step\":1}" }, { "code": "temp_set", "name": "供暖温度设置", "type": "Integer", "values": "{\"unit\":\"℃\",\"min\":10,\"max\":45,\"scale\":0,\"step\":1}" }, { "code": "temp_current", "name": "当前供暖温度", "type": "Integer", "values": "{\"unit\":\"℃\",\"min\":0,\"max\":60,\"scale\":0,\"step\":1}" } ] }, "success": true, "t": 1727550221300, "tid": "602d461c7dcc11ef88b02ac421ecbce6" }
{ "result": { "category": "bgl", "functions": [ { "code": "switch", "desc": "switch", "name": "switch", "type": "Boolean", "values": "{}" }, { "code": "dhw_temp_set", "desc": "dhw temp set", "name": "dhw temp set", "type": "Integer", "values": "{\"unit\":\"℃\",\"min\":35,\"max\":60,\"scale\":0,\"step\":1}" }, { "code": "temp_set", "desc": "temp set", "name": "temp set", "type": "Integer", "values": "{\"unit\":\"℃\",\"min\":10,\"max\":45,\"scale\":0,\"step\":1}" } ] }, "success": true, "t": 1727550232778, "tid": "66fac14e7dcc11ef88b02ac421ecbce6" }
{ "result": [ { "id": "bfc6d1959b288a680ak5ga", "status": [ { "code": "switch", "value": true }, { "code": "dhw_temp_set", "value": 60 }, { "code": "temp_set", "value": 21 }, { "code": "temp_current", "value": 22 } ] } ], "success": true, "t": 1727550239383, "tid": "6af984087dcc11ef88b02ac421ecbce6" }
@make-all What other information do I need to provide?
QueryThingsDataModel: { "result": { "model": "{\"modelId\":\"0000036qoe\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power2\",\"attribute\":\"1664\"},\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\"}},{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"mode\",\"description\":\"기능\",\"extensions\":{\"iconName\":\"icon-dp_mode\",\"attribute\":\"1152\"},\"name\":\"Mode\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"Interior\",\"Reservation\",\"OutGoing\",\"Bath\",\"Summer\",\"OnDol\"]}},{\"abilityId\":3,\"accessMode\":\"rw\",\"code\":\"dhw_temp_set\",\"description\":\"온수설정온도\",\"extensions\":{\"attribute\":\"1152\"},\"name\":\"DHW Set Temp.\",\"typeSpec\":{\"type\":\"value\",\"max\":60,\"min\":35,\"scale\":0,\"step\":1,\"unit\":\"℃\"}},{\"abilityId\":5,\"accessMode\":\"rw\",\"code\":\"temp_set\",\"description\":\"실내온도설정\",\"extensions\":{\"iconName\":\"icon-set\",\"attribute\":\"1152\"},\"name\":\"Room Set Temp.\",\"typeSpec\":{\"type\":\"value\",\"max\":45,\"min\":10,\"scale\":0,\"step\":1,\"unit\":\"℃\"}},{\"abilityId\":6,\"accessMode\":\"ro\",\"code\":\"temp_current\",\"description\":\"실내현재온도\",\"extensions\":{\"iconName\":\"icon-dp_c\",\"attribute\":\"1152\"},\"name\":\"Room Current Temp.\",\"typeSpec\":{\"type\":\"value\",\"max\":60,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"℃\"}},{\"abilityId\":20,\"accessMode\":\"ro\",\"code\":\"fault\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-baojing\",\"scope\":\"fault\",\"attribute\":\"1152\"},\"name\":\"Fault\",\"typeSpec\":{\"type\":\"bitmap\",\"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}},{\"abilityId\":101,\"accessMode\":\"rw\",\"code\":\"CH_OP_TIME\",\"description\":\"예약 가동시간\",\"name\":\"CH_Operating Time\",\"typeSpec\":{\"type\":\"value\",\"max\":90,\"min\":10,\"scale\":0,\"step\":5,\"unit\":\"Minute\"}},{\"abilityId\":102,\"accessMode\":\"rw\",\"code\":\"CH_STOP_TIME\",\"description\":\"\",\"name\":\"CH_Stop Time\",\"typeSpec\":{\"type\":\"value\",\"max\":19,\"min\":1,\"scale\":0,\"step\":1,\"unit\":\"Hour\"}},{\"abilityId\":103,\"accessMode\":\"rw\",\"code\":\"CH_SET_TEMP\",\"description\":\"난방수온설정온도\",\"name\":\"CH Set Temp.\",\"typeSpec\":{\"type\":\"value\",\"max\":85,\"min\":45,\"scale\":0,\"step\":1,\"unit\":\"℃\"}},{\"abilityId\":104,\"accessMode\":\"ro\",\"code\":\"currenterror\",\"description\":\"\",\"name\":\"Current Error\",\"typeSpec\":{\"type\":\"value\",\"max\":255,\"min\":0,\"scale\":0,\"step\":1,\"unit\":\"\"}}]}]}" }, "success": true, "t": 1727621781743, "tid": "fd835f557e7211efb77736033862a1ba" }
@make-all Hello! I don't quite understand the "stalled" status. Perhaps you need some more information about this device?
I was a bit unsure how to proceed, because all the info I could find was only in Russian. But now I found some info in Korean for NCTR-100WA and NCTR-100WF, which appear to be the same device with only language differences, so I will keep looking for English models, or at least cross reference translations if there is any unclear points.
I figured out that the "OnDol" that appears in the modes is Korean for underfloor heating, which helped figure out how the modes are mapped ("OutGoing" must then be the "away" mode that switches it to anti-freeze)
@make-all Hello! Yes, that's right, this is Korean production and my model for the CIS countries for the Russian-speaking population. I think this thermostat has a lot of functions since it connects to many boilers with different functions that it must take into account in control. And yes, the boiler has an anti-freeze function and control of the underfloor heating circuit. Kiturami gas boilers have many functions that this room thermostat can control and perhaps you also need to look at the boiler functions in the English manuals (they are available in the global search) to understand what functions the thermostat can perform. If I can help you with anything, write and I will try to do everything necessary.
@make-all Hello! I copied ustom_components/tuya_local/devices /kiturami_nctr100_thermostat.yaml for testing. And I noticed inconsistencies in the thermostat functions and insufficient settings in your integration, I realized that it was difficult for you to do this without sufficient information and instructions for this device. I tried to prepare the necessary description of the thermostat functions in English, so that it would be easier for you to understand them. If you have any questions, please ask me, I will try to give you more detailed information. Description of functions eng.xlsx
This is a complete and detailed manual for the NCTR-100WR thermostat in Russian. I couldn't find it in English, but you can use Google Translate. NCTR 100WR.pdf
I made some tweaks. Note, to access all the functions you need to use the operation mode of the water_heater entity, as the climate's hvac_mode only supports a fixed list of options, which only heat (Interior, OnDol), auto (Reservation) and off (Summer, Bath, whole device off) fit. Turning the climate entity off sets it to Bath, as most likely you want to leave the DHW on. Turning it to heat sets it to Interior, as that is the most close fit to climate entity (where temperature and current temperature are expected to converge), Other options need to be set from the water_heater where all the options are listed.
@make-all I tested the configuration and all its functions. And I came to the conclusion that water_heater is not needed at all and that it is necessary to implement the modes through the list selection in the settings. So I dared to correct your configuration as it should be. select the operating modes in the list of the settings column and also set the DHW temperature there. Otherwise, everything is fine. After good and thorough testing, I suggest using my correction as the final configuration.
name: Thermostat
products:
- id: 7vjtrn5888247ol8
name: Kiturami NCTR100WR
primary_entity:
entity: climate
translation_key: thermostat
dps:
- id: 2
type: string
name: hvac_mode
mapping:
- dps_val: Reservation
value: auto
- dps_val: OnDol
value: heat
hidden: true
- dps_val: Interior
value: heat
- dps_val: Bath
value: "off"
- dps_val: Summer
value: "off"
hidden: true
- dps_val: OutGoing
value: "off"
hidden: true
- id: 103
type: integer
name: temperature
range:
min: 45
max: 85
unit: C
mapping:
- constraint: hvac_mode
conditions:
- dps_val: Interior
value_redirect: room_temperature
range:
min: 10
max: 45
- id: 6
type: integer
name: current_temperature
- id: 103
type: integer
name: water_temperature
range:
min: 45
max: 85
- id: 5
type: integer
name: room_temperature
secondary_entities:
- entity: select
name: Operating mode
category: config
dps:
- id: 2
type: string
name: option
mapping:
- dps_val: Interior
value: Room air temp
- dps_val: OnDol
value: Coolant temp
- dps_val: Reservation
value: Timer
- dps_val: OutGoing
value: Absence
- dps_val: Summer
value: DHW supply
- dps_val: Bath
value: DHW priority
- entity: number
class: temperature
name: DHW temp set
category: config
dps:
- id: 3
type: integer
name: value
unit: C
class: measurement
range:
min: 35
max: 60
- entity: binary_sensor
class: problem
category: diagnostic
dps:
- id: 20
type: bitfield
name: sensor
mapping:
- dps_val: 0
value: false
- value: true
- id: 20
type: bitfield
name: fault_code
- id: 104
type: integer
name: current_error
- entity: number
name: Turn-on timer
category: config
translation_key: timer
dps:
- id: 101
type: integer
name: value
unit: min
range:
min: 20
max: 90
- entity: number
name: Turn-off timer
category: config
translation_key: timer
dps:
- id: 102
type: integer
name: value
unit: h
range:
min: 1
max: 19
- entity: sensor
class: temperature
name: Temp current
category: diagnostic
dps:
- id: 6
type: integer
name: sensor
unit: C
class: measurement
- entity: sensor
class: temperature
name: CH temp current
category: diagnostic
dps:
- id: 103
type: integer
name: sensor
unit: C
class: measurement
I really like this!
Hello! I have found problems with the operation of the device with my adjustments in the configuration, apparently I have serious errors in the code. I will try to explain to you the essence of this device. As the manufacturer himself states, this device is a remote control for a heating boiler, with a room thermostat function and other settings for temperatures and boiler operating modes. And we are faced with a configuration problem in that we are trying to enter all the functions as a thermostat and separately the water heating mode, turning off the thermostat and at the same time turning off the device, which entails turning off the entire boiler, which is fundamentally wrong. It is necessary to implement the configuration as follows:
I will tell you a little more about how these modes work: Reservation is a timer mode, in this mode the boiler turns on at the set time and heats the coolant water, then turns off. (my opinion - a stupid function). Summer - In this mode, the boiler switches off the heating and thermostats and exclusively heats the DHW in the boiler to the temperature set in "dp_id": 3. Bath - The same mode as Summer, only when turned on, it starts heating the water immediately for a large volume to collect quickly. OutGoing - A mode that switches off all functions and modes and thermostats, completely stopping the boiler and preventing the boiler and heating system from freezing if it is deep winter outside. Detailed description of OutGoing: The freeze protection function prevents damage due to freezing of the coolant.
Based on your description above, the only issue is that the Bath and Summer modes are reversed. I originally set Summer as the "preheating" one, because in the manual the description mentioned "can be turned on in Summer to have hot water quickly".
The climate "off" mode should switch the underlying mode to Bath. I did not connect the climate entity to dp 1 (power switch), because I realised that the intention is probably to leave DHW running when climate is switched off.
I did not separate into select and number entities, because the water_heater entity is designed to cover these functions. Although there is no good card to expose a water_heater in the Home Assistant UI, this is not something I think integrations should work around as if integrations work around the UI issue, then there is no reason for users to raise the issue to HA UI developers. The same applies to the siren entity.
I tried to make adjustments to the code taking into account the functions that I described. Please check it, since I do not understand everything in your functions.
name: Thermostat
products:
- id: 7vjtrn5888247ol8
name: Kiturami NCTR100WR
primary_entity:
entity: climate
translation_key: thermostat
dps:
- id: 2
type: string
name: hvac_mode
mapping:
- dps_val: Reservation
value: auto
- dps_val: OnDol
value: heat
hidden: true
- dps_val: Interior
value: heat
- dps_val: Bath
value: "auto"
- dps_val: Summer
value: "auto"
- dps_val: OutGoing
value: "auto"
- id: 103
type: integer
name: temperature
range:
min: 45
max: 85
unit: C
mapping:
- constraint: hvac_mode
conditions:
- dps_val: Interior
value_redirect: room_temperature
range:
min: 10
max: 45
- id: 6
type: integer
name: current_temperature
- id: 103
type: integer
name: water_temperature
range:
min: 45
max: 85
- id: 5
type: integer
name: room_temperature
secondary_entities:
- entity: water_heater
dps:
- id: 1
type: boolean
name: operation_mode
mapping:
- dps_val: false
value: "off"
- dps_val: true
value: "on"
- entity: select
name: Operating mode
category: config
dps:
- id: 2
type: string
name: option
mapping:
- dps_val: Interior
value: Room air temp
- dps_val: OnDol
value: Coolant temp
- dps_val: Reservation
value: Timer
- dps_val: OutGoing
value: Absence
- dps_val: Summer
value: DHW supply
- dps_val: Bath
value: DHW priority
- entity: switch
name: Breaker
dps:
- id: 1
type: boolean
name: switch
- entity: number
class: temperature
name: DHW temp set
category: config
dps:
- id: 3
type: integer
name: value
unit: C
class: measurement
range:
min: 35
max: 60
- entity: number
name: Turn-on timer
category: config
translation_key: timer
dps:
- id: 101
type: integer
name: value
unit: min
range:
min: 20
max: 90
- entity: number
name: Turn-off timer
category: config
translation_key: timer
dps:
- id: 102
type: integer
name: value
unit: h
range:
min: 1
max: 19
- entity: sensor
class: temperature
name: Temp current
category: diagnostic
dps:
- id: 6
type: integer
name: sensor
unit: C
class: measurement
- entity: sensor
class: temperature
name: CH temp current
category: diagnostic
dps:
- id: 103
type: integer
name: sensor
unit: C
class: measurement
- entity: binary_sensor
class: problem
category: diagnostic
dps:
- id: 20
type: bitfield
name: sensor
mapping:
- dps_val: 0
value: false
- value: true
- id: 20
type: bitfield
name: fault_code
- id: 104
type: integer
name: current_error
Final configuration file. I have done full testing of all functions. Everything works fine. You can update the file custom_components/tuya_local/devices/kiturami_nctr100_thermostat.yaml.
name: Thermostat
products:
- id: 7vjtrn5888247ol8
name: Kiturami NCTR100WR
primary_entity:
entity: climate
name: Thermostat boiler
translation_key: thermostat_boiler
dps:
- id: 2
type: string
name: hvac_mode
mapping:
- dps_val: Reservation
value: auto
- dps_val: OnDol
value: heat
hidden: true
- dps_val: Interior
value: heat
- dps_val: Bath
value: "auto"
- dps_val: Summer
value: "auto"
- dps_val: OutGoing
value: "auto"
- id: 103
type: integer
name: temperature
range:
min: 45
max: 85
unit: C
mapping:
- constraint: hvac_mode
conditions:
- dps_val: Interior
value_redirect: room_temperature
range:
min: 10
max: 45
- id: 6
type: integer
name: current_temperature
- id: 103
type: integer
name: carrier_heat_temperature
- id: 5
type: integer
name: room_temperature
secondary_entities:
- entity: select
name: Operating mode
category: config
translation_key: operating_mode
dps:
- id: 2
type: string
name: option
mapping:
- dps_val: Interior
value: Room air temp
- dps_val: OnDol
value: Coolant temp
- dps_val: Reservation
value: Timer
- dps_val: OutGoing
value: Absence
- dps_val: Summer
value: DHW supply
- dps_val: Bath
value: DHW priority
- entity: switch
name: Breaker
translation_key: turn_on_off_boiler
dps:
- id: 1
type: boolean
name: switch
- entity: number
class: temperature
name: DHW temp set
category: config
translation_key: dhw_temp_set
dps:
- id: 3
type: integer
name: value
unit: C
class: measurement
range:
min: 35
max: 60
- entity: number
class: temperature
name: CH temp set
category: config
translation_key: carrier_heat_temp_set
dps:
- id: 103
type: integer
name: value
unit: C
class: measurement
range:
min: 45
max: 85
- entity: number
name: Turn-on timer
category: config
translation_key: turn_on_timer
dps:
- id: 101
type: integer
name: value
unit: min
range:
min: 20
max: 90
- entity: number
name: Turn-off timer
category: config
translation_key: turn_off_timer
dps:
- id: 102
type: integer
name: value
unit: h
range:
min: 1
max: 19
- entity: binary_sensor
class: running
category: diagnostic
dps:
- id: 1
type: integer
name: sensor
- entity: sensor
class: temperature
name: Air temp current
category: diagnostic
translation_key: actual_air_temp
dps:
- id: 6
type: integer
name: sensor
unit: C
class: measurement
- entity: sensor
class: temperature
name: CH temp current
category: diagnostic
translation_key: carrier_heat_temp
dps:
- id: 103
type: integer
name: sensor
unit: C
class: measurement
- entity: sensor
class: temperature
name: DHW temp current
category: diagnostic
translation_key: dhw_temp_current
dps:
- id: 3
type: integer
name: sensor
unit: C
class: measurement
- entity: binary_sensor
class: problem
category: diagnostic
dps:
- id: 20
type: bitfield
name: sensor
mapping:
- dps_val: 0
value: false
- value: true
- id: 20
type: bitfield
name: fault_code
- id: 104
type: integer
name: current_error
I have also prepared localization for Russian. If possible, add it to your ru.json file too.
translation_key: ru
switch:
"turn_on_off_boiler": {
"name": "Вкл/Выкл котла"
},
climate:
"thermostat_boiler": {
"name": "Термостат котла"
},
number:
"dhw_temp_set": {
"name": "ГВС температура"
},
"carrier_heat_temp_set": {
"name": "Теплоноситель темп."
},
"turn_on_timer": {
"name": "Таймер включения"
},
"turn_off_timer": {
"name": "Таймер выключения"
},
sensor:
"actual_air_temp": {
"name": "Темп. воздуха факт."
},
"carrier_heat_temp": {
"name": "Темп. теплоносителя"
},
"dhw_temp_current": {
"name": "Температура ГВС"
},
select:
"operating_mode": {
"name": "Режим работы",
"state": {
"Room air temp": "По температуре воздуха",
"Coolant temp": "По температуре теплоносителя",
"Timer": "Таймер",
"Absence": "Отсутствие",
"DHW supply": "ГВС бойлер",
"DHW priority": "Приоритет ГВС"
}
},
Thank you very much for your quick help with Tuya Local integration!
How can you close the request if your configuration is not corrected? Your code is incorrect and it creates several problems in the operation of the heating boiler itself, although the remote device supposedly works, but the boiler actually works in a different mode or does not work at all.
Please file bugs describing clearly what problems you are observing with the released config.
Log message
DPS information
Product ID
bfc6d1959b288a680ak5ga
Product Name
Kiturami thermostat
Information about how the device functions
This product is thermostat: https://krb.co.kr/en/?r=en&m=product&cat=254&uid=146 The thermostat controls these models of gas boiler for home heating: https://krb.co.kr/en/?r=en&m=product&cat=177&uid=129 I have the black and grey version: