Writing a component for Luxtronik Heatpumps

Where did you place that in the Code ?

I wonder where to put the code. I tried to add it to my sensor.yaml, but it errors.


what error message do you get?

I found the problem. I used wrong sensor name. The code works well now:

  • platform: template
    sensors:
    id_web_time_vdstd_akt:
    friendly_name: VD-stojí
    value_template: >-
    {% set time = (states.luxtronik.stav_zivotnost_kompresoru.state | int) | int %}
    {% set minutes = ((time % 3600) / 60) | int %}
    {% set hours = ((time % 86400) / 3600) | int %}
    {% set days = (time / 86400) | int %}
    {%- if time < 60 -%}
    0
    {%- else -%}
    {%- if days > 0 -%}
    {{ days }}d
    {%- endif -%}
    {%- if hours > 0 -%}
    {%- if days > 0 -%}
    {{ ’ ’ }}
    {%- endif -%}
    {{ hours }}h
    {%- endif -%}
    {%- if minutes > 0 -%}
    {%- if days > 0 or hours > 0 -%}
    {{ ’ ’ }}
    {%- endif -%}
    {{ minutes }}m
    {%- endif -%}
    {%- endif -%}

Hi everyone,

I have been trying to setup my Alpha Innotec heatpump to Home Assistant for several days now and I noticed something very weird.
I wanted to use the web interface to quickly figure out what some useful parameters to use in home assistant, but after the first time I accessed the web interface, it disappeared on me after a few minutes and I can’t get it back.
I used to Alpha Control app to check if the connection was still working and it was, but it showed a different IP address. After setting a fixed ip in the router (which I had not yet done) and a restart of the display, I was still not able to use the web interface.

I’m at a complete loss and I’m either doing something very stupid or something is broken.

Is there another good (easy to use) source to figure out what some of the more useful parameters are? I’m specifically interested in the power consumption.

Update: the web interface is available again the next day. Keeping an eye on it for how long it lasts. Let’s hope it stays stable.
I’m still interested in practical tips or examples to add sensors.
If someone can get me started on automatically adding some sensors, I’m willing to dive into the coding again to see if we can give this integration a bit of a push in the right direction.

Is it also possible to read out the “Heizgrenze” (temperatureHeatingLimit)?
I am migrating from Openhab to Home assistant and there it was possible, but I could not find any sensor.

And is there the possibility to read out the “hysterese”?

Hello,
did you manage to run dumb.lux.py anyhow?
Could you share your experience on how to do that on home assistant os?

Quick question: how can I check if my heat pump is cooling or heating?
I can see it is cooling on the display, but I have not found the corresponding sensor for it yet.
Any tips?

Quick reply: ID_WEB_WP_BZ_akt

1 Like

ID_WEB_WP_BZ_akt is indeed the correct status sensor, unfortunately, it seems that there is a bug in the heat pump firmware, as you can read here and the “cooling” status is not displayed.

1 Like

Hello everyone,

new to Home Assistant

I have installed Bouni’s Luxtronik component using HACS to Home Assistant.

I have edited the configuration.yaml to include the bellow pasted lines,
but now I am unable to find any luxtronik Integration/Device/Entity to add to Dashboards in Homeassistant.

Can anyone please give me a direction?

thank you

Ivo

luxtronik:
  host: 192.168....(my alpha innotec IP address)
  port: 8889

sensor:
  - platform: luxtronik
    sensors:
      - 'ID_WEB_Temperatur_TVL'
      - 'ID_WEB_Temperatur_TRL'
      - 'ID_WEB_Sollwert_TRL_HZ'
      - 'ID_WEB_Temperatur_TRL_ext'
      - 'ID_WEB_Temperatur_TBW'
      - 'ID_WEB_Temperatur_THG'
      - 'ID_WEB_Temperatur_TA'
      - 'ID_WEB_Temperatur_TWE'
      - 'ID_WEB_Temperatur_TWA'
      - 'ID_WEB_Temperatur_TFB1'
      - 'ID_WEB_Sollwert_TVL_MK1'
      - 'ID_WEB_Temperatur_TFB2'
      - 'ID_WEB_Sollwert_TVL_MK2'
      - 'ID_WEB_LIN_UH'
      - 'ID_WEB_LIN_UH_Soll'
      - 'ID_WEB_LIN_HD'
      - 'ID_WEB_LIN_ND'
      - 'ID_WEB_WMZ_Brauchwasser'
      - 'ID_WEB_WMZ_Heizung'
      - 'ID_WEB_WMZ_Seit'
      
binary_sensors:
  - platform: luxtronik
    sensors:
      - 'ID_WEB_VBOout'
      - 'ID_WEB_HUPout'
      - 'ID_WEB_MA1out'
      - 'ID_WEB_MZ1out'
      - 'ID_WEB_VD1out'
      - 'ID_WEB_ZIPout'
      - 'ID_WEB_ZUPout'
      - 'ID_WEB_EVUin'

I think You are making it wrong
take a look at examples:

sensor:
  - platform: luxtronik
    sensors:
      - group: calculations
        id: ID_WEB_Temperatur_TVL
        friendly_name: Temperature forerun
        icon: mdi:thermometer

You also have to restart HA after making changes to configuration.yaml

I went the easy way - run this code on on my PC in local network using VS Code

Hello all,
do not know if it is related to component or I’m I missing something but I can not make scan_interval to function. It always refreshes sensors once in a minute.
Maybe I’m doing something wrong?

- platform: luxtronik
  scan_interval:
    seconds: 1
  sensors:
   .....
    - group: calculations
      id: Heat_Output
      friendly_name: Heat output 

also tried miliseconds, and a regular:

- platform: luxtronik
  scan_interval: 1
  sensors:
   .....
    - group: calculations
      id: Heat_Output
      friendly_name: Heat output 

Edit:
So I have looked at the code, and if I’m not mistaken - it is hadrcoded to 60s?
Is there a reason for that?

I want to adjust the heat pump to work better with my solar panels and I see various ways of doing this. The first thing I did was to adjust the boiler target temperature based on solar production. This seems to work well and most hot water is produced using solar with no compromise to comfort.

What would be the best entity/parameter to adjust the temperature?
Or is it better to use the operating modes “party/automatic/off”?

1 Like

Hi Everyone,

I’m still playing around with the integration so I though I’d share my progress.

I think I managed to determine when the heatpump is heating, cooling and/or producing warm water. Using a separate energy meter, I can track the power consumption for each of these things now.
I used a bunch of helpers because I didn’t know how to do it in an easier way.

In short:
IF the operating time changed
THEN store the new operating time in a time helper
AND add the energy difference since the last update to an energy helper
AND set state boolean to true
ELSE set state boolean to false
FINALLY update another energy helper

You can use the same IF, THEN, ELSE also for heating and cooling in the same automation.

This is the automation

alias: Luxtronik - States
trigger:
  - platform: state
    entity_id:
      - luxtronik.system_time  # use the system time to trigger the automation of every refresh
action:
  - if: 
      - condition: template
        value_template: >-
          {{ states('luxtronik.operating_time_hot_water') | int !=
          states('input_number.luxtronik_hot_water_time') | int }}
    then: 
      - service: input_number.set_value
        target:
          entity_id: input_number.luxtronik_hot_water_time
        data:
          value: '{{ states(''luxtronik.operating_time_hot_water'') | int }}'
      - service: input_number.set_value
        target:
          entity_id: input_number.luxtronik_hot_water_energy
        data:
          value: >-
            {{ (states('input_number.luxtronik_hot_water_energy') | float +
            states('sensor.heatpump_energy') | float -
            states('input_number.luxtronik_energy') | float) | round(2) }}
      - service: input_boolean.turn_on
        data: {}
        target:
          entity_id: input_boolean.luxtronik_hot_water
    else:
      - service: input_boolean.turn_off
        data: {}
        target:
          entity_id: input_boolean.luxtronik_hot_water
  - service: input_number.set_value
    target:
      entity_id: input_number.luxtronik_energy
    data:
      value: '{{ states(''sensor.heatpump_energy'') }}'

It uses the following entities:

        - group: calculations
          id: ID_WEB_AktuelleTimeStamp  # system time
          friendly_name: System time

        - group: calculations
          id: ID_WEB_Zaehler_BetrZeitKue # Operating hours cooling
          friendly_name: Operating time - Cooling

        - group: calculations
          id: ID_WEB_Zaehler_BetrZeitBW  # Operating hours hot water
          friendly_name: Operating time - Hot water

        - group: calculations
          id: ID_WEB_Zaehler_BetrZeitHz  # Operating hours heating
          friendly_name: Operating time - Heating

If you combine this with the Energy tracked by the heatpump, you can calculate the COP

        - group: calculations
          id: ID_WEB_WMZ_Heizung
          friendly_name: Energy - Heating

        - group: calculations
          id: ID_WEB_WMZ_Brauchwasser
          friendly_name: Energy - Hot water
1 Like

I’m not sure exactly what you’re trying to achieve, but I’ve created a Luxtronik component that makes integration a bit easier.
Maybe that will help you.
Feel free to express your wishes for enhancements.
In sensor.luxtronik_status you can get the current operation mode.

2 Likes

This looks very nice. I wasn’t aware any substantial development wat happening for Luxtronik.

Why is this a separate project and not a continuation of the current HACS integration?
Can you provide installation instructions? I have never installed an integration by hand before.
Does it work together with the old HACS integration or should I remote it?

My goal is to determine when the heatpump is heating or cooling (which I could not find a reliable entity for) and to calculate the COP for heating and hot water.

1 Like

Why is this a separate project and not a continuation of the current HACS integration?

I’ve tried adding this as a normal integration, but I’ve failed so far due to the coding guidelines.
Here’s the PR, if you have the opportunity, feel free to contribute:

Can you provide installation instructions?

Just add my github repo url (GitHub - BenPru/luxtronik: Luxtronik integration for Home Assistant) as custom hacs repo url in hacs and install luxtronik2 via hacs.
Your heatpump should auto discovered after restart and you can follow the setup assistant pages.

Does it work together with the old HACS integration or should I remote it?

It should work together. It uses the domain luxtronik2 instead of luxtronik.
In yaml you can use own luxtronik properties in the same style like "luxtronik.", just use “luxtronik2.”. But know that luxtronik2 is a newer integration and creates e.g. sensor.luxtronik_ instead of luxtronik.*!

My goal is to determine when the heatpump is heating or cooling (which I could not find a reliable entity for)

You can use sensor.luxtronik_status for it.

and to calculate the COP for heating and hot water.

This is only possible with external power consumption meter, not standalone with luxtronik.

2 Likes

I’d love to help. It has been a while since I did professional coding, but its a project worthwhile to spend some effort on. I see that there are some conflicts, but I can’t see more than that. What’s the next step which needs to be taken care off?