Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General E-Manager section sensors unavailable #3

Open
lutzvahl opened this issue Jun 15, 2023 · 69 comments
Open

General E-Manager section sensors unavailable #3

lutzvahl opened this issue Jun 15, 2023 · 69 comments

Comments

@lutzvahl
Copy link

Hi,

great work, thanks for sharing the config!
I was able to adopt in my HA, unfortunately I don't get any values for the 'General E-Manager' Section registers 01xx.
E.g. for 0103 (Actual power consumption) HA is just showing: unavailable
Pump values, buffer and boiler (so 1xxx, 2xxx, and 3xxx) are working great!
I'm even able to set the solar power values (register 0102), but I'm unable to read the overall power consumption of the system.

Any clue what's going on with the 01xx registers?

As of now I'm using the eu13l_hp1_inverter_power_consumption (1012 registers) to track power.

@RalfWinter
Copy link
Owner

Hi Lutz,
as I understand the E-Manager is used in case you have a photovoltaic system at home and want to tell the heatpump to use more electrical energy in case there is enough energy available from the roof (e.g. to heat up domestic hot water to a higher temperature).
By the best of my knowledge the E-Manager is not active by default, I also have no PV-system when I got the WP installed therefore I can't test it. If Lambda did not activate the E-Manager in your WP I guess you will not be able to pull any data via MODBUS, you may want to talk to their support person to confirm this.

Cheers.....Ralf

@thecem
Copy link

thecem commented Jun 20, 2023

Hi Lutz,

you could write it directly from ha (if you have your grid meter values in ha) to the heat pump’s register:

alias: Kostal -> EU08L
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.ksem_ac_meter_watts
condition: []
action:
  - service: modbus.write_register
    data:
      address: 102
      value: "{{states('sensor.ksem_ac_meter_watts') | int | bitwise_and(65535)}}"
      hub: EU08L
mode: single

@FBrokelmann
Copy link

FBrokelmann commented Nov 6, 2023

Hi there, I am trying to write back to my EU13L with modbus-protocol - without any success so far (reading works fine).
I try to write the max. buffer temperature (according to the docs from Lambda in register 3050. I am trying around with the following manual Automation:

alias: TEST modbus writeback EU13L
description: ""
trigger:

  • platform: event
    event_type: ""
    context: {}
    condition: []
    action:
  • service: modbus.write_register
    data:
    address: 3050
    value: 44
    hub: EU13L
    mode: single

Does anyone have an idea?

@thecem: how can you use a three digit code for the register??? The adress should be 4 digit long!?
image

Bye. Falk

@thecem
Copy link

thecem commented Nov 6, 2023

Leading zero could be cutted.

try:

value:
  - 44

or

value: [44]

@thecem
Copy link

thecem commented Nov 6, 2023

@FBrokelmann: could you do me a favor and read register 5006. I assume you have one or two heating circuits. If you have heating circuits wich value do you get with register 5006//5106!
And when was the pump installed?

thx a lot!

@FBrokelmann
Copy link

@FBrokelmann: could you do me a favor and read register 5006. I assume you have one or two heating circuits. If you have heating circuits wich value do you get with register 5006//5106! And when was the pump installed?

thx a lot!

Hi @thecem, my heatpump (EU13L) was installed end of october last year. And I am VERY happy with it! :-)

Register 5006 (my one and only heating circuit) returns value 3 (same situation as with Ralf Winter I would say - I only use automatic heating mode up to now).

cheers

@thecem
Copy link

thecem commented Nov 6, 2023

Many thx!

My EU08 works since 10/23 like a charm! And it is even silently as the old oil heating.
So you have the “old” SW that has all values, my SW Version is changed and you are not able to read the values, but able to write. So it is a kind useless, since I need this to bind it into my EMS.

I have opened a ticket on Lambda side and hope there will be bringing a solution for this. Because it is so easy to handle this.
Up to that , I have to wait!

did you try it with the different value syntax?

@thecem
Copy link

thecem commented Nov 6, 2023

actual working automation:

alias: Kostal -> EU08L
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.ksem_ac_meter_watts
  - platform: time_pattern
    seconds: /5
condition: []
action:
  - service: modbus.write_register
    data:
      address: 102
      hub: EU08L
      value:
        - "{{states('sensor.ksem_ac_meter_watts') | int | bitwise_and(65535)}}"
mode: single

@RalphDiesinger
Copy link

RalphDiesinger commented Nov 6, 2023 via email

@FBrokelmann
Copy link

Many thx!

My EU08 works since 10/23 like a charm! And it is even silently as the old oil heating. So you have the “old” SW that has all values, my SW Version is changed and you are not able to read the values, but able to write. So it is a kind useless, since I need this to bind it into my EMS.

I have opened a ticket on Lambda side and hope there will be bringing a solution for this. Because it is so easy to handle this. Up to that , I have to wait!

did you try it with the different value syntax?

yes, I tried the new syntax (and several other variants), but still it doesn't work. Maybe it is something within the modbus-konfiguration of the sensor? Could you please post your config of adress 102?

my config for adress 3050 is the follwoing:

  • name: EU13L_Buff1_set_max_temperature
    address: 3050
    input_type: input
    unit_of_measurement: "°C"
    state_class: total
    scale: 0.1
    precision: 1
    data_type: int16

Can you see a problem in that config?

Did I get it right: You think my software ist old, and I can read, but not write?
image

@thecem
Copy link

thecem commented Nov 6, 2023

Hello, I just asked an acquaintance where I set this up over the weekend. Your heat pump is also off 23 and also does not display the operating mode (5006) correctly.

________________________________ Von: thecem @.> Gesendet: Montag, 6. November 2023 12:18 An: RalfWinter/lambda-heatpump-modbus-tcp-HA @.> Cc: Subscribed @.> Betreff: Re: [RalfWinter/lambda-heatpump-modbus-tcp-HA] General E-Manager section sensors unavailable (Issue #3) Many thx! My EU08 works since 10/23 like a charm! And it is even silently as the old oil heating. So you have the “old” SW that has all values, my SW Version is changed and you are not able to read the values, but able to write. So it is a kind useless, since I need this to bind it into my EMS. I have opened a ticket on Lambda side and hope there will be bringing a solution for this. Because it is so easy to handle this. Up to that , I have to wait! did you try it with the different value syntax? — Reply to this email directly, view it on GitHub<#3 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7QCQTIFSFCYLYINVAL4VIDYDDBQRAVCNFSM6AAAAAAZH6U4DGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJUGU4TOMJVGQ. You are receiving this because you are subscribed to this thread.Message ID: @.>

Yes. It belongs to the SW Version, the “old” one have the value in the registers, the new one not. There will be an update.

this one doesn’t have the values in the registers out of the controller, but you are able to write:

IMG_0030

@thecem
Copy link

thecem commented Nov 6, 2023

Many thx!
My EU08 works since 10/23 like a charm! And it is even silently as the old oil heating. So you have the “old” SW that has all values, my SW Version is changed and you are not able to read the values, but able to write. So it is a kind useless, since I need this to bind it into my EMS.
I have opened a ticket on Lambda side and hope there will be bringing a solution for this. Because it is so easy to handle this. Up to that , I have to wait!
did you try it with the different value syntax?

yes, I tried the new syntax (and several other variants), but still it doesn't work. Maybe it is something within the modbus-konfiguration of the sensor? Could you please post your config of adress 102?

my config for adress 3050 is the follwoing:

  • name: EU13L_Buff1_set_max_temperature
    address: 3050
    input_type: input
    unit_of_measurement: "°C"
    state_class: total
    scale: 0.1
    precision: 1
    data_type: int16

Can you see a problem in that config?

Did I get it right: You think my software ist old, and I can read, but not write? image

This config is only to read the registers!
Which value you could read in this register?

try to write following, go to:

  • Entwicklerwerkzeuge
  • Dienste
  • Modbus: Register schreiben
  • copy & paste
service: modbus.write_register
data:
  value:
    - 440
  hub: EU13L
  address: 3050

You have to multiply your request value by 10 since there is a multiplication of 0.1 for the readed value in the documentation. A temp with 25,1 is 251 and there is a limit between 250 and 650, so 44 will not be accepted.

@miwa4711
Copy link

miwa4711 commented Nov 7, 2023

Great job, thanks to all contributors.
Using your above Yaml, appriciate it!. Unfortunately some of them are returning unexpected values (like T_EQout 1008: -327, using NodeRed/ModbusRead got 32768), not shure how to interprete these. Regarding E-Manager all registers are unavailble, dispite E-Manager is activated, but using NodeRed registers returning proper values. I already got an energy meter for my PV-System. So I am writing values to E-Manager Act. Power 0102 with HA service what is fine and Heat Pump runs as expected. Thanks for the automation, it helps a lot.

Heat Pump SW-Version V0.0.1 Jul 3 2023 (Remote service is showing Typ: EU 13L SWID: V0.0.4 - 3K).

Do you get all register values in a proper manner with above Yaml?

@thecem
Copy link

thecem commented Nov 7, 2023

Your have the same SW as mine.

EQout is not connected and they report the minimum value, same on my side.

what value you get on register 5006 & 5005?

@FBrokelmann
Copy link

Many thx!

My EU08 works since 10/23 like a charm! And it is even silently as the old oil heating. So you have the “old” SW that has all values, my SW Version is changed and you are not able to read the values, but able to write. So it is a kind useless, since I need this to bind it into my EMS.

I have opened a ticket on Lambda side and hope there will be bringing a solution for this. Because it is so easy to handle this. Up to that , I have to wait!

did you try it with the different value syntax?

yes, I tried the new syntax (and several other variants), but still it doesn't work. Maybe it is something within the modbus-konfiguration of the sensor? Could you please post your config of adress 102?

my config for adress 3050 is the follwoing:

  • name: EU13L_Buff1_set_max_temperature

address: 3050

input_type: input

unit_of_measurement: "°C"

state_class: total

scale: 0.1

precision: 1

data_type: int16

Can you see a problem in that config?

Did I get it right: You think my software ist old, and I can read, but not write? image

This config is only to read the registers!

Which value you could read in this register?

try to write following, go to:

  • Entwicklerwerkzeuge

  • Dienste

  • Modbus: Register schreiben

  • copy & paste


service: modbus.write_register

data:

  value:

    - 440

  hub: EU13L

  address: 3050

You have to multiply your request value by 10 since there is a multiplication of 0.1 for the readed value in the documentation. A temp with 25,1 is 251 and there is a limit between 250 and 650, so 44 will not be accepted.

Thanx a lot, i am now able to write back. :-)

@miwa4711
Copy link

miwa4711 commented Nov 8, 2023

Your have the same SW as mine.

EQout is not connected and they report the minimum value, same on my side.

what value you get on register 5006 & 5005?

So why is Lambda doing different regarding their documentation (Modbus Beschreibung und Protokoll 11.04.2023)? Tried to contact Lambda serveral times but there was no reply yet. What a pity!
However I don't need special values like EQout to run the Heat Pump as a normal user.
But I would like to control some more functions of the Heat Pump by HA concerning Automations:

  • Holidays (Ferienbetrieb)
  • Boost Domestik Hot Water
  • Party Mode (seems not available)
  • Set operating modes of Heat Pump (Auto, off), Heat Circuits (Auto, Summer, Frost, off), Boiler (Auto, Frost, off), Buffer (Auto, Frost, off)
    Hoping Lambda expand the Modbus to meet my request some day.

5005: -300, NodeRed: 62536
5006: -3000, NodeRed: 62536

@thecem
Copy link

thecem commented Nov 8, 2023

Ok, so this is valid.

you could set the heat circuit mode with 5006, but be carefully, you are not able to set it back to 62536. For the time out period it will work, but you are with this software not able to read out the operation mode what was set in the gui. There is a reason behind this, since there was request from some vendors. It will be fixed in future to get the op mode and the “Soll Temperaturen” (Set Point/request temp). At the moment I couldn’t connect to my EMS since there is no possibility to get this relevant information out of the HP control unit.

Even the E-Manager status (that shows up in the display), that the Temperatur is higher., could not extracted in any way.

@miwa4711
Copy link

miwa4711 commented Nov 8, 2023

Ok, so this is valid.

you could set the heat circuit mode with 5006, but be carefully, you are not able to set it back to 62536. For the time out period it will work, but you are with this software not able to read out the operation mode what was set in the gui. There is a reason behind this, since there was request from some vendors. It will be fixed in future to get the op mode and the “Soll Temperaturen” (Set Point/request temp). At the moment I couldn’t connect to my EMS since there is no possibility to get this relevant information out of the HP control unit.

Even the E-Manager status (that shows up in the display), that the Temperatur is higher., could not extracted in any way.

Seems you know a lot more of Lambda's Modbus journey. So I will wait for improvements and stop requesting solutions for my problems at Lambda's customer support. But how to avoid missing improvements you mentioned above? Let suppose you are in contact with Lambda may you post notable changed here to let us know?

@thecem
Copy link

thecem commented Nov 8, 2023

Yes, I’m in contact with lambda and have addressed the problems and even a solution for this. But we have to wait until they implement this. And I’m impatient 😂!

@miwa4711
Copy link

Yes, I’m in contact with lambda and have addressed the problems and even a solution for this. But we have to wait until they implement this. And I’m impatient 😂!

Hi, what kind of EMS are you using? Are you planning having a provider like Tibber?

@thecem
Copy link

thecem commented Nov 13, 2023

Home Assistant.

tibber is really interesting, but the prices are at the moment(Nov 23) to high.
If you have a battery it could be an option. For me the average must be 8 cents under my fix price 26, since I have to pay the battery usage.

@miwa4711
Copy link

Where are you from? I live in Germany and my price is 31. Who is your provider?

@thecem
Copy link

thecem commented Nov 13, 2023

DE, had the opportunity in late July via check24 to go with octopus (26,32 Cents). The price is for 24 months, without bonuses and the option to cancel every month. I came from Vattenfall, which had really a good price, but decided to start from 08/24 with 32 cents, far to much!

@ghry5
Copy link

ghry5 commented Dec 2, 2023

For me the leading zeroes where cut. Instead of:

 - name: EU13L_EMgr_Actual_Power
    address: 0102
 - name: EU13L_EMgr_Actual_Power
    address: "0102"

Works just fine.

@thecem
Copy link

thecem commented Dec 2, 2023

102 without 0 should also work.

@i-moove
Copy link

i-moove commented Jan 28, 2024

Hi guys I am not that far yet.
I am not familiar with HA, even not with programming.
I have the EUL-13 and would like to import it into HA mainly to see the values. At least at the beginning.
I have installed HACS an tried to get the repository into HA by copying the https from github but it failed with the message: Repository structure is not compliant.

I tried the same with a Wattpilot repository for my Fronius Wallbox and this worked out without any problems.

May someone help :)

@miwa4711
Copy link

miwa4711 commented Mar 2, 2024

@thecem: Any news about your conversation regarding update of modbus with lambda?

@thecem
Copy link

thecem commented Mar 2, 2024

Last information was, they will rethink the logic. I will ask for status.

@thecem
Copy link

thecem commented Mar 2, 2024

@Eisbaer2: Das oben ist eine automation, der Link die config für die Sensoren in HA. Nur die Automation schreibt die Werte in die Lambda. Gut das es geht.

@Eisbaer2
Copy link

Eisbaer2 commented Mar 2, 2024

@Eisbaer2: Das oben ist eine automation, der Link die config für die Sensoren in HA. Nur die Automation schreibt die Werte in die Lambda. Gut das es geht.

Hallo @thecem, war ein Missverständnis, eigentlich wollte ich @i-moove helfen.

@ulkrueger
Copy link

Bei mir ist allerdings ein Auslesen der Register 100-104 möglich (OpenHAB):

Das liegt wahrscheinlich daran, dass du noch bei der 0.0.1 bist. Bei der 0.0.4 geht es leider nicht mehr

Aber bin ich nicht laut Anzeige auch auf der Firmware „0.0.4 - 3K“ vom 4. Juli 23?

@Eisbaer2
Copy link

@ulkrueger: Du hast Recht. Komisch, dass es bei dir dann geht. Meine 0.0.4 - 3K hat allerdings Build Date: 20. September.

@Eisbaer2
Copy link

Nochmal ich @ulkrueger @thecem @RalfWinter:
Ich werde noch verrückt. Bei mir kommt beim Energy Manager mit den Registern 100 - 104 unter Modbus nichts raus (wohl aber schreibe ich in Register 102 meine Energie-Saldo, das funktioniert).
Über meinen Heizungsbauer habe ich die Aussage bekommen, dass die Ausgabe bei mir funktionieren müsste. Jetzt habe ich nochmal probiert. Und: mit dem Tool von modbustester.com bekomme ich tatsächlich auch Werte in den Registern 100-104, die stimmig scheinen. Nur: unter Home Assistant nicht. Ich habe schon sehr viel probiert, warum auch immer kommt da nichts an. Aller anderen Modbus-Register funktionieren. Ich habe mich an den Entwurf von @RalfWinter gehalten, in meiner configuration.yaml steht z.B.

    - name: eu13l_emgr_power_consumption_setpoint
      address: 0104
      input_type: holding
      unit_of_measurement: "W"
      state_class: total
      scale: 1
      precision: 0
      data_type: int16

Habe auch schon viel rumgespielt mit anderen timeouts, Groß- und Kleinschreibung, etc. Hat alles nichts geholfen, die HA-modbus-Integration scheint da nichts auslesen zu können. Ich bin absolut ratlos, warum das nicht funktioniert. Hat jemand von euch noch Ideen, Tipps, Lösungen?

@chilobo
Copy link
Contributor

chilobo commented Apr 10, 2024

Ich werde in 1-2 Monaten auch eine Lambda E08 haben und bin durch Zufall auf diese Diskussion gestoßen. Allerdings arbeite ich mit Openhab. Bisher steuere ich nur die GO-E angepasst an die PV-Leistung, möchte aber in Zukunft auch die Lambda steuern.
@ulkrueger: Kannst Du mir vielleicht bei den ersten Schritten in Openhab helfen? Wie schreibt man in GitHub eine PN?

@RalfWinter
Copy link
Owner

Habe auch schon viel rumgespielt mit anderen timeouts, Groß- und Kleinschreibung, etc. Hat alles nichts geholfen, die HA-modbus-Integration scheint da nichts auslesen zu können. Ich bin absolut ratlos, warum das nicht funktioniert. Hat jemand von euch noch Ideen, Tipps, Lösungen?

Hallo, ich würde gerne helfen, habe aber das gleiche Problem: seit 3 Wochen habe ich eine PV-Anlage auf dem Dach und Energiereform hat mir den EMgr freigeschaltet, bekomme davon aber keine Daten in HA. Das Beschreiben des Registers 102 habe ich deshalb erstmal gelassen und nutze den potentialfreien Kontakt vom Wechselrichter um der Lambda PV-Überschuss zu signalisieren; das klappt überraschend gut, damit kann ich erstmal leben.

@Eisbaer2
Copy link

Eisbaer2 commented Apr 10, 2024

Ich habe das Problem lösen können: die führende Null beim Register darf nicht verwendet werden, bei der Adresse also nur 100 statt 0100 eingeben. Damit klappt es zumindest bei mir :-)
@RalfWinter: Das Schreiben des Zählerwertes ging erstaunlich einfach über eine Automatisierung (so du den Zählerwert schon in HA hast). Melde dich, wenn du Hilfe dazu brauchst.

@RalfWinter
Copy link
Owner

RalfWinter commented Apr 11, 2024

Super! Habe die Änderungen bei mir im HA auch gemacht und ich sehe jetzt auch Werte in der EMgr-Sektion. 1000 Dank! Die YAML-Datei hier im Repository habe ich bereits aktualisiert.

@RalfWinter
Copy link
Owner

RalfWinter commented Apr 11, 2024

@Eisbaer2 : ich habe folgende Automation geschrieben, der Wert wird aber nicht ins Register geschrieben....was mache ich falsch? Danke Dir....

alias: WP-PV-Excess
description: Sent PV-Excess to HP
trigger:
  - platform: time_pattern
    seconds: "59"
condition: []
action:
  - service: modbus.write_register
    metadata: {}
    data:
      hub: EU13L
      address: 102
      value: "{{ states('sensor.shelly3em_total_power') | int }}"
mode: single

@Eisbaer2
Copy link

Eisbaer2 commented Apr 11, 2024

@RalfWinter: hier meine funktionierende Automation

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

@RalfWinter
Copy link
Owner

RalfWinter commented Apr 11, 2024

Danke, aber funktioniert genau so wenig. Meine Lambda bringt allerdings auch einen Alarm sobald ich den E-Manager auf "Automatik" stelle:
E-Manager ungültiger Wert

In den Details steht AlarmX0Para506

Ich nehme an, ich habe schon an anderer Stelle ein Problem. Werde die Tage mal wieder Energiereform kontaktieren. Die tun sich da zwar auch schwer, aber einen Versuch ist es wert.

Edit:
Konfiguration bei mir ist wie folgt:
E-Meter Kommunikationsart: ModBus Client
E-Meter Messpunkt: Neg. E-Überschuss

@thecem
Copy link

thecem commented Apr 11, 2024

Kannst du bitte mal in HA unter Entwicker in Template folgend einfügen und den Wert für negativ und positiv posten:

{{states('sensor.leistung_aktuell') | int | bitwise_and(65535)}}

@thecem
Copy link

thecem commented Apr 11, 2024

Deine Einstellungen sind korrekt! Der Alarm auch, ich denke das es an deinem Sensor liegt. Hierzu brauche ich aber die Ausgabe..

@RalfWinter
Copy link
Owner

RalfWinter commented Apr 11, 2024

Bei folgendem Kommando kommt -9400
{{states('sensor.shelly3em_total_power') | int }}

Damit kommt ca. 56500:
{{states('sensor.shelly3em_total_power') | int | bitwise_and(65535)

Die -9400 war zu dem Zeitpunkt der Export (in Watt) ins Grid.

@thecem
Copy link

thecem commented Apr 11, 2024

Kannst du bitte noch mal den Wert beim Verbrauch posten?
Gerne auch erst heute Abend.

@RalfWinter
Copy link
Owner

Kein Problem, bin Privatier ;-)
Was meinst Du mit "Verbrauch"? Von der WP?

@Eisbaer2
Copy link

Bei folgendem Kommando kommt -9400 {{states('sensor.shelly3em_total_power') | int }}

Damit kommt ca. 56500: {{states('sensor.shelly3em_total_power') | int | bitwise_and(65535)

Die -9400 war zu dem Zeitpunkt der Export (in Watt) ins Grid.

Eigentlich sollte es mit den 56500 klappen ...

@RalfWinter
Copy link
Owner

RalfWinter commented Apr 11, 2024

Dein Zählerwert sollte bei PV-Überschuss negativ sein. Ist dem so?

Ja, genau. Und weil in der Lambda "Neg. E-Überschuss" definiert ist, hätte ich gedacht, das passt. In HA wird bei "EU13L_EMgr_Actual_Power" immer "-32768" angezeigt, als ob der Wert nicht gesetzt wird.

@RalfWinter
Copy link
Owner

Ah, here we go...habe mal den Loglevel auf Debug gestellt:
2024-04-11 11:53:59.476 ERROR (SyncWorker_7) [homeassistant.components.modbus.modbus] Pymodbus: EU13L: Error: device: 0 address: 102 -> Exception Response(134, 6, IllegalFunction)

@thecem
Copy link

thecem commented Apr 11, 2024

Was ist denn die config fürs Modbus?

@RalfWinter
Copy link
Owner

RalfWinter commented Apr 11, 2024

Was ist denn die config fürs Modbus?

Die schaut so aus:

modbus:
- name: "EU13L"
type: tcp
host: 192.168.1.120
port: 502

@thecem
Copy link

thecem commented Apr 11, 2024

Bitte mal den Leistungswert selbst setzen und zwar alle /5 Sec. Wichtig ist der Bindestrich "-".

alias: Leistungsdaten => Wärmepumpe
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.leistung_aktuell
  - platform: time_pattern
    seconds: /5
condition: []
action:
  - service: modbus.write_register
    data:
      address: 102
      hub: EU13L
    value:
      - "49666"
mode: single

@RalfWinter
Copy link
Owner

Bitte mal den Leistungswert selbst setzen und zwar alle /5 Sec. Wichtig ist der Bindestrich "-".

Du bist mein Held, das hat funktioniert, der Fehler in der Lambda-GUI ist prompt weg! In HA steht nun -18.870 W.

Hast Du noch eine Tipp, wie ich den eigentlichen Wert übertragen bekomme?

@Eisbaer2
Copy link

Nimm meine Automation und tausche nur den Sensor aus. Wahrscheinlich lag es bei dir nur am fehlenden Bindestrich.

@RalfWinter
Copy link
Owner

RalfWinter commented Apr 11, 2024

Ja, eigentlich easy, das Minus hat es gemacht, allerdings muss der Wert so wie bei Dir deklariert werden:
- "{{states('sensor.leistung_aktuell') | int | bitwise_and(65535)}}"

1000 Dank Euch Beiden, @Eisbaer2 und @thecem

@RalfWinter
Copy link
Owner

RalfWinter commented Apr 12, 2024

Nochmal zum Abschluß: den potentialfreien Kontakt habe ich abgebaut und arbeite jetzt nur noch mit dem EMgr, ein Träumchen.
EMgr
PV-Betrieb

@RalfWinter
Copy link
Owner

RalfWinter commented Apr 12, 2024

Back to English: for owners of a Shelly 3EM smart meter this is the description to send the PV-surplus not needed elsewhere in your household to the E-manager of your Lambda heatpump. The Shelly 3EM is a cheap alternative to the expensive ModBus-Smartmeter offered by Lambda. In addition many HA-users already have Shelly devices because of the easy integration in Home Assistant.

The following is divided into three parts: the automation,the configuration.yaml und Lambda-setup part.

The automation part:

alias: PV-Excess-to-HP
description: Sent PV-Excess to Heatpump
trigger:
  - platform: state
    entity_id:
      - sensor.power_current
    for:
      hours: 0
      minutes: 0
      seconds: 0
  - platform: time_pattern
    seconds: /10
condition: []
action:
  - service: modbus.write_register
    data:
      hub: EU13L
      address: 102
      value:
        - "{{states('sensor.power_current') | int | bitwise_and(65535)}}"
mode: single

The configuration.yaml part:

Because the Shelly-integration for the 3-phase smart meter does not include an entity which represents the total power over all 3 phases you need to add following template sensors at the end of your configuration.yaml (change the unique id of your Shelly-3EM [here "34945474b5f2"] according to your discovered Shelly-3EM in your installation).

#
# Shelly 3EM additions for PV numbers
#
      # Template sensor for current power comsumption
      power_current:
        friendly_name: "Power Current"
        unit_of_measurement: 'W'
        value_template: >-
            {{ states('sensor.shellyem3_34945474b5f2_channel_a_power')|float + states('sensor.shellyem3_34945474b5f2_channel_b_power')|float + states('sensor.shellyem3_34945474b5f2_channel_c_power')|float }}
        availability_template: "{{
            [ states('sensor.shellyem3_34945474b5f2_channel_a_power'),
              states('sensor.shellyem3_34945474b5f2_channel_b_power'),
              states('sensor.shellyem3_34945474b5f2_channel_c_power')
            ] | map('is_number') | min
          }}"
   
      # Template sensor for values of power import (active_power > 0)
      power_import:
        friendly_name: "Power Import"
        unit_of_measurement: 'W'
        value_template: >-
          {% if (states('sensor.shellyem3_34945474b5f2_channel_a_power')|float + states('sensor.shellyem3_34945474b5f2_channel_b_power')|float + states('sensor.shellyem3_34945474b5f2_channel_c_power')|float) > 0 %}
            {{ states('sensor.shellyem3_34945474b5f2_channel_a_power')|float + states('sensor.shellyem3_34945474b5f2_channel_b_power')|float + states('sensor.shellyem3_34945474b5f2_channel_c_power')|float }}
          {% else %}
            {{ 0 }}
          {% endif %}
        availability_template: "{{
            [ states('sensor.shellyem3_34945474b5f2_channel_a_power'),
              states('sensor.shellyem3_34945474b5f2_channel_b_power'),
              states('sensor.shellyem3_34945474b5f2_channel_c_power')
            ] | map('is_number') | min
          }}"

      # Template sensor for values of power export (active_power < 0)
      power_export:
        friendly_name: "Power Export"
        unit_of_measurement: 'W'
        value_template: >-
          {% if (states('sensor.shellyem3_34945474b5f2_channel_a_power')|float + states('sensor.shellyem3_34945474b5f2_channel_b_power')|float + states('sensor.shellyem3_34945474b5f2_channel_c_power')|float) < 0 %}
            {{ (states('sensor.shellyem3_34945474b5f2_channel_a_power')|float + states('sensor.shellyem3_34945474b5f2_channel_b_power')|float + states('sensor.shellyem3_34945474b5f2_channel_c_power')|float) * -1 }}
          {% else %}
            {{ 0 }}
          {% endif %}
        availability_template: "{{
            [ states('sensor.shellyem3_34945474b5f2_channel_a_power'),
              states('sensor.shellyem3_34945474b5f2_channel_b_power'),
              states('sensor.shellyem3_34945474b5f2_channel_c_power')
            ] | map('is_number') | min
          }}"

The E-Manager part:
In order to consume the PV-surplus numbers the E-Manager in your Lambda-HP needs to be configured as follows:

  • E-Meter communication type: ModBus-Client (deutsch: E-Meter Kommunikationsart: ModBus-Client)
  • E-Meter measurement type: Neg. E-surplus (deutsch: E-Meter Messpunkt: Neg. E-Überschuss)*
    *Remark: in case your installer configured the "E-Meter measurement type" for positive numbers you may use the entity "Power Export" which represents the power-surplus in positive integer number.

The other values in the E-Manager configuration will be set according to the "best-practices" of the installer of your heatpump and, the last point, whether you have a battery coupled to your PV-system or not:
EMgr-config

If all works fine you should see (depending on your personal setup....) following values in HA:
Emgr-HA
...and in case of enough PV-surplus you will see the new "PV-and-sun"-icon on your Lambda-display (see screenshots in the previous comment).

Last but not least you configure the PV-temperature increase in your different modules like in "domestic hot water" (in my setup: 13k), the "buffer" (14k) and the "heating circuit(s)" (here I only increased a little, 3k, I already increased the buffer massively).

@huhndomi
Copy link

huhndomi commented May 22, 2024

Ich habe Probleme die automation zum Schreiben der Werte in die Lambda Wärmepumpe in meine configuration.yaml einzufügen. Ich habe diese ganz unten ans Ende der configuration.yaml wie folgt eingefügt:

...
     eu15l_hc1_operating_mode_txt:
        friendly_name: "EU15L_Hc1_Operating_Mode_txt"
        value_template: >
          {{ ['Off', 'Manual', 'Automatik', 'Auto-Heating', 'Auto-Cooling', 'Frost', 'Summer', 'Floor-dry'][states('sensor.EU15L_hc1_operating_mode')|int] }}
      eu15l_hc2_operating_state_txt:
        friendly_name: "EU15L_Hc2_Operating_State_txt"
        value_template: >
          {{ ['Heating', 'Eco', 'Cooling', 'Floor-dry', 'Frost', 'Max-Temp', 'Error', 'Service', 'Holiday', 'Central Heating Summer', 'Central Cooling Winter', 'Prio-Stop', 'Off', 'Release-Off', 'Time-Off', 'Standby', 'Standby-Heating', 'Standby-Eco', 'Standby-Cooling', 'Standby-Frost', 'Standby-Floor-dry'][states('sensor.EU15L_hc2_operating_state')|int] }}
      eu15l_hc2_operating_mode_txt:
        friendly_name: "EU15L_Hc2_Operating_Mode_txt"
        value_template: >
          {{ ['Off', 'Manual', 'Automatik', 'Auto-Heating', 'Auto-Cooling', 'Frost', 'Summer', 'Floor-dry'][states('sensor.EU15L_hc2_operating_mode')|int] }}

# Werte von HomeAssistant zur Lambda schicken. Raumtemperatur und verfuegbarer PV Ueberschuss
automation:
  alias: PV-Ueberschuss-zur-Lambda
  description: Schicke PV-Ueberschuss zur Lambda Waermepumpe
    trigger:
    - platform: state
      entity_id:
        - sensor.smart_meter_ts_65a_3_wirkleistung
      for:
        hours: 0
        minutes: 0
        seconds: 0
    - platform: time_pattern
      seconds: /10
  condition: []
  action:
    - service: modbus.write_register
      data:
        hub: EU15L
        address: 102
        value:
          - "{{states('sensor.smart_meter_ts_65a_3_wirkleistung') | int | bitwise_and(65535)}}"
    mode: single

Wenn ich dies so einfüge erhalte ich immer folgende Fehlermeldung:

Konfigurationsfehler
Error loading /config/configuration.yaml: mapping values are not allowed here
in "/config/configuration.yaml", line 1018, column 12

Line 1018 ist hierbei die Zeile mit "trigger:"

Nutze folgende Version von HA:
Core
2024.5.4
Supervisor
2024.05.1
Operating System
12.3
Frontend
20240501.1

Könnt ihr mir da weiterhelfen? Danke

@huhndomi
Copy link

huhndomi commented May 23, 2024

Ich habe den Fehler selbst gefunden. Problem waren die Leerzeichen in der Konfiguration. Da hat mir diese Seite weitergeholfen: https://www.geeksforgeeks.org/how-do-i-resolve-a-mapping-values-are-not-allowed-here-error-in-yaml/

@RalfWinter Vielleicht kannst du dies auch direkt in deine Konfiguration hier mit übernehmen.

Mit mehreren Werten welche ich von meinem HomeAssistant in die Lambda übertrage, sieht meine configuration.yaml wie folgt aus. Dies habe ich am Ende der Konfiguration eingefügt:

# Werte von HomeAssistant zur Lambda schicken. Raumtemperatur und verfuegbarer PV Ueberschuss
automation:
  - alias: PV-Ueberschuss-zur-Lambda
    description: Schicke PV-Überschuss zur Lambda Wärmepumpe
    trigger:
      - platform: state
        entity_id:
          - sensor.smart_meter_ts_65a_3_wirkleistung
        for:
          hours: 0
          minutes: 0
          seconds: 0
      - platform: time_pattern
        seconds: /10
    condition: []
    action:
      - service: modbus.write_register
        data:
          hub: EU15L
          address: 102
          value:
            - "{{states('sensor.smart_meter_ts_65a_3_wirkleistung') | int | bitwise_and(65535)}}"
    mode: single
  - alias: Durchschnittstemperatur-Fussbodenheizung-zur-Lambda
    description: Schicke Durchschnittstemperatur Fußbodenheizung zur Lambda Wärmepumpe
    trigger:
      - platform: state
        entity_id:
          - sensor.temperatur_heizkreis_fussbodenheizung_durchschnitt
        for:
          hours: 0
          minutes: 0
          seconds: 0
      - platform: time_pattern
        seconds: /10
    condition: []
    action:
      - service: modbus.write_register
        data:
          hub: EU15L
          address: 5004
          value:
            - >-
              {{ (float(states('sensor.temperatur_heizkreis_fussbodenheizung_durchschnitt')) *10 )
              |round(0)  }}
    mode: single
  - alias: Durchschnittstemperatur-Heizkoerper-zur-Lambda
    description: Schicke Durchschnittstemperatur Heizkörper zur Lambda Wärmepumpe
    trigger:
      - platform: state
        entity_id:
          - sensor.temperatur_heizkreis_heizkorper_durchschnitt
        for:
          hours: 0
          minutes: 0
          seconds: 0
      - platform: time_pattern
        seconds: /10
    condition: []
    action:
      - service: modbus.write_register
        data:
          hub: EU15L
          address: 5104
          value:
            - >-
              {{ (float(states('sensor.temperatur_heizkreis_heizkorper_durchschnitt')) *10 )
              |round(0)  }}
    mode: single

@andreas-bulling
Copy link

Nimm meine Automation und tausche nur den Sensor aus. Wahrscheinlich lag es bei dir nur am fehlenden Bindestrich.

same here - have been trying to get this working for two days now. Thanks a million!

@thecem
Copy link

thecem commented Sep 24, 2024

Pls post your formatted (use the button above <>) automation and the sensor details (developer/states).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests