Koexistenz HA und evcc

Bei Grid:
Power = Aktueller Strombezug (Positiver Wert) / Export (Negativer Wert) - Habe bei mir mittlerweile auf den Wert direkt vom Stromzähler umgestellt
Energy = bei mir power_meter_consumption_1 insg. bezogener Strom in kWh aus dem Grid (immer steigender Wert)

  - name: grid
    type: custom
    power:
      source: mqtt
      broker: 192.168.xxx.xxx:1883
      topic: pvdataevcc/sensor/stromzahler_aktueller_verbrauch
      user: xxx
      password: xxx
      scale: 1
      timeout: 30s
    energy:
      source: mqtt
      broker: 192.168.xxx.xxx:1883
      topic: pvdataevcc/sensor/power_meter_consumption_1
      user: xxx
      password: xxx
      scale: 1
      timeout: 30s

Bei PV:
Power = Aktuelle Stromerzeugung der PV (nur Positiver Wert)
Energy = insg. Exportierter Strom in kWh aus dem Grid (immer steigender Wert)

  - name: pv
    type: custom
    power:
      source: mqtt
      broker: 192.168.xxx.xxx:1883
      topic: pvdataevcc/sensor/inverter_input_power
      user: xxx
      password: xxx
      scale: 1
      timeout: 30s
    energy:
      source: mqtt
      broker: 192.168.xxx.xxx:1883
      topic: pvdataevcc/sensor/exported_energy
      user: xxx
      password: xxx
      scale: 1
      timeout: 30s

Schau erst mal ob du das mit Power (W) und Energy (kWh) richtig gemacht hast.
Wenn dann die Werte immer noch verdreht sind versuche es mal mit scale: -1 in der grid sektion:

  - name: grid
    type: custom
    power:
      source: mqtt
      broker: 192.168.xxx.xxx:1883
      topic: pvdataevcc/sensor/stromzahler_aktueller_verbrauch
      user: xxx
      password: xxx
      scale: -1
      timeout: 30s

danke @a13xde!

leider klappt das auch nicht. Habe nochmal geprüft, ob W / kWh korrekt sind und mit scale gespielt. Leider bleibt es dabei , dass Netzeinspeisung angezeigt wird, wenn ich Netzstrom beziehe…

@Phil2204 hab mich noch mal in der Doku abgesichert, dass scale -1 ist der korrekte Weg um Bezug und Einspeisung zu verdrehen.

Hier ist auch noch mal ein Blog Artikel der es genau so mit mqtt und scale -1 in der evcc.yaml umgesetzt hat:
https://haus-automatisierung.com/photovoltaik/2023/02/22/pv-anlage-ueberschussladen-evcc.html

Vergleiche das mal mit deiner Config, insb. der “name: grid” part

Du kannst es sicherlich auch in HomeAssistant schon vorher umdrehen, dass solltest du aber in einem eigenen Thread in Englisch abhandeln, hier bekommst du glaub zu wenig Beachtung und ich habe leider auch kein Beispiel dafür.

Edit: hier ein weiteres Beispiel PV-Überschussladen mit GoodWe Wechselrichter, Home Assisant und evcc – herrmayr.de

@a13xde , danke für deine Bemühungen.
Ich gucke mir das an und werde bei Bedarf deinem Rat folgen…

Hello, I’m also trying to query a Deye WR using a Modbus adapter. Which adapter do you use and do you use the Modbus connection from the WR for it? Is there a guide or a video or something similar somewhere?

you can buy this Modbud Adapter on “eBay” and also on “Kleinanzeigen”

Search for: “Deye Sun 12k-SG04LP3 Modbus Adapter”

or: Link to Kleinanzeigen.de

Link to ebay

Hello, I already have it, but it didn’t work at first. I then talked to the seller and he wrote a new firmware for it and now it works with the Deye.
Apparently something has changed at Deye on the Modbus and he has to change the programming.

Wo genau schreibt ihr die Automation rein in welches Verzeichnis ?

I even had no luck getting it up and running in the 1st place: https://github.com/wlcrs/huawei_solar/discussions/266

Mega! Vielen Dank. Bin deiner Anleitung gefolgt. Funktioniert super.
Einzig das Pollling vom Inverter funktioniert kann ich nicht auf 15 Sekunden setzen. Da muss ich noch einmal ran. Ohne deine Beispielkonfig hätte ich das nicht geschafft!

Please write this in English, this is an English forum. It’s not my fault, but it’s possible that you’ll get a reprimand.

[image]

Hi everyone, one question I have some trouble with my Configuration. You can see I get the actual status from grid and from Son. But no solar power and the Battery charge and discharge are detected exactly the wrong way round. Can you see where I have do the mistake ?

Hi Schlichi, Modbusproxy funktioniert auch gut mit HUAWEI und evcc. Timout habe ich auf 1 gesetzt. Aber wie kann die HA Integration auf den Modbusproxy zugreifen, der ja unter HA läuft. Dann hätte ich die gleiche IP wie HA nur den Port 502. Habs probiert, aber das funktioniert nicht.

Problem gelöst. Funktioniert natürlich auch. In der Huawei Solar Integration muss der SlavePort auf 1 gesetzt werden.

Hallo, ich habe auch aktuell Probleme mit Modbus Proxy, zusammen mit Goodwe Integration.

Ich habe soweit alles eingerichtet und bekomme auch alles verbunden und Daten.

Optionen
upstreamhost
192.168.178.183
upstreamport
502
listenport
502
connection_time
0,5
timeout
20
loglevel

INFO

DEBUG

ERROR

Nach ca. 20-40 wo alles Super läuft kommen die ersten Fehlermeldungen:
2024-06-13 13:22:13,698 ERROR modbus-proxy.Client(192.168.178.37:57412): reading error: ConnectionResetError(104, ‘Connection reset by peer’)
2024-06-13 13:25:03,702 ERROR modbus-proxy.Client(192.168.178.37:33996): reading error: ConnectionResetError(104, ‘Connection reset by peer’)
2024-06-13 13:29:33,834 ERROR modbus-proxy.Client(192.168.178.37:47406): reading error: ConnectionResetError(104, ‘Connection reset by peer’)
2024-06-13 13:31:03,630 ERROR modbus-proxy.Client(192.168.178.37:46240): reading error: ConnectionResetError(104, ‘Connection reset by peer’)
2024-06-13 13:31:33,749 ERROR modbus-proxy.Client(192.168.178.37:57216): reading error: ConnectionResetError(104, ‘Connection reset by peer’)
2024-06-13 13:32:13,627 ERROR modbus-proxy.Client(192.168.178.37:39838): reading error: ConnectionResetError(104, ‘Connection reset by peer’)
2024-06-13 13:34:33,632 ERROR modbus-proxy.Client(192.168.178.37:51592): reading error: ConnectionResetError(104, ‘Connection reset by peer’)
2024-06-13 13:35:23,670 ERROR modbus-proxy.Client(192.168.178.37:37664): reading error: ConnectionResetError(104, ‘Connection reset by peer’)

Dann werden keine Daten mehr ausgelesen. Wenn ich Proxy neu starte geht es so weiter.

Hat das jemand schon gehabt bzw. was könnte der Fehler sein ?

Danke

Grüße

Vielleicht sehr interessant für alle die sich für EVCC interessieren :

Ok, so I am running into the same issue as many here, and unfortunately have been unable to solve it so far…

My Home Assistant is running at IP 192.168.178.111 and the internal WiFi for my Huawei Sun2000 is at 192.168.200.1:6607 which I solved by connecting the WiFi from my HA Server directly to the AP in the Inverter. Everything else on my HA Server runs via Ethernet, so no issues there. This works perfectly with rhe wlcrs Huawei Integration.

Now I want to try out evcc and need to use a Modbus Proxy.
The HA Addon doesn’t exactly have many options, but I tried my best to set it up correctly. The issue is…if I choose the upstream IP of the Inverter (192.168.200.1) and the Port 6607, then I don’t get any errors, but I also don’t get any Data from the Inverter and can’t connect to the Proxy through the wlcrs Integration. As far as I can tell, it never actually establishes a connection, maybe because it tries to gi through the Ethernet instead of WiFi?
I have tried different Ports (502 vs 6607), have stopped the Huawei Integration and waited before starting the Proxy etc. but nothing made any difference.

Any ideas?

Edit: I managed to get it working with some network shenanigans.

ich habe modbus-proxy eingerichtet für meine Sofar hyd 5ktl über rs485 und waveshare adapter. der zugriff über den proxy läuft gut für die solax-modbus-integration. allerdings weiß ich nicht wie ich den zugriff über evcc hinbekomme. wäre super, wenn jemand die yaml von der evcc konfiguration posten könnte.