Weishaupt Heatpump integration via modbus

Hi pls find attached the code which works for me to load the hot water -

Modbus Automation to start WW load over Modbus

Load starts every day at 14:00 or when the Hue button is pressed on the left

  • alias: WP Warmwasser Load
    trigger:
    • platform: time
      at: ‘14:00:00’
    • platform: state
      entity_id: input_boolean.start_wp_ww_load
      to: ‘on’
      action:
    • service: modbus.write_register
      data:
      hub: wpump
      address: 42102
      slave: 1
      value: 80

      60 Minuten Push to reach the 45 C

      changed to 80 minutes in winter

    • service: input_boolean.turn_off
      entity_id: input_boolean.start_wp_ww_load
      mode: single

Hey there anyone tried to read in these params:

FormatPumpeLeistung unsigned short 20 … 100 20 … 100%
FormatPumpeVolumenstrom unsigned short 83 … 596 8.3 … 59.3 l/m - Step 17 = 0.1 m3/h

I tried it like this is it correct?

      - name: WP_PumpeLeistungWarmwasser   # 20....100%
        slave: 1
        address: 43106
        input_type: input
        unit_of_measurement: "%"
        state_class: measurement
        scale: 0.4         # TODO ??! Scale the raw value by 0.4 to get the percentage (20% to 100%)
        offset: 20
        precision: 1
        data_type: int16

      - name: WP_PumpeVolumenStromHeizen   # 83...596   8.3....59.3 l/m - Step 17 = 0.1 m3/h
        slave: 1
        address: 43108
        input_type: input
        unit_of_measurement: "m3/h"
        state_class: measurement
        scale: 0.05555555555555556  # TODO is this correct?! Calculate scaling factor (18 steps = 0.1, 510 units = 59.3)
        offset: 83
        precision: 1
        data_type: int16

@rafdev18 How do you track the energy consumption just by using the statistics values (my weißhaupt guy said these are not reliable…)

Or do you read in this parameter - I guess it shows the current power consumption? of the whole system?

System:
Parameter el. Leistungsvorgabe 0 … 30.000 W 40 002 Holding R/W

1 Like

I believe the volume flows and the pump output of the heat pump can be changed manually here. As far as I know, Weishaupt does not support readout via ModBus… It’s a shame that this isn’t possible, I use wemportal (GitHub - erikkastelec/hass-WEM-Portal: Custom component for retrieving sensor information from Weishaupt WEM Portal) for this.

I did try these registers and I think I found the following at my Geoblock WGB 8:

33106: Verdampfungstemperatur
33107: Überhitzung Verdichter
33108: Kondensationstemperatur

Pretty sure about the first one, that was the only number that matched the WEM Portal. About the following 2 I am not exactly sure. But I think I still haven´t found what you call Glycol in (Sole In). I think I will add some extra temperature sensors to know Sole In and out. Do we have a common place where we can collect our findings?

Thanks rafdev18, works great!

1 Like

Lelek62, is the Vorlauftemperatur with register 33104 working with your WGB8? I‘m having a WGB8 too but the Vorlauftemperatur is shown with a constant value of -3,276.8 °C. In the WEM portal I have two times „Vorlauftemperatur (Wärmeerzeuger)“ but one is showing a realistic value only (the ofter shows 0), so maybe with the WGB8 there is another register for the Vorlauftemperatur?

@chriscom2020
I use a Weißhaupt Split Heatpump (Split Wärmepumpe) WWP-LS-10-BR Modbus:
I share my whole code and instructions of how to configure your HA here:

https://github.com/CesMak/lacht_ha/blob/814937ddc41f4d9c682fef73478aa62965cfc202/heatpump/readme.md

You can also find a complete description of modbus codes.

If you have any feedback please write me here or open an issue.

@ravdev18
I have HA 11.5 and I have problems to get your code regarding the JAZ running I added in my templates_heatpump.yaml

    - name: "value_jitter_integration_fix"     # regarding correct power consumption measurements: see @rafdev in https://community.home-assistant.io/t/weishaupt-heatpump-integration-via-modbus/436823
      state: >
        {% set minutes = (now().hour * 60) + now().minute %}
        {% set is_positive = (minutes // 10) % 2 == 0 %}
        {% set value = 0.001 if is_positive else -0.001 %}
        {{ value }}

    - name: "heat_pump_electric_power"
      unit_of_measurement: "kW"
      device_class: power
      unique_id: “0412660815061367648539”
      state: >
        {% set base_power = 0.017 + states('sensor.value_jitter_integration_fix') | float(default=0) + states('sensor.wp_leistungsanforderung') | float(default=0) * 0.0189 %}
        {% set additional_power = 0 %}
        {% if states('sensor.wp_e1_status') == '1' %}
        {% set additional_power = additional_power + 3.5 %}
        {% endif %}
        {% if states('sensor.wp_e2_status') == '1' %}
        {% set additional_power = additional_power + 3.5 %}
        {% endif %}
        {{ base_power + additional_power }}
        attribute_templates:
        last_update: 1

This however does not seem to work if I check the heat_pump_electric_power in seetings-> entities I do not see any values. The value_jitter_integration_fix fluctuates -0.001 and 0.001.
OR do I have to add your code to the sensors? and not within the templates file?

Regarding other automations Warm Water Push I am also not sure where to put the code.
I added it now to automations.yaml file. But It is not working I thought it would work automatically at 2pm but it is not…

automations:
  #Heatpump Automations
  #some automations: load warmwater every day at 14:00 for 30minutes
  - alias: "WP_Warmwasser_Load"
    trigger:
      - platform: time
        at: "14:00:00"
    action:
      - service: modbus.write_register
        data:
          hub: wpump
          address: 42102
          slave: 1
          value: 30
    mode: single

  - name: "SystembetriebsartChange"
    unique_id: wpump_mode
    state: "{{ states('sensor.wp_systembetriebsart_text') }}"
    options: "{{ ['Automatik', 'Heizen', 'Kühlen', 'Sommer', 'Standby', '2. WEZ']}}"
    select_option:
      service: modbus.write_register
      data:
        hub: wpump
        slave: 1
        address: 40001
        value: >
          {% if option == "Automatik" %} 0
          {% elif option == "Heizen" %} 1
          {% elif option == "Kühlen" %} 2
          {% elif option == "Sommer" %} 3
          {% elif option == "Standby" %} 4
          {% elif option == "2. WEZ" %} 5
          {% endif %}

Besides that I would like to connect my PV and lets say if my battery is 100% and there is still sun outside I want to store more energy in my house. I thougt about increasing the Raumsolltermparture or maybe use the SG Ready Anhebung (but that is only for warm water correct?)

SG Ready Anhebung FormatSollwert 42 105 Holding R/W

I think the 42 105 is holding how many Kelvin the warm water should be heated above the given warm water temperature if the SG Ready function is active (default 5 Kelvin). It depends on your heat pump configuration what the SG Ready 1 and SG Ready 2 inputs are delivering. I’m using warm water overheating only. I didn‘t find a way to set the SG Ready state via modbus but solved it with a Shelly WLAN relais

@wonderer45 the heat pump has different Vorlauf circuits - looks like yours is not on #1 - if you look into the registers there are 3 different options.

Switch to the right one and receive the correct data ! if I recall the register schema is 33104 for #1 then 33204 for #2 … my installation used #3. After I did change the modbus code to the right sensor register all is good.

@chriscom2020 - yes correct on the jitter - you do need to add the jitter into the power sensor in order to keep the Riemann integration happy ! Just add the jitter into the calculated power sensor and it will correctly integrate power. It is for me very closely aligned to the real energy usage.

On the automation it is indeed as simple as adding the automation code for WW load into your automations.yaml file. You should see the automation in the settings automation area and you can even trigger it to run test. Might be just code formatting as the yaml is really column sensitive.

Several members on this group got my code into operations - so the code should work -

Actually I had an error in my automations file - that is why it did not show up, however it was actively working:

In the image however you can see the warmwater temperature does not alwayse follow the push. What good works is the time at 2pm the outer temperature sensor was showning that it was quite warm alwayse.
Is there a delta too big somwere adjustable? E.g. if the current warm water temperatur is still to high the push does not work? Or do I have to increase the time (30 min to 1h or so?).

Thanks rafdev18. I testet all 33x04 registers with no success. Finally I found a hint in the haustechnikforum which pointed to register 33111 - that works for my with my WGB8 sole heatpump, I’m getting the vorlauf temperature with a precision of 1/10 °C

Some more results to share:

measuring the electric power of the heatpump I use an Eltako power meter to measure the electric power (WW_eltako_power) consumed by the heatpump (Details under sesnsors section). Moreover I use the estimation of the heatpump electric power by rafdev (= heatpump_actual_electric_power). Displayed values:

Eltako measurements: WW_eltako_power (value not displayed in the night due to wifi)
Estimated heatpump electric power (by rafdev): heatpump_actual_electric_powers
total household consumption: load power (measured with pv inverter)

You can see that the @rafdev18 estimation is quite good (I need to scale this value up and thats it I guess :slight_smile:
However also my eltako even though i use the S0 interface (which is a pain - is not so bad - also this value requries some scaling factors).

@MarkusLacht - yes you are absolutely right - if the hot water temperature did not drop yet bellow the 5 Celsius from the set temperature then the push command will not trigger.

For me not an issue as I only do a hot water push at 2 pm and 24h later the temperature difference is correct.

@MarkusLacht - this is pretty cool - thank you for reconfirming the consumption calculation based on the the Leistungsanforderung value.

I would be interested in the adjustment you need to make in order to better hit the measured values. I am pretty happy with the result but there is always room for improvement.

BTW I am able to calculate also based on the sensor the amount from grid and solar power for my heat pump and can display this accordingly :wink: just if you are looking for your next project.

1 Like

Hello! I’m interested for managing my Weishaupt WWP LS13 BRE in home assistant , but I don’t see Modbus anywher in option or in the connection. I’ve an ethernet port for the wem portal. I can activate Wem portal (dont work for me, i need the Wheishaupt code for activate the heat pump), i can chose a Static IP ou DHCP but i can’t select modbus anywhere.

Someone can help me please?

How to use SG Ready Anhebung via Modbus:

This is how I try it currently:

  1. I activated SG READY Anhebung and set it to 4Kelvin
  2. I use these two scripts to activate / deactivate SGR2 = Erhöhter Betrieb
- alias: "WP_SGR2_activate"
  trigger:
    - platform: time
      at: "10:52:00"
  action:
    - service: modbus.write_register
      data:
        hub: wpump
        address: 35102
        slave: 1
        value: 2
  mode: single
  id: eff5c68f8c944d24ab5ffd3fcfe38a71

- alias: "WP_SGR2_deactivate"
  trigger:
    - platform: time
      at: "10:58:00"
  action:
    - service: modbus.write_register
      data:
        hub: wpump
        address: 35102
        slave: 1
        value: 0
  mode: single
  id: eff5c5f8c944d24ab5ffd3fcfe38a71

Some more german notes:
SGR1(35101) offen, SGR2(35102) zu: erhöhrter Betrieb (2)
Zu der Vorlauftemerperatur im Heizbetrieb und der WarmwasserSolltemperatur wird die eingestellte SG Ready Anhebung aufaddiert.
TODO wert auf 2 oder auf 0 schalten?! fuer bspw. 10min?!

SG Ready Anhebung: 42105 - read write value
Anhebung Warmwasser Solltemperatur 4K
Vorlaufueberhoehung: → WW soll temperatur + Vorlaufueberhoehung 7K
Maximaltemperatur : → nur fuer Zwangsbetrieb SGR1 und SGR2 zu 60°

Hello
I also am very new to home assistant.
Could you please help where to copy the code.
I adjust my ip adress in the code for the modbus but i don’t see any sensors being added in home assistant.

The setup language off the heatpump is Dutch, should everything be translated before i paste the code?

Thanks for the help with my beginners problems
Tom

1 Like

Hi there,

in case any of you also runs into the problem with an unavailable “warmwater temp sensor” after upgrading to 2024.3 -
I found the issue logged here: Lost Modbus Sensor after upgrade to Core 2024.3 · Issue #112607 · home-assistant/core · GitHub

There is no solution yet, but as a workaround it helps to either diable the warmwater temp sensor itself or the corresponding climate entity.

Both are linked to very same modebus register (in my case 32102) - and this seems to be a problem now.

Regards,
Stefan

Sorry. Did not see you reply. I solved it the easy way. I found a former colleague who is a developer and let him solve my problem.