LG Therma V heatpump Waveshare modbus

For heating/cooling related questions in Domoticz

Moderator: leecollings

Post Reply
Garfield
Posts: 5
Joined: Thursday 20 November 2014 12:14
Target OS: Linux
Domoticz version: 2024.4
Contact:

LG Therma V heatpump Waveshare modbus

Post by Garfield »

Is there anyone who has the combination LG Therma V heat pump and the Waveshare rs485 to eth (b) working?
I have already tried the various modbus plugins that are available, but they do not work for my heat pump.
Via a command line command I receive data from the Waveshare (e.g. mbpoll "IPadres waveshare" -a 2 -t 0 -r 1) which indicates that the waveshare is properly connected.
the output of the modpoll command is:
Protocol configuration: Modbus TCP
Slave configuration...: address = [2]
start reference = 1, count = 1
Communication.........: "IPadres Waveshare", port 502, t/o 1.00 s, poll rate 1000 ms
Data type..........: discrete output (coil)

-- Polling slave 2...
[1]: 1

Thanks in advance.
Lu2St
Posts: 2
Joined: Wednesday 21 February 2024 10:10
Target OS: Windows
Domoticz version:
Contact:

Re: LG Therma V heatpump Waveshare modbus

Post by Lu2St »

I do, just trying to make it work.
[Edit]: I do, went through some bumps, but works now, see my own reply below.
Split Type HU143MA U33/ HN1639 NK3 NK5, SW 3.0.6.6

There are a lots of bumps here.

I just recently got some parameters into Home Assistant through a yaml file: Compressor rmp, outside temp and flow temperature in circulation2
So actually 3 out of some ~50.

I'm using just the first 378 lines of this yaml: https://github.com/basti242/homeassista ... a_v_modbus (this might be my issue, I'll try a simplier one, eg here:https://rodmcbain.com/mastering-modbus- ... assistant/ ).
[EDIT]: this wasn't the issue, the code is perfectly OK.

The key issues you may face:
- Correct dip switch settings on the Therma V internal unit (or analog board in a combo outdoor unit). This is really crazy as various revisions have possibly reversed functionality of some switches (eg. DSW1/SW2 - generic vs. Siemens protocol), [EDIT]: see manual vs. this video https://youtu.be/FABoic8q3AU?si=sCCZHlEea21pxWzB NO, don't, just use the manual linked in the next post for 8+8 DSW PCB layout.
- Correct [EDIT]: Central comm and Modbus address in the Wall panel of the Therma - in your case it should be the same as the Slave setting in your command line.
- Correct entity address (the manual is deeply misleading - eg content described under address 30001 is in reality in the 30000 position [EDIT] - some official manuals mention the +1 value issue; also Holds and inputs are interchanged)
- Correct setup of the Waveshare device (exactly the Modbus TCP as you write)
- Correct caption/syntax in the yaml (spaces, split config.yaml specifics...)

My issue might be the NK3 revision, that may need SW update. But I don't give up to try and find out.
[Edit]: Although some users reported, this was not the issue I was facing

I'm using this tool (https://github.com/ClassicDIY/ModbusTool) to verify the communication, but so far I just get a connection to the Waveshare, but no data from the LG Heatpump.

Hope any of this helps you.
Last edited by Lu2St on Tuesday 27 February 2024 23:32, edited 2 times in total.
LG Therma V Split HU143MA U33 / HN1639NK5 (Sw. 3-0-6-6) successfully integrated through Waveshare RS485 to ETH (POE) into HA.
Lu2St
Posts: 2
Joined: Wednesday 21 February 2024 10:10
Target OS: Windows
Domoticz version:
Contact:

Re: LG Therma V heatpump Waveshare modbus

Post by Lu2St »

OK. Now it works.

My main issue was the DIP SW. (Also a bit of the contribution to my issue was that I got documentation for the internal unit as if it was the NK3 version (8+4 DSW), however I have an NK5 that has a 8+8 DSW layout).

So. As the NK5 has the 8+8 DSW PCB layout that I was not able to find anywhere (except for some videos where the DIP SW settings' description was misleading/wrong) I have set it wrong.

Finally I checked the labels and searched until I found this doc:
https://www.lg.com/pl/business/download ... 14746].pdf

Yep, It's Polish. But it's the only reliable document for the DIP SW settings on the 8+8 DIP SW layout PCBs.

IMPORTANT: look very carefully at the DIP SW setting and apply as the text in the table describes.
For my Therma V HU143MA U33/HN1639NK5 the settings as follows:
DSW2 (the upper DSW):
SW1: ON (UP) {Indoor unit setting for central control (Master/Slave) > Slave}
DSW1 (the lower DSW):
SW1: ON (UP) {LG unit's Modbus device type (Master/Slave) > Slave}
SW2: ON (UP) {Modbus protocol (Open/REGINE) > Open protocol}

Wrong DSW setup lead to the following errors:
1) Read Error 02 on connecting with e.g. the "Modbus Tool" app to the LG heat pump (vs. connection just to the Waveshare Modbus server via TCP using the VirCom tool with no issues).
2) Oddly some entities/addresses had values present in Home assistant - for me the most misleading thing you could imagine.
3) The LG Control panel's Service settings had the "Connection" menu available, however the "Modbus address" item was not present (had a different name) and had no correlation to the "Central control Address" item (now this address defines the first half of the Modbus address).
4) The ACT diode (green) on the Waveshare device never made it to a visible full green (longer) blink, just very fast blinks with blue (visible as kind of white).

Hope this helps.
Last edited by Lu2St on Tuesday 27 February 2024 23:43, edited 1 time in total.
LG Therma V Split HU143MA U33 / HN1639NK5 (Sw. 3-0-6-6) successfully integrated through Waveshare RS485 to ETH (POE) into HA.
Garfield
Posts: 5
Joined: Thursday 20 November 2014 12:14
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: LG Therma V heatpump Waveshare modbus

Post by Garfield »

I have also managed it now. I can read all registers and write the "coil" and "holding" register. I wrote 6 Lua scripts for it. No idea if that can be merged, but that is for later. Please note that modbus 3 is an "input" register and modbus 4 is a "holding" register. The LG manual is incorrect.
If anyone is interested, please let me know.

Lu2St thank you for your input.
robaduck
Posts: 1
Joined: Wednesday 09 October 2024 19:35
Target OS: Windows
Domoticz version:
Contact:

Re: LG Therma V heatpump Waveshare modbus

Post by robaduck »

I know it's been some time and that's probably why the link for the picture isn't working - if anyone has it i might get the missing link
however I have as issue that looks very similar to what this thread is about.

Been hammering on the modbus connection for a couple of weeks without any reply from my zhbw056a1 LG gen4 - so far with no response

I have DIP1 sw1+2 and DIP2 sw1 on (indoor pcb)
modbus address on the pump control display is group 0 and address 1. or 0 1

Great tool with the modbus "blaster" and I'm now completely convinced that it's my LG which is not responding as I see no RX data on the waveshare modbus "RS485 TO POE ETH (B)"

I have been testing the YAML slave adresses a bit to see if that was my issue, but so far nothing works


Code: Select all

  - name: modbus_hub
    type: tcp
    host: 192.168.128.50
    port: 502
    delay: 1
    timeout: 14
    binary_sensors:
        - name: "LG Therma V Compressor"
          address: 3
          slave: 0
          scan_interval: 10
          device_class: running
          input_type: discrete_input
        - name: "LG Therma V Defrost"
          address: 4
          slave: 2
          scan_interval: 10
          device_class: running
          input_type: discrete_input
        - name: "hp_heating_mode"
          unique_id: "modbus.hp_heating_mode"
          address: 0
          scan_interval: 5
          slave: 1
          input_type: coil
        - name: "hp_flow_too_low"
          unique_id: "modbus.hp_flow_too_low"
          address: 0
          scan_interval: 10
          slave: 1
          input_type: discrete_input
        - name: "hp_pump_status"
          unique_id: "modbus.hp_pump_status"
          address: 1
          scan_interval: 10
          slave: 1
          input_type: discrete_input
        - name: "hp_compressor_status"
          unique_id: "modbus.hp_compressor_status"
          address: 3
          scan_interval: 10
          slave: 1
          input_type: discrete_input
        - name: "hp_defrost_status"
          unique_id: "modbus.hp_defrost_status"
          address: 4
          scan_interval: 30
          slave: 1
          input_type: discrete_input
        - name: "hp_dhw_status"
          unique_id: "modbus.hp_dhw_status"
          address: 5
          scan_interval: 10
          slave: 1
          input_type: discrete_input
        - name: "hp_disinfect_status"
          unique_id: "modbus.hp_disinfect_status"
          address: 6
          scan_interval: 60
          slave: 1
          input_type: discrete_input
        - name: "hp_silent_status"
          unique_id: "modbus.hp_silent_status"
          address: 7
          scan_interval: 10
          slave: 1
          input_type: discrete_input
        - name: "hp_error_status"
          unique_id: "modbus.hp_error_status"
          address: 13
          scan_interval: 60
          slave: 1
          input_type: discrete_input
    sensors:
        - name: hp_mode
          unique_id: "hp_mode"
          scan_interval: 10
          address: 1
          slave: 1
          input_type: input
        - name: hp_dhw_target_temp
          unique_id: "modbus.hp_dhw_target_temp"
          scan_interval: 10
          address: 8
          slave: 1
          input_type: holding
          scale: 0.1
          precision: 1
          device_class: temperature
          unit_of_measurement: "°C"
        - name: "hp_inlet_temp"
          unique_id: "modbus.hp_inlet_temp"
          scan_interval: 10
          address: 2
          slave: 1
          input_type: input
          scale: 0.1
          precision: 1
          device_class: temperature
          unit_of_measurement: "°C"
        - name: "hp_flow_rate"
          unique_id: "modbus.hp_flow_rate"
          scan_interval: 10
          address: 8
          slave: 1
          scale: 0.1
          precision: 1
          input_type: input
          unit_of_measurement: "l/min"
        - name: "hp_outdoor_air_temp"
          unique_id: "modbus.hp_outdoor_air_temp"
          scan_interval: 60
          address: 12
          slave: 1
          input_type: input
          scale: 0.1
          precision: 1
          device_class: temperature
          unit_of_measurement: "°C"
    switches:
        - name: "hp_dhw_mode"
          unique_id: "modbus.hp_dhw_mode"
          slave: 1
          address: 1
          write_type: coil
          command_on: 1
          command_off: 0
          verify:
            input_type: coil
            address: 1
            state_on: 1
            state_off: 0
        - name: "hp_silent_mode"
          unique_id: "modbus.hp_silent_mode"
          slave: 1
          address: 2
          write_type: coil
          command_on: 1
          command_off: 0
          verify:
            input_type: coil
            address: 2
            state_on: 1
            state_off: 0

    climates:
        - name: "hp_heating_climate"
          unique_id: "modbus.hp_heating_climate"
          address: 3
          slave: 1
          input_type: input
          max_temp: 45
          min_temp: 15
          offset: 0
          precision: 1
          scale: 0.1
          target_temp_register: 2
          temp_step: 0.5
          temperature_unit: C
          hvac_onoff_register: 0
          write_registers: true
          hvac_mode_register:
            address: 0
            values:
              state_cool: 0
              state_heat: 4
              state_auto: 3

        - name: "hp_water_climate"
          unique_id: "modbus.hp_water_climate"
          address: 5
          slave: 1
          input_type: input
          max_temp: 55
          min_temp: 40
          offset: 0
          precision: 1
          scale: 0.1
          target_temp_register: 8
          temp_step: 0.5
          temperature_unit: C
Attachments
2024-10-09 21_13_54-Device Settings.png
2024-10-09 21_13_54-Device Settings.png (182.62 KiB) Viewed 1883 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests