337 lines
4.4 KiB
Markdown
337 lines
4.4 KiB
Markdown
# ING FinTS Auswertung
|
|
|
|
Python-Skripte zur automatisierten Auswertung eines ING-Kontos über FinTS.
|
|
|
|
## Funktionen
|
|
|
|
### balance.py
|
|
|
|
Ermittelt den aktuellen Kontostand und überträgt diesen an ioBroker.
|
|
|
|
Ausgabe:
|
|
|
|
* Kontostand
|
|
* Buchungsdatum
|
|
|
|
Optional:
|
|
|
|
* Übertragung an ioBroker
|
|
|
|
---
|
|
|
|
### transactions.py
|
|
|
|
Lädt die Kontobewegungen einer Kalenderwoche direkt von der ING.
|
|
|
|
Erzeugt:
|
|
|
|
```text
|
|
Transaktionen/
|
|
└── YYYY/
|
|
├── csv/
|
|
│ └── transactions_YYYY_KWxx.csv
|
|
└── json/
|
|
└── transactions_YYYY_KWxx.json
|
|
```
|
|
|
|
Zusätzlich:
|
|
|
|
* Anzahl Transaktionen
|
|
* Wochensumme
|
|
* Wochenausgaben
|
|
|
|
werden an ioBroker übertragen.
|
|
|
|
---
|
|
|
|
### categorize_transactions.py
|
|
|
|
Kategorisiert die bereits exportierten Transaktionen anhand der Datei `Kategorien.json`.
|
|
|
|
Es erfolgt kein erneuter Abruf bei der ING.
|
|
|
|
Quelle:
|
|
|
|
```text
|
|
Transaktionen/YYYY/json/transactions_YYYY_KWxx.json
|
|
```
|
|
|
|
Erzeugt:
|
|
|
|
```text
|
|
Transaktionen/
|
|
└── YYYY/
|
|
├── categorized_csv/
|
|
│ └── categorized_transactions_YYYY_KWxx.csv
|
|
├── categorized_json/
|
|
│ └── categorized_transactions_YYYY_KWxx.json
|
|
├── summary/
|
|
│ └── category_summary_YYYY_KWxx.json
|
|
└── jahresauswertung/
|
|
└── Kontobewegungen_YYYY.xlsx
|
|
```
|
|
|
|
---
|
|
|
|
## Excel-Auswertung
|
|
|
|
Die Datei
|
|
|
|
```text
|
|
Kontobewegungen_YYYY.xlsx
|
|
```
|
|
|
|
enthält:
|
|
|
|
### Blatt "Übersicht"
|
|
|
|
Monatsübergreifende Übersicht aller vorhandenen Kalenderwochen:
|
|
|
|
* Einnahmen
|
|
* Ausgaben
|
|
* Saldo
|
|
|
|
### Blatt "KWxx"
|
|
|
|
Für jede Kalenderwoche:
|
|
|
|
#### Kennzahlen
|
|
|
|
* Anzahl Transaktionen
|
|
* Einnahmen
|
|
* Ausgaben
|
|
* Saldo
|
|
|
|
#### Kategorien
|
|
|
|
* Einnahmen pro Kategorie
|
|
* Ausgaben pro Kategorie
|
|
* Saldo pro Kategorie
|
|
|
|
#### Kontobewegungen
|
|
|
|
* Datum
|
|
* Betrag
|
|
* Kategorie
|
|
* Name
|
|
* Verwendungszweck
|
|
|
|
---
|
|
|
|
## Kategorien
|
|
|
|
Datei:
|
|
|
|
```text
|
|
Kategorien.json
|
|
```
|
|
|
|
Beispiel:
|
|
|
|
```json
|
|
{
|
|
"Haus": [
|
|
"ERGO",
|
|
"ENTEGA",
|
|
"WASSER"
|
|
],
|
|
|
|
"Lebensmittel": [
|
|
"REWE",
|
|
"ALDI",
|
|
"LIDL"
|
|
],
|
|
|
|
"Luxus": [
|
|
"AMAZON"
|
|
],
|
|
|
|
"Ausgleich": [
|
|
"AUSGLEICH"
|
|
]
|
|
}
|
|
```
|
|
|
|
Die Suche erfolgt in:
|
|
|
|
* Name
|
|
* Verwendungszweck
|
|
|
|
Groß-/Kleinschreibung wird ignoriert.
|
|
|
|
---
|
|
|
|
## Verzeichnisstruktur
|
|
|
|
```text
|
|
/home/banking
|
|
├── .ing.conf
|
|
├── Kategorien.json
|
|
├── ING
|
|
│ ├── balance.py
|
|
│ ├── transactions.py
|
|
│ ├── categorize_transactions.py
|
|
│ └── README.md
|
|
├── Transaktionen
|
|
│ └── YYYY
|
|
└── logs
|
|
```
|
|
|
|
---
|
|
|
|
## Konfiguration
|
|
|
|
Datei:
|
|
|
|
```text
|
|
~/.ing.conf
|
|
```
|
|
|
|
Beispiel:
|
|
|
|
```ini
|
|
ING_USER=12345678
|
|
ING_PIN=geheim
|
|
ING_IBAN=DE......
|
|
IOBROKER_HOST=10.0.1.10
|
|
IOBROKER_PORT=8087
|
|
|
|
IOBROKER_DP_BALANCE=javascript.0.Variablen.Konto_Saldo
|
|
IOBROKER_DP_TRANSACTIONS=javascript.0.Variablen.Konto_Transaktionen
|
|
IOBROKER_DP_WEEKSUM=javascript.0.Variablen.Konto_Wochensumme
|
|
IOBROKER_DP_WEEKEXPENSES=javascript.0.Variablen.Konto_Wochenausgaben
|
|
```
|
|
|
|
---
|
|
|
|
## Installation
|
|
|
|
Repository klonen:
|
|
|
|
```bash
|
|
git clone https://git.hintergasse.de/hubobel/ING.git
|
|
```
|
|
|
|
Python-Abhängigkeiten installieren:
|
|
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
---
|
|
|
|
## Wichtige Befehle
|
|
|
|
### Repository aktualisieren
|
|
|
|
```bash
|
|
git -C ~/ING pull
|
|
```
|
|
|
|
### Kontostand abrufen
|
|
|
|
```bash
|
|
python3 ~/ING/balance.py
|
|
```
|
|
|
|
### Aktuelle Kalenderwoche laden
|
|
|
|
```bash
|
|
python3 ~/ING/transactions.py
|
|
```
|
|
|
|
### Bestimmte Kalenderwoche laden
|
|
|
|
(Beispiel KW23/2026)
|
|
|
|
```bash
|
|
python3 ~/ING/transactions.py 2026 23
|
|
```
|
|
|
|
### Aktuelle Kalenderwoche kategorisieren
|
|
|
|
```bash
|
|
python3 ~/ING/categorize_transactions.py
|
|
```
|
|
|
|
### Bestimmte Kalenderwoche kategorisieren
|
|
|
|
(Beispiel KW23/2026)
|
|
|
|
```bash
|
|
python3 ~/ING/categorize_transactions.py 2026 23
|
|
```
|
|
|
|
---
|
|
|
|
## Logging
|
|
|
|
Linux:
|
|
|
|
```text
|
|
/home/banking/logs
|
|
```
|
|
|
|
Windows (PyCharm):
|
|
|
|
```text
|
|
<Projektverzeichnis>/logs
|
|
```
|
|
|
|
Logdateien:
|
|
|
|
```text
|
|
balance.log
|
|
transactions.log
|
|
categorize_transactions.log
|
|
```
|
|
|
|
---
|
|
|
|
## Nextcloud
|
|
|
|
### Linux
|
|
|
|
Synchronisation über rclone:
|
|
|
|
```bash
|
|
rclone copy \
|
|
~/Transaktionen/2026/jahresauswertung/Kontobewegungen_2026.xlsx \
|
|
nextcloud:Bank/2026
|
|
```
|
|
|
|
### Windows
|
|
|
|
Automatische Kopie nach:
|
|
|
|
```text
|
|
C:\Users\hubob\Nextcloud\Bank\2026
|
|
```
|
|
|
|
---
|
|
|
|
## Cronjobs
|
|
|
|
### Kontostand
|
|
|
|
Montag bis Samstag alle 4 Stunden:
|
|
|
|
```cron
|
|
0 */4 * * 1-6 /usr/bin/python3 /home/banking/ING/balance.py
|
|
```
|
|
|
|
### Transaktionen
|
|
|
|
Sonntag 23:30 Uhr:
|
|
|
|
```cron
|
|
30 23 * * 0 /usr/bin/python3 /home/banking/ING/transactions.py
|
|
```
|
|
|
|
### Kategorisierung
|
|
|
|
Sonntag 23:37 Uhr:
|
|
|
|
```cron
|
|
37 23 * * 0 /usr/bin/python3 /home/banking/ING/categorize_transactions.py
|
|
```
|