Hi, I bought a Hitachi CSNET lite to remotely manage the air conditioners, it has the Modbus tcp protocol inside and I would like to use this function to integrate it into HA. Could I get your assistance to write the code? Or if there is already a realized project. Thank you
I managed to write this code, it works but several functions are missing, such as the current temperature, if I remove the # HA it gives me an error. What it means
modbus:
- name: Hitachi
type: tcp
host: 192.168.2.237
port: 502
climates:
- name: Clima 201
unique_id: clima_201
slave: 1
address: 1
input_type: holding
count: 1
max_temp: 30
min_temp: 18
offset: 0
precision: 1
target_temp_register: 20006
temp_step: 1
temperature_unit: "°C"
hvac_mode_register:
address: 20004
values:
state_cool: 0
state_heat: 3
write_registers: true
hvac_onoff_register: 20003
write_registers: true
Now with this setting I can also get the current room temperature, but I think this code can be written better. I also had to insert a switches to be able to turn the climate on and off, I was unable to insert it as an integral part of the climate. If anyone more experienced than me has any suggestions, they are welcome. Thank you
modbus:
- name: hub1
type: tcp
host: 192.168.2.237
port: 502
switches:
- name: Power_Clima_201
address: 20003
command_on: 1
command_off: 0
climates:
- name: Clima 201
unique_id: clima_201
slave: 1
address: 20015
input_type: holding
count: 1
max_temp: 30
min_temp: 18
offset: 0
precision: 1
target_temp_register: 20006
temp_step: 1
temperature_unit: "°C"
hvac_mode_register:
address: 20004
values:
state_cool: 0
state_heat: 3
write_registers: true
hvac_onoff_register: 20003
write_registers: true
Hi!
Where did you manage to find this product?
The product is sold by Hitachi dealers, they order it for you, I also found an online dealer in Italy who ordered it for me, it costs more than €1,000.00 but I can now manage 28 climates.
Is the lite better than A{x}MB?
Would contact you directly but there is no message option in here.
I don’t know what you’re telling me
I was talking about A128MB model, which I acquired in the meantime.
Right now I have it like this, slightly altered after this docs:
configuration.yaml:
# ...
modbus: !include modbus.yaml
modbus.yaml
- name: hub1
type: tcp
host: 192.168.1.122
port: 502
switches:
- name: Hitachi
address: 20003
command_on: 1
command_off: 0
verify:
input_type: holding
address: 20009
state_on: 1
state_off: 0
- name: "Hitachi Low / Medium"
address: 20005
command_on: 1
command_off: 0
verify:
input_type: holding
address: 20010
state_on: 1
state_off: 0
- name: "Hitachi Low / High"
address: 20005
command_on: 2
command_off: 0
verify:
input_type: holding
address: 20005
state_on: 2
state_off: 0
- name: "Hitachi Low / High2"
address: 20005
command_on: 3
command_off: 0
verify:
input_type: holding
address: 20005
state_on: 3
state_off: 0
- name: "Hitachi Low / Auto"
address: 20005
command_on: 4
command_off: 0
verify:
input_type: holding
address: 20005
state_on: 4
state_off: 0
climates:
- name: Hitachi
unique_id: hitachi
slave: 1
address: 20015
input_type: holding
count: 1
max_temp: 30
min_temp: 18
offset: 0
precision: 1
target_temp_register: 20006
temp_step: 1
temperature_unit: "°C"
hvac_mode_register:
address: 20004
values:
state_cool: 0
state_dry: 1
state_fan_only: 2
state_heat: 3
state_auto: 4
write_registers: true
hvac_onoff_register: 20003
write_registers: true
Because SET_FAN is not available (yet) in modbus climate, at least there are buttons for changing speed, and it also reads the on/off status + there are fan, cool, dry, auto and off modes too.
I will keep perfecting it, want to try another solution for speed selection etc, and will keep you posted.
I created this as a solution to the modbus controlled air conditioning fan speed
#==================
#=== Input Numbers
#==================
input_number:
fan_air_conditional_101:
name: Fan 101
min: 0
max: 2
step: 1
icon: mdi:air-conditioner
#============
#=== ModBus
#============
modbus:
- name: hub1
type: tcp
host: 192.168.2.237
port: 502
climates:
- name: Clima 101
unique_id: clima_101
#hub: hub1
slave: 1
address: 20239
input_type: holding
count: 1
max_temp: 30
min_temp: 18
offset: 0
precision: 1
#structure: ">10h"
target_temp_register: 20230
temp_step: 1
temperature_unit: "°C"
hvac_mode_register:
address: 20228
values:
state_cool: 0
state_heat: 3
write_registers: true
hvac_onoff_register: 20227
write_registers: true
sensors:
- name: Fan State 101
unit_of_measurement: status
slave: 1
address: 20235
input_type: holding
#================
#=== Automations
#================
automation:
#==============================================
#=== Write the input value on the modbus
#==============================================
- alias: Fan 101
id: fan_101
trigger:
- platform: state
entity_id:
- input_number.fan_air_conditional_101
condition: []
action:
- service: modbus.write_register
data:
hub: hub1
address: 20229
value: '{{ states.input_number.fan_air_conditional_101.state|int }}'
- service: modbus.write_register
data:
hub: hub1
address: 20235
value: '{{ states.input_number.fan_air_conditional_101.state|int }}'
#==========================================================================
#=== Check the fan speed sensor value, if it is different change the input
#==========================================================================
- alias: State Fan 101
id: state_fan_101
trigger:
- platform: state
entity_id:
- sensor.fan_state_101
condition: []
action:
- service: input_number.set_value
data_template:
entity_id: input_number.fan_air_conditional_101
value: "{{ states.sensor.fan_state_101.state | int }}"
sorry for my dumb questions as Iam relatively new to modbus but what is
sensors:
- name:
unit_of_measurement: status
slave: 1
address: 20235
input_type: holding
referring to ? I cant find the register in the documentation
It should be described in the modbus documentation of your device.