1
mirror of https://github.com/rvdbreemen/OTGW-firmware synced 2024-11-16 04:33:49 +01:00

Revert "Revert "Revert "add HA device and thermostat entity through mqtt discovery."""

This reverts commit 2dd610aa37.
This commit is contained in:
Robert van den Breemen 2021-02-28 22:24:50 +01:00
parent 2dd610aa37
commit 2f609bf550
3 changed files with 67 additions and 123 deletions

View File

@ -297,32 +297,13 @@ void doAutoConfigure()
// DebugTf("sline[%s]\r\n", CSTR(sLine));
if (splitString(sLine, ',', sTopic, sMsg))
{
// discovery topic prefix
DebugTf("sTopic[%s]==>", CSTR(sTopic)); DebugFlush();
sTopic.replace("%homeassistant%", CSTR(settingMQTThaprefix));
Debugf("[%s]\r\n", CSTR(sTopic));DebugFlush();
/// node
DebugTf("sTopic[%s]==>", CSTR(sTopic)); DebugFlush();
sTopic.replace("%node_id%", CSTR(getUniqueId()));
Debugf("[%s]\r\n", CSTR(sTopic)); DebugFlush();
/// ----------------------
/// node
DebugTf("sMsg[%s]==>", CSTR(sMsg)); DebugFlush();
sMsg.replace("%node_id%", CSTR(getUniqueId()));
Debugf("[%s]\r\n", CSTR(sMsg)); DebugFlush();
/// version
DebugTf("sMsg[%s]==>", CSTR(sMsg)); DebugFlush();
sMsg.replace("%version%", CSTR(String(_VERSION)));
Debugf("[%s]\r\n", CSTR(sMsg)); DebugFlush();
// payload topic prefix
DebugTf("sMsg[%s]==>", CSTR(sMsg)); DebugFlush();
sMsg.replace("%OTGW%", CSTR(settingMQTTtopTopic));
Debugf("[%s]\r\n", CSTR(sMsg)); DebugFlush();
sendMQTT(CSTR(sTopic), CSTR(sMsg), (sTopic.length() + sMsg.length()+2));
delay(10);
} else DebugTf("Either comment or invalid config line: [%s]\r\n", CSTR(sLine));

View File

@ -1,113 +1,76 @@
// device
// # "availability_topic": "%OTGW%", // this should be the online/offline topic , left it out as i couldn't find it
// "device":
// {
// "connections": None,
// "identifiers": "%hostname%-%ip%",
// "manufacturer": "Schelte Bron",
// "model": "otgw-nodo",
// "name": "OpenTherm Gateway",
// "sw_version": None,
// "via_device": None
// },
//
// "current_temperature_topic": '%OTGW%/Tr', // this should be the current room temp topic, ID 24
// "initial": '18',
// "max_temp": '24',
// "min_temp": '16',
// # "mode_command_topic": None,
// "mode_state_template": "{% if value == '1' %}heat{% else %}off{% endif %}",
// "mode_state_topic": '%OTGW%/ch_enable', // this should be the ch_enable topic, bit 8 of ID 0
// "modes": ['off', 'heat'],
// "precision": 0.1,
// # using temporary allows local thermostat override. use /constant to block
// # room thermostat input
// "temperature_command_topic": '%OTGW%/command', // this should be the current room temp topic used to SET/ override the thermostat
// "temperature_command_template": "TT={{ value }}",
// "temperature_state_topic": '%OTGW%/TrSet', // this should be the current value room setpoint topic, ID 16
// "temperature_unit": "C",
// "temp_step": "0.5",
// "payload_off": 0,
// "payload_on": 1,
// }
//climate
%homeassistant%/climate/%node_id%/thermostat/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-thermostat", "current_temperature_topic": '%OTGW%/Tr', "initial": '20', "max_temp": '28', "min_temp": '12', "mode_state_template": "{% if value == '1' %}heat{% else %}off{% endif %}", "mode_state_topic": '%OTGW%/ch_enable', "modes": ['off', 'heat'], "precision": 0.1, "temperature_command_topic": '%OTGW%/command', "temperature_command_template": "TT={{ value }}", "temperature_state_topic": '%OTGW%/TrSet', "temperature_unit": "C", "temp_step": "0.5", "payload_off": 0, "payload_on": 1 }
// Configuration topic no1: %homeassistant%/sensor/<name node>/config
// Configuration Payload no1: {"unique_id": "otgw", "name": "flame", "state_topic": "%OTGW%/flame"}
%homeassistant%/binary_sensor/%node_id%/fault/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-fault", "name": "Fault", "state_topic": "%OTGW%/fault"}
%homeassistant%/binary_sensor/%node_id%/centralheating/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-centralheating", "name": "Central Heating", "state_topic": "%OTGW%/centralheating"}
%homeassistant%/binary_sensor/%node_id%/domestichotwater/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-domestichotwater", "name": "Domestic Hot Water", "state_topic": "%OTGW%/domestichotwater"}
%homeassistant%/binary_sensor/%node_id%/flame/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-flame", "name": "Flame", "state_topic": "%OTGW%/flame"}
%homeassistant%/binary_sensor/%node_id%/cooling/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-cooling", "name": "Cooling", "state_topic": "%OTGW%/cooling"}
%homeassistant%/binary_sensor/%node_id%/centralheating2/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-centralheating2", "name": "Central Heating 2", "state_topic": "%OTGW%/centralheating2"}
%homeassistant%/binary_sensor/%node_id%/diagnostic_indicator/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-diagnostic_indicator", "name": "Diagonostic Indicator", "state_topic": "%OTGW%/diagnostic_indicator"}
%homeassistant%/binary_sensor/OTGW/fault/config , {"unique_id": "otgw","name": "Fault", "state_topic": "%OTGW%/fault"}
%homeassistant%/binary_sensor/OTGW/centralheating/config , {"name": "Central Heating", "state_topic": "%OTGW%/centralheating"}
%homeassistant%/binary_sensor/OTGW/domestichotwater/config , {"name": "Domestic Hot Water", "state_topic": "%OTGW%/domestichotwater"}
%homeassistant%/binary_sensor/OTGW/flame/config , {"name": "Flame", "state_topic": "%OTGW%/flame"}
%homeassistant%/binary_sensor/OTGW/cooling/config , {"name": "Cooling", "state_topic": "%OTGW%/cooling"}
%homeassistant%/binary_sensor/OTGW/centralheating2/config , {"name": "Central Heating 2", "state_topic": "%OTGW%/centralheating2"}
%homeassistant%/binary_sensor/OTGW/diagnostic_indicator/config , {"name": "Diagonostic Indicator", "state_topic": "%OTGW%/diagnostic_indicator"}
%homeassistant%/binary_sensor/%node_id%/ch_enable/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-ch_enable", "name": "Central Heating enable", "state_topic": "%OTGW%/ch_enable"}
%homeassistant%/binary_sensor/%node_id%/dhw_enable/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-dhw_enable", "name": "Domestic Hot Water enable", "state_topic": "%OTGW%/dhw_enable"}
%homeassistant%/binary_sensor/%node_id%/cooling_enable/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-cooling_enable", "name": "Cooling enable", "state_topic": "%OTGW%/cooling_enable"}
%homeassistant%/binary_sensor/%node_id%/otc_active/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-otc_active", "name": "OTC enable", "state_topic": "%OTGW%/otc_active"}
%homeassistant%/binary_sensor/%node_id%/ch2_enable/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-ch2_enable", "name": "central heating 2 enable", "state_topic": "%OTGW%/ch2_enable"}
%homeassistant%/binary_sensor/OTGW/ch_enable/config , {"name": "Central Heating enable", "state_topic": "%OTGW%/ch_enable"}
%homeassistant%/binary_sensor/OTGW/dhw_enable/config , {"name": "Domestic Hot Water enable", "state_topic": "%OTGW%/dhw_enable"}
%homeassistant%/binary_sensor/OTGW/cooling_enable/config , {"name": "Cooling enable", "state_topic": "%OTGW%/cooling_enable"}
%homeassistant%/binary_sensor/OTGW/otc_active/config , {"name": "OTC enable", "state_topic": "%OTGW%/otc_active"}
%homeassistant%/binary_sensor/OTGW/ch2_enable/config , {"name": "central heating 2 enable", "state_topic": "%OTGW%/ch2_enable"}
%homeassistant%/binary_sensor/%node_id%/service_request/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-service_request", "name": "Service request", "state_topic": "%OTGW%/service_request"}
%homeassistant%/binary_sensor/%node_id%/lockout_reset/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-lockout_reset", "name": "Lockout-reset", "state_topic": "%OTGW%/lockout_reset"}
%homeassistant%/binary_sensor/%node_id%/low_water_pressure/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-low_water_pressure", "name": "Low water press", "state_topic": "%OTGW%/low_water_pressure"}
%homeassistant%/binary_sensor/%node_id%/gas_flame_fault/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-gas_flame_fault", "name": "Gas/flame fault", "state_topic": "%OTGW%/gas_flame_fault"}
%homeassistant%/binary_sensor/%node_id%/air_pressure_fault/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-air_pressure_fault", "name": "Air press fault", "state_topic": "%OTGW%/air_pressure_fault"}
%homeassistant%/binary_sensor/%node_id%/water_over-temperature/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-water_over-temperature", "name": "Water over-temp", "state_topic": "%OTGW%/water_over-temperature"}
%homeassistant%/binary_sensor/OTGW/service_request/config , {"name": "Service request", "state_topic": "%OTGW%/service_request"}
%homeassistant%/binary_sensor/OTGW/lockout_reset/config , {"name": "Lockout-reset", "state_topic": "%OTGW%/lockout_reset"}
%homeassistant%/binary_sensor/OTGW/low_water_pressure/config , {"name": "Low water press", "state_topic": "%OTGW%/low_water_pressure"}
%homeassistant%/binary_sensor/OTGW/gas_flame_fault/config , {"name": "Gas/flame fault", "state_topic": "%OTGW%/gas_flame_fault"}
%homeassistant%/binary_sensor/OTGW/air_pressure_fault/config , {"name": "Air press fault", "state_topic": "%OTGW%/air_pressure_fault"}
%homeassistant%/binary_sensor/OTGW/water_over-temperature/config , {"name": "Water over-temp", "state_topic": "%OTGW%/water_over-temperature"}
%homeassistant%/binary_sensor/%node_id%/dhw_present/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-dhw_present", "name": "DHW present", "state_topic": "%OTGW%/dhw_present"}
%homeassistant%/binary_sensor/%node_id%/control_type/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-control_type", "name": "Control type", "state_topic": "%OTGW%/control_type"}
%homeassistant%/binary_sensor/%node_id%/cooling_config/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-cooling_config", "name": " Cooling configs", "state_topic": "%OTGW%/cooling_config"}
%homeassistant%/binary_sensor/%node_id%/dhw_config/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-dhw_config", "name": "DHW config", "state_topic": "%OTGW%/dhw_config"}
%homeassistant%/binary_sensor/%node_id%/master_low_off_pomp_control_function/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-master_low_off_pomp_control_function", "name": "Master low-off&pump control function", "state_topic": "%OTGW%/master_low_off_pomp_control_function"}
%homeassistant%/binary_sensor/%node_id%/ch2_present/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-ch2_present", "name": "CH2 present", "state_topic": "%OTGW%/ch2_present"}
%homeassistant%/binary_sensor/OTGW/dhw_present/config , {"name": "DHW present", "state_topic": "%OTGW%/dhw_present"}
%homeassistant%/binary_sensor/OTGW/control_type/config , {"name": "Control type", "state_topic": "%OTGW%/control_type"}
%homeassistant%/binary_sensor/OTGW/cooling_config/config , {"name": " Cooling configs", "state_topic": "%OTGW%/cooling_config"}
%homeassistant%/binary_sensor/OTGW/dhw_config/config , {"name": "DHW config", "state_topic": "%OTGW%/dhw_config"}
%homeassistant%/binary_sensor/OTGW/master_low_off_pomp_control_function/config , {"name": "Master low-off&pump control function", "state_topic": "%OTGW%/master_low_off_pomp_control_function"}
%homeassistant%/binary_sensor/OTGW/ch2_present/config , {"name": "CH2 present", "state_topic": "%OTGW%/ch2_present"}
// Configuration topic no2: %homeassistant%/sensor/<name node>/config
// Configuration payload no1: {"device_class": "temperature", "name": "Temperature", "state_topic": "%OTGW%/<sensor name>>", "unit_of_measurement": "°C", "value_template": "{{ value_json.temperature}}" }
%homeassistant%/sensor/%node_id%/TSet/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-TSet", "device_class": "temperature", "name": "Control setpoint", "state_topic": "%OTGW%/TSet", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/TsetCH2/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-TsetCH2", "device_class": "temperature", "name": "Control setpoint for 2e circuit", "state_topic": "%OTGW%/TsetCH2", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/TrOverride/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-TrOverride", "device_class": "temperature", "name": "Remote override room setpoint", "state_topic": "%OTGW%/TrOverride", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/TrSet/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-TrSet", "device_class": "temperature", "name": "Room setpoint", "state_topic": "%OTGW%/TrSet", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/Troom/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-Troom", "device_class": "temperature", "name": "Room Temperature", "state_topic": "%OTGW%/Tr", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/Tboiler/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-Tboiler", "device_class": "temperature", "name": "Boiler flow water temperature", "state_topic": "%OTGW%/Tboiler", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/Tdhw/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-Tdhw", "device_class": "temperature", "name": "DHW temperature", "state_topic": "%OTGW%/Tdhw", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/Toutside/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-Toutside", "device_class": "temperature", "name": "Outside Temperature", "state_topic": "%OTGW%/Toutside", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/Tret/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-Tret", "device_class": "temperature", "name": "Return water temperature", "state_topic": "%OTGW%/Tret", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/Tstorage/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-Tstorage", "device_class": "temperature", "name": "Solar storage temperature", "state_topic": "%OTGW%/Tstorage", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/Tcollector/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-Tcollector", "device_class": "temperature", "name": "Solar collector temperature", "state_topic": "%OTGW%/Tcollector", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/TflowCH2/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-TflowCH2", "device_class": "temperature", "name": "Flow water temperature CH2 cir.", "state_topic": "%OTGW%/TflowCH2", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/Tdhw2/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-Tdhw2", "device_class": "temperature", "name": "Domestic hot water temperature 2", "state_topic": "%OTGW%/Tdhw2", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/Texhaust/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-Texhaust", "device_class": "temperature", "name": "Boiler exhaust temperature", "state_topic": "%OTGW%/Texhaust", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/TdhwSet/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-TdhwSet", "device_class": "temperature", "name": "DHW setpoint", "state_topic": "%OTGW%/TdhwSet", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/MaxTSet/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-MaxTSet", "device_class": "temperature", "name": "Max CH water setpoint", "state_topic": "%OTGW%/MaxTSet", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/CoolingControl/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-CoolingControl", "name": "Cooling control signal", "state_topic": "%OTGW%/CoolingControl", "unit_of_measurement": "%", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/MaxRelModLevelSetting/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-MaxRelModLevelSetting", "name": "Max Rel Modulation level setting", "state_topic": "%OTGW%/MaxRelModLevelSetting", "unit_of_measurement": "%", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/RelModLevel/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-RelModLevel", "name": "Relative Modulation Level", "state_topic": "%OTGW%/RelModLevel", "unit_of_measurement": "%", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/CHPressure/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-CHPressure", "name": "Water pressure in CH circuit", "state_topic": "%OTGW%/CHPressure", "unit_of_measurement": "bar", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/DHWFlowRate/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-DHWFlowRate", "name": "Water flow rate in DHW circuit", "state_topic": "%OTGW%/DHWFlowRate", "unit_of_measurement": "l/min", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/Hcratio/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-Hcratio", "device_class": "temperature", "name": "OTC heat curve ratio", "state_topic": "%OTGW%/DHWFlowRate", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/OpenThermVersionMaster/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-OpenThermVersionMaster", "name": "Master OT protocol version", "state_topic": "%OTGW%/OpenThermVersionMaster", "unit_of_measurement": "l/min", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/OpenThermVersionSlave/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-OpenThermVersionSlave", "name": "Slave OT protocol version", "state_topic": "%OTGW%/OpenThermVersionSlave", "unit_of_measurement": "l/min", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/TSet/config , {"device_class": "temperature", "name": "Control setpoint", "state_topic": "%OTGW%/TSet", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/TsetCH2/config , {"device_class": "temperature", "name": "Control setpoint for 2e circuit", "state_topic": "%OTGW%/TsetCH2", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/TrOverride/config , {"device_class": "temperature", "name": "Remote override room setpoint", "state_topic": "%OTGW%/TrOverride", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/TrSet/config , {"device_class": "temperature", "name": "Room setpoint", "state_topic": "%OTGW%/TrSet", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/Troom/config , {"device_class": "temperature", "name": "Room Temperature", "state_topic": "%OTGW%/Tr", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/Tboiler/config , {"device_class": "temperature", "name": "Boiler flow water temperature", "state_topic": "%OTGW%/Tboiler", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/Tdhw/config , {"device_class": "temperature", "name": "DHW temperature", "state_topic": "%OTGW%/Tdhw", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/Toutside/config , {"device_class": "temperature", "name": "Outside Temperature", "state_topic": "%OTGW%/Toutside", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/Tret/config , {"device_class": "temperature", "name": "Return water temperature", "state_topic": "%OTGW%/Tret", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/Tstorage/config , {"device_class": "temperature", "name": "Solar storage temperature", "state_topic": "%OTGW%/Tstorage", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/Tcollector/config , {"device_class": "temperature", "name": "Solar collector temperature", "state_topic": "%OTGW%/Tcollector", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/TflowCH2/config , {"device_class": "temperature", "name": "Flow water temperature CH2 cir.", "state_topic": "%OTGW%/TflowCH2", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/Tdhw2/config , {"device_class": "temperature", "name": "Domestic hot water temperature 2", "state_topic": "%OTGW%/Tdhw2", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/Texhaust/config , {"device_class": "temperature", "name": "Boiler exhaust temperature", "state_topic": "%OTGW%/Texhaust", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/TdhwSet/config , {"device_class": "temperature", "name": "DHW setpoint", "state_topic": "%OTGW%/TdhwSet", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/MaxTSet/config , {"device_class": "temperature", "name": "Max CH water setpoint", "state_topic": "%OTGW%/MaxTSet", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/CoolingControl/config , {"name": "Cooling control signal", "state_topic": "%OTGW%/CoolingControl", "unit_of_measurement": "%", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/MaxRelModLevelSetting/config , {"name": "Max Rel Modulation level setting", "state_topic": "%OTGW%/MaxRelModLevelSetting", "unit_of_measurement": "%", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/RelModLevel/config , {"name": "Relative Modulation Level", "state_topic": "%OTGW%/RelModLevel", "unit_of_measurement": "%", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/CHPressure/config , {"name": "Water pressure in CH circuit", "state_topic": "%OTGW%/CHPressure", "unit_of_measurement": "bar", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/DHWFlowRate/config , {"name": "Water flow rate in DHW circuit", "state_topic": "%OTGW%/DHWFlowRate", "unit_of_measurement": "l/min", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/Hcratio/config , {"device_class": "temperature", "name": "OTC heat curve ratio", "state_topic": "%OTGW%/DHWFlowRate", "unit_of_measurement": "°C", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/OpenThermVersionMaster/config , {"name": "Master OT protocol version", "state_topic": "%OTGW%/OpenThermVersionMaster", "unit_of_measurement": "l/min", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/OpenThermVersionSlave/config , {"name": "Slave OT protocol version", "state_topic": "%OTGW%/OpenThermVersionSlave", "unit_of_measurement": "l/min", "value_template": "{{ value }}" }
//Statistics
%homeassistant%/sensor/%node_id%/BurnerStarts/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-BurnerStarts", "name": "Nr of starts burner", "state_topic": "%OTGW%/BurnerStarts", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/CHPumpStarts/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-CHPumpStarts", "name": "Nr of starts CH pump", "state_topic": "%OTGW%/CHPumpStarts", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/DHWPumpValveStarts/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-DHWPumpValveStarts", "name": "Nr of starts DHW pump or valve", "state_topic": "%OTGW%/DHWPumpValveStarts", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/DHWBurnerStarts/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-DHWBurnerStarts", "name": "Nr of starts burner during DHW", "state_topic": "%OTGW%/DHWBurnerStarts", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/BurnerOperationHours/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-BurnerOperationHours", "name": "Nr of hours burner operation", "state_topic": "%OTGW%/BurnerOperationHours", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/CHPumpOperationHours/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-CHPumpOperationHours", "name": "Nr of hours CH pump running", "state_topic": "%OTGW%/CHPumpOperationHours", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/DHWPumpValveOperationHours/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-DHWPumpValveOperationHours", "name": "Nr of hours DHW valve open", "state_topic": "%OTGW%/DHWPumpValveOperationHours", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/DHWBurnerOperationHours/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-DHWBurnerOperationHours", "name": "Nr of hours burner operation DHW", "state_topic": "%OTGW%/DHWBurnerOperationHours", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/BurnerStarts/config , {"name": "Nr of starts burner", "state_topic": "%OTGW%/BurnerStarts", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/CHPumpStarts/config , {"name": "Nr of starts CH pump", "state_topic": "%OTGW%/CHPumpStarts", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/DHWPumpValveStarts/config , {"name": "Nr of starts DHW pump or valve", "state_topic": "%OTGW%/DHWPumpValveStarts", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/DHWBurnerStarts/config , {"name": "Nr of starts burner during DHW", "state_topic": "%OTGW%/DHWBurnerStarts", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/BurnerOperationHours/config , {"name": "Nr of hours burner operation", "state_topic": "%OTGW%/BurnerOperationHours", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/CHPumpOperationHours/config , {"name": "Nr of hours CH pump running", "state_topic": "%OTGW%/CHPumpOperationHours", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/DHWPumpValveOperationHours/config , {"name": "Nr of hours DHW valve open", "state_topic": "%OTGW%/DHWPumpValveOperationHours", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/DHWBurnerOperationHours/config , {"name": "Nr of hours burner operation DHW", "state_topic": "%OTGW%/DHWBurnerOperationHours", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/status_master/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-status_master", "name": "Status Master", "state_topic": "%OTGW%/status_master", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/status_slave/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-status_slave", "name": "Status Slave", "state_topic": "%OTGW%/status_slave", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/status_master/config , {"name": "Status Master", "state_topic": "%OTGW%/status_master", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/status_slave/config , {"name": "Status Slave", "state_topic": "%OTGW%/status_slave", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/ASF_flags/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-ASF_flags", "name": "Application Specific Fault", "state_topic": "%OTGW%/ASF_flags", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/ASF_oemfaultcode/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-ASF_oemfaultcode", "name": "ASF OEM fault code", "state_topic": "%OTGW%/ASF_oemfaultcode", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/ASF_flags/config , {"name": "Application Specific Fault", "state_topic": "%OTGW%/ASF_flags", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/ASF_oemfaultcode/config , {"name": "ASF OEM fault code", "state_topic": "%OTGW%/ASF_oemfaultcode", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/master_configuration/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-master_configuration", "name": "Status Master Configuration", "state_topic": "%OTGW%/master_configuration", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/master_memberid_code/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-master_memberid_code", "name": "Status Master Memberid Code", "state_topic": "%OTGW%/master_memberid_code", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/slave_configuration/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-slave_configuration", "name": "Status Slave Configuration", "state_topic": "%OTGW%/slave_configuration", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/%node_id%/slave_memberid_code/config , {"device": {"identifiers": "%node_id%", "manufacturer": "Schelte Bron", "model": "otgw-nodo", "name": "OpenTherm Gateway", "sw_version": "%version%",}, "unique_id": "%node_id%-slave_memberid_code", "name": "Status Slave Memberid Code", "state_topic": "%OTGW%/slave_memberid_code", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/master_configuration/config , {"name": "Status Master Configuration", "state_topic": "%OTGW%/master_configuration", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/master_memberid_code/config , {"name": "Status Master Memberid Code", "state_topic": "%OTGW%/master_memberid_code", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/slave_configuration/config , {"name": "Status Slave Configuration", "state_topic": "%OTGW%/slave_configuration", "unit_of_measurement": "", "value_template": "{{ value }}" }
%homeassistant%/sensor/OTGW/slave_memberid_code/config , {"name": "Status Slave Memberid Code", "state_topic": "%OTGW%/slave_memberid_code", "unit_of_measurement": "", "value_template": "{{ value }}" }

View File

@ -196,8 +196,8 @@ String getMacAddress() {
return String(baseMacChr);
}
String getUniqueId() {
String uniqueId = "otgw-"(String)getMacAddress();
String getUniqueId(String name, String sufix) {
String uniqueId = (String)getMacAddress() + name + sufix;
return String(uniqueId);
}