Making progress. Currently warnings from sections and acutators are discovered and organized in devices and entities.
Devices:
Warnings as problem entities:
Next step is zones and zone errors before I go for the climate entities.
Making progress. Currently warnings from sections and acutators are discovered and organized in devices and entities.
Devices:
Warnings as problem entities:
Next step is zones and zone errors before I go for the climate entities.
Hi
Any idea on how to connect it if not using a USB into home assistant. (Don’t want the HA in that location for example)
Would it be possible to have a esp8266 board or something pulling the data from the modbus and connecting via wifi to the HA server ? Loos like there is a modbus controller component in esphome.
I think it is possible. But there is no support for climate entity so quite some thinking is needed if you want to control the thermostats.
Also note that the modbus cable is a single twisted pair and it can be very long.
Hmm, ok thanks. My HA is virtual and in a different building
Guess i will have to do it with a remote home assistant then when there is some raspberry pies in stock someware.
I’m using modbus over Ethernet via an USR-DR302 Din Rail Serial RS485 to Ethernet TCP IP Server Module which has been working really well.
Do you think this would work as well? Serial Port Rs485 To Wifi Device Server Module Converter Elfin-ew11a-0 Modbus Protocol Data Transfer Via Wifi
Sure, it’s the same principle. For me the DIN rail mounted Ethernet version suited my needs. As long as you get “Modbus over network” you’ll be fine.
Hi!
Thanks for great instructions. I have connected my esp32 with max485 modbus successfully to LK ICS. I can read out all temperatures etc but is struggeling with binary values.
@astrandb Do you know how to handle the adresses differently between the modbus registers listed in sheet “Input Registers” vs “Inputs”? I am trying to read out
1:01004 Zone 1 Heat Status 0 1 0 - No Heating In Zone, 1 - Heating Active.
which is listed in the LK “Inputs” sheet. But address 1004 is also listed in LK “Input Registers” sheet as:
3:01004 Zone 1 Battery Level 0 100 %
In your example here: GitHub - astrandb/lk-systems-floor: How to setup Home Assistant with modbus integration for LK Systems ICS.2 (Thanks btw! )
you do not seem to handle them differently?
In my setup i expose input
as binary sensor with input_type=discrete_input
and input register
as a sensor with input_type=input
Thanks! Yes, I learned more about the modbus protocol now and the trick in esphome is to set:
register_type: discrete_input
for the binary sensors reading from modbus discrete inputs (format 1nnnn)
I found some good info here: Standard Modbus Data Address Format
For those of you using Node-red, here is a first devel release of my flow. GitHub - a-n-lundgren/nodered-flow-lk-modbus: Node-red flow to interact with LK ICS.2 Room Temperature Control System from LK Systems using modbus
Some wiring help would be appreciated. The LK box has a three-prong plug (+, -, 0) whereas the server I got off Amazon (https://www.amazon.de/dp/B08Q5H8DFY?psc=1&ref=ppx_yo2ov_dt_b_product_details) has four pins…
This should work:
A = +
B = -
0 = GND
I have the same dongle as @astrandb but get no response from the system. I have plugged it into my computer and trys with all kindes of settings in a modbus pc program but it timesout without answer every time. Its like the modbus comunication from the LK system is not activated. Anyone know what can be the problem?
I just got the modbus integration to LK ICS.2 working.
I used the LilyGo T-CAN485 board and ESPHome.
I haven’t tested it fully yet and I’m sure there are a few mistakes.
There is plenty room for improvement. I haven’t added any write registers for example.
Here is the yaml for esphome:
esphome:
name: lkics2gw
comment: LK ICS2 GW
platform: ESP32
board: esp32dev
wifi:
# General ESPHome setup
api:
ota:
logger:
# Set pins required for LilyGo T-CAN485 board
output:
- platform: gpio
id: ENABLE_PIN # Enable the chip
pin:
number: GPIO19
inverted: true
- platform: gpio
id: SE_PIN # Enable autodirection
pin:
number: GPIO17
inverted: true
- platform: gpio
id: ENABLE_5V_PIN # Enable 5V pin for RS485 chip
pin:
number: GPIO16
inverted: true
# Configure uart that will be used
uart:
id: mod_bus
rx_pin: GPIO21
tx_pin: GPIO22
baud_rate: 38400
stop_bits: 1
parity: NONE
data_bits: 8
modbus:
id: modbus1
modbus_controller:
- id: lk_ics2
## the Modbus device addr
address: 0x1
modbus_id: modbus1
setup_priority: -10
binary_sensor:
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Actuator Error"
id: "actuator_error"
entity_category: diagnostic
device_class: problem
register_type: read
address: 100
bitmask: 0x0001
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Zone Error"
id: "zone_error"
entity_category: diagnostic
device_class: problem
register_type: read
address: 100
bitmask: 0x0002
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Communication Timeout Error"
id: "communication_timeout_error"
entity_category: diagnostic
device_class: problem
register_type: read
address: 100
bitmask: 0x0004
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "High Current Consumption Error"
id: "high_current_consumption_error"
entity_category: diagnostic
device_class: problem
register_type: read
address: 100
bitmask: 0x0008
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Duplicate Network ID"
id: "duplicate_network_id"
entity_category: diagnostic
device_class: problem
register_type: read
address: 100
bitmask: 0x0010
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Data Logging Error"
id: "data_logging_error"
entity_category: diagnostic
device_class: problem
register_type: read
address: 100
bitmask: 0x0020
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Sensor Error Zone 1"
id: "room_sensor_error_zone_1"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1009
bitmask: 0x0001
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Communication Timeout Error Zone 1"
id: "communication_error_zone_1"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1009
bitmask: 0x0002
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Floor Sensor Error Zone 1"
id: "floor_sensor_error_zone_1"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1009
bitmask: 0x0004
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Cannot Install RUW Zone 1"
id: "ruw_cannot_install_zone_1"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1009
bitmask: 0x0008
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Hardware Error Zone 1"
id: "hardware_error_zone_1"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1009
bitmask: 0x0010
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Low Zone 1"
id: "battery_low_zone_1"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1009
bitmask: 0x0020
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Sensor Error Zone 2"
id: "room_sensor_error_zone_2"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1109
bitmask: 0x0001
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Communication Timeout Error Zone 2"
id: "communication_error_zone_2"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1109
bitmask: 0x0002
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Floor Sensor Error Zone 2"
id: "floor_sensor_error_zone_2"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1109
bitmask: 0x0004
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Cannot Install RUW Zone 2"
id: "ruw_cannot_install_zone_2"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1109
bitmask: 0x0008
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Hardware Error Zone 2"
id: "hardware_error_zone_2"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1109
bitmask: 0x0010
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Low Zone 2"
id: "battery_low_zone_2"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1109
bitmask: 0x0020
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Sensor Error Zone 3"
id: "room_sensor_error_zone_3"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1209
bitmask: 0x0001
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Communication Timeout Error Zone 3"
id: "communication_error_zone_3"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1209
bitmask: 0x0002
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Floor Sensor Error Zone 3"
id: "floor_sensor_error_zone_3"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1209
bitmask: 0x0004
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Cannot Install RUW Zone 3"
id: "ruw_cannot_install_zone_3"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1209
bitmask: 0x0008
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Hardware Error Zone 3"
id: "hardware_error_zone_3"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1209
bitmask: 0x0010
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Low Zone 3"
id: "battery_low_zone_3"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1209
bitmask: 0x0020
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Sensor Error Zone 4"
id: "room_sensor_error_zone_4"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1309
bitmask: 0x0001
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Communication Timeout Error Zone 4"
id: "communication_error_zone_4"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1309
bitmask: 0x0002
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Floor Sensor Error Zone 4"
id: "floor_sensor_error_zone_4"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1309
bitmask: 0x0004
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Cannot Install RUW Zone 4"
id: "ruw_cannot_install_zone_4"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1309
bitmask: 0x0008
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Hardware Error Zone 4"
id: "hardware_error_zone_4"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1309
bitmask: 0x0010
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Low Zone 4"
id: "battery_low_zone_4"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1309
bitmask: 0x0020
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Sensor Error Zone 5"
id: "room_sensor_error_zone_5"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1409
bitmask: 0x0001
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Communication Timeout Error Zone 5"
id: "communication_error_zone_5"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1409
bitmask: 0x0002
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Floor Sensor Error Zone 5"
id: "floor_sensor_error_zone_5"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1409
bitmask: 0x0004
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Cannot Install RUW Zone 5"
id: "ruw_cannot_install_zone_5"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1409
bitmask: 0x0008
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Hardware Error Zone 5"
id: "hardware_error_zone_5"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1409
bitmask: 0x0010
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Low Zone 5"
id: "battery_low_zone_5"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1409
bitmask: 0x0020
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Sensor Error Zone 6"
id: "room_sensor_error_zone_6"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1509
bitmask: 0x0001
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Communication Timeout Error Zone 6"
id: "communication_error_zone_6"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1509
bitmask: 0x0002
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Floor Sensor Error Zone 6"
id: "floor_sensor_error_zone_6"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1509
bitmask: 0x0004
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Cannot Install RUW Zone 6"
id: "ruw_cannot_install_zone_6"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1509
bitmask: 0x0008
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Hardware Error Zone 6"
id: "hardware_error_zone_6"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1509
bitmask: 0x0010
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Low Zone 6"
id: "battery_low_zone_6"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1509
bitmask: 0x0020
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Sensor Error Zone 7"
id: "room_sensor_error_zone_7"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1609
bitmask: 0x0001
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Communication Timeout Error Zone 7"
id: "communication_error_zone_7"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1609
bitmask: 0x0002
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Floor Sensor Error Zone 7"
id: "floor_sensor_error_zone_7"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1609
bitmask: 0x0004
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Cannot Install RUW Zone 7"
id: "ruw_cannot_install_zone_7"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1609
bitmask: 0x0008
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Hardware Error Zone 7"
id: "hardware_error_zone_7"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1609
bitmask: 0x0010
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Low Zone 7"
id: "battery_low_zone_7"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1609
bitmask: 0x0020
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Sensor Error Zone 8"
id: "room_sensor_error_zone_8"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1709
bitmask: 0x0001
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Communication Timeout Error Zone 8"
id: "communication_error_zone_8"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1709
bitmask: 0x0002
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Floor Sensor Error Zone 8"
id: "floor_sensor_error_zone_8"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1709
bitmask: 0x0004
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Cannot Install RUW Zone 8"
id: "ruw_cannot_install_zone_8"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1709
bitmask: 0x0008
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Hardware Error Zone 8"
id: "hardware_error_zone_8"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1709
bitmask: 0x0010
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Low Zone 8"
id: "battery_low_zone_8"
entity_category: diagnostic
device_class: problem
register_type: read
address: 1709
bitmask: 0x0020
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Heating Status Zone 1"
id: "heating_status_zone_1"
device_class: heat
register_type: discrete_input
address: 1003
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Heating Status Zone 2"
id: "heating_status_zone_2"
device_class: heat
register_type: discrete_input
address: 1103
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Heating Status Zone 3"
id: "heating_status_zone_3"
device_class: heat
register_type: discrete_input
address: 1203
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Heating Status Zone 4"
id: "heating_status_zone_4"
device_class: heat
register_type: discrete_input
address: 1303
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Heating Status Zone 5"
id: "heating_status_zone_5"
device_class: heat
register_type: discrete_input
address: 1403
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Heating Status Zone 6"
id: "heating_status_zone_6"
device_class: heat
register_type: discrete_input
address: 1503
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Heating Status Zone 7"
id: "heating_status_zone_7"
device_class: heat
register_type: discrete_input
address: 1603
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Heating Status Zone 8"
id: "heating_status_zone_8"
device_class: heat
register_type: discrete_input
address: 1703
sensor:
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Alarms Actuator 1"
id: "alarms_actuator_1"
register_type: read
address: 101
value_type: S_WORD
bitmask: 0xc000
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Alarms Actuator 2"
id: alarms_actuator_2
register_type: read
address: 101
value_type: S_WORD
bitmask: 0x3000
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Alarms Actuator 3"
id: alarms_actuator_3
register_type: read
address: 101
value_type: S_WORD
bitmask: 0x0c00
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Alarms Actuator 4"
id: alarms_actuator_4
register_type: read
address: 101
value_type: S_WORD
bitmask: 0x0300
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Alarms Actuator 5"
id: alarms_actuator_5
register_type: read
address: 101
value_type: S_WORD
bitmask: 0x00c0
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Alarms Actuator 6"
id: alarms_actuator_6
register_type: read
address: 101
value_type: S_WORD
bitmask: 0x0030
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Alarms Actuator 7"
id: alarms_actuator_7
register_type: read
address: 101
value_type: S_WORD
bitmask: 0x000c
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Alarms Actuator 8"
id: alarms_actuator_8
register_type: read
address: 101
value_type: S_WORD
bitmask: 0x0003
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Temperature Zone 1"
id: room_temp_zone_1
device_class: "temperature"
state_class: "measurement"
accuracy_decimals: 1
register_type: read
address: 1001
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Level Zone 1"
id: battery_level_zone_1
device_class: "battery"
state_class: "measurement"
register_type: read
address: 1003
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Link Quality Zone 1"
id: link_quality_zone_1
register_type: read
address: 1004
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Set Temperature Zone 1"
id: set_temperature_zone_1
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1006
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Regulation Output Zone 1"
id: regulation_output_zone_1
register_type: read
address: 1008
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Temperature Zone 2"
id: room_temp_zone_2
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1101
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Level Zone 2"
id: battery_level_zone_2
device_class: "battery"
state_class: "measurement"
register_type: read
address: 1103
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Link Quality Zone 2"
id: link_quality_zone_2
register_type: read
address: 1104
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Set Temperature Zone 2"
id: set_temperature_zone_2
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1106
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Regulation Output Zone 2"
id: regulation_output_zone_2
register_type: read
address: 1108
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Temperature Zone 3"
id: room_temp_zone_3
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1201
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Level Zone 3"
id: battery_level_zone_3
device_class: "battery"
state_class: "measurement"
register_type: read
address: 1203
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Link Quality Zone 3"
id: link_quality_zone_3
register_type: read
address: 1204
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Set Temperature Zone 3"
id: set_temperature_zone_3
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1206
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Regulation Output Zone 3"
id: regulation_output_zone_3
register_type: read
address: 1208
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Temperature Zone 4"
id: room_temp_zone_4
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1301
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Level Zone 4"
id: battery_level_zone_4
device_class: "battery"
state_class: "measurement"
register_type: read
address: 1303
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Link Quality Zone 4"
id: link_quality_zone_4
register_type: read
address: 1304
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Set Temperature Zone 4"
id: set_temperature_zone_4
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1306
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Regulation Output Zone 4"
id: regulation_output_zone_4
register_type: read
address: 1308
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Temperature Zone 5"
id: room_temp_zone_5
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1401
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Level Zone 5"
id: battery_level_zone_5
device_class: "battery"
state_class: "measurement"
register_type: read
address: 1403
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Link Quality Zone 5"
id: link_quality_zone_5
register_type: read
address: 1404
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Set Temperature Zone 5"
id: set_temperature_zone_5
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1406
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Regulation Output Zone 5"
id: regulation_output_zone_5
register_type: read
address: 1408
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Temperature Zone 6"
id: room_temp_zone_6
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1501
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Level Zone 6"
id: battery_level_zone_6
device_class: "battery"
state_class: "measurement"
register_type: read
address: 1503
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Link Quality Zone 6"
id: link_quality_zone_6
register_type: read
address: 1504
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Set Temperature Zone 6"
id: set_temperature_zone_6
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1506
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Regulation Output Zone 6"
id: regulation_output_zone_6
register_type: read
address: 1508
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Temperature Zone 7"
id: room_temp_zone_7
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1601
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Level Zone 7"
id: battery_level_zone_7
device_class: "battery"
state_class: "measurement"
register_type: read
address: 1603
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Link Quality Zone 7"
id: link_quality_zone_7
register_type: read
address: 1604
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Set Temperature Zone 7"
id: set_temperature_zone_7
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1606
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Regulation Output Zone 7"
id: regulation_output_zone_7
register_type: read
address: 1608
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Room Temperature Zone 8"
id: room_temp_zone_8
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1701
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Battery Level Zone 8"
id: battery_level_zone_8
device_class: "battery"
state_class: "measurement"
register_type: read
address: 1703
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Link Quality Zone 8"
id: link_quality_zone_8
register_type: read
address: 1704
unit_of_measurement: "%"
value_type: S_WORD
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Set Temperature Zone 8"
id: set_temperature_zone_8
device_class: "temperature"
state_class: "measurement"
register_type: read
address: 1706
unit_of_measurement: "°C"
value_type: S_WORD
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: lk_ics2
name: "Regulation Output Zone 8"
id: regulation_output_zone_8
register_type: read
address: 1708
unit_of_measurement: "%"
value_type: S_WORD
# Some helper functions to restart ESPHome from HA
button:
- platform: restart
name: LKICS2GW Restart
- platform: safe_mode
name: LKICS2GW Safe Mode Boot
I’m finally also up and running and I got my first room conencted and possible to control via home assistant. However I struggle somewhat with the logic around the addresses. I got the following set up, is there someone here who could kindly give me a hint of how the address numbering works? More specifically, I’m trying to reach the address of a slave unit.
I’m not sure what you mean by master and slave units. But if you just got a single LK ICS.2 controller unit with thermostats in each room. The thermostats only communicate with the controller unit and you only communicate with the controller unit via modbus.
So each room would be address 1001 for zone 1, 1101 for zone 2, 1201 for zone 3 and so on.
I have put my updated code for the Lilygo T-CAN485 on github btw if anyone is interested.
First I want to say nice work.
How do you have it setup in HA?
Has anyone tried to connect HA to the LK Webserver instead of RS485 on the ICS.2 controller ? I have the LK master ICS.2 and webserver located in a very inconvenient place so running a new cable from my NUC to that place would be a mess so really hoping there is a way to get the LK system into HA through the webserver. Anyone tried this or working on it, pleased let me know.