question

andre-3 avatar image
andre-3 asked

Python script for dbus Control with Multiplus equipment in context with Fronius Wattpilot

Dear community,

Matthias asked me for an english version as he moved the article. Here we go!

I've been reading the forum for a while now and would like to make a contribution. A Victron system has been running here for about a year. I recently had it finally registered by the electrician. Our household has one electric car. This is usually not connected to the power supply on weekdays. It is charged via a Fronius Wattpilot 11J. To ensure that we use the maximum amount of energy ourselves, we always needed to optimize the charging settings. Just for the fun of it, I set myself a small project to automate a few processes. The project is implemented in Python. It's a hobby and I'm not a programmer. The control to the Multiplus is done via dbus. Errors are not impossible :)

Source code for those who are interested can be found here: https://github.com/MeAsSystemsEngineer/victron-dbus-wattpilot

1) Eco Mode - By default, the Eco Mode charges as long as PV surplus is available. This means that the house battery was emptied and then charging stopped. The consumers then drew power from the grid. That was suboptimal. I have introduced two changes here:
- The maximum discharge is 6 amps. As soon as there is no more PV surplus available and electricity has to be drawn from the grid, the WattPilot stops charging according to its hysteresis
- The maximum charge of the home battery depends on the charge level. The higher this is, the slower the house battery is charged.

2) Next Trip Mode - By default, Next Trip Mode charges as much power as is set in the app. A variable tariff is taken into account. I have also made changes here:
- The maximum discharge is 10 amps.
- I limit the charge to one phase so that the maximum current comes out of the battery

3) Default mode - By default, the mode charges the car fully with the set parameters. We mainly needed this mode in winter. A high load on the MP reduces efficiency and increases the noise level. It was better to cover the base load with the house battery. I therefore made a change here too:
- No energy is drawn from the battery.

Of course, this doesn't suit every household. But if you want, you can use the script as a basis for implementing something of your own. It would certainly have been possible to create something analog with Node Red. At this point, however, I simply wanted to dive a little deeper into the Victron OS. We always charge via Eco at the current time of year (spring till autumn). In the transitional period, we switch to NextTrip before going to bed. The mileage per day is around 80 km. The level of self-consumption is pleasantly high. The modes are switched using the button on the WattPilot or in the app. Once set up, it runs without maintenance.

Please leave your comments here!

------ german version below ------

Hallo liebe Community,

ich lese schon etwas länger im Forum mit und möchte mich jetzt auch einmal mit einem Beitrag zu Wort melden. Hier läuft seit ca. einem Jahr eine Victron Anlage. Vor kurzem habe ich diese vom Elektriker final anmelden lassen.

Unser Haushalt fährt elektrisch mit einem Auto. Dieses ist in der Regel werktags nicht am Strom. Geladen wird über einen Fronius Wattpiloten 11J.

Damit wir das Maximum an Energie selbst verbrauchen, war immer etwas Optimierung an den Ladeeinstellungen notwendig. Aus Spaß an der Freude habe ich mir ein kleines Projekt vorgenommen, um ein paar Abläufe zu automatisieren. Das Projekt ist in Python realisiert. Es ist ein Hobby und ich bin kein Programmierer. Die Steuerung zum Multiplus erfolgt über dbus. Fehler sind nicht ausgeschlossen :) Quellcode für Interessierte ist hier zu finden: https://github.com/MeAsSystemsEngineer/victron-dbus-wattpilot

1) Eco Mode

Im Standard lädt der Eco Mode, solange Überschuss verfügbar ist. Das hat bedeutet, der Hausakku wurde geleert und dann hat die Ladung aufgehört. Die Verbraucher haben Strom aus dem Netz bezogen. Das war suboptimal. Ich habe hier zwei Veränderungen eingeführt:

- Die maximale Entladung liegt bei 6 Ampere. Sobald kein PV Überschuss mehr verfügbar ist und Strom aus dem Netz bezogen werden müsste, stoppt der WattPilot seinen Ladevorgang entsprechend seiner Hysterese

- Die maximale Ladung des Hausakkus ist abhängig vom Füllstand. Je höher dieser ist, umso langsamer wird der Hausakku geladen.

2) Next Trip Mode

Im Standard lädt der Next Trip Mode so viel Strom, wie in der App eingestellt ist. Dabei wird ein variabler Tarif berücksichtigt. Ich habe auch hier Veränderungen vorgenommen:

- Die maximale Entladung liegt bei 10 Ampere.

- Ich begrenze die Ladung auf eine Phase, damit das Maximum an Strom aus dem Akku kommt

3) Default Mode

Im Standard lädt der Modus mit den eingestellten Parametern das Auto voll. Diesen Modus haben wir hauptsächlich im Winter benötigt. Eine hohe Last am MP lässt die Effizienz fallen und erhöht den Geräuschpegel. Besser war es, mit dem Hausakku die Grundlast zu decken. Daher habe ich auch hier eine Veränderung vorgenommen:

- Es wird keine Energie aus dem Akku entnommen.

Natürlich passt dieses Bild nicht in jeden Haushalt. Aber wenn man möchte, kann man das Script als Basis verwenden, etwas eigenes zu implementieren. Sicher wäre es auch mit Node Red möglich gewesen, etwas analoges zu erstellen. Ich wollte an dieser Stelle jedoch einfach einmal etwas in das Victron OS eintauchen.

Wir laden zur akuellen Jahreszeit immer über Eco. In der Übergangszeit schalten wir vor dem Schlafengehen auf NextTrip um. Die Fahrleistung pro Tag liegt bei ca. 80 km. Der Grad des Eigenverbrauchs ist angenehm hoch.

Das Umschalten der Modi wird über den Knopf am WattPiloten oder in der App erledigt. Einmal eingerichtet läuft das dann ohne Wartung.

Gern Kommentare hier lassen!


Multiplus-IIVenus OSFroniuspython
3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Matthias Lange - DE avatar image Matthias Lange - DE ♦ commented ·
@andre das ist eher was für den Modification Bereich, habe ich mal dahin verschoben, auch wenn es auf Englisch besser wäre.
0 Likes 0 ·
smueff1970 avatar image smueff1970 commented ·
Hallo Andre,

macht einen sinnvollen Eindruck :-). Andre Rudolph aus Reinholdshain ?

Gruß Thomas

0 Likes 0 ·
andre-3 avatar image andre-3 commented ·

Nein, in diesem Falle aus Thüringen :)

0 Likes 0 ·
0 Answers