RalfWinter / lambda-heatpump-modbus-tcp-HA

Home Assistant configuration.yaml additions to integrate Lambda heatpump
Apache License 2.0
28 stars 6 forks source link

Modbus control of operation mode heating circuit 2 #11

Open patrickbohren opened 5 months ago

patrickbohren commented 5 months ago

Has anyone managed to control the operating mode register 5106 for heating circuit 2 via Modbus? Sending values such as OFF (0) to register 5006 (heating circuit 1) is accepted correctly, but sending the same value to register 5106 is ignored by the Lambda controller. Lambda SW Version: V0.0.4-3K Apr 24 2023

thecem commented 5 months ago

This is for heating circuit 2? Could you read the value? If this HC was configured without booting the controller it could maybe not be written.

patrickbohren commented 5 months ago

Reading back the operating mode register, both circuits show the values I have written periodically every minute. The lambda controller has been rebooted a couple of times since commissioning. Changing the mode from the GUI is the only way I have found so far to change the mode of heating circuit 2.

Pitri82 commented 2 months ago

Hi there, Thanks to all of you for your work. I was able to integrate my EU20L to Home Assistant and read all sensor. Writing values to the e-Manger also works fine.

But I've got the same issue like @patrickbohren. I can write values to the operating state of the heat circuits, with no error response. In HA shows the change after some seconds, but in the lambda GUI there is no change in the operation mode of the circuit. It is the same behaviour for all of my 4 heat circuits. (Modbus 5006 - 5306) Only the value accepted bei the EU20L is 0 fur circuit 3 (5206)

Normally the transfered operation state is "-1".

SW-Version V1.0.2 Apr 10 2024 09:32:23 Konfig-Version: V0x11 Parameter-Version: V0x1

ZimmermannThomas commented 3 weeks ago

Hello,

as far as I am correctly informed, this is a problem that was caused by an update some time ago. I can write the operating mode of my heating ciruits via Modbus, but it jumps back to the original value in Home Assistant after a while. The value does not change at all in the GUI of the heat pump. The heat pump does not accept the new operating mode either.

I have similar behavior with the setpoint flow line temperature. I write the value. The new value is displayed in Home Assistant, but only partially on the GUI (e.g. flow line setpoint) of the heat pump. After a few minutes, the value jumps back to the GUI value. Do I have to write the values every X minutes?

Snap
thecem commented 3 weeks ago

Datapoints between 00-49 have to be written regularly (timeout after 5 minutes), otherwise they fall to an assigned one Default value returned.

Eisbaer2 commented 3 weeks ago

Datapoints between 00-49 have to be written regularly (timeout after 5 minutes), otherwise they fall to an assigned one Default value returned.

Was meinst du damit? Sind das die letzten Stellen der Modbus-Adresse? Und wenn ja: Wie löst du das dann? Über eine Automation, die immer wieder den neuen Wert reinschreibt?

thecem commented 3 weeks ago

The Datapoint number 00-49 are the two last digit of the register address. An automation with regularly send values is overwriting the UI values. The UI values will not in every case represent the sender Information. This is a kind of fail safe mechanism to prevent no control if there is a connection loss time greater than the timeout.

It’s a pitty!!! All values are there, the control values, the compressor values, but lambda is not giving us theses values, via Modbus!

Only 3h of work within the sigmatek lasal software, if I could have access to, I would do it for them/us!

Pitri82 commented 1 week ago

So @thecem when I get your comment correct, I have to send the e.g. operation mode for a heat circuit every 5min to get the lambda doing what I want. But the GUI won’t display it at all. Am I correct?

thecem commented 1 week ago

Yes, I would recommend to send the value every 31-59(without 35,40,45,50,55) second (example: /33) of a minute with HA and every value in a different second. So no automations send at the same time! Then there will be no issues and alarms in lambda. Not every values will be shown in the HP UI! But some icons changes or temps will be shown. They are working on a full Modbus Stack, that every value could read ( even compressor values, what is the most importent and useful) and write values that interact with the UI.

Eisbaer2 commented 1 week ago

Yes, I would recommend to send the value every 31-59(without 35,40,45,50,55) second (example: /33) of a minute with HA and every value in a different second. So no automations send at the same time! Then there will be no issues and alarms in lambda. Not every values will be shown in the HP UI! But some icons changes or temps will be shown. They are working on a full Modbus Stack, that every value could read ( even compressor values, what is the most importent and useful) and write values that interact with the UI.

Können wir nicht einfach hier mal die entsprechenden Automationen sammeln und zur Verfügung stellen? Wäre doch wahrscheinlich für alle Seiten viel besser. Ich fange mal an mit meiner bisher einzigen Lambda-Automation, mit der ich dem Energiemanager meine Ist-Leistungswerte mitteile:

alias: Leistungsdaten => Wärmepumpe
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.leistung_ha_total_active_power
  - platform: time_pattern
    seconds: "30"
condition: []
action:
  - data:
      address: 102
      hub: EU13L
      value:
        - >-
          {{states('sensor.leistung_ha_total_active_power') | int |
          bitwise_and(65535)}}
    action: modbus.write_register
mode: single
thecem commented 1 week ago

IMG_3029

thecem commented 1 week ago

Homeassistant Automation to set Roomtemp for Heating Circuit 2:

alias: Heating Circuit Room Temp -> EU08L
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.average_temperature_dg
  - platform: time_pattern
    seconds: /37
condition: []
action:
  - data:
      hub: EU08L
      value:
        - >-
          {{ ((states('sensor.average_temperature_dg') |float) | round(1) * 10)
          | int | bitwise_and(65535) }}
      address: 5104
    action: modbus.write_register
mode: single
Eisbaer2 commented 1 week ago

IMG_3029

Genau das habe ich ausgewählt, dann kommen die beiden Hochkommata, dazwischen habe ich meinen Code kopiert. Hat leider nicht funktioniert. Da scheint mind. ein Zeichen dabei zu sein, mit dem sich die Code-Formatierung schwer tut...

thecem commented 1 week ago

Activate a light, switch or a heat cable on defrost status:

Nice fog!

alias: EU08L -> Defrosting light
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.eu08l_heat_pump_1_state_map
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: sensor.eu08l_heat_pump_1_state_map
            state: DEFROSTING
        sequence:
          - type: turn_on
            device_id: 7dca0101cd516b1d22b610f871ac6cbc
            entity_id: 39198a77aed900a2289f6f571e5d4723
            domain: light
            flash: short
mode: single

Heat Cable:

alias: EU08L -> Heat Cable
description: Heizkabel zur Entwässerung auf dem Garagen Dach bei Frost
trigger:
  - platform: state
    entity_id:
      - sensor.eu08l_heat_pump_1_state_map
    to: DEFROSTING
condition: []
action:
  - type: turn_on
    device_id: 41bb4f8cc2684ca12d91a55884ae875c
    entity_id: e69fdc243ef4bfa50ddea45d999d21fb
    domain: switch
  - delay:
      hours: 0
      minutes: 30
      seconds: 0
      milliseconds: 0
  - type: turn_off
    device_id: 41bb4f8cc2684ca12d91a55884ae875c
    entity_id: e69fdc243ef4bfa50ddea45d999d21fb
    domain: switch
mode: single

Ja, sie steht bei mir auf dem Garagen Dach und nein, das war nicht dauerhaft mit dem Heizkabel.

Und wer Angst vor Vibrationen hat, machts hiermit:

thecem commented 1 week ago

Alarm:

alias: EU08L -> Notify EU08L Alarm
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.eu08l_heat_pump_1_error_state
    above: 0
condition: []
action:
  - action: notify.persistent_notification
    metadata: {}
    data:
      title: ⚠️ Alarm Lambda EU08L
      message: "Error State: {{states('sensor.eu08l_heat_pump_1_error_state_map')}}"
      data:
        notification_id: eu08l_error
  - action: notify.mobile_app_iphone
    metadata: {}
    data:
      title: ⚠️ Alarm Lambda EU08L
      message: "Error State: {{states('sensor.eu08l_heat_pump_1_error_state_map')}}"
      data:
        notification_id: eu08l_error
mode: single
thecem commented 1 week ago

Fail Save Heating Circiut 1 Room Temp:

alias: EU08L <- EG Temp
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.average_temperature_eg
  - platform: time_pattern
    seconds: /31
condition: []
action:
  - data:
      hub: EU08L
      address: 5004
      value:
        - >-
          {% if states('sensor.average_temperature_eg') != "unknown" and
              states('sensor.average_temperature_eg')!= "unavailable" %}
          {{ ((states('sensor.average_temperature_eg') |float) | round(1) * 10)|
          int | bitwise_and(65535) }} {% else %} {{ (17.7 * 10)| int |
          bitwise_and(65535) }} {% endif %}
    action: modbus.write_register
mode: single

where 17.7°C in heat pump UI info you, something is wrong with your sensors, but not with automation ;-).

Wenn die Werte unknownoder unavailable sind wird 17.7°C Grad geschrieben, somit wird es nicht kalt in der Wohnung wenn der Sensor ausfällt. Brauch ich nicht aber schöne Spielerrei! Hintergrund war am Anfang zu verstehen was, wie mit der Lambda geht und was nicht.

thecem commented 1 week ago

IMG_3029

Genau das habe ich ausgewählt, dann kommen die beiden Hochkommata, dazwischen habe ich meinen Code kopiert. Hat leider nicht funktioniert. Da scheint mind. ein Zeichen dabei zu sein, mit dem sich die Code-Formatierung schwer tut...

So mache ich es:

  1. Copy&Paste den YAML Code
  2. Makiere den YAML Code
  3. Drück auf <>
  4. Done!

Ändere es oben, das hilft den Anderen.

Eisbaer2 commented 1 week ago

Zähler für den Abtau-Vorgang. In der configuration.yaml anzugelegen. Dazu habe ich noch einen Helfer angelegt, der mir den Wert für den jeweiligen Kalendertag anzeigt und immer um Mitternacht auf 0 gesetzt wird

 - platform: history_stats
    name: Abtauen
    entity_id: sensor.eu13l_hp1_operating_state_txt
    unique_id: 1dc1114c-c3be-4727-85ce-98b0f32dd7cb
    state: "Defrost"
    type: count
    start: "{{ now().replace(hour=0, minute=0, second=0) }}"
    end: "{{ now() }}"
Eisbaer2 commented 1 week ago

Genau das habe ich ausgewählt, dann kommen die beiden Hochkommata, dazwischen habe ich meinen Code kopiert. Hat leider nicht funktioniert. Da scheint mind. ein Zeichen dabei zu sein, mit dem sich die Code-Formatierung schwer tut...

So mache ich es:

  1. Copy&Paste den YAML Code
  2. Makiere den YAML Code
  3. Drück auf <>
  4. Done!

Ändere es oben, das hilft den Anderen.

Oh mann, die Reihenfolge war falsch... Mit reinkopieren, markieren, dann auf Code klicken, ging es problemlos. Danke! Habs auch oben geändert

thecem commented 1 week ago

Zähler für den Abtau-Vorgang. In der configuration.yaml anzugelegen. Dazu habe ich noch einen Helfer angelegt, der mir den Wert für den jeweiligen Kalendertag anzeigt und immer um Mitternacht auf 0 gesetzt wird

- platform: history_stats
   name: Abtauen
   entity_id: sensor.eu13l_hp1_operating_state_txt
   unique_id: 1dc1114c-c3be-4727-85ce-98b0f32dd7cb
   state: "Defrost"
   type: count
   start: "{{ now().replace(hour=0, minute=0, second=0) }}"
   end: "{{ now() }}"

Wie zählst Du? WMZ oder Werte aus der Lambda? Ich habe WMZ´s verbaut und lese die mit wmbusmeters, hier kommen starke abweichungen zum tragen, gerade im unteren bereich der Kompressionsrate. Insgesamt stimmen die Werte aber sehr gut.

Eisbaer2 commented 1 week ago

Fail Save Heating Circiut 1 Room Temp: ... where 17.7°C in heat pump UI info you, something is wrong with your sensors, but not with automation ;-).

Sorry, habe nicht ganz verstanden, wofür die Automation gut ist und was es mit den 17,7° auf sich hat. Etwas mehr Erklärung/Kontext wäre gut.

thecem commented 1 week ago

s.O. https://github.com/RalfWinter/lambda-heatpump-modbus-tcp-HA/issues/11#issuecomment-2365122589

thecem commented 1 week ago

Neue Modbus Beschreibung: https://lambda-wp.at/wp-content/uploads/2024/09/Modbus-Protokoll-und-Beschreibung.pdf

Eisbaer2 commented 1 week ago

Neue Modbus Beschreibung: https://lambda-wp.at/wp-content/uploads/2024/09/Modbus-Protokoll-und-Beschreibung.pdf

Interessant. Kurzer Vergleich zur letzten Version: