Einbindung SML an evcc #2658
Replies: 2 comments 4 replies
-
;)
Du kannst die aufbereiten wie Du willst, na klar!
entsprechend eingestelltem Intervall
Siehe Doku der "plugins"
Nein. Z.b. selber machen mit Node-red.
Gleiches Problem- Umwandlung musst Du in jeder Variante selber machen z.B. mit Node-red. |
Beta Was this translation helpful? Give feedback.
-
Hallo,
vielen Dank für die Vorschläge und Hinweise. Ich habe das jetzt erstmal so gelöst:
Die beiden USB-IR-Leseköpfe stehen an meinem Raspi ja zur Verfügung. Die
Daten kommen im SML-OBIS-Format bzw. werden in einem Fall dahin umgewandelt
(siehe Beispiel erster Eintrag).
In einem Script werden die Zählerstände ausgelesen und der Power-Wert
ermittelt. Diese beiden Power-Werte werden dann per MQTT (per
mosquitto_pub) "gepostet". In evcc sind die beiden Meter als MQTT-Meter
eingestellt und lesen den richtigen "Topic" dann aus. Das ist in meinem
Fall alles auf einem Raspi (USB-Leser, mosquitto-Broker und Client) sowie
evcc.
**Beispiel für Übertragung des Power-Wertes per mqtt:**
```
mosquitto_pub -h localhost -u user -P password -t *meter/netz/leistung* -m
$netzwatt # Variable netzwatt enthält den Power-Wert per grep ermittelt, ggf. auch negativer Wert
```
bzw.
```
mosquitto_pub -h localhost -u user -P password -t meter/prod/leistung -m
$prodwatt # Variable prodwatt enthält den Power-Wert per grep ermittelt,ggf. auch negativer Wert
```
**Die meter-Einträge in evcc.yaml lauten dafür:**
```
meters:
- type: template
template: mqtt-meter
usage: grid
power: *meter/netz/leistung* # topic-produktion
scalepower: 1 # Die Leistung wird in Watt erwartet. Falls z.b. kW
geliefert wird, kann dies hier mit dem Wert 1000 angepasst werden
timeout: 90s # Akzeptiere keine Daten die älter als dieser Wert ist
name: grid
- type: template
template: mqtt-meter
usage: pv
power: meter/prod/leistung # topic-netz
scalepower: 1 # Die Leistung wird in Watt erwartet. Falls z.b. kW
geliefert wird, kann dies hier mit dem Wert 1000 angepasst werden
timeout: 90s # Akzeptiere keine Daten die älter als dieser Wert ist
name: pv2
```
Das klappt aus meiner Sicht (eine anderes Problem habe ich noch, das poste
ich noch in einem separaten Post), da es thematisch hier nicht passt.
Voraussetzung ist natürlich, dass man die Zählerdaten gut lesbar per grep
usw. ermitteln kann, was bei mir der Fall ist. Sollten die Daten im binären
SML-Format (hexadezimal) vorliegen, wird es dann schon schwieriger.
Wenn man keinen vzlogger einsetzt wäre dazu ein "Plugin" oder ähnliches
sehr gut (wie im vorherigen Post auch angedacht), der SML-OBIS
(json-ähnliches standardisiertes Format) oder SML-binäre Daten
(Hexadezimal) direkt per evcc verarbeiten kann (wenn z.B. die IR-Leser und
evcc-Server auf *einem* Rechner sind) oder - falls an getrennten Rechnern
mit Umweg über MQTT übertragen wird. Da könnte man die OBIS-Daten oder die
binäre Ausgabe eines Lesezyklus per MQTT posten und dann in evcc
verarbeiten.
Da bin ich in der Programmierung allerdings überfordert ;-) unterstütze
aber gerne im Bereitsstellen von Beispieldaten oder Tests.
Die OBIS-Beispiel Daten hatte ich oben schon einmal gepostet. Hexadezimal
/ binär sehen die Daten so aus - kleiner Auszug beginnen mit 1b:
`1b 1b 1b 1b 01 01 01 01 05 76 08 0d 70 24 00 62`
Wie gesagt - ich habe es aktuell für mich lösen können, ggf. ist aber
dieser Erweiterung sinnvoll und erleichtert die Einbindung von Zählern.
|
Beta Was this translation helpful? Give feedback.
-
Hallo,
ich spiele mit dem Gedanken EVCC als Energiemanager für das Laden vom E-Auto (PHEV) zu nutzen
Daher: hier ein paar Verständnisfragen, um einzuschätzen, ob ich mit evcc zum Ziel komme - ich bin begeistert von der Lösung und hoffe dass es möglich ist Sorry für die dummen Einsteigerfragen.:
Aktuelle Situation:
Neu: go-eCharger (Version 0.41) vorhanden und in Kürze Kia PHEV,
Ist: SW-Datenlogger SBFspot (mit MQTT-Ausgabe) per Bluetooth vom älteren SMA-WR // 2 x USB IR-Leseköpfe am Produktionszähler und am Zweirichtungszähler.
Beide Leseköpfe liefern mir per USB /dev/ttyUSB0 bzw. USB1 siehe unten SML-Daten (im OBIS-Format - also gut lesbar), ansonsten sind die Zähler nicht "smart"
=> wenn das Abfragen beider Zähler klappt, dann ist der Zugriff auf Daten vom Wechselrichter eigentlich unnötig.
Beispiel OBIS-SML für SML Produktions-Zähler (also von PV-Anlage/WR):
`
129-129:199.130.3255#ISK#
1-0:0.0.9255#09 01 49 53 4b 00 04 37 56 ae #
1-0:1.8.0255#0.0#Wh
1-0:1.8.1255#0.0#Wh
1-0:1.8.2255#0.0#Wh
1-0:2.8.0255#23326687.9#Wh
1-0:2.8.1255#23326687.9#Wh
1-0:2.8.2255#0.0#Wh
1-0:16.7.0*255#-62#W
`
und Zwei-Richtungszähler (Abnahme, Netz-Einspeisung)
`ESY5Q3DA1024 V3.04
1-0:0.0.0255(61000391)
1-0:1.8.0255(00020524.6156648kWh)
1-0:2.8.0255(00061060.8283542kWh)
1-0:21.7.0255(000135.68W)
1-0:41.7.0255(000065.34W)
1-0:61.7.0255(000069.08W)
1-0:1.7.0255(000270.10W)
1-0:96.5.5255(80)
0-0:96.1.255*255(1ESY1160137522)
`
Alles auf einem Raspi (SBFspot, 2 x USB-Leser sowie die geplante EVCC-Installation). Auf dem Raspi läuft auch ein MQTT zum Test
Meine Fragen vor allem zur Abfrage der beiden Meter:
Die Daten liegen auf einem Raspi vor. Kann ich die SML-Daten per Grep und Co so aufbereiten, dass die Daten für den EVCC verwendet werden können?
wie hoch ist die Frequenz der Daten - wie häufig misst EVCC den Status (jede Minute?) Das habe ich bisher noch nicht gefunden
wie lautet der Aufbau einer Beispiel-"Meter"-Datei - das habe ich bisher nicht gefunden? Nur versch. Abfragemöglichkeiten smarter Meter, aber z.B. Möglichkeit eines Bash-Scripts, wo ich z.B. die Möglichkeit sehe direkt im korrekten Format zu liefern
direkte Umwandlung der SML-Text-Daten (OBIS) in ein Format für EVCC möglich / schon durch jemanden umgesetzt?
SML ist ja standardisiert und liefert ja auch Werte für die 3 Phasen
Umweg über MQTT (also SMLDaten der Zähler in MQTT umwandeln lassen und dann vom EVCC abfragen lassen)
Vorteil wäre, dass die Daten dann auch für andere Systeme nutzbar wären (was ich aktuell aber nicht benötige).
Hinweis: es wird kein Volkszähler oder so eine Lösung eingesetzt, sondern nur "SBFspot" als Opensource-Datenlogger zum Hochladen der SMA-Daten an pvoutput mit zusätzlichen Daten der beiden IR-Leseköpfe - Frequenz 5 Minuten)
Die einfachste Lösung wäre ein Abfrage Script der jeweiligen USB-IR-Leser und direkter Ausgabe der benötigen Daten für den EVCC.
Hat hier jemand eine Idee? Oder ist das was ich vorhabe aktuell so noch nicht möglich?
Beta Was this translation helpful? Give feedback.
All reactions