An LG Therma V ignored every Modbus request until the installer-menu Modbus Address went from 21 to 1

I wired an LG Therma V heat pump to a Modbus gateway, set the DIP switch the manual asks for, and got nothing. The gateway’s serial counters showed 7 requests sent and 0 bytes received. The cause was a setting I believed was already correct: the unit’s Modbus address was 21, not the 1 the manual describes as the default.

TL;DR — On an LG Therma V R32 monobloc, check Installer settings → Connectivity → Modbus Address on the wall controller and set it to the slave ID you poll (01 here). Then read the 3xxxx registers with function code 04 and the 4xxxx registers with 03, at address = number − 1, one register per request where the map has gaps.

The setup

The heat pump is an LG Therma V 12 kW R32 monobloc with the « 4 series » control board. LG documents it as a Modbus RTU slave for a « 3rd party controller »: RS-485, 9600 baud, 8 data bits, no parity, 1 stop bit. An Elfin EW41B, a small RS-485 to Wi-Fi converter, sits on the bus with its protocol set to Modbus, so it translates Modbus TCP on its port 8899 into Modbus RTU on the wire. Home Assistant’s modbus integration polls the gateway every 5 to 30 seconds.

Diagram: Home Assistant speaks Modbus TCP to an RS-485 to Wi-Fi gateway, which speaks RS-485 to the heat pump's 3rd party controller terminals. Three numbered notes: Modbus Address factory value 21 instead of 1; wires on the 3rd party controller terminals, swap A and B if silent; 3xxxx registers use function code 04 and 4xxxx use 03, raw address is number minus 1.

What I expected

From the installation manual: Option Switch 1, DIP 1 to ON (Modbus slave), bus wires on the terminals the manual names for Modbus, slave address 1 by default. Then 30001-range registers as holding registers (the manual’s table title says « Holding (0x03) ») and 40001-range as input registers (« Input (0x04) »).

What actually happens

Four separate things were off, and any one of them is enough to get silence or timeouts.

  1. The address. In the installer menu, Modbus Address read 21. Requests to slave 1 were simply ignored: a Modbus slave does not answer frames addressed to someone else, so there is no error to see, only timeouts. Setting it to 01 made the unit answer at once.
  2. The terminals. On this unit the bus goes to the terminals labelled 3rd party controller A/B (26 and 27 on this board), not to the pair the manual names. A and B also ended up swapped relative to my first guess. Swapping them is harmless on RS-485 and worth trying early.
  3. The function codes are the other way round. The 3xxxx registers (temperatures, flow, error code) answer to function 04, read input registers. The 4xxxx registers (mode, water setpoint, curve offset) answer to function 03, read holding registers. That is the usual Modicon convention; it is the manual’s table titles that are inverted. In both cases the raw address is the register number minus the prefix minus 1: 30004 is input register 3.
  4. Gaps in the map time out. Registers the unit does not implement (on mine, 30015-30016 and everything from 30026 to 30063, including the energy registers some newer models expose) do not return a Modbus exception. They time out. A block read that spans one of them fails as a whole.

I also set DIP 2 of Option Switch 1 to ON. I did not test whether it is needed.

The fix

The working Home Assistant configuration, trimmed to one register of each kind. The host is a placeholder for the gateway’s address:

modbus:
  - name: heat_pump
    type: tcp
    host: heatpump-gateway.local
    port: 8899
    timeout: 5
    delay: 2
    message_wait_milliseconds: 100
    sensors:
      - {name: "HP water out", address: 3, input_type: input, data_type: int16, scale: 0.1, precision: 1, unit_of_measurement: "°C", scan_interval: 10}
      - {name: "HP flow", address: 8, input_type: input, data_type: uint16, scale: 0.1, precision: 1, unit_of_measurement: "L/min", scan_interval: 10}
      - {name: "HP outdoor", address: 12, input_type: input, data_type: int16, scale: 0.1, precision: 1, unit_of_measurement: "°C", scan_interval: 15}
      - {name: "HP curve offset", address: 4, input_type: holding, data_type: int16, unit_of_measurement: "K", scan_interval: 30}
    binary_sensors:
      - {name: "HP compressor", address: 3, input_type: discrete_input, scan_interval: 5}
    switches:
      - {name: "HP heating", address: 0, write_type: coil, verify: {input_type: coil, address: 0}}

Each sensor is its own request, so a missing register only breaks itself. The weather-curve offset (40005) is a signed 16-bit value; modbus.write_register takes the raw unsigned word, so a negative offset is written as 65536 + value:

action: modbus.write_register
data: {hub: heat_pump, slave: 1, address: 4, value: "{{ 65536 - 5 }}"}  # offset -5 K

Reading the register back gives −5 with data_type: int16.

Why it works

Modbus RTU is a polled bus where every frame carries a slave address and only the matching device replies. A wrong address looks exactly like a broken cable: no answer, no error frame. The gateway’s serial counters (bytes sent versus bytes received) are the quickest way to tell « nothing comes back » from « something comes back and the client rejects it ». Here it was 0 bytes received, which points at address, wiring or DIP switch, never at register numbers.

The manual’s « default 1 » is a statement about a factory state, and a unit that has been through an installer’s hands may not be in it. The value shown on the controller is the only one that counts.

What I did not test

  • Only one unit: R32 monobloc 12 kW, 4 series board, wall controller left connected. Split units, R290 models and 3 series boards may use other terminals and DIP positions.
  • DIP 2 of Option Switch 1 at OFF.
  • Writing every holding register. In Auto mode I only rely on the curve offset (40005); writing the fixed water setpoint (40003) there may be ignored. Writes can be silently dropped, so read back after writing.
  • Long-term EEPROM wear from frequent writes is undocumented; I write only on change.

Facts

context: LG Therma V R32 monobloc (4 series) as Modbus RTU slave behind an RS-485 to Wi-Fi gateway, polled by Home Assistant
problem: No reply at all (0 bytes received) despite DIP switch set; then block reads timing out
solution: Set Installer settings > Connectivity > Modbus Address to the polled ID (factory value was 21); wire to the 3rd party controller A/B terminals; 3xxxx = FC 04, 4xxxx = FC 03, address = number - 1; one register per request
verified_on: 2026-10-17
applies_to: LG Therma V R32 monobloc HM123MR, 4 series control, wall controller still connected; still polling fine on 2026-11-09
does_not_apply_to: Units without the 3rd party controller option; 3 series boards (different DIP layout)

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Retour en haut