Created
November 26, 2024 10:18
-
-
Save waako/b37fdc1cfb0419ed1975d29a420be144 to your computer and use it in GitHub Desktop.
Hitachi Yutaki S heatpump Modbus integration for Home Assistant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
homeassistant: | |
packages: !include_dir_named integrations | |
input_select: !include_dir_merge_named entities/input_select/ | |
template: !include_dir_merge_list entities/template/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# File location: entities/input_select/ | |
pac_operation_state: | |
name: Heatpump (PaC) Operation state | |
options: | |
- 'OFF' | |
- Cool Demand OFF | |
- Cool Thermostat OFF | |
- Cool Thermostat ON | |
- Heating Demand OFF | |
- Heating Thermostat OFF | |
- Heating Thermostat ON | |
- Hot Water OFF (Domestic) | |
- Hot Water ON (Domestic) | |
- Swimming Pool OFF | |
- Swimming Pool ON | |
- Alarm | |
pac_central_mode: | |
name: Heatpump (PaC) Central mode | |
options: | |
- Local | |
- Air | |
- Water | |
- Full | |
pac_heat_circuit_status: | |
name: Heatpump (PaC) Heat Circuit Status | |
options: | |
- No | |
- Points | |
- Gradient | |
- Fix | |
pac_mode: | |
name: Heatpump (PaC) Mode | |
options: | |
- Cool | |
- Heat | |
- Auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# File location: integrations/ | |
# Modbus integration | |
# | |
# https://www.home-assistant.io/integrations/modbus/ | |
# | |
modbus: | |
- name: "hitachi" | |
type: tcp | |
host: !secret pac_host | |
port: 502 | |
# retry_on_empty: true | |
delay: 3 | |
# timeout: 8 | |
message_wait_milliseconds: 30 | |
climates: | |
- name: "Hot Water" | |
unique_id: pac_dhw | |
address: 1080 | |
target_temp_register: 1025 | |
max_temp: 60 | |
min_temp: 38 | |
scale: 1 | |
precision: 0 | |
temp_step: 1 | |
hvac_mode_register: | |
address: 1024 | |
values: | |
state_heat: 1 | |
state_off: 0 | |
write_registers: true | |
# # House heating thermostat via Modbus | |
# - name: "Heating HP" | |
# unique_id: pac_heating_c1 | |
# address: 1012 | |
# target_temp_register: 1011 | |
# target_temp_write_registers: true | |
# max_temp: 25 | |
# min_temp: 16 | |
# scale: 0.1 | |
# precision: 1 | |
# temp_step: 0.5 | |
# hvac_mode_register: | |
# address: 1002 | |
# values: | |
# state_heat: 1 | |
# state_off: 0 | |
# write_registers: true | |
switches: | |
- name: "Heatpump System" | |
unique_id: pac_1000_system_on_off | |
address: 1000 | |
write_type: holding | |
command_on: 1 | |
command_off: 0 | |
verify: | |
input_type: holding | |
address: 1050 | |
state_on: 1 | |
state_off: 0 | |
- name: "Heatpump Heating" | |
unique_id: pac_1002_heating_on_off | |
address: 1002 | |
write_type: holding | |
command_on: 1 | |
command_off: 0 | |
verify: | |
input_type: holding | |
address: 1052 | |
state_on: 1 | |
state_off: 0 | |
- name: "Heatpump ECO mode" | |
unique_id: pac_1007_mode_eco_confort | |
address: 1007 | |
write_type: holding | |
command_on: 1 | |
command_off: 0 | |
verify: | |
input_type: holding | |
address: 1057 | |
state_on: 1 | |
state_off: 0 | |
- name: "Heatpump Hot Water" | |
unique_id: pac_1024_dhw_on_off | |
address: 1024 | |
write_type: holding | |
command_on: 1 | |
command_off: 0 | |
verify: | |
input_type: holding | |
address: 1076 | |
state_on: 1 | |
state_off: 0 | |
- name: "Heatpump DHW Boost" | |
unique_id: pac_1026_dhw_boost | |
address: 1026 | |
write_type: holding | |
command_on: 1 | |
command_off: 0 | |
verify: | |
input_type: holding | |
address: 1078 | |
state_on: 1 | |
state_off: 0 | |
- name: "Heatpump C1 Heating Thermostat available" | |
unique_id: pac_1010_c1_thermostat_available | |
address: 1010 | |
write_type: holding | |
command_on: 1 | |
command_off: 0 | |
verify: | |
input_type: holding | |
address: 1078 | |
state_on: 1 | |
state_off: 0 | |
sensors: | |
- name: pac_1051_unit_mode | |
unique_id: pac_1051_unit_mode | |
address: 1051 | |
# Circuit 1 | |
- name: pac_1053_circuit1_heat_control_type | |
unique_id: pac_1053_circuit1_heat_control_type | |
address: 1053 | |
- name: pac_1055_set_fix_temp_water_hot | |
unique_id: pac_1055_set_fix_temp_water_hot | |
unit_of_measurement: °C | |
device_class: temperature | |
# min_value: 1 | |
address: 1055 | |
- name: pac_1057_mode_eco_confort | |
unique_id: pac_1057_mode_eco_confort | |
address: 1057 | |
- name: pac_1058_set_temp_offset_eco_hot | |
unique_id: pac_1058_set_temp_offset_eco_hot | |
unit_of_measurement: °C | |
device_class: temperature | |
# min_value: 1 | |
address: 1058 | |
- name: pac_1010_thermostat_available | |
unique_id: pac_1010_thermostat_available | |
address: 1010 | |
- name: pac_1011_thermostat_setting_temp | |
unique_id: pac_1011_thermostat_setting_temp | |
unit_of_measurement: °C | |
device_class: temperature | |
scale: 0.1 | |
precision: 1 | |
address: 1011 | |
- name: pac_1012_thermostat_room_temp | |
unique_id: pac_1012_thermostat_room_temp | |
unit_of_measurement: °C | |
device_class: temperature | |
scale: 0.1 | |
precision: 2 | |
address: 1012 | |
- name: pac_1060_set_temp_thermostat | |
unique_id: pac_1060_set_temp_thermostat | |
unit_of_measurement: °C | |
device_class: temperature | |
scale: 0.1 | |
precision: 1 | |
address: 1060 | |
- name: pac_1061_temp_room_thermostat | |
unique_id: pac_1061_temp_room_thermostat | |
unit_of_measurement: °C | |
device_class: temperature | |
scale: 0.1 | |
precision: 1 | |
address: 1061 | |
- name: pac_1062_set_temp_thermostat_wireless | |
unique_id: pac_1062_set_temp_thermostat_wireless | |
unit_of_measurement: °C | |
device_class: temperature | |
scale: 0.1 | |
precision: 1 | |
address: 1062 | |
- name: pac_1063_temp_room_thermostat_wireless | |
unique_id: pac_1063_temp_room_thermostat_wireless | |
unit_of_measurement: °C | |
device_class: temperature | |
scale: 0.1 | |
precision: 1 | |
address: 1063 | |
# Domestic Hot Water | |
- name: pac_1077_dhw_set_temp | |
unique_id: pac_1077_dhw_set_temp | |
unit_of_measurement: °C | |
device_class: temperature | |
precision: 1 | |
# min_value: 1 | |
address: 1077 | |
- name: pac_1078_dhw_boost_status | |
unique_id: pac_1078_dhw_boost_status | |
address: 1078 | |
- name: pac_1079_dhw_demand_mode | |
unique_id: pac_1079_dhw_demand_mode | |
address: 1079 | |
# System / General | |
- name: pac_1088_unit_mode_control | |
unique_id: pac_1088_unit_mode_control | |
address: 1088 | |
- name: pac_1090_unit_operational_status | |
unique_id: pac_1090_unit_operational_status | |
address: 1090 | |
- name: pac_1091_temp_outdoor | |
unique_id: pac_1091_temp_outdoor | |
unit_of_measurement: °C | |
device_class: temperature | |
address: 1091 | |
- name: pac_1092_temp_water_in | |
unique_id: pac_1092_temp_water_in | |
unit_of_measurement: °C | |
device_class: temperature | |
address: 1092 | |
- name: pac_1093_temp_water_out | |
unique_id: pac_1093_temp_water_out | |
unit_of_measurement: °C | |
device_class: temperature | |
address: 1093 | |
- name: pac_1094_hlink_status | |
unique_id: pac_1094_hlink_status | |
address: 1094 | |
- name: pac_1095_PCB_software | |
unique_id: pac_1095_PCB_software | |
address: 1095 | |
- name: pac_1096_LCD_software | |
unique_id: pac_1096_LCD_software | |
address: 1096 | |
- name: pac_1097_unit_capacity | |
unique_id: pac_1097_unit_capacity | |
unit_of_measurement: kWh | |
address: 1097 | |
- name: pac_1098_unit_power_consumption | |
unique_id: pac_1098_unit_power_consumption | |
unit_of_measurement: kWh | |
device_class: energy | |
address: 1098 | |
- name: pac_1200_temp_water_out_hp | |
unique_id: pac_1200_temp_water_out_hp | |
unit_of_measurement: °C | |
device_class: temperature | |
address: 1200 | |
- name: pac_1201_temp_outdoor_average | |
unique_id: pac_1201_temp_outdoor_average | |
unit_of_measurement: °C | |
device_class: temperature | |
address: 1201 | |
- name: pac_1206_temp_gas | |
unique_id: pac_1206_temp_gas | |
unit_of_measurement: °C | |
device_class: temperature | |
# min_value: 1 | |
address: 1206 | |
- name: pac_1207_temp_liquid | |
unique_id: pac_1207_temp_liquid | |
unit_of_measurement: °C | |
device_class: temperature | |
address: 1207 | |
- name: pac_1208_temp_gas_discharge | |
unique_id: pac_1208_temp_gas_discharge | |
unit_of_measurement: °C | |
device_class: temperature | |
address: 1208 | |
- name: pac_1209_temp_evaporation | |
unique_id: pac_1209_temp_evaporation | |
unit_of_measurement: °C | |
device_class: temperature | |
address: 1209 | |
- name: pac_1210_expansion_valve_open_indoor | |
unique_id: pac_1210_expansion_valve_open_indoor | |
unit_of_measurement: "%" | |
# scan_interval: 5 | |
address: 1210 | |
- name: pac_1211_expansion_valve_open_outdoor | |
unique_id: pac_1211_expansion_valve_open_outdoor | |
unit_of_measurement: "%" | |
# scan_interval: 5 | |
address: 1211 | |
- name: pac_1212_inverter_frequency | |
unique_id: pac_1212_inverter_frequency | |
unit_of_measurement: Hz | |
# scan_interval: 5 | |
address: 1212 | |
- name: pac_1213_cause_stoppage | |
unique_id: pac_1213_cause_stoppage | |
address: 1213 | |
- name: pac_1214_compressor_active_current | |
unique_id: pac_1214_compressor_active_current | |
unit_of_measurement: A | |
address: 1214 | |
- name: pac_1215_capacity_data | |
unique_id: pac_1215_capacity_data | |
address: 1215 | |
- name: pac_1217_defrost | |
unique_id: pac_1217_defrost | |
address: 1217 | |
- name: pac_1218_unit_model | |
unique_id: pac_1218_unit_model | |
address: 1218 | |
- name: pac_1219_water_temp_setting | |
unique_id: pac_1219_water_temp_setting | |
unit_of_measurement: °C | |
address: 1219 | |
- name: pac_1220_water_flow | |
unique_id: pac_1220_water_flow | |
unit_of_measurement: m3/h | |
scale: 0.1 | |
precision: 2 | |
address: 1220 | |
- name: pac_1221_water_pump_speed | |
unique_id: pac_1221_water_pump_speed | |
unit_of_measurement: "%" | |
address: 1221 | |
- name: pac_1223_alarm_number | |
unique_id: pac_1223_alarm_number | |
address: 1223 | |
# Outdoor Unit / Coolant | |
- name: pac_1224_r134a_discharge_temp | |
unique_id: pac_1224_r134a_discharge_temp | |
unit_of_measurement: °C | |
address: 1224 | |
- name: pac_1225_r134a_suction_temp | |
unique_id: pac_1225_r134a_suction_temp | |
unit_of_measurement: °C | |
address: 1225 | |
- name: pac_1226_r134a_discharge_pressure | |
unique_id: pac_1226_r134a_discharge_pressure | |
unit_of_measurement: bar | |
scale: 0.1 | |
precision: 1 | |
address: 1226 | |
- name: pac_1227_r134a_section_pressure | |
unique_id: pac_1227_r134a_section_pressure | |
unit_of_measurement: bar | |
device_class: pressure | |
scale: 0.1 | |
precision: 1 | |
address: 1227 | |
- name: pac_1228_r134a_compressor_frequency | |
unique_id: pac_1228_r134a_compressor_frequency | |
unit_of_measurement: Hz | |
device_class: frequency | |
address: 1228 | |
- name: pac_1229_r134a_expansion_valve_2_indoor_open | |
unique_id: pac_1229_r134a_expansion_valve_2_indoor_open | |
unit_of_measurement: "%" | |
state_class: measurement | |
address: 1229 | |
- name: pac_1230_r134a_compressor_active_current | |
unique_id: pac_1230_r134a_compressor_active_current | |
unit_of_measurement: A | |
address: 1230 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# File location: entities/template/ | |
# # Use friendly state values for Heatpump | |
- sensor: | |
- name: "Heatpump Mode" | |
unique_id: pac_mode_status | |
state: >- | |
{{ iif( | |
states('sensor.pac_1051_unit_mode') not in ('unavailable', 'unknown'), | |
(state_attr('input_select.pac_mode','options')[(states('sensor.pac_1057_mode_eco_confort')|int)]), | |
(state_attr('input_select.pac_mode','options')[0]) | |
) | |
}} | |
availability: "{{states('sensor.pac_1051_unit_mode')|int(-1) >= 0 }}" | |
- name: "Heatpump Eco Mode" | |
unique_id: pac_mode_eco_status | |
state: >- | |
{{ iif( | |
states('sensor.pac_1057_mode_eco_confort') not in ('unavailable', 'unknown'), | |
(state_attr('select.pac_eco_mode','options')[(states('sensor.pac_1057_mode_eco_confort')|int)]), | |
(state_attr('select.pac_eco_mode','options')[0]) | |
) | |
}} | |
availability: "{{states('sensor.pac_1057_mode_eco_confort')|int(-1) >= 0 }}" | |
- name: "Heatpump Heating Circuit Status" | |
unique_id: pac_mode_heat_circuit_status | |
state: >- | |
{{ iif( | |
states('sensor.pac_1053_circuit1_heat_control_type') not in ('unavailable', 'unknown'), | |
(state_attr('input_select.pac_heat_circuit_status','options')[(states('sensor.pac_1053_circuit1_heat_control_type')|int)]), | |
(state_attr('input_select.pac_heat_circuit_status','options')[0]) | |
) | |
}} | |
availability: "{{states('sensor.pac_1053_circuit1_heat_control_type')|int(-1) >= 0 }}" | |
- name: "Heatpump Operation Status" | |
unique_id: pac_operational_status | |
state: >- | |
{{ iif( | |
states('sensor.pac_1090_unit_operational_status') not in ('unavailable', 'unknown'), | |
(state_attr('input_select.pac_operation_state','options')[(states('sensor.pac_1090_unit_operational_status')|int)]), | |
(state_attr('input_select.pac_operation_state','options')[0]) | |
) | |
}} | |
availability: "{{states('sensor.pac_1090_unit_operational_status')|int(-1) >= 0 }}" | |
- name: "Heatpump DHW Demande Mode" | |
unique_id: pac_dhw_demand_mode_status | |
state: >- | |
{{ iif( | |
states('sensor.pac_1079_dhw_demand_mode') not in ('unavailable', 'unknown'), | |
(state_attr('select.pac_dhw_demand_mode','options')[(states('sensor.pac_1079_dhw_demand_mode')|int)]), | |
(state_attr('select.pac_dhw_demand_mode','options')[0]) | |
) | |
}} | |
availability: "{{states('sensor.pac_1079_dhw_demand_mode')|int(-1) >= 0 }}" | |
- name: "Heatpump Central Mode Status" | |
unique_id: pac_central_mode_status | |
state: >- | |
{{ iif( | |
states('sensor.pac_1088_unit_mode_control') not in ('unavailable', 'unknown'), | |
(state_attr('input_select.pac_central_mode','options')[(states('sensor.pac_1088_unit_mode_control')|int)]), | |
(state_attr('input_select.pac_central_mode','options')[0]) | |
) | |
}} | |
availability: "{{states('sensor.pac_1088_unit_mode_control')|int(-1) >= 0 }}" | |
- name: "pac_1080_dhw_temp" | |
unique_id: "pac_1080_dhw_temp_template" | |
unit_of_measurement: "°C" | |
device_class: temperature | |
state: >- | |
{{ state_attr('climate.hot_water', 'current_temperature') }} | |
# # Control Heatpump using friendly name values (get initial state from sensor) | |
- select: | |
- unique_id: "pac_eco_mode" | |
state: >- | |
{{ iif( | |
states('sensor.pac_1057_mode_eco_confort') not in ('unavailable', 'unknown'), | |
(state_attr('select.pac_eco_mode','options')[(states('sensor.pac_1057_mode_eco_confort')|int)]), | |
(state_attr('select.pac_eco_mode','options')[0]) | |
) | |
}} | |
options: "{{ ['ECO','Comfort'] }}" | |
select_option: | |
- action: modbus.write_register | |
data: | |
hub: hitachi | |
address: 1007 | |
value: >- | |
{{ (state_attr('select.pac_eco_mode','options').index(option))|int}} | |
availability: "{{states('sensor.pac_1057_mode_eco_confort')|int(-1) >= 0 }}" | |
- unique_id: "pac_dhw_demand_mode" | |
options: "{{ ['Standard','High Demand'] }}" | |
state: >- | |
{{ iif( | |
states('sensor.pac_1079_dhw_demand_mode') not in ('unavailable', 'unknown'), | |
(state_attr('select.pac_dhw_demand_mode','options')[(states('sensor.pac_1079_dhw_demand_mode')|int)]), | |
(state_attr('select.pac_dhw_demand_mode','options')[0]) | |
) | |
}} | |
select_option: | |
- action: modbus.write_register | |
data: | |
hub: hitachi | |
address: 1027 | |
value: >- | |
{{ (state_attr('select.pac_dhw_demand_mode','options').index(option))|int}} | |
availability: "{{states('sensor.pac_1079_dhw_demand_mode')|int(-1) >= 0 }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment