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

Automatic Phase switching with Tinkerforge WARP Energy Manager #6615

Closed
deadrabbit87 opened this issue Mar 4, 2023 · 30 comments · Fixed by #7995
Closed

Automatic Phase switching with Tinkerforge WARP Energy Manager #6615

deadrabbit87 opened this issue Mar 4, 2023 · 30 comments · Fixed by #7995
Assignees
Labels
devices Specific device support

Comments

@deadrabbit87
Copy link
Contributor

deadrabbit87 commented Mar 4, 2023

Is your feature request related to a problem? Please describe.
Tinkerforge has released in 02.2023 the WARP Energy Manager.

In combination with the WARP 2 Charger, automatic phase switching (1ph 3 ph) is now supported. For the moment, evcc doesn't support automatic phase switching with a Tinkerforge Wallbox.

Describe the solution you'd like
Integration of the WARP Energy Manager in evcc. Evcc should be able to control the used phases.

The API of the energy manager:
https://www.warp-charger.com/api.html?v=2#reference-energy_manager

@andig andig self-assigned this Mar 4, 2023
@andig andig added the devices Specific device support label Mar 4, 2023
@andig
Copy link
Member

andig commented Mar 5, 2023

Does the WEM only switch phases or does it also control the charger? There should only be a single controlling instance. I think we need some automatism to tell evcc that it should take control of an WEM if it is present. How would be determine that that's the case?

@deadrabbit87
Copy link
Contributor Author

I'm not sure, but i think it's depending on the configuration. I've installed my energy manager yesterday and for the moment it is not configured with a smart meter. Therefore it is only possible to switch between "schnell" and "off":
grafik
According to the api, it should be possbile to switch the phases externally. See phase_switching_mode.

@andig
Copy link
Member

andig commented Mar 5, 2023

Certainly. The question is under which conditions we should do that. Just always???

@deadrabbit87
Copy link
Contributor Author

deadrabbit87 commented Mar 5, 2023

I don't know, what makes sense. Maybe when "PV-Überschussladen" is switched off?
grafik

In this case, evcc would be the only controlling instance.

@TMA84
Copy link
Sponsor

TMA84 commented Mar 5, 2023

I think you would have to set the charging mode in the Energy Manager via API and start and stop charging in the Warp Charger via API.

If the "PV Überschussladen" is disabled, there will probably be no automatic phase switching.

@TMA84
Copy link
Sponsor

TMA84 commented Mar 5, 2023

Does the WEM only switch phases or does it also control the charger? There should only be a single controlling instance. I think we need some automatism to tell evcc that it should take control of an WEM if it is present. How would be determine that that's the case?

I think this is the best solution. The Wem always control the WARP Charger. Phase switching isn‘t working without controlling the WARP Charger

@deadrabbit87
Copy link
Contributor Author

@TMA84
Copy link
Sponsor

TMA84 commented Mar 6, 2023

@andig
Unfortunately I can't program, but I could help with documentation and testing. But the integration would be very helpful.

@deadrabbit87
Copy link
Contributor Author

@andig Unfortunately I can't program, but I could help with documentation and testing. But the integration would be very helpful.

Same as me. If there is anything to do, i would try to help.

@andig
Copy link
Member

andig commented Mar 6, 2023

Wir können das ja mal probehalber einbauen, aber das Grundproblem bleibt: es braucht irgendeinen Automatismus, der evcc mitteilt, ob wir die Phasenumschaltung übernehmen dürfen und sollen.

@TMA84
Copy link
Sponsor

TMA84 commented Mar 7, 2023

Ich hätte da gegebenenfalls einen anderen Lösungsansatz.
Könntet ihr nicht anstatt direkt die Wallbox zu steuern den Energy Manager den ausgewählten Ladestatus übergeben und dieser übernimmt dann die Steuerung?

Das könnte man per HTTP API oder auch per MQTT machen.
https://www.warp-charger.com/api.html?v=2#energy_manager_charge_mode

Zusätzlich könnte man noch den Wert des Zählers an den Energy Manager übergeben.
https://www.warp-charger.com/api.html?v=2#meter_values_update
Hier muss nur der Wert Power den aktuellen Gesamtleistung enthalten.
Die beiden anderen Werte können mit 0 übergeben werden.

@deadrabbit87
Copy link
Contributor Author

Was auf jeden Fall mal schon funktioniert: Ich habe min+PV im WARP Energy Manager eingestellt und PV in EVCC.

Die Wallbox lädt dann erst mal nicht, weil kein Strom von EVCC an WB freigegeben wird. Erst wenn das geschieht, beginnt die Ladung.

Phasenumschaltung funktioniert dann aber leider nicht automatisch. Setzt nan aber im WEM die Ladung auf Schnell, geht auch das.

Was ich damit sagen will: Der Lösungsansatz von @TMA84 könnte so funktionieren.

@deadrabbit87
Copy link
Contributor Author

Gibt es diesbezüglich schon Neuigkeiten?

Hab seit längerem beides parallel im Einsatz: EVCC steuert die Wallbox und im Energy Manager schalte ich nur von MIN+PV (1 Phase) und SCHNELL (3 Phasen) um. Funktioniert auch soweit parallel super, nur was halt fehlt, ist dass EVCC auch die Phasen umschaltet.

Daher wäre die Lösung von @TMA84 schon super in EVCC.

@rtrbt
Copy link

rtrbt commented Mar 22, 2023

Kurzes Update: Wir haben uns mit @andig auf eine API-Erweiterung geeinigt, damit EVCC die Phasenumschaltung kontrollieren kann. Implementieren wir für die nächste Firmware-Version.

@TMA84
Copy link
Sponsor

TMA84 commented Mar 22, 2023

Das ist doch mal eine gute Nachricht.

@deadrabbit87
Copy link
Contributor Author

Eine sehr gute Nachricht!

@andig
Copy link
Member

andig commented Mar 22, 2023

PERFEKT! Echt toll, dass ihr Euch soviel Mühe macht, ein Fremdsystem einzubinden…

@github-actions github-actions bot added the stale Outdated and ready to close label Apr 12, 2023
@andig andig removed the stale Outdated and ready to close label Apr 13, 2023
@TMA84
Copy link
Sponsor

TMA84 commented Apr 17, 2023

Hallo @rtrbt @andig,
gibt es da schon weiteres? Können wir vielleicht beim testen unterstützen?

@rtrbt
Copy link

rtrbt commented Apr 19, 2023

Leider noch nicht. Eventuell kommen wir diese Woche noch dazu.

@deadrabbit87
Copy link
Contributor Author

Hallo @rtrbt,

gibts ggf. schon ein Beta? Wie @TMA84 schon geschrieben hat, würden wir gerne unterstützen.

@rtrbt
Copy link

rtrbt commented May 2, 2023

Oh sorry, @MattiasTF hatte die Beta am Freitag nur @andig direkt geschickt. Ich zitiere mal aus der Mail:

In den Einstellungen vom WEM kannst du jetzt den Phasenumschaltungsmodus auf „Externe Steuerung“ stellen. Dazu gibt es zwei neue API-Endpunkte:

/energy_manager/state -> external_control
Das sagt dir, ob du eine Phasenumschaltung auslösen kannst.
0: Phasenumschaltung verfügbar
1: Phasenumschaltung nicht verfügbar, externe Steuerung deaktiviert
2: Phasenumschaltung nicht verfügbar, Laufzeitbedingungen nicht erfüllt
3: Phasenumschaltung nicht verfügbar, Phasen werden gerade umgeschaltet

Unter 2 fällt sowas wie Wallboxen antworten nicht, Schützfehler, über externen Eingang blockiert, etc.

/energy_manager/external_control(_update) -> phases_wanted
Über external_control_update kannst du eine Phasenumschaltung auslösen.
"phases_wanted":0 - Strom aus, einphasig
"phases_wanted":1 - Strom an, einphasig
"phases_wanted":3 - Strom an, dreiphasig

Über external_control kannst du kontrollieren, ob dein Kommando übernommen wurde oder nicht. In den Zuständen 1-3 (siehe oben) werden Kommandos ignoriert.

Bitte beachte, dass entgegen der vorherigen Ankündigung aktuell doch keine Totzeit zwischen zwei Phasenumschaltungen erzwungen wird. Eine Umschaltung dauert ca. 15 Sekunden und neue Kommandos werden in der Zeit ignoriert, aber der WEM hält dich nicht davon ab, vier Umschaltungen pro Minute durchzuführen, was dir dein Auto sicherlich übelnehmen wird. Die auf der Debug-Seite angezeigten Wartezeiten werden im extern gesteuerten Modus ignoriert. Die Totzeit liegt somit auch in der Verantwortung von EVCC.

Bitte beachte (die 2.): Die API ist noch nicht final und der Code hat Beta-Qualität. 😉

energy_manager_firmware_1_0_1+EVCC_beta.bin.zip

@deadrabbit87
Copy link
Contributor Author

Sehr cool, danke! Ist schon geflasht 😉. Dann hoffe ich, das @andig und @premultiply so flott sind wie sonst auch 😛😉

@deadrabbit87
Copy link
Contributor Author

@andig Ich weiß, du hattest mal gesagt, ihr gebt keine Zeitangaben bis wann ihr das implementiert, daher die Frage: Wo in deiner Prioritätenliste von 1-100 steht der feature request?

Gruß

@premultiply premultiply self-assigned this May 8, 2023
@andig
Copy link
Member

andig commented May 12, 2023

Kommt auf jeden Fall!

@andig
Copy link
Member

andig commented May 14, 2023

Wie sieht das bei Euch im mqtt aus- hat der EM ein anderes Topic als die Warp? Gibts dafür einen Standard (so wie warp für die Wallbox?

@deadrabbit87
Copy link
Contributor Author

deadrabbit87 commented May 14, 2023

Sieht bei mir so aus wem/26ud/energy_manager/...:, also ja:

grafik

@andig
Copy link
Member

andig commented May 14, 2023

Und was hast du als warp topic konfiguriert?

@deadrabbit87
Copy link
Contributor Author

warp2/22qS/... Die Standardnamen müsste ich mal ändern...
grafik

@andig
Copy link
Member

andig commented May 18, 2023

Ihr könnt es gerne nochmal probieren, erfordert the Beta-FW. Wenn das auch nciht klappt wäre es Klasse, wenn mir jemand seine Warp mal über eine Public Broker zur Verfügung stellen könnte (info@evcc.io)

@deadrabbit87
Copy link
Contributor Author

Ihr könnt es gerne nochmal probieren, erfordert the Beta-FW. Wenn das auch nciht klappt wäre es Klasse, wenn mir jemand seine Warp mal über eine Public Broker zur Verfügung stellen könnte (info@evcc.io)

Sehr gerne, muss ich aber erst schauen wie das geht, hab ich noch nie gemacht.

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

Successfully merging a pull request may close this issue.

5 participants