Hello,
find below my YAML code. Updated 20240508 to Version 0.93!
V0.93: Scale of Register 29 (Hot water temperature) changed back to 1 due to correction of scale by ochsner as of May 8th,2024. Added several new precise temperatures (scale 0.1)
V0.92: scale of Register 29 (Hot water temperature) needed to be adapted to 0.1 due to errouneous changes by Ochsner as of May 1 2024
V0.91 in particular overcomes the precision problem which was a consequence of HA Release 2024.2
V0.9:
The updated version has fixed the previous uint32 workaround. The version is fully compatible to the initial version. Please update in case you downloaded the intial version.
Please share your experience, suggestions, …
Good luck!
Alfred
#!include ots_hub.yaml
# Configuraton according OTS MODBUS INTERFACE (document ZBH-Modbus OTS-EN03.pdf)
# e.g. Ochsner Air Hawk 208
#Version 0.93
# Changes according mail from Ochsner Mayx 8th, 2024
# - Scale of Register 29 (Hot water temperature) changed back to 1 due to correction of scale by ochsner
# - added Register 147 holding hot_water_emperature_precise (Scale 0.1)
# - added Registers 153, 154, 155, 156 for room_temperature_price_heating_circuit* (1,2,3,4)
#Version 0.92
# - Scale of Register 29 (Hot water temperature) adapted to 0.1 due to errpneous change as of May 1 2024
#Version: 0.91
# Changes:
# - device_class defined for most entities (temperature, power, energy, ...)
# - unique_id: change to full name (incompatible with <=V0.9)
# - scale combined with precision since it was broken in 2024.2 if used without precicion
# Version: 0.9
# Changes:
# - uint32 now correctly specified (using swap: word), change is compatible to previous version
# Comments and conventions used
# - sensors are named:
# 'OTS_'<register-address>'_'<designation>
# Values representing text are appended by '_number'
# 'DHW' (domestic hot water) represented as "hot water"
# Sensor templates are defined for each value representing text
# - unit_of_measurement and scale are defined where specified
# - unique_id assigned in order to assign friendly name via UI
# - some sensors not present in all configurations are commented
# Known issues:
# - some entities should be defined as input_type: holding in order to be able
# to write values (addr 1-5 and 149-162)
# Ochsner Air Hawk 208 Modbus TCP Configuration
modbus:
- name: ots_hub
type: tcp
host: 192.168.0.3 #Replace with your IP-Addr
port: 502 # Usually Port 502, otherwise replace with your Port
delay: 0
message_wait_milliseconds: 30
timeout: 5
# Ochsner Air Hawk 208 sensors
# Configuration of sensors according Data Point List
sensors:
#**** Begin Write-Only Registers
- name: OTS_001_target_operating_mode_heating_circuit_number
slave: 1
address: 1
unique_id: ots_001_target_operating_mode_heating_circuit_number
- name: OTS_002_target_heating_cooling
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 2
unique_id: ots_002_target_heating_cooling
- name: OTS_003_target_operation_mode_hot_water_number
slave: 1
address: 3
unique_id: ots_003_target_operation_mode_hot_water_number
- name: OTS_004_target_hot-water_temperature
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 4
unique_id: ots_004_target_hot-water_temperature
- name: OTS_005_switch-ON_hot-water_temperature_differential
unit_of_measurement: K
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 5
unique_id: ots_005_switch-ON_hot-water_temperature_differential
- name: OTS_011_target_operating_mode_heating_circuit_number
slave: 1
address: 11
unique_id: ots_011_target_operating_mode_heating_circuit_number
#**** End Write-Only Registers
#**** Begin Read-Back Registers (feedback for corresponding write register)
- name: OTS_012_target_heating_cooling
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 12
unique_id: ots_012_target_heating_cooling
- name: OTS_013_target_operation_mode_hot_water_number
slave: 1
address: 13
unique_id: ots_013_target_operation_mode_hot_water_number
- name: OTS_014_target_hot-water_temperature
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 14
unique_id: ots_014_target_hot-water_temperature
- name: OTS_015_switch-ON_hot-water_temperature_differential
unit_of_measurement: K
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 15
unique_id: ots_015_switch-ON_hot-water_temperature_differential
#**** End Read-Back Registers (feedback for corresponding write register)
#**** Begin Read-Only Registers
- name: OTS_029_hot_water_temperature
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 1 #between May 1st 2024 and May 8th had scale 0.1 due to an error by ochsner
slave: 1
address: 29
unique_id: ots_029_hot_water_temperature
- name: OTS_034_heatpump_flow_temperature
unit_of_measurement: °C
precision: 1
scale: 0.1
device_class: temperature
slave: 1
address: 34
unique_id: ots_034_heatpump_flow_temperature
- name: OTS_035_heatpump_return_temperature
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 35
unique_id: ots_035_heatpump_return_temperature
- name: OTS_036_flow_rate_heat_sink_system
unit_of_measurement: 'm³/h'
device_class: volume_flow_rate
precision: 2
scale: 0.01
slave: 1
address: 36
unique_id: ots_036_flow_rate_heat_sink_system
- name: OTS_037_buffer_temperature_top
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 37
unique_id: ots_037_buffer_temperature_top
- name: OTS_038_buffer_temperature_bottom
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 38
unique_id: ots_038_buffer_temperature_bottom
- name: OTS_039_flow_temperature_auxiliary heater
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 39
unique_id: ots_039_flow_temperature_auxiliary
- name: OTS_040_system_pressure_heat_sink_system
unit_of_measurement: bar
device_class: pressure
precision: 2
scale: 0.01
slave: 1
address: 40
unique_id: ots_040_system_pressure_heat_sink_system
- name: OTS_041_evaporator_intake_air_temperature
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 41
unique_id: ots_041_evaporator_intake_air_temperature
- name: OTS_042_evaporator_discharge_air_temperature
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 42
unique_id: ots_042_evaporator_discharge_air_temperature
- name: OTS_043_Reserved
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 43
unique_id: ots_043_Reserved
- name: OTS_044_Reserved
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 44
unique_id: ots_044_Reserved
- name: OTS_048_outdoor_temperature
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 48
unique_id: ots_048_outdoor_temperature
- name: OTS_049_system_operating_status_number
slave: 1
address: 49
unique_id: ots_049_system_operating_status_number
- name: OTS_050_heatpump_operating_status_number
slave: 1
address: 50
unique_id: ots_050_heatpump_operating_status_number
- name: OTS_059_auxilary_heater_operating_status_heatpump_number
slave: 1
address: 59
unique_id: ots_059_auxilary_heater_operating_status_heatpump_number
- name: OTS_060_auxilary_heater_operating_status_tank
slave: 1
address: 60
unique_id: ots_060_auxilary_heater_operating_status_tank
- name: OTS_079_hours_of_operation_compressor
data_type: uint32
swap: word
unit_of_measurement: h
scale: 1
#device_class: duration - not set due to formating x:00:00
slave: 1
address: 79
unique_id: ots_079_hours_of_operation_compressor
- name: OTS_081_switching_cycles_compressor
data_type: uint32
swap: word
slave: 1
address: 81
unique_id: ots_081_switching_cycles_compressor
- name: OTS_083_hours_of_operations_auxiliary heater
data_type: uint32
swap: word
#device_class: duration - not set due to formating x:00:00
scale: 1
device_class: duration
slave: 1
address: 83
unique_id: ots_083_hours_of_operations_auxiliary
- name: OTS_085_switching_cycles_auxiliary heater
data_type: uint32
swap: word
slave: 1
address: 85
unique_id: OTS_085
- name: OTS_089_heating_energy
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 89
unique_id: ots_089_heating_energy
- name: OTS_091_cooling_energy
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 91
unique_id: ots_091_cooling_energy
- name: OTS_093_hot_water_energy
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 93
unique_id: ots_093_hot_water_energy
- name: OTS_095_defrosting energy
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 95
unique_id: ots_095_defrosting
- name: OTS_097_power_demand_heating
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 97
unique_id: ots_097_power_demand_heating
- name: OTS_099_power_demand_cooling
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 99
unique_id: ots_099_power_demand_cooling
- name: OTS_101_power_demand_hot_water
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 101
unique_id: ots_101_power_demand_hot_water
- name: OTS_103_power_demand_defrosting
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 103
unique_id: ots_103_power_demand_defrosting
- name: OTS_119_auxiliary_heater_heating_energy
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 119
unique_id: ots_119_auxiliary_heater_heating_energy
- name: OTS_121_auxiliary_heater_hot_water_energy
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 121
unique_id: ots_121_auxiliary_heater_hot_water_energy
- name: OTS_123_auxiliary_heater_defrosting
data_type: uint32
swap: word
unit_of_measurement: kWh
device_class: energy
slave: 1
address: 123
unique_id: ots_123_auxiliary_heater_defrosting
- name: OTS_147_precise_hot_water_temperature
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 147
unique_id: ots_147_precise_hot_water_temperature
#**** End Read-Only Registers
#**** Begin Write/Read Registers
- name: OTS_149_room_temperature_heating_circuit_1
unit_of_measurement: °C
device_class: temperature
slave: 1
address: 149
unique_id: ots_149_room_temperature_heating_circuit_1
- name: OTS_150_room_temperature_heating_circuit_2
unit_of_measurement: °C
device_class: temperature
slave: 1
address: 150
unique_id: ots_150_room_temperature_heating_circuit_2
- name: OTS_151_room_temperature_heating_circuit_3
unit_of_measurement: °C
device_class: temperature
slave: 1
address: 151
unique_id: ots_151_room_temperature_heating_circuit_3
- name: OTS_152_room_temperature_heating_circuit_4
unit_of_measurement: °C
device_class: temperature
slave: 1
address: 152
unique_id: ots_152_room_temperature_heating_circuit_4
- name: OTS_153_precise_room_temperature_heating_circuit_1
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 153
unique_id: ots_153_precise_room_temperature_heating_circuit_1
- name: OTS_154_precise_room_temperature_heating_circuit_2
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 154
unique_id: ots_154_precise_room_temperature_heating_circuit_2
- name: OTS_155_precise_room_temperature_heating_circuit_3
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 155
unique_id: ots_155_precise_room_temperature_heating_circuit_3
- name: OTS_156_precise_room_temperature_heating_circuit_4
unit_of_measurement: °C
device_class: temperature
precision: 1
scale: 0.1
slave: 1
address: 156
unique_id: ots_156_precise_room_temperature_heating_circuit_4
- name: OTS_159_relative_humidity_heating_circuit_1
unit_of_measurement: '%'
device_class: humidity
slave: 1
address: 159
unique_id: ots_159_relative_humidity_heating_circuit_1
- name: OTS_160_relative_humidity_heating_circuit_2
unit_of_measurement: '%'
device_class: humidity
slave: 1
address: 160
unique_id: ots_160_relative_humidity_heating_circuit_2
- name: OTS_161_relative_humidity_heating_circuit_3
unit_of_measurement: '%'
device_class: humidity
slave: 1
address: 161
unique_id: ots_161_relative_humidity_heating_circuit_3
- name: OTS_162_relative_humidity_heating_circuit_4
unit_of_measurement: '%'
device_class: humidity
slave: 1
address: 162
unique_id: ots_162_relative_humidity_heating_circuit_4
#**** End Write/Read Registers
#**** Begin undocumented Registers
# unknown and undocumented (0-20)
- name: OTS_202_unknown_undocumented
slave: 1
address: 202
input_type: holding
data_type: uint16
scale: 1
precision: 1
scan_interval: 30
unique_id: ots_202_unknown_undocumented
# verified but undocumented
- name: OTS_203_hot_water_temperature_precise
slave: 1
address: 203
input_type: holding
data_type: uint16
unit_of_measurement: °C
scale: 0.1
precision: 1
scan_interval: 30
unique_id: ots_203_hot_water_temperature_precise
# unknown and undocumented (?)
- name: OTS_204_unknown_undocumented
slave: 1
address: 204
input_type: holding
data_type: uint16
scale: 1
precision: 1
scan_interval: 30
unique_id: ots_204_unknown_undocumented
# unknown and undocumented (only 21,22,23 so far)
- name: OTS_205_unknown_undocumented
slave: 1
address: 205
input_type: holding
data_type: uint16
scale: 1
precision: 1
scan_interval: 30
unique_id: ots_205_unknown_undocumented
# unknown and undocumented (always 1542)
- name: OTS_213_unknown_undocumented
slave: 1
address: 213
input_type: holding
data_type: uint16
scale: 1
precision: 1
scan_interval: 30
unique_id: ots_213_unknown_undocumented
# verified but undocumented
# value for hot water target setpoint depending on schedule and mode
- name: OTS_219_hot_water_target_setpoint
slave: 1
address: 219
input_type: holding
data_type: uint16
unit_of_measurement: °C
scale: 0.1
precision: 1
scan_interval: 60
unique_id: ots_219_hot_water_target_setpoint
# unknown and undocumented (0, and 227-249 so far)
- name: OTS_220_unknown_undocumented
slave: 1
address: 220
input_type: holding
data_type: uint16
scale: 1
precision: 1
scan_interval: 30
unique_id: ots_220_unknown_undocumented
# unknown and undocumented (0, 1 or 2))
# value is a copy of OTS_ß49_heatpump_operating_status_number
- name: OTS_229_heatpump_operating_status_number
slave: 1
address: 229
input_type: holding
data_type: uint16
scale: 1
precision: 1
scan_interval: 30
unique_id: ots_229_heatpump_operating_status_number
# verified but undocumented
- name: OTS_246_power_consumption
slave: 1
address: 246
input_type: holding
data_type: uint16
unit_of_measurement: W
state_class: measurement
device_class: power
scan_interval: 30
unique_id: ots_246_power_consumption
# unknown and undocumented
- name: OTS_247_unknown_undocumented
slave: 1
address: 247
input_type: holding
data_type: uint16
unit_of_measurement: W
state_class: measurement
device_class: power
scan_interval: 30
unique_id: ots_247_unknown_undocumentedn
# unknown and undocumented
- name: OTS_248_unknown_undocumented
slave: 1
address: 248
input_type: holding
data_type: uint16
unit_of_measurement: W
state_class: measurement
device_class: power
scan_interval: 30
unique_id: ots_248_unknown_undocumented
#**** End undocumented Registers
# Configuration of sensors according Data Point List
# Additionally Sensor templates are defined for each "*operating_mode" and
# "operating_status" as well.
# They represent the value in human readable text instead of a number
# e.g.: for System operating status: "defrost" for number 4
sensor:
- platform: template
sensors:
#Convert OTS_001_target_operating_mode_heating_circuit_number to text
ots001targetoperatingmodeheatingcircuittext:
friendly_name: "Target operating mode heating circuit (Write)"
unique_id: ots001targetoperatingmodeheatingcircuittext
device_class: enum
value_template: >-
{% set mapper = {
'0' : 'Standby',
'1' : 'Heating',
'2' : 'Standby' } %}
{% set state = states.sensor.OTS_001_target_operating_mode_heating_circuit_number.state %}
{{ mapper[state] if state in mapper else 'Unknown' }}
#Convert OTS_003_target_operation_mode_hot_water_number to text
ots003targetoperationmodehotwatertext:
friendly_name: "Target operation mode hot water (Write)"
unique_id: ots003targetoperationmodehotwatertext
device_class: enum
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'On' } %}
{% set state = states.sensor.OTS_003_target_operation_mode_hot_water_number.state %}
{{ mapper[state] if state in mapper else 'Unknown' }}
#Convert OTS_013_target_operation_mode_hot_water_number to text
ots013targetoperationmodehotwatertext:
friendly_name: "Target operation mode hot water (Read back)"
unique_id: ots013targetoperationmodehotwatertext
device_class: enum
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'On' } %}
{% set state = states.sensor.OTS_013_target_operation_mode_hot_water_number.state %}
{{ mapper[state] if state in mapper else 'Unknown' }}
#Convert OTS_011_target_operating_mode_heating_circuit_number to text
ots011targetoperatingmodeheatingcircuittext:
friendly_name: "Target operating mode heating circuit (Read back)"
unique_id: ots011targetoperatingmodeheatingcircuittext
device_class: enum
value_template: >-
{% set mapper = {
'0' : 'Standby',
'1' : 'Heating',
'2' : 'Standby' } %}
{% set state = states.sensor.OTS_011_target_operating_mode_heating_circuit_number.state %}
{{ mapper[state] if state in mapper else 'Unknown' }}
#Convert OTS_049_system_operating_status_number to text
ots049systemoperatingstatustext:
friendly_name: "System operating status"
unique_id: ots049systemoperatingstatustext
device_class: enum
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'Heating',
'2' : 'Hot Water',
'3' : 'Cooling',
'4' : 'Defrost',
'5' : 'Defrost' } %}
{% set state = states.sensor.OTS_049_system_operating_status_number.state %}
{{ mapper[state] if state in mapper else 'Unknown' }}
#Convert OTS_050_heatpump_operating_status_number to text
ots050heatpumpoperatingstatustext:
friendly_name: "Heatpump operating status"
unique_id: ots050heatpumpoperatingstatustext
device_class: enum
value_template: >-
{% set mapper = {
'0' : 'Off',
'1' : 'Heating',
'2' : 'Cooling',
'3' : 'Hot water',
'4' : 'Defrost',
'5' : 'PSU outage (EVU Sperre)',
'6' : 'Manual heating',
'7' : 'Manual cooling',
'8' : 'Bivalent interlock',
'9' : 'Operating mode changeover',
'10' : 'Operating mode changeover',
'11' : 'Pump pre-run time',
'12' : 'Standby',
'13' : 'Pump run-on time',
'14' : 'Fault',
'15' : 'Current limitation',
'16' : 'Standby',
'17' : 'Operating program switched off',
'18' : 'Minimum time off',
'19' : 'Minimum time on',
'20' : 'Minimalum system pressure' } %}
{% set state = states.sensor.OTS_050_heatpump_operating_status_number.state %}
{{ mapper[state] if state in mapper else 'Unknown' }}
#Convert OTS_059_auxilary_heater_operating_status_heatpump_number to text
ots059auxilaryheateroperatingstatusheatpumptext:
friendly_name: "Auxilary heater operating status (heatpump)"
unique_id: ots059auxilaryheateroperatingstatusheatpumptext
device_class: enum
value_template: >-
{% set mapper = {
'0' : 'Standby',
'1' : 'Heating',
'2' : 'Standby',
'3' : 'Hot water',
'4' : 'Bivalent interlock',
'5' : 'Fault',
'6' : 'Frost protection mode',
'7' : 'Maximum temperatur shutdown',
'8' : 'PSU outage (EVU-Sperre)',
'9' : 'Hot water',
'10' : 'Operating program switched off',
'11' : 'Minimalum system pressure',
'12' : 'Pump pre-run time',
'13' : 'Pump run-on time' } %}
{% set state = states.sensor.OTS_059_auxilary_heater_operating_status_heatpump_number.state %}
{{ mapper[state] if state in mapper else 'Unknown' }}