-
Notifications
You must be signed in to change notification settings - Fork 107
SoC Skoda and VWId using VW Group #2325
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # SoC-Modul Skoda | ||
|
|
||
| Das SoC-Modul Skoda gibt es in openWB 2.x. | ||
|
|
||
| ## Konfiguration | ||
|
|
||
| Die Konfiguration erfolgt im Bereich Einstellungen - Konfiguration - Fahrzeuge: | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| ## Hinweise | ||
|
|
||
| Für nicht-Skoda Fahrzeuge (Audi, VW, etc.) funktioniert das Modul nicht. | ||
|
|
||
| Erfolgreich getestet u.a. für folgende Fahrzeuge: Enyaq. | ||
|
|
||
| **Wichtig für alle Fahrzeuge:** | ||
| Es muss ein aktives Konto im Skoda ID Portal vorhanden sein und die "MySkoda App" muss eingerichtet sein. | ||
|
|
||
| **WICHTIG:** | ||
| Skoda ändert gelegentlich die Bedingungen für die Nutzung der Online-Services. | ||
|
|
||
| Diese müssen bestätigt werden. Wenn der SOC-Abruf plötzlich nicht mehr funktioniert, VOR dem Posten bitte Schritt 1 ausführen. | ||
|
|
||
| Bei Problemen zunächst bitte diese Schritte durchführen: | ||
|
|
||
| 1. sicherstellen, dass auf dieser Skoda-Seite alle Einverständnisse gegeben wurden. | ||
|
|
||
| <https://skodaid.vwgroup.io/landing-page> | ||
|
|
||
| In einigen Fällen wurden die Einverständnisse gegeben und trotzdem funktionierte die Abfrage nicht. | ||
| Hier hat folgendes Vorgehen geholfen: Im Skoda Konto das Land temporär umstellen, d.h. | ||
| - auf ein anderes Land als das eigene ändern | ||
| - sichern | ||
| - zurück auf das eigene Land ändern | ||
| - sichern. | ||
|
|
||
| 2. Nach einem manuellen SOC-Abruf (Kreispfeil hinter dem SOC klicken) auf der Status - Seite EV-SOC Log und Debug log auf Fehler kontrollieren | ||
|
|
||
| 3. Falls im Ev-Soc Log Fehler 303 (unknown redirect) gemeldet wird: | ||
| - Ursache 1: Bestimmte Sonderzeichen im Passwort funktionieren nicht mit dem Modul. Bitte das Passwort auf eines ohne Sonderzeichen ändern und testen. | ||
| - Ursache 2: Falsche Email, Passwort oder VIN eingegeben. Alle 3 löschen, speichern, neu eingeben, speichern und testen. | ||
|
|
||
| 4. Falls eine Firewall im Spiel ist: Es gab einzelne Probleme beim Internet-Zugriff der openWB auf Python Archive und Fahrzeug-Server wenn IPV6 aktiv ist. | ||
|
|
||
| 5. Nach Neustart bzw. Änderung der LP-Konfiguration werden im EV-Soc-Log Fehler ausgegeben (permission oder fehlende Datei). | ||
|
|
||
| Diese Fehler sind normal und können ignoriert werden. Leider wird im Debug Mode 0 keine Positiv-Meldung ausgegeben. | ||
| Empfehlung: | ||
| - In Einstellungen - System - Fehlersuche dies einstellen: Debug Level/Details | ||
| - dann einen manuellen SOC-Abruf durchführen (im Dashboard auf Kreispfeil klicken). | ||
| - danach sollte im EV-SOC-Log eine Zeile ähnlich dieser kommen: | ||
|
|
||
| `2023-02-12 11:57:14 INFO:soc_skoda:Lp1 SOC: 61%@2023-02-12T11:53:20` | ||
|
|
||
| Diese Zeile zeigt folgende Information: | ||
|
|
||
| `2023-02-12 11:57:14` *- Timestamp des SOC-Abrufs* | ||
|
|
||
| `INFO` *- Debug Level INFO* | ||
|
|
||
| `soc_skoda` *- SOC-Modul* | ||
|
|
||
| `Lp1` *- Ladepunkt* | ||
|
|
||
| `SOC: 61%` *- SOC Stand* | ||
|
|
||
| `@2025-02-12T11:53:20` *- Timestamp des Updates vom EV zum VW Cloud-Server* | ||
|
|
||
| 6. Falls diese Schritte nicht zum Erfolg führen, das Problem im [Support Thema](https://forum.openwb.de/viewforum.php?f=12) mit Angabe relevanter Daten posten | ||
| - oWB SW Version | ||
| - oWB gekauft oder selbst installiert | ||
| - wenn selbst installiert: welches OS(Stretch/Buster) | ||
| - welches Fahrzeug | ||
| - falls vorhanden Angaben über Firewall, VPN, etc., also Appliances, die den Internetzugang limitieren könnten | ||
| - relevante Abschnitte der Logs, vor allem Fehlermeldungen, als CODE-blocks (</>). | ||
|
|
||
| Das SoC-Log mit evtl. Fehlermeldungen kann wie folgt eingesehen werden: | ||
|
|
||
| - Einstellungen - System - Fehlersuche |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #!/usr/bin/env python3 | ||
|
|
||
| import aiohttp | ||
| from asyncio import new_event_loop, set_event_loop | ||
| from typing import Union | ||
| from modules.vehicles.skoda import libskoda | ||
| from modules.vehicles.skoda.config import Skoda | ||
| from modules.vehicles.vwgroup.vwgroup import VwGroup | ||
|
|
||
|
|
||
| class api(VwGroup): | ||
|
|
||
| def __init__(self, conf: Skoda, vehicle: int): | ||
| super().__init__(conf, vehicle) | ||
|
|
||
| # async method, called from sync fetch_soc, required because libvwid/libskoda expect async environment | ||
| async def _fetch_soc(self) -> Union[int, float, str]: | ||
| async with aiohttp.ClientSession() as self.session: | ||
| skoda = libskoda.skoda(self.session) | ||
| return await super().request_data(skoda) | ||
|
|
||
|
|
||
| def fetch_soc(conf: Skoda, vehicle: int) -> Union[int, float, str]: | ||
|
|
||
| # prepare and call async method | ||
| loop = new_event_loop() | ||
| set_event_loop(loop) | ||
|
|
||
| # get soc, range from server | ||
| a = api(conf, vehicle) | ||
| soc, range, soc_ts, soc_tsX = loop.run_until_complete(a._fetch_soc()) | ||
|
|
||
| return soc, range, soc_ts, soc_tsX | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| from typing import Optional | ||
|
|
||
|
|
||
| class SkodaConfiguration: | ||
| def __init__(self, | ||
| user_id: Optional[str] = None, # show in UI | ||
| password: Optional[str] = None, # show in UI | ||
| vin: Optional[str] = None, # show in UI | ||
| refreshToken: Optional[str] = None, # DON'T show in UI! | ||
| calculate_soc: bool = False # show in UI | ||
| ): | ||
| self.user_id = user_id | ||
| self.password = password | ||
| self.vin = vin | ||
| self.refreshToken = refreshToken | ||
| self.calculate_soc = calculate_soc | ||
|
|
||
|
|
||
| class Skoda: | ||
| def __init__(self, | ||
| name: str = "Skoda", | ||
| type: str = "skoda", | ||
| official: bool = False, | ||
| configuration: SkodaConfiguration = None) -> None: | ||
| self.name = name | ||
| self.type = type | ||
| self.official = official | ||
| self.configuration = configuration or SkodaConfiguration() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Für was steht denn das X in soc_tsX? Ist soc_ts_server ausssagekräftiger?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''' Für was steht denn das X in soc_tsX? Ist soc_ts_server ausssagekräftiger?
Das stammt ursprünglich aus dem vwid Modul:
soc_ts und soc_tsX beschreiben denselben Zeitpunkt, soc_ts als string, soc_tsX als timestamp.
der String wird im Log benutzt, der timestamp für den car_state.