Skip to content

basti242/homeassistant_lg_therma_v_modbus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description
Basics
How to install

Gateway
Homeassistant
Heatpump

Dashboard

Description

This package is for connecting and controlling an LG Therma V heat pump with Homeassistant via modbus.
This manual is tested with:

Heat pump Tested by
LG Therma V Monoblock 9kW basti242

Basics

The LG Heatpump is only availiable to communicate via RS485/Modbus TCP . The best way to connect them with Homeassistant is a Modbus TCP Gateway. For example a Waveshare Industrial RS232/RS485 to Ethernet Converter.

Converter

With this integration, you are able to controll nearly all settings of your heatpump.

Examples

image image

How to install

Gateway

IMG_4261

Tested Gateways:

Device Type Tested by Link
Waveshare RS485 To ETH tabletop device basti242 Amazon
Waveshare RS485 To ETH (B) top-hat rail fRiMMi83 Amazon
WaveShare RS232-485-TO-WIFI-ETH tabletop device BigCabbage Amazon

Homeassistant

Overview availiable Modbus Register

Download the modbus_lg_heatpump.yaml

Put the file in a folder named integrations. Create the folder if not exist.

image

Add a reference to your integration folder in your configuration.yaml. The homeassistant: line should be still there.

homeassistant:
  packages: !include_dir_named integrations

Set the secrets in your secrets.yaml file

# LG Heatpump
#-----------------------------------------------
lg_heatpump_modbus_host_ip: 10.10.1.xxx #change it to the IP adress from your gateway
lg_heatpump_modbus_port: 502
lg_heatpump_modbus_slave: 1

Restart your Homeassistant

Heatpump

Hardware settings
Wire connection between heatpump and gateway.
Inside the heatpump you will find a connector named "3rd PARTY CONTROLLER". This is the connector for the modbus wire. The wire must be connected to contact A (+) and B(-).

connection_heatpump

Dip switch inside the heatpump Settings for 4er series
On the main bord of the heatpump are 2 dip switch banks, SW1 and SW2. For us are the settings from SW1 important.

SW1 dip 1 - ON --> The heat pump is set as a Modbus slave device.
SW1 dip 2 - ON --> The heat pump is using a open protokoll.

image

Software settings
It is also required to set some options on the inside LG head unit (LG RS3).

image

  1. Navigate to Settings
  2. ...

image

That’s it! You can now control the heat pump from Homeassistant.

Dashboard

Examples
required HACS packages for these examples

  • mushroom
  • card_mod
  • Multiple-Entity-Row

image

type: entities
entities:
  - type: custom:mushroom-chips-card
    chips:
      - type: template
        content: Steuerungen
        card_mod:
          style: |
            ha-card {
              border: none !important;
              box-shadow: none !important; 
              padding: 3px !important;
              background: none !important;
              margin-bottom: -10px !important;
              font-size: 3.5rem !important;
            }
  - entity: input_select.hp_set_operation_mode
    name: Operation Mode
  - entity: input_select.hp_set_control_method
    name: Control Mode
  - entity: input_number.hp_dhw_target_temperatur
    name: Brauchwasser
    icon: kuf:sani_water_hot
type: conditional
conditions:
  - condition: state
    entity: sensor.hp_operation_mode
    state: "3"
card:
  type: entities
  entities:
    - type: custom:mushroom-chips-card
      chips:
        - type: template
          content: Sollwertverschiebungen
          card_mod:
            style: |
              ha-card {
                border: none !important;
                box-shadow: none !important; 
                padding: 3px !important;
                background: none !important;
                margin-bottom: -10px !important;
                font-size: 3.5rem !important;
              }
    - entity: input_number.hp_shift_value_in_auto_mode_circuit1
      name: HK₁
      secondary_info: last-changed
      icon: kuf:sani_heating
    - entity: input_number.hp_shift_value_in_auto_mode_circuit2
      name: HK₂
      secondary_info: last-changed
      icon: mdi:heating-coil
    - entity: sensor.hp_target_temp_circuit1
      type: custom:multiple-entity-row
      show_state: false
      name: Status
      icon: mdi:thermometer-chevron-up
      secondary_info: HK₁ & HK₂
      entities:
        - entity: sensor.hp_shift_value_in_auto_mode_circuit1
          name: HK₁
        - entity: sensor.hp_shift_value_in_auto_mode_circuit2
          name: HK₂

image

type: entities
entities:
  - entity: switch.hp_hauptschalter
    secondary_info: last-changed
    type: custom:multiple-entity-row
    name: Wärmepumpe
    state_color: true
    icon: mdi:heat-pump
    show_state: false
    entities:
      - entity: sensor.power_heatpump
        name: false
      - entity: switch.hp_silent_mode
        name: Silent Mode
        toggle: true
      - entity: switch.hp_hauptschalter
        name: Ein/Aus
        toggle: true
  - entity: binary_sensor.hp_dhw_heating_status
    secondary_info: last-changed
    type: custom:multiple-entity-row
    name: Brauchwasser (DHW)
    state_color: true
    icon: mdi:coolant-temperature
    show_state: false
    entities:
      - entity: sensor.hp_dhw_target_temp
        name: Soll
      - entity: sensor.hp_dhw_water_temp
        name: Ist
      - entity: switch.hp_dhw
        name: false
        toggle: true
  - type: custom:mini-graph-card
    animate: true
    decimals: 1
    hours_to_show: 24
    line_width: 2
    entities:
      - entity: sensor.hp_dhw_water_temp
        show_state: false
        color: "#FFBF00"
        name: Temperatur
    show:
      state: false
      icon: false
      name: false
      labels: true
      icon_adaptive_color: true
      extrema: false
      average: false
    icon: mdi:thermometer
    card_mod:
      style: |-
        ha-card {
          border: none !important;
        }
  - entity: switch.zirkulationspumpe
    secondary_info: last-changed
    type: custom:multiple-entity-row
    name: Zirkulationspumpe
    state_color: true
    icon: mdi:pump
    show_state: false
    entities:
      - entity: automation.heizung_zirkulationspumpe
        name: Automation
        toggle: true
      - entity: switch.zirkulationspumpe
        name: Ein/Aus
        toggle: true

image

type: entities
entities:
  - type: custom:mushroom-template-card
    primary: Heizkreis 1 (Radiatoren)
  - type: custom:bar-card
    positions:
      icon: "off"
      indicator: inside
      name: outside
    width: 80%
    height: 25px
    text-align: right
    padding-left: 4px
    bar-card-border-radius: 2px
    entities:
      - entity: sensor.hp_target_temp_circuit1
        name: Soll
      - entity: sensor.hp_outlet_temp
        name: Ist
    entity_row: false
  - type: custom:mushroom-template-card
    primary: Heizkreis 2 (Fußboden)
  - type: custom:bar-card
    positions:
      icon: "off"
      indicator: inside
      name: outside
    width: 80%
    height: 25px
    text-align: right
    padding-left: 4px
    bar-card-border-radius: 2px
    entities:
      - entity: sensor.hp_target_temp_circuit2
        name: Soll
      - entity: sensor.hp_flow_temp_circle_2
        name: Ist
    entity_row: false
  - type: section
  - entity: sensor.hp_target_temp_circuit1
    type: custom:multiple-entity-row
    show_state: false
    name: Sollwertverschiebungen
    icon: mdi:thermometer
    secondary_info: HK₁ & HK₂
    entities:
      - entity: sensor.hp_shift_value_in_auto_mode_circuit1
        name: HK₁
      - entity: sensor.hp_shift_value_in_auto_mode_circuit2
        name: HK₂
  - entity: sensor.hp_outside_temp
    name: Außentemperatur (Heatpump)
  - type: section
  - entity: sensor.hp_inlet_temp
    type: custom:multiple-entity-row
    show_state: false
    name: Wärmepumpe
    icon: mdi:thermometer-water
    secondary_info: Inlet / Outlet
    entities:
      - entity: sensor.hp_inlet_temp
        name: Eingang
      - entity: sensor.hp_outlet_temp
        name: Ausgang
  - entity: sensor.vorlauf_hk1_esp
    type: custom:multiple-entity-row
    show_state: false
    name: Heizkreis 1 (ESP)
    icon: mdi:thermometer
    secondary_info: Heizkörper
    entities:
      - entity: sensor.vorlauf_hk1_esp
        name: Vorlauf
      - entity: sensor.ruecklauf_hk1_esp
        name: Rücklauf
  - entity: sensor.vorlauf_hk2_esp
    type: custom:multiple-entity-row
    show_state: false
    name: Heizkreis 2 (ESP)
    icon: mdi:thermometer
    secondary_info: Fußbodenheizung
    entities:
      - entity: sensor.vorlauf_hk2_esp
        name: Vorlauf
      - entity: sensor.ruecklauf_hk2_esp
        name: Rücklauf
  - type: section
  - entity: sensor.temp_before_vaporiser
    type: custom:multiple-entity-row
    show_state: false
    name: Temperaturen Verdampfer
    icon: mdi:thermometer
    entities:
      - entity: sensor.temp_before_vaporiser
        name: vor
      - entity: sensor.temp_after_vaporiser
        name: nach
  - entity: sensor.temp_liquid_gas
    name: Temperatur Flüssiggas