{
    "title": "WBE2-I-EBUS_template_title",
    "device_type": "tpl1_web2_i_ebus",
    "group": "g-wb",
    "device": {
        "name": "WBE2-I-EBUS-v4",
        "id": "wbe2-i-ebus",
        "min_request_interval": 1000,
        "response_timeout": 800,
        "guard_interval_us": 150000,
        "device_timeout_ms": 3000,
        "device_max_fail_cycles": 2,

        "groups": [
            {
                "title": "Boiler State",
                "id": "boiler_state"
            },
            {
                "title": "Hot Water Settings",
                "id": "hot_water_settings"
            },
            {
                "title": "HW Info",
                "id": "hw_info"
            },
            {
                "title": "Heating Settings",
                "id": "heating_settings"
            }
        ],

        "setup": [
            {
                "title": "disable direct heating control",
                "address": 203,
                "reg_type": "holding",
                "value": 0
            },
            {
                "title": "enable direct heating control",
                "address": 205,
                "reg_type": "holding",
                "value": 0,
                "condition": "(heating_options==0)||(heating_options==3)"
            },
            {
                "title": "enable room sensor",
                "address": 208,
                "reg_type": "holding",
                "value": 0,
                "condition": "heating_options==1"
            },
            {
                "title": "enable outdoor sensor",
                "address": 208,
                "reg_type": "holding",
                "value": 1,
                "condition": "heating_options==2"
            }
        ],

        "parameters": [
            {
                "id": "heating_options",
                "title": "Heating Settings",
                "enum": [
                    1,
                    2,
                    0,
                    3
                ],
                "enum_titles": [
                    "Room Temperature Sensor",
                    "Outdoor Temperature Sensor",
                    "Direct Heating Setpoint Control",
                    "Heating Off"
                ],
                "default": 1,
                "required": true,
                "order": 1,
                "group": "heating_settings",
                "readonly": true
            },
            {
                "id": "climate_curve_number",
                "title": "Climate Curve Number",
                "address": 207,
                "reg_type": "holding",
                "enum": [
                    1, 2, 3, 4, 5,
                    6, 7, 8, 9, 10,
                    11, 12, 13, 14, 15,
                    16, 17, 18, 19
                ],
                "enum_titles": [
                    "1", "2", "3", "4", "5",
                    "6", "7", "8", "9", "10",
                    "11", "12", "13", "14", "15",
                    "16", "17", "18", "19"
                ],
                "default": 1,
                "order": 2,
                "group": "heating_settings",
                "condition": "heating_options==2"
            }
        ],

        "channels": [
            {
                "name": "Error Code",
                "address": 205,
                "reg_type": "input",
                "type": "value",
                "format": "u16",
                "group": "boiler_state"
            },
            {
                "name": "Hot Water Temperature",
                "address": 207,
                "reg_type": "input",
                "type": "temperature",
                "format": "u16",
                "group": "boiler_state"
            },
            {
                "name": "External Storage Water Temperature",
                "address": 209,
                "reg_type": "input",
                "type": "temperature",
                "format": "u16",
                "group": "boiler_state",
                "enabled": false
            },
            {
                "name": "Heating Temperature",
                "address": 206,
                "reg_type": "input",
                "type": "temperature",
                "format": "u16",
                "group": "boiler_state"
            },
            {
                "name": "Heating Return Water Temperature",
                "address": 208,
                "reg_type": "input",
                "type": "temperature",
                "format": "u16",
                "group": "boiler_state"
            },
            {
                "name": "Boiler Outdoor Temperature Sensor",
                "address": 210,
                "reg_type": "input",
                "type": "temperature",
                "format": "s16",
                "scale": 0.1,
                "offset": -100,
                "group": "boiler_state",
                "enabled": false
            },
            {
                "name": "Hot Water Setpoint Max",
                "address": 211,
                "reg_type": "input",
                "type": "temperature",
                "format": "u16",
                "group": "boiler_state"
            },
            {
                "name": "Water Pressure",
                "address": 212,
                "reg_type": "input",
                "type": "pressure",
                "format": "s16",
                "scale": 0.001,
                "group": "boiler_state"
            },
            {
                "name": "Burner Modulation Level",
                "address": 213,
                "reg_type": "input",
                "type": "value",
                "format": "s16",
                "scale": 0.1,
                "units": "%",
                "group": "boiler_state"
            },
            {
                "name": "Invalid Connection",
                "address": 214,
                "reg_type": "input",
                "type": "value",
                "format": "u16",
                "group": "boiler_state"
            },
            {
                "name": "Boiler Status",
                "address": 215,
                "reg_type": "input",
                "type": "value",
                "format": "u16",
                "group": "boiler_state"
            },
            {
                "name": "Hot Water Setpoint",
                "address": 204,
                "reg_type": "holding",
                "type": "temperature",
                "format": "u16",
                "min": 0,
                "max": 85,
                "group": "hot_water_settings"
            },
            {
                "name": "FW Version",
                "address": 204,
                "reg_type": "input",
                "type": "value",
                "format": "u16",
                "scale": 0.01,
                "group": "hw_info"
            },
            {
                "name": "Temperature Sensor Type",
                "address": 208,
                "reg_type": "holding",
                "type": "value",
                "readonly": true,
                "group": "heating_settings",
                "condition": "heating_options==1"
            },
            {
                "name": "Heating Setpoint",
                "address": 203,
                "reg_type": "holding",
                "type": "value",
                "units": "deg C",
                "format": "u16",
                "min": 0,
                "max": 85,
                "readonly": true,
                "group": "heating_settings",
                "condition": "(heating_options==1)||(heating_options==2)||(heating_options==3)"
            },
            {
                "name": "Room Temperature",
                "address": 206,
                "reg_type": "holding",
                "type": "value",
                "units": "deg C",
                "format": "s16",
                "scale": 0.1,
                "offset": -100,
                "min": -50,
                "max": 50,
                "group": "heating_settings",
                "condition": "heating_options==1"
            },
            {
                "name": "Outdoor Temperature",
                "address": 206,
                "reg_type": "holding",
                "type": "value",
                "units": "deg C",
                "format": "s16",
                "scale": 0.1,
                "offset": -100,
                "min": -50,
                "max": 50,
                "group": "heating_settings",
                "condition": "heating_options==2"
            },
            {
                "name": "Room Temperature Setpoint",
                "address": 205,
                "reg_type": "holding",
                "type": "value",
                "units": "deg C",
                "format": "u16",
                "min": 0,
                "max": 35,
                "group": "heating_settings",
                "condition": "heating_options==1"
            },
            {
                "name": "Heating Status",
                "reg_type": "holding",
                "address": 205,
                "type": "switch",
                "group": "heating_settings",
                "condition": "heating_options==2"
            },
	   {
                "name": "Debug message 1",
                "address": 216,
                "reg_type": "input",
                "type": "value",
                "format": "u16",
                "group": "hw_info"
            },

	   {
                "name": "Debug message 2",
                "address": 217,
                "reg_type": "input",
                "type": "value",
                "format": "u16",
                "group": "hw_info"
            },

	   { 
                "name": "Debug message 3",
                "address": 218,
                "reg_type": "input",
                "type": "value",
                "format": "u16",
                "group": "hw_info"
            },

            {
                "name": "Heating Setpoint",
                "address": 203,
                "reg_type": "holding",
                "type": "value",
                "units": "deg C",
                "format": "u16",
                "min": 0,
                "max": 85,
                "group": "heating_settings",
                "condition": "heating_options==0"
            }
        ],

        "translations": {
            "en": {
                "WBE2-I-EBUS_template_title": "WBE2-I-EBUS-v4 (eBus boiler interface)"
            },
            "ru": {
                "WBE2-I-EBUS_template_title": "WBE2-I-EBUS-v4 (интерфейс eBus для котлов)",
                "Boiler State": "Состояние котла",
                "Hot Water Settings": "Параметры ГВС",
                "HW Info": "Данные модуля",
                "Boiler Status": "Состояние контуров котла",
                "Error Code": "Код ошибки",
                "Hot Water Temperature": "t° ГВС",
                "Heating Temperature": "t° подачи отопления",
                "Heating Return Water Temperature": "t° обратной воды отопления",
                "External Storage Water Temperature": "Температура ГВС внешнего накопителя",
                "Water Pressure": "Давление воды",
                "Boiler Outdoor Temperature Sensor": "Уличная t° - датчик котла",
                "Hot Water Setpoint Max": "Максимальная уставка ГВС",
                "Burner Modulation Level" : "Модуляция  горелки",
                "Hot Water Setpoint": "Уставка ГВС",
                "Heating Settings": "Параметры отопления",
                "FW Version": "Версия прошивки",
                "Invalid Connection": "Ошибка связи с котлом",
                "Room Temperature Sensor": "Датчик комнатной температуры",
                "Temperature Sensor Type": "Тип датчика температуры",
                "Heating Setpoint": "Уставка отопления",
                "Room Temperature": "Комнатная t°",
                "Room Temperature Setpoint": "Уставка комнатной t°",
                "Outdoor Temperature Sensor": "Датчик уличной температуры",
                "Climate Curve Number": "Номер климатической кривой",
                "Outdoor Temperature": "Уличная температура",
                "Heating Status": "Статус отопления",
                "Direct Heating Setpoint Control": "Управление уставкой отопления",
                "Heating Off": "Отопление отключено",

		"Debug message 1":			"Счетчик отправленных пакетов",
		"Debug message 2":			"Счетчик принятых пакетов",
		"Debug message 3":			"Счетчик байтов синхронизации"

            }
        }
    }
}
