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

Update EEBUS to use version 0.6 of EEBUS libs #13998

Merged
merged 8 commits into from
Jun 30, 2024

Conversation

DerAndereAndi
Copy link
Contributor

@DerAndereAndi DerAndereAndi commented May 20, 2024

  • Update to eebus-go v0.6.0, spine-go v0.6.0 and ship-go v0.5.1
  • Add better support for VW ISO VAS capable chargers and EVs, to enable them to go to sleep

@DerAndereAndi DerAndereAndi marked this pull request as draft May 20, 2024 19:32
@DerAndereAndi
Copy link
Contributor Author

DerAndereAndi commented May 20, 2024

This can also be used as a foundation to implement communication with a control box. But I recommend moving the eebus server then from charger to the server package.

I tested this with a software emulation of a wallbox so far. Will test with multiple wallboxes during the next week.

The updated version should also have everything needed to provide an interactive pairing UI. E.g. list all visible remote EEBUS devices, initiate a pairing request, but also react to incoming pairing requests.

@andig
Copy link
Member

andig commented May 21, 2024

@DerAndereAndi ersetzt das dann #12407 oder ist das hier ein Zwischenschritt?

I tested this with a software emulation of a wallbox so far.

Könntest Du die teilen oder finde ich die in https://github.com/enbility/cemd? Vielen Dank!

The updated version should also have everything needed to provide an interactive pairing UI. E.g. list all visible remote EEBUS devices, initiate a pairing request, but also react to incoming pairing requests.

Das wäre ein Thema dem wir uns widmen wollen wenn das Config UI released ist.

@andig andig added the enhancement New feature or request label May 21, 2024
@DerAndereAndi
Copy link
Contributor Author

@DerAndereAndi ersetzt das dann #12407 oder ist das hier ein Zwischenschritt?

Ja, das ersetzt deinen PR.

Könntest Du die teilen oder finde ich die in https://github.com/enbility/cemd? Vielen Dank!

Nein, das geht leider nicht.

Das wäre ein Thema dem wir uns widmen wollen wenn das Config UI released ist.

👍

@andig
Copy link
Member

andig commented May 24, 2024

Nein, das geht leider nicht.

Schade. Mir fehlt mangels Gerät jede Möglichkeit, hier etwas beizutragen ausser "trocken" coding.

Es wäre Klasse den PR fertig zu bekommen- aktuell ist aufgrund der geänderten Struktur keine (einfache) Aktualisierung der Dependencies mehr möglich.

@andig andig mentioned this pull request Jun 1, 2024
@andig
Copy link
Member

andig commented Jun 7, 2024

Hi Andi, kann ich irgendwie helfen den PR zu finalisieren? Aufgrund der 0.x Versionen hängen wir sonst im Dependency Upgrade fest:

go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20240604170348-d4e7c9cb6cb8
go: downloading golang.org/x/oauth2 v0.21.0
go: downloading github.com/itchyny/gojq v0.12.16
go: downloading github.com/go-playground/validator/v10 v10.21.0
go: downloading github.com/prometheus/common v0.54.0
go: downloading github.com/itchyny/timefmt-go v0.1.6
go: downloading modernc.org/sqlite v1.30.0
go: downloading github.com/prometheus/procfs v0.15.1
go: downloading google.golang.org/genproto v0.0.0-20240604185151-ef581f913117
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117
go: downloading github.com/aws/aws-sdk-go v1.53.18
go: downloading github.com/insomniacslk/xjson v0.0.0-20240605162811-87a2577578b2
go: downloading modernc.org/libc v1.52.1
go: github.com/evcc-io/evcc imports
	github.com/evcc-io/evcc/cmd imports
	github.com/evcc-io/evcc/charger imports
	github.com/enbility/cemd/emobility: cannot find module providing package github.com/enbility/cemd/emobility
go: github.com/evcc-io/evcc imports
	github.com/evcc-io/evcc/cmd imports
	github.com/evcc-io/evcc/charger/eebus imports
	github.com/enbility/eebus-go/spine/model: cannot find module providing package github.com/enbility/eebus-go/spine/model
go: downloading modernc.org/ccgo/v4 v4.17.10

@DerAndereAndi
Copy link
Contributor Author

Ich kann erst nächste Woche wenn ich mein Auto wieder habe weiter machen.

Alternative für upgrades: du änderst die bisherige Nutzung von Versionsnummer auf den entsprechenden Commit.

@andig
Copy link
Member

andig commented Jun 9, 2024

Komischerweise klappt das beim cemd nicht:

go get -v github.com/enbility/cemd@2839324 -> github.com/enbility/cemd v0.2.2

Bei eebus-go gehts:

github.com/enbility/eebus-go v0.2.1-0.20230521185917-1bae87b0ec27

Sieht aus, als würde das Go Tooling das nicht zulassen.

@DerAndereAndi
Copy link
Contributor Author

go.mod direkt editieren mit:

github.com/enbility/eebus-go v0.0.0-20230521185917-1bae87b0ec27
github.com/enbility/cemd v0.0.0-20230426193025-28393246b3d0

sollte gehen. Bei CEMD evtl. das Datum auch auf 20230426183025 setzen.

@andig
Copy link
Member

andig commented Jun 9, 2024

Tut auch nicht:

go get -u
go: downloading github.com/enbility/cemd v0.0.0-20230426183025-28393246b3d0
go: github.com/evcc-io/evcc imports
	github.com/evcc-io/evcc/cmd imports
	github.com/evcc-io/evcc/charger imports
	github.com/enbility/cemd/emobility: cannot find module providing package github.com/enbility/cemd/emobility
go: github.com/evcc-io/evcc imports
	github.com/evcc-io/evcc/cmd imports
	github.com/evcc-io/evcc/charger/eebus imports
	github.com/enbility/eebus-go/spine/model: cannot find module providing package github.com/enbility/eebus-go/spine/model

Ich warte einfach ;)

@andig
Copy link
Member

andig commented Jun 23, 2024

Fixed by replacing the versions in 27d67d0

@DerAndereAndi DerAndereAndi changed the title Update EEBUS to use version 0.5 of EEBUS libs Update EEBUS to use version 0.6 of EEBUS libs Jun 29, 2024
@DerAndereAndi
Copy link
Contributor Author

Tested with two EEBUS compatible chargers and works great. It even seems to improve the crashing issues of the Elli Charger Connect and Pro wallboxes to some extend for me.

@DerAndereAndi DerAndereAndi marked this pull request as ready for review June 29, 2024 14:45
This updates the eebus charger implementation to use the latest version 0.5 implementations of cemd, eebus, spine and ship
Only use OSCEV if the a wallbox with ISO15118-2 VW VAS is connected, and the EV is using this. This also enables full charging control and putting the EV to sleep.

All other current implementations of the usecase are basically wrong and are no different than using OPEV.
- Updated to eebus-go v0.6.0, spine-go v0.6.0 and ship-go v0.5.1
- Various updates and fixes
@andig
Copy link
Member

andig commented Jun 29, 2024

Ich hatte die use cases in #12407 noch (für meinen Geschmack) minimal eleganter erzeugt:

	// create use cases
	service := c.cem.Service
	c.uc = &Usecases{
		EvseCC: ucevsecc.NewUCEVSECC(service, c.evseHandler),
		EvCC:   ucevcc.NewUCEVCC(service, c.evHandler),
		EvCem:  ucevcem.NewUCEVCEM(service, c.evHandler),
		OpEV:   ucopev.NewUCOPEV(service, c.evHandler),
		EvSoc:  ucevsoc.NewUCEVSOC(service, c.evHandler),
	}

	// register use cases
	for _, uc := range []cemdapi.UseCaseInterface{
		c.uc.EvseCC,
		c.uc.EvCC, c.uc.EvCem, c.uc.OpEV, c.uc.EvSoc,
	} {
		c.cem.AddUseCase(uc)
	}

@andig
Copy link
Member

andig commented Jun 29, 2024

Klasse- hab noch ein paar Kleinigkeiten geändert und die Cert-Funktionen raus gezogen.

@andig
Copy link
Member

andig commented Jun 29, 2024

Meinst Du das kann ins Nightly oder lieber bis nach Release warten?

@DerAndereAndi
Copy link
Contributor Author

Wenn du kurzfristig ein Release planst, lieber danach

@andig andig merged commit b2f6816 into evcc-io:master Jun 30, 2024
6 checks passed
@andig
Copy link
Member

andig commented Jun 30, 2024

Klasse- dann rein damit. Es steht grad nix Kritisches an.

if err != nil {
// there are no overload protection limits available, e.g. because the data was not received yet
// there are limits available, e.g. because the data was not received yet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DerAndereAndi der Kommentar sollte "no limits" heißen? Oder ist die Bedingung falsch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Den Kommentar gibt es im aktuellen Code nicht und die Stelle greift nur bei VAS => Taycan. Das läuft sauber.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arg, falsche Stelle. Den gibts immer noch:

	limits, err := c.uc.OpEV.LoadControlLimits(evEntity)
	if err != nil {
		// there are limits available, e.g. because the data was not received yet
		c.log.DEBUG.Println("!! OpEV.LoadControlLimits error", err)
		return true, nil
	}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An der Stelle hier falsch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glaube ich kaum, denn Limits sind im Ablauf ja da und gesetzt.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mir gehts nur um den Kommentar- der müsste heissen "no limits"? Dann würde ich das lokal korrigieren.

@DerAndereAndi DerAndereAndi deleted the feature/eebus05 branch August 5, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants