-
-
Notifications
You must be signed in to change notification settings - Fork 639
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
Enphase Envoy with token-based authentication #8146
Comments
Ich sehe nicht wie wir Token Auth generisch implementieren könnten. Das würde dann wohl eine eigene Go Umsetzung erfordern, Beispiele mit HTTP finden sich diverse, z.B. die Easee (OAuth2). |
@salz3n danke für Deine Arbeit. Meine Meinung zu Deinen 2 Punkten wäre:
Kannst Du bitte die anderen Punkte auch einbauen? Also Bezug usw. Eben was wichtig ist. @andig könnten bitte in dem aktuellen Template auch der Bezug mit aufgenommen werden. Damit man es nicht über irgendwelche Umwege bauen muss?! |
Ein PR für das Template wäre schön |
Bei mir wurde gestern das neuste Update im Enphase Envoy installiert und nun bekomme ich endlich alle Werte in der API korrekt ausgeliefert. Ich werde im Laufe der Woche noch ein PR erstellen. Wenn ich das richtig sehe, dann kann ich mit dem Template dann @pitware2005 Hast Du eine Enphase-Installation mit Software 7.x und Batterie zum Testen von meinem PR? |
HI everyone, A have some difficulties in setting up an IQ enphase with 7.X firmware. Can you make a short step by step to-do list with the settings or a link to a newbie style tutorial ? |
@bgrigoriu It shouldn't be too complex, but you will have to wait until the support of firmware 7.X is added to the code. The maintainers of the project need to include the pull request #8247 into a release of evcc. Until this change is not included the Enphase Envoy 7.x is not supported by evcc. |
Thanks for the comment. |
BRAUCHE UNTERSTÜTZUNG BEI DER PROGRAMMIERUNG
In Issue #7779 wurde ein Template für das Enphase Envoy-S implementiert.
Leider wurde bei der neueren Enphase Envoy Firmware der Zugriff auf eine Token-Authentifizierung umgestellt. Daher geht das aktuelle Template https://github.com/evcc-io/evcc/blob/master/templates/definition/meter/enphase.yaml nicht mehr für die neuesten Enphase-Versionen.
Ich habe das Template leicht angepasst und konnte es zumindest als Proof-of-Concept wieder zum Laufen bringen:
/templates/definition/meter/enphase.yaml
Jedoch gibt es noch zwei Probleme, welche vor einem Pull Request gelöst werden müssten. Vielleicht findet sich ja jemand, der mich unterstützen kann, da ich noch nie in Go programmiert habe.
Problem 1: Token-Generierung
Das Authentifizierung-Token (oben im Code mit
<THE TOKEN>
benannt) hat nur eine Laufzeit von 1 Jahr und müsste daher am besten automatisiert vom evcc Code erzeugt und vor Ablauf erneuert werden.Der genaue Prozess ist hier sehr gut beschrieben: https://enphase.com/download/iq-gateway-access-using-local-apis-or-local-ui-token-based-authentication-tech-brief
Es gibt auch ein funktionierendes Skript in Python. Dieses müsste vermutlich in Go umgeschrieben und dann irgendwie in den evcc Code integriert werden:
Problem 2: Endpoint production.json funktioniert nicht mehr
Der Endpoint
/production.json
ist leider zur Zeit noch nicht mit Hilfe des Bearer Tokens abrufbar. Dies scheint ein Bug von der Enphase API zu sein, da nur manche API-Endpunkte mit dem Token funktionieren - andere aber nur mit einem Session-Cookie (Erst im Browser lokal in den Envoy mit Hilfe vom Bearer Token einloggen, dann den Cookie-WertsessionId
auslesen).Es gibt jedoch noch den Endpoint
/ivp/meters/readings
. Dieser scheint ähnliche Werte zu liefern. Ich denke, dass manactivePower
nutzen könnte.Ich würde mich sehr freuen, wenn sich jemand findet, mit dem ich das Template fertig entwickeln kann.
The text was updated successfully, but these errors were encountered: