├── .gitignore ├── img ├── import.png ├── import2.png ├── create-datasource.png ├── delete-dashboards.png └── delete-library-panels.png ├── dashboards ├── img │ ├── jahr.png │ ├── monat.png │ ├── today.png │ ├── mobile.png │ ├── all-time.png │ ├── time-range.png │ ├── aux-ext-devices.png │ ├── save-dashboard.png │ ├── select-vehicle.png │ └── today-details.png ├── README.md └── dashboards │ └── EVCC_ Monat.json ├── LICENSE ├── scripts ├── evcc-influx-aggregate.conf ├── README.md └── evcc-influx-aggregate.sh └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /img/import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/img/import.png -------------------------------------------------------------------------------- /img/import2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/img/import2.png -------------------------------------------------------------------------------- /dashboards/img/jahr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/dashboards/img/jahr.png -------------------------------------------------------------------------------- /dashboards/img/monat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/dashboards/img/monat.png -------------------------------------------------------------------------------- /dashboards/img/today.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/dashboards/img/today.png -------------------------------------------------------------------------------- /dashboards/img/mobile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/dashboards/img/mobile.png -------------------------------------------------------------------------------- /img/create-datasource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/img/create-datasource.png -------------------------------------------------------------------------------- /img/delete-dashboards.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/img/delete-dashboards.png -------------------------------------------------------------------------------- /dashboards/img/all-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/dashboards/img/all-time.png -------------------------------------------------------------------------------- /dashboards/img/time-range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/dashboards/img/time-range.png -------------------------------------------------------------------------------- /img/delete-library-panels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/img/delete-library-panels.png -------------------------------------------------------------------------------- /dashboards/img/aux-ext-devices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/dashboards/img/aux-ext-devices.png -------------------------------------------------------------------------------- /dashboards/img/save-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/dashboards/img/save-dashboard.png -------------------------------------------------------------------------------- /dashboards/img/select-vehicle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/dashboards/img/select-vehicle.png -------------------------------------------------------------------------------- /dashboards/img/today-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ha-puzzles/evcc-grafana-dashboards/HEAD/dashboards/img/today-details.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 evcc-grafana-dashboards 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /scripts/evcc-influx-aggregate.conf: -------------------------------------------------------------------------------- 1 | # Configuration options for the evcc-inlfux-aggregate.sh script. Must be located in the same directory as the script. 2 | 3 | 4 | ### INFLUX DATABASE CONFIGURATION ### 5 | 6 | # Name of the Influx DB, where you write the EVCC data into. 7 | INFLUX_EVCC_DB="evcc" 8 | 9 | # User name of the EVCC DB. Empty, if no user is required. Default: "" 10 | INFLUX_EVCC_USER="" 11 | 12 | # Password of the EVCC DB user. Can be anything except an empty string in case no password is set. Default: "none" 13 | INFLUX_EVCC_PASSWORD="none" 14 | 15 | # Name of the Influx DB, where you write the aggregated data into. 16 | INFLUX_AGGR_DB="evcc_aggr" 17 | 18 | # User name of the aggregation DB. Empty string, if no user is required. Default: "" 19 | INFLUX_AGGR_USER="" 20 | 21 | # Password of the aggreation DB user. Can be anything except an empty string in case no password is set. Default: "none" 22 | INFLUX_AGGR_PASSWORD="none" 23 | 24 | # If the script is run remotely, enter the host name of the remote host. Default: "localhost" 25 | INFLUX_HOST="localhost" 26 | 27 | # The port to connect to influx. Default: 8086 28 | INFLUX_PORT=8086 29 | 30 | 31 | ### PV CONFIGURATION ### 32 | 33 | # Limit in W to filter out unrealistic peaks. Default: 40000 34 | PEAK_POWER_LIMIT=40000 35 | 36 | # Set to false in case your home does not use a battery. 37 | HOME_BATTERY="true" 38 | 39 | # Set to true to collect tariff history. 40 | DYNAMIC_TARIFF="true" 41 | 42 | 43 | ### GENERAL CONFIGURATION ### 44 | 45 | # Time zone as in TZ identifier column here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List 46 | # IMPORTANT: The time zone must be the same as the one used on the system (default value) and the one used for displaying the Grafana dashboard. 47 | TIMEZONE="`cat /etc/timezone`" 48 | 49 | # Interval in which the energy calculation is sampled. Should be at least twice the query interval of EVCC. Default: "60s" as EVCC has a default interval of 30s. 50 | ENERGY_SAMPLE_INTERVAL="60s" 51 | 52 | # Interval of grid tariff price updates. Default: "15m". 53 | # If for example your grid tariff changes in intervals of 60 minutes, change this to "1h". 54 | # If you have static grid prices that do not change over the day, set this to "1d". 55 | TARIFF_PRICE_INTERVAL="15m" 56 | 57 | # Set to true to generate debug output. 58 | DEBUG="false" -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | # Aggregation Script 2 | 3 | Irgendwann war der Raspberry PI heillos damit überfordert alle Daten live zusammenzustellen und die monatlichen und vorallem jährlichen Dashboards liefen nur noch in Timeouts. Daher war eine Aggregierung notwendig. Diese erledigt das Bash Shell Script `evcc-influx-aggregate.sh`. 4 | 5 | ## Installation 6 | 7 | 1. Script [`evcc-influx-aggregate.sh`](./evcc-influx-aggregate.sh) und Konfigurationsdatei [`evcc-influx-aggregate.conf`](./evcc-influx-aggregate.conf) herunterladen und auf ein Linux System kopieren. Idealerweise ist dies das System (oder die VM) auf der die InfluxDB läuft. Falls dies nicht möglicht ist (z.B. HAOS), kann das script auch remote von einem anderen Linux System ausgeführt werden. 8 | 9 | 2. Das UNIX CLI Tool `bc` installieren. Auf Debian-basierten Linux Systemen z.B. mit `apt install bc`. 10 | 11 | 3. Getrennte Datenbank für die aggregierten Daten anlegen. Falls keine getrennte Datenbank gewünscht wird können auch die Zugangsdaten der EVCC Influx Datenbank genommen werden. Es wird allerdings empfohlen eine getrennte Datenbank für die Aggegrationen anzulegen. 12 | 1. Auf dem Influx server das `influx` CLI starten 13 | 2. Datenbank anlegen (hier nennen wir die DB 'evcc_aggr'): 14 | 15 | `create database evcc_aggr` 16 | 3. Datenbank benutzen: 17 | 18 | `use evcc_aggr` 19 | 4. Einen User 'grafana' anlegen. Falls gewünscht mit Password: 20 | 21 | `create user grafana with password '' with all privileges` 22 | 23 | 4. Nur bei Remote Ausführung des Scriptes auf einem anderen System als dem auf dem die Influx DB läuft: 24 | 1. Influx Client installieren. Je nach Linuxderivat z.B. `apt-get install influxdb-client` 25 | 2. Mit `influx -version` überprüfen, dass es der Client mit der richtigen Version ist (muss 1.8.x sein) 26 | ``` 27 | $ influx -version 28 | InfluxDB shell version: 1.8.10 29 | ``` 30 | 3. Überprüfen ob man sich zur Influx verbinden kann: `influx -host [Influx DB host name] -port 8086 -database [Database name]` 31 | 32 | 5. Konfigurationsdatei [`evcc-influx-aggregate.conf`](./evcc-influx-aggregate.conf) mit den entsprechenden Werten anpassen. Die Werte sind mit erklärenden Kommentaren versehen. Bitte alle Werte überprüfen und gegebenenfalls anpassen. 33 | 34 | 6. Die Rechte für das Script anpassen, damit es ausführbar wird: `chmod +x evcc-influx-aggregate.sh` 35 | 36 | 7. Einmal die Fahrzeuge und Ladepunkte erkennen lassen: 37 | ```bash 38 | ./evcc-influx-aggregate.sh --detect 39 | ``` 40 | Überprüfen ob die Namen der Fahrzeuge und Ladepunkte stimmen. 41 | 42 | 8. Für jedes Jahr, für das die Influx DB bereits mit EVCC Daten gefüllt ist, eine Aggregierung des gesamten Jahres starten: 43 | ```bash 44 | ./evcc-influx-aggregate.sh --year 2025 45 | ``` 46 | Das wird nun etwas dauern. 47 | 48 | 9. Mit Hilfe von `crontab -e` folgende regelmäßige Aufrufe konfigurieren: 49 | ``` 50 | 5 0 * * * /evcc-influx-aggregate.sh --yesterday >> /var/log/evcc-grafana-dashboards.log 2>&1 51 | 0 * * * * /evcc-influx-aggregate.sh --today >> /var/log/evcc-grafana-dashboards.log 2>&1 52 | ``` 53 | Hierbei `` durch den Pfad ersetzen, wo das Script gespeichert wurde. 54 | 55 | Damit wird dann jede Nacht der gestrige Tage aggregiert, sowie jede volle Stunde einmal der aktuelle Tag. Die Ausgaben werden in der Datei `/var/log/evcc-grafana-dashboards.log` geloggt. 56 | 57 | 10. Anlegen und Setzen der permissions des Log Files: 58 | ```bash 59 | sudo touch /var/log/evcc-grafana-dashboards.log 60 | sudo chown /var/log/evcc-grafana-dashboards.log 61 | ``` 62 | Dabei ist `` durch den Loginnamen des Benutzers zu ersetzen unter dem in Schritt 8 der Befehl `crontab -e` ausgeführt wurde. 63 | 64 | 65 | ## Benutzung 66 | 67 | | Parameter | Beschreibung | 68 | | ---------------------------- | ---------------------------------------------------------------------------------------- | 69 | | `--day ` | Aggregiere die Daten für den angegebenen Tag und den Monat | 70 | | `--month ` | Aggregiere alle Daten für alle Tage dem dem angegebenen Monat. | 71 | | `--year ` | Aggregiere alle Daten für alle Tage und Monate des angegebenen Jahres | 72 | | `--from [--to ]` | Aggregiere all Daten ab einem bestimmten Startdatum bis zu einem Enddatum. Wenn kein Enddatum mit `--to` angegeben wird, ist das Enddatum der aktuelle Tag. | 73 | | `--today` | Aggregiere die Daten des heutigen Tages und des aktuellen Monats | 74 | | `--yesterday` | Aggregiere die Daten des gestrigen Tages und des gestrigen Monats | 75 | | `--delete-aggregations` | Lösche die Measurements der aggregierten Daten aus der Influx Datenbank. Das Löschen eines einzelnen Measurements kann durchaus einige Minuten benötigen. | 76 | | `--detect` | Suche die Loadpoints und Vehicles aus der Datenbank heraus. Es ist empfehlenswert dies einmal vor der ersten Aggregation auszuführen, um zu überprüfen ob die Namen der Loadpoints und Vehicles stimmen. Sollten hier noch ältere Werte gefunden werden, können diese in den Dashboards über die Blocklist Variable ausgeblendet werden. | 77 | | `--debug` | Aktiviere Debug Ausgabe zur Fehlersuche. | 78 | 79 | 80 | ### Beispiele 81 | 82 | Aggregiere die Daten aller Tage des Jahres 2024: 83 | ```bash 84 | evcc-influx-aggregate.sh --year 2024 85 | ``` 86 | 87 | Aggregiere die Daten vom 16.7.2024: 88 | ```bash 89 | evcc-influx-aggregate.sh --day 2024 7 16 90 | ``` 91 | 92 | Aggregiere die Daten beginnend am 6.3.2023 bis zum 15.2.2025: 93 | ```bash 94 | evcc-influx-aggregate.sh --from 2023 3 6 --to 2025 2 15 95 | ``` -------------------------------------------------------------------------------- /dashboards/README.md: -------------------------------------------------------------------------------- 1 | Wie diese Dashboards zu importieren sind, siehe [hier](../README.md). 2 | 3 | # Today 4 | 5 | Real-time Statistiken des aktuellen Tages für Desktops oder Tablets. 6 | 7 | ![PV Today Screenshot](img/today.png) 8 | 9 | 10 | # Today (mobile) 11 | 12 | Real-time Statistiken des aktuellen Tages, optimiert für mobile Geräte. 13 | 14 | ![Mobile Screenshot](img/mobile.png) 15 | 16 | 17 | # Today Details 18 | 19 | Weitere Details, die bei der Fehlersuche helfen können wie 20 | - die Leistung der einzelnen PVs oder Batteriemodule, falls mehrere konfiguriert sind. 21 | - Leistung und Verbräuche einzelner AUX und EXT Geräte. 22 | - Leistung und Ströme der einzelnen Phasen 23 | - Ladeströme der Wallboxen 24 | 25 | ![Today Details Screenshot](img/today-details.png) 26 | 27 | # Monat 28 | 29 | Monatliche Statistiken. 30 | 31 | > [!NOTE] 32 | > Dieses Dashboard benötigt tägliche aggregierte Daten. Siehe [scripts](../scripts/) für das Aggregierungsskript. 33 | 34 | ![Monat Screenshot](img/monat.png) 35 | 36 | 37 | # Jahr 38 | 39 | Jährliche Statistiken. 40 | 41 | > [!NOTE] 42 | > Dieses Dashboard benötigt monatliche und tägliche aggregierte Daten. Siehe [scripts](../scripts/) für das Aggregierungsskript. 43 | 44 | ![Jahr Screenshot](img/jahr.png) 45 | 46 | 47 | # All-time 48 | 49 | *(Ehemals: PV-Finanz Dashboard)* 50 | 51 | Statistiken über den gesamten erfassten Datenzeitraum bestehend aus zwei Teilen: 52 | 53 | - Energiestatistiken wie ein Jahr-zu-Jahr Vergleich der monatlichen Erträge. 54 | - Finanzielle Statistiken zur Amortisation der Anlage. Sollte noch kein ganzes Jahr in der Datenbank vorhanden sein, wird anhand der aktuellen Daten eine Prognose für ein ganzes Jahr erstellt. Diese Prognose ist linear und natürlich sehr stark von der Jahreszeit der vorhanden Daten beeinflusst. 55 | 56 | 57 | > [!NOTE] 58 | > Dieses Dashboard benötigt täglich und monatlich aggregierte Daten. Siehe [scripts](../scripts/) für das Aggregierungsskript. 59 | 60 | ![All-Time Screenshot](img/all-time.png) 61 | 62 | # Anpassungen 63 | 64 | Ganz ohne manuelle Anpassungen geht es leider nicht. Hier einige Dinge, die noch nach dem Import gemacht werden müssen. 65 | 66 | ## Gemeinsame Einstellungen von allen Dashboards 67 | - Jedes Dashboard hat eigene Parameter. Da es leider keine globalen Variablen in Grafana gibt, müssen diese einmal pro Dashboard während des Imports angepasst werden. 68 | - Je nach Anzahl der Ladepunkte und der Fahrzeuge müssen einige Panelgrößen anpassen. 69 | - *Optional*: Die Ladepunkte und Fahrzeuge erhalten per default alle dieselben Farben. Um für verschiedene Ladepunkte und Fahrzeuge verschiedene Farben zu erhalten müssen in den jeweiligen Panels in Grafana die Overrides angepasst werden. Es sind schon Beispiele dabei für Ladepunkte (Garage, Stellplatz) und Fahrzeuge (Ioniq 5, Tesla). Hier muss in der Regel nur das Feld auf den richtigen Ladepunkt oder das richtige Fahrzeug gemappt werden. Ansonsten müssen weitere Overrides angelegt werden. 70 | - *Optional*: Falls Ladepunkte oder Fahrzeuge angezeigt werden, die man nicht sehen will (zum Beispiel weil während der Einrichtung etwas mehrfach umbenannt worden ist), kann man in den Dashboard Einstellungen die Variablen 'loadpointBlockist' und 'vehicleBlockist' anpassen. 71 | - Dashboard in den Edit Mode versetzen. 72 | - Auf 'Settings' klicken. 73 | - Auf dem Tab 'Variables' auf die Variablen Klicken 74 | - Wert anpassen. Der Wert ist eine reguläre Expression mit dem Einträge gematched werden, die NICHT angezeigt werden sollen. Er muss mit einem Schrägstrich beginnen und Enden und darf nicht leer sein. Wenn nichts gefiltert werden soll, muss hier eine Expressions stehen, die keinen der Werte matched. 75 | 76 | Beispiele: 77 | | Beschreibung | Pattern | 78 | | ------------ | ------- | 79 | | Nichts filtern (außer ein Eintrag würde 'none' lauten) | `/^none$/` | 80 | | Filtere 'Garage' aus | `/^Garage$/` | 81 | | Filtere 'Garage' und 'Stellplatz' aus | `/^Garage$\|^Stellplatz$/` | 82 | | Filtere alles, das mit 'Mr White' beginnt aus | `/^Mr White.*$/` | 83 | | Filtere alles, das mit '(offline)' endet aus | `/^.*\(offline\)$/` | 84 | 85 | ## EVCC: Today und EVCC: Today (Mobile) 86 | - Anpassen von (Soft)Min und (Softt)Max je nach maximaler Leistung von PV und Ladepunkten in folgenden Panels: 87 | - Gauges auf der linken Seite 88 | - Verlaufschart in der Mitte 89 | - Energie unten rechts 90 | 91 | ## EVCC: Today - Details 92 | - Mittels overrides können den einzelnen PV Teilen Namen zugewiesen werden. 93 | - Formel für 'Sonstige' Verbraucher: Siehe [Formel für 'Sonstige' anpassen](#formel-für-sonstige-anpassen). 94 | 95 | ## EVCC: Monat 96 | - Formel für 'Sonstige' Verbraucher: Siehe [Formel für 'Sonstige' anpassen](#formel-für-sonstige-anpassen). 97 | 98 | ## EVCC: Jahr 99 | - Formel für 'Sonstige' Verbraucher: Siehe [Formel für 'Sonstige' anpassen](#formel-für-sonstige-anpassen). 100 | 101 | ## EVCC: All-time 102 | - Unter den Dashboard Settings die Default Werte der Variablen, wie die Investitionskosten, anpassen. 103 | - Zeitraum anpassen: Startdatum unter 'From' auswählen und in 'To' muss `now` stehen. 104 | 105 | ![Zeitraum anpassen](img/time-range.png) 106 | 107 | Danach das Dashboard speichern und dabei die ausgewählte Zeit mit abspeichern. 108 | - *Optional*: Falls in den Fahrtkosten Panele unten "Fahrzeuge" (zum Beispiel eine Wärmepumpe) auftauchen, die hier nicht erscheinen sollen, oder falls bestimmte Fahrzeuge temporär ohne Anpassung der Blockist ein-und ausgeblendet werden soll, dann diesen Schritten folgen: 109 | 1. Dashboard editieren und in den Settings zum 'Variablen' tab gehen 110 | 2. Auf die Variable 'vehicle' klicken. 111 | 3. Unter 'Show on dashboard' den Wert 'Label and value` auswählen. 112 | 4. Oben rechts auf das Dashboard zurückgehen. Nun taucht hier eine Auswahlbox oben für das Fahrzeug auf. Hier ist 'All' vorausgewählt. Diese Auswahl auf die gewünschten Fahrzeuge ändern: 113 | 114 | ![Fahrzeugauswahl](img/select-vehicle.png) 115 | 5. *Optional*: Mit Schritt 1-3 die variable wieder verstecken, wenn man sie nicht mehr sehen will. Oder einfach sichtbar lassen, dann kann man die Auswahl in Zukunft schnell ändern. 116 | 2. Dashboard abspeichern. Dabei 'Update default variable values' auswählen. 117 | 118 | ![Dashboard abspeichern](img/save-dashboard.png) 119 | 120 | 121 | ## Formel für 'Sonstige' anpassen 122 | 123 | In den Dashboards 'EVCC: Today - Details', 'EVCC: Monat', und 'EVCC:Jahr' müssen gegebenenfalls die Formeln für die sonstigen Verbraucher, die nicht von den einzeln gemessenen Geräten erfasst werden, angepasst werden. 124 | 125 | 1. Feststellen ob AUX ('Self-regulating consumer') oder/und EXT ('Regular consumer') verwendet werden. 126 | 1. 'EVCC: Today - Details' öffnen. 127 | 2. Oben rechts auf 'Edit' klicken um in den Edit Mode zu kommen. 128 | 3. Das Donut Chart 'Haus: Aktuelle Leistung' editieren. Im Panel Menü auf 'Edit' klicken. 129 | 4. Unten links die Queries 'extPowers' und 'auxPowers' unsichtbar und sichtbar schalten. Ändern sich dabei jeweils die Einträge in der Liste? Dann sind EXT, bzw. AUX Geräte verfügbar. 130 | ![Sonstige Verbraucher Formel anpassen](img/aux-ext-devices.png) 131 | 2. Die Formel für 'Sonstige' anpassen. 132 | * Es gibt nur AUX Geräte: 133 | ``` 134 | $totalHomePower - $auxPowersSum 135 | ``` 136 | * Es gibt nur EXT Geräte: 137 | ``` 138 | $totalHomePower - $extPowersSum 139 | ``` 140 | * Es gibt AUX und EXT Geräte: 141 | ``` 142 | $totalHomePower - $auxPowersSum - $extPowersSum 143 | ``` 144 | 3. Schritt 2 für folgende Widgets durchführen 145 | * 'EVCC: Today - Details' 146 | * 'Haus: Aktuelle Leistung' (wurde bereits erledigt) 147 | * 'Haus: Leistung' 148 | * 'Haus: Energieverteilung' 149 | * 'Haus: Energieverbrauch' 150 | * 'EVCC: Monat' 151 | * 'Haus: Energieverteilung' 152 | * 'Haus: Energieverbrauch' 153 | * 'EVCC: Jahr' 154 | * 'Haus: Energieverteilung' 155 | * 'Haus: Energieverbrauch' -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Grafana Dashboard für EVCC 2 | 3 | EVCC Dashboard mit Grafana für 2 Loadpoints und 2 Fahrzeuge. Loadpoints und Fahrzeuge können bei Bedarf einfach reduziert werden. 4 | 5 | - Realtime Dashboard for Desktop, Tablet und Mobile. 6 | - Monatliche und jährliche Übersicht. 7 | - Berechnungen für Autarkie, Eigenverbrauch, sowie finanzielles Dashboard mit Kaptialrückflüssen und Amortisation. 8 | 9 | 10 | Vorab: Ohne in Grafana einsteigen zu können, geht es nicht. Die Dashboards sind an meinen Bedürfnisse angepasst, so filtere ich in vielen Dashboards Ausreißer aus. Diese Werte müsst ihr ggf. anpassen. Zum Beispiel filtere ich bei meiner 9.84 kWp anlage alle Werte über 20 kW raus. Denkt bitte nicht, dass ihr meine Dashboards einfach in Grafana hochladen könnt und es wird bei Euch funktionieren. Seht das bitte eher als Startpunkt für eigene Dashboards. 11 | 12 | Ich habe versucht alle notwendigen Anpassungen unter ['dashboards'](dashboards/README.md) aufzulisten. Dabei ist mir aber sicher was durch die Lappen gegangen. 13 | 14 | ![PV Today Screenshot](dashboards/img/today.png) 15 | 16 | 17 | ## Installation 18 | 19 | Installationsschritte für eine **frische, neue Installation**. Sollte in der Grafana Instanz schon eine ältere Version meines Dashboards installiert sein, bitte unten unter [Upgrade](#upgrade) weitermachen. 20 | 21 | ### Grundvoraussetzungen 22 | 23 | Folgende Grundvoraussetzungen müssen erfüllt sein: 24 | 25 | - EVCC: https://evcc.io/ (Version 0.200 oder neuer empfohlen) 26 | - Influx DB v1.8 (InfluxDB 2.x wird nicht unterstützt, siehe FAQ): https://www.influxdata.com/ 27 | - Grafana: https://grafana.com/ (aktuell getestete Version: 11.5.0) 28 | - Grundlegende Linux Kenntnisse oder die Bereitschaft sich diese anzueignen. 29 | - Die Möglichkeit ein Bash Shell Script regelmäßig per Crontab ausführen zu können (HAOS Benutzer, siehe FAQ) 30 | - Bereitschaft sich etwas in Grafana einzuarbeiten. 31 | 32 | 33 | ### Software 34 | 35 | Hier nur die groben Schritte, da sie je nach Plattform stark variieren: 36 | 37 | 1. EVCC installieren und konfigurieren: https://docs.evcc.io/docs/installation 38 | 2. Influx DB 1.8.x installieren: https://docs.influxdata.com/influxdb/v1/introduction/install/ 39 | 3. Datenbank für EVCC anlegen. Auf der Kommandozeile den Influx client mit dem Kommando `influx` ausführen. Dann folgende Kommandos eingeben: 40 | ``` 41 | create database evcc 42 | use evcc 43 | create user grafana with password '' with all privileges 44 | grant all privileges on evcc to grafana 45 | exit 46 | ``` 47 | Damit legen wir eine Datenbank mit dem Namen 'evcc' an und fügen dieser Datenbank einen User namens 'grafana' hinzu, der ohne Passwort vollen Zugriff hat. Dies ist natürlich nicht das sicherste Setup und es wird zumindest empfohlen dem User 'grafana' ein Passwort zu geben. 48 | 5. EVCC konfigurieren, dass Daten in die Influx geschrieben werden: https://docs.evcc.io/docs/reference/configuration/influx/ 49 | 6. Grafana installieren: https://grafana.com/docs/grafana/latest/setup-grafana/installation/ 50 | 51 | Dieser Thread ["InfluxDB und Grafana"](https://github.com/evcc-io/evcc/discussions/4213) im EVCC Repository kann sehr hilfreich sein. 52 | 53 | ### Installation der Dashboards in Grafana 54 | 55 | 56 | 1. Daten Aggregations Script wie [unter 'scripts beschrieben](./scripts/README.md) anpassen und installieren (ohne dieses werden die Dashboards für Monat, Jahr und Finanz nicht laufen). 57 | 58 | 2. Data Sources unter 'Connections / Data Sources' anlegen. 59 | 1. Oben rechts auf '+ Add new data source' clicken. 60 | 2. 'InfluxDB' auswählen. 61 | 3. Daten wie im Bild unten eintragen. 'URL', 'Database', 'User' und 'Passwort' müssen natürlich passend auf die eigene DB angepasst werden. 62 | ![Data Source anlegen](./img/create-datasource.png) 63 | 4. Auf 'Save & test' clicken. 64 | 5. Eine weitere Data Source für die Aggregations DB hinzufügen. 65 | 6. Wieder Influx auswählen. 66 | 7. Dieselben Daten, wie oben eintragen, aber 67 | - Name: 'EVCC Aggregations' 68 | - Database: 'evcc_aggr' (oder dieselbe DB wie oben, wenn keine getrennte DB gewünscht ist) 69 | 70 | 3. Dashboards über den Grafana.com Community Store installieren: 71 | 1. In Grafana unter 'Dashboards' auf 'New/Import' clicken: 72 | ![Import dashboard](./img/import.png) 73 | 2. Unter "Find and import dashboards..." folgende Dashboards mit folgenden IDs importieren: 74 | | Dashboard | ID | 75 | | ------------------------ | --------- | 76 | | EVCC: PV All-time: | **22024** | 77 | | EVCC: PV Jahr: | **22025** | 78 | | EVCC: PV Monat: | **22026** | 79 | | EVCC: PV Today (Mobile): | **22027** | 80 | | EVCC: PV Today: | **22028** | 81 | | EVCC: PV Today Details: | **22956** | 82 | 83 | 4. Die Werte des Dashboards anpassen: 84 | 1. Data Source auswählen. 'EVCC Influx DB' steht für die Datenbank, in die EVCC direkt schreibt. 'EVCC Aggregation' ist die Datenbank, in die das Aggregationsscript die aggregierten Daten schreibt. Weitere Variablen wie abgefragt ausfüllen. Diese können aber auch noch nach dem Import angepasst werden. Die Blockist Variablen würde ich nur bei Bedarf später ändern. 85 | 2. Letzte Anpassungen in den Dashboards vornehmen. Siehe auch [unter 'dashboards'](./dashboards/README.md#anpassungen). 86 | 87 | Der Screenshot zeigt den Import des Monatsdashboard. Die abgefragten Werte unterscheiden sich von Dashboard zu Dashboard. 88 | 89 | ![Import des dashboards](./img/import2.png) 90 | 91 | 92 | ## Upgrade 93 | 94 | Falls schon eine ältere Version installiert worden ist, hier die Schritte um die neuere Version zu installieren. 95 | 96 | > [!WARNING] 97 | > Eigene Anpassungen an meinen Dashboards gehen bei diesem Prozess leider verloren und die Dashboards müssen erneut angepasst werden. Der Upgrade Prozess ist leider nicht so einfach, wie ich es mir wünschen würde. 98 | 99 | 1. Ein Backup der aktuellen Grafana Datenbank erstellen für den Fall der Fälle. 100 | 1. Grafana stoppen: `sudo systemctl stop grafana-server` 101 | 2. Ein Backup der Grafana Datenbank in /tmp erstellen: `cp -rv /var/lib/grafana /tmp` 102 | 3. Grafana starten: `sudo systemctl start grafana-server` 103 | 2. Grafana im Browser öffnen und im Menü auf 'Dashboards' clicken. 104 | 3. Alle EVCC PV Dashboards löschen. 105 | 106 | ![PV Dashboards löschen](./img/delete-dashboards.png) 107 | 4. Auf 'Dashboards/Library Panels' gehen. **Dort alle Library Panels löschen, die von mir kommen.** Wird dies nicht gemacht, führt dies zu teilweise inkonsistenten Dashboards, welche das neue Dashboard mit alten Library Panels vermischen. 108 | 109 | ![PV Library Panels löschen](./img/delete-library-panels.png) 110 | 5. Dashboards über den Grafana.com Community Store installieren: 111 | 1. In Grafana unter 'Dashboards' auf 'New/Import' clicken: 112 | ![Import dashboard](./img/import.png) 113 | 2. Unter "Find and import dashboards..." folgende Dashboards mit folgenden IDs importieren: 114 | | Dashboard | ID | 115 | | ------------------------ | --------- | 116 | | EVCC: PV All-time: | **22024** | 117 | | EVCC: PV Jahr: | **22025** | 118 | | EVCC: PV Monat: | **22026** | 119 | | EVCC: PV Today (Mobile): | **22027** | 120 | | EVCC: PV Today: | **22028** | 121 | | EVCC: PV Today Details: | **22956** | 122 | 123 | 6. Die Werte des Dashboards anpassen: 124 | 1. Data Source auswählen. 'EVCC Influx DB' steht für die Datenbank, in die EVCC direkt schreibt. 'EVCC Aggregation' ist die Datenbank, in die das Aggregationsscript die aggregierten Daten schreibt. Weitere Variablen wie abgefragt ausfüllen. Diese können aber auch noch nach dem Import angepasst werden. Die Blockist Variablen würde ich nur bei Bedarf später ändern. 125 | 2. Letzte Anpassungen in den Dashboards vornehmen. Siehe auch [unter 'dashboards'](./dashboards/README.md#anpassungen). 126 | 127 | 128 | ## FAQ 129 | 130 | ### Wird es Support für Influx 2 geben? 131 | 132 | Leider nur sehr eingeschränkt und daher nicht zu empfehlen. 133 | 134 | Wer Influx 2 mit InfluxQL nutzt kann die Today Dashboards nutzen. Alle Dashboards, die aggregierte Daten brauchen werden allerdings nicht unterstützt, da ich derzeit keine Möglichkeit sehe mit dem Influx 2 CLI direkte Queries auszuführen (siehe [#14](https://github.com/ha-puzzles/evcc-grafana-dashboards/issues/14)). Eine Unterstützung der Query Language Flux bedeutet einen kompletten Rewrite. Diesen Rewrite plane ich allerdings nicht zu machen, da Influx 2 mit Flux eine Einbahnstraße geworden ist. Siehe auch: [The Plan for InfluxDB 3.0 Open Source](https://www.influxdata.com/blog/the-plan-for-influxdb-3-0-open-source/) 135 | 136 | ### Wie führe ich das Aggregation Script unter HAOS aus? 137 | 138 | Gute Frage. Leider ist mir derzeit keine Möglichkeit bekannt unter HAOS (oder ähnlichen Systemen ohne direkten Zugriff auf das System) Shell Scripte direkt auszuführen. Wer eine Möglichkeit findet bitte Bescheid geben. 139 | 140 | Was ich evaluiert habe ist die Nutzung von Continuous Queries innerhalb von Influx. Leider stoße ich hier an andere Grenzen, da InfluxQL Funktionen wie $TODAY fehlen um die entsprechenden Queries formulieren zu können. 141 | 142 | Die einzige Möglichkeit, die ich hier sehe ist das Shell Script auf einem externen Linux System zu konfigurieren, das sich remote mit der Influx DB auf dem HAOS System verbindet. Siehe die [Dokumentation des Aggregations Scriptes](./scripts/README.md) wie man es so konfiguriert, dass man es auf einem externen Linux System laufen lassen kann. 143 | 144 | ### Nach dem Upgrade sehen die Dashboards irgendwie komisch aus 145 | 146 | Hast Du die Upgrade Schritte, insbesondere das Löschen der Library Panels befolgt, bevor Du die neuen Dashboards importiert hast? 147 | 148 | ### Ein paar Panele zeigen nur "No Data" an. 149 | 150 | - Hast Du die Aggregation schon für alle betreffenden Zeiträume laufen gelassen? Siehe [scripts](./scripts/). 151 | - Wurden beim Import die richtigen Data Sources ausgewählt? Falls nein, kann sie auch nachträglich in den betroffenen Panels noch geändert werden. 152 | 153 | 154 | 155 | # Danke 156 | 157 | Herzlichen Dank an alle, die im Thread ["InfluxDB und Grafana"](https://github.com/evcc-io/evcc/discussions/4213) im EVCC Repository aktiv mitgeholfen haben. Ohne Eure Hilfe wäre das hier entweder nichts geworden oder hätte deutlich länger gedauert. 158 | -------------------------------------------------------------------------------- /scripts/evcc-influx-aggregate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Aggregation script for EVCC grafana dashboards. See https://github.com/ha-puzzles/evcc-grafana-dashboards 4 | 5 | logError() { 6 | echo "[ERROR] $1" 7 | } 8 | 9 | logWarning() { 10 | echo "[WARNING] $1" 11 | } 12 | 13 | logInfo() { 14 | echo "[INFO] $1" 15 | } 16 | 17 | logDebug() { 18 | if [ "$DEBUG" == "true" ]; then 19 | echo "[DEBUG] $1" 20 | fi 21 | } 22 | 23 | # Source configuration from evcc-influx-aggregate.conf, which needs to be located in the same directory as this script. 24 | if [ -f "$(dirname $0)/evcc-influx-aggregate.conf" ]; then 25 | . "$(dirname $0)/evcc-influx-aggregate.conf" 26 | else 27 | logError "Configuration file $(dirname $0)/evcc-influx-aggregate.conf not found." 28 | exit 1 29 | fi 30 | 31 | #arguments 32 | AGGREGATE_YEAR=0 33 | AGGREGATE_YESTERDAY=false 34 | AGGREGATE_TODAY=false 35 | AGGREGATE_MONTH_YEAR=0 36 | AGGREGATE_MONTH_MONTH=0 37 | AGGREGATE_DAY_YEAR=0 38 | AGGREGATE_DAY_MONTH=0 39 | AGGREGATE_DAY_DAY=0 40 | AGGREGATE_FROM_YEAR=0 41 | AGGREGATE_FROM_MONTH=0 42 | AGGREGATE_FROM_DAY=0 43 | AGGREGATE_TO_YEAR=0 44 | AGGREGATE_TO_MONTH=0 45 | AGGREGATE_TO_DAY=0 46 | DELETE_AGGREGATIONS=false 47 | DETECT_VALUES=false 48 | 49 | # Maps of number of days per month. February leap year is updated later 50 | declare -A DAYS_OF_MONTH 51 | DAYS_OF_MONTH[1]=31 52 | DAYS_OF_MONTH[2]=28 53 | DAYS_OF_MONTH[3]=31 54 | DAYS_OF_MONTH[4]=30 55 | DAYS_OF_MONTH[5]=31 56 | DAYS_OF_MONTH[6]=30 57 | DAYS_OF_MONTH[7]=31 58 | DAYS_OF_MONTH[8]=31 59 | DAYS_OF_MONTH[9]=30 60 | DAYS_OF_MONTH[10]=31 61 | DAYS_OF_MONTH[11]=30 62 | DAYS_OF_MONTH[12]=31 63 | 64 | # Array of vehicles 65 | declare -A VEHICLES 66 | 67 | #Array of loadpoints 68 | declare -A LOADPOINTS 69 | 70 | #Array of ext devices 71 | declare -A EXT_DEVICES 72 | 73 | #Array of aux devices 74 | declare -A AUX_DEVICES 75 | 76 | validateNumber() { 77 | if ! [[ "$1" =~ ^[1-9][0-9]*$ ]]; then 78 | return 1 79 | fi 80 | return 0 81 | } 82 | 83 | validateDate() { 84 | year=$1 85 | month=$2 86 | day=$3 87 | 88 | if ! validateNumber "$year" || [ "$year" -lt 1970 ] || [ "$year" -gt 2100 ]; then 89 | logError "Year must be a number between 1970 and 2100." 90 | exit 1 91 | fi 92 | 93 | if [ "$month" == "" ]; then 94 | return 0 95 | fi 96 | if ! validateNumber "$month" || [ "$month" -lt 1 ] || [ "$month" -gt 12 ]; then 97 | logError "Month must be number between 1 and 12." 98 | exit 1 99 | fi 100 | 101 | if [ "$day" == "" ]; then 102 | return 0 103 | fi 104 | if isLeapYear $year; then 105 | logDebug "The year $year is a leap year. February has 29 days." 106 | DAYS_OF_MONTH[2]=29 107 | fi 108 | if ! validateNumber "$day" || [ "$day" -lt 1 ] || [ "$day" -gt ${DAYS_OF_MONTH[$month]} ]; then 109 | logError "Day must be a number between 1 and ${DAYS_OF_MONTH[$month]} for the month $month." 110 | exit 1 111 | fi 112 | } 113 | 114 | parseArguments() { 115 | if [ "$#" -eq 0 ]; then 116 | printUsage 117 | exit 1 118 | fi 119 | while [ "$#" -gt 0 ]; do 120 | if [ "$1" == '--debug' ]; then 121 | export DEBUG=true 122 | shift 1 123 | logDebug "Enabling debug." 124 | elif [ "$1" == '--year' ]; then 125 | if [ "$#" -lt 2 ]; then 126 | printUsage 127 | exit 1 128 | fi 129 | validateDate $2 130 | AGGREGATE_YEAR=$2 131 | shift 2 132 | logDebug "Aggregating year $AGGREGATE_YEAR" 133 | elif [ "$1" == '--month' ]; then 134 | if [ "$#" -lt 3 ]; then 135 | printUsage 136 | exit 1 137 | fi 138 | validateDate $2 $3 139 | AGGREGATE_MONTH_YEAR=$2 140 | AGGREGATE_MONTH_MONTH=$3 141 | shift 3 142 | logDebug "Aggregating month ${AGGREGATE_MONTH_YEAR}-${AGGREGATE_MONTH_MONTH}" 143 | elif [ "$1" == '--day' ]; then 144 | if [ "$#" -lt 4 ]; then 145 | printUsage 146 | exit 1 147 | fi 148 | validateDate $2 $3 $4 149 | AGGREGATE_DAY_YEAR=$2 150 | AGGREGATE_DAY_MONTH=$3 151 | AGGREGATE_DAY_DAY=$4 152 | shift 4 153 | logDebug "Aggregating day ${AGGREGATE_DAY_YEAR}-${AGGREGATE_DAY_MONTH}-${AGGREGATE_DAY_DAY}" 154 | elif [ "$1" == '--from' ]; then 155 | if [ "$#" -lt 4 ]; then 156 | printUsage 157 | exit 1 158 | fi 159 | validateDate $2 $3 $4 160 | AGGREGATE_FROM_YEAR=$2 161 | AGGREGATE_FROM_MONTH=$3 162 | AGGREGATE_FROM_DAY=$4 163 | AGGREGATE_TO_YEAR=`date +%Y` 164 | AGGREGATE_TO_MONTH=`date +%-m` 165 | AGGREGATE_TO_DAY=`date +%-d` 166 | shift 4 167 | if [ "$1" == '--to' ]; then 168 | if [ "$#" -lt 4 ]; then 169 | printUsage 170 | exit 1 171 | fi 172 | validateDate $2 $3 $4 173 | AGGREGATE_TO_YEAR=$2 174 | AGGREGATE_TO_MONTH=$3 175 | AGGREGATE_TO_DAY=$4 176 | shift 4 177 | fi 178 | logDebug "Aggregating from day ${AGGREGATE_FROM_YEAR}-${AGGREGATE_FROM_MONTH}-${AGGREGATE_FROM_DAY} to ${AGGREGATE_TO_YEAR}-${AGGREGATE_TO_MONTH}-${AGGREGATE_TO_DAY}" 179 | elif [ "$1" == '--yesterday' ]; then 180 | AGGREGATE_YESTERDAY=true 181 | shift 1 182 | logDebug "Aggregating yesterday" 183 | elif [ "$1" == '--today' ]; then 184 | AGGREGATE_TODAY=true 185 | shift 1 186 | logDebug "Aggregating today" 187 | elif [ "$1" == '--delete-aggregations' ]; then 188 | DELETE_AGGREGATIONS=true 189 | shift 1 190 | logDebug "Deleting aggregations." 191 | elif [ "$1" == '--detect' ]; then 192 | DETECT_VALUES=true 193 | shift 1 194 | logDebug "Detecting loadpoints and vehicles." 195 | else 196 | printUsage 197 | exit 1 198 | fi 199 | done 200 | } 201 | 202 | printUsage() { 203 | echo "Usage: One of the following:" 204 | echo " `basename $0` --year [--debug]" 205 | echo " `basename $0` --month [--debug]" 206 | echo " `basename $0` --day [--debug]" 207 | echo " `basename $0` --from [--to ] [--debug]" 208 | echo " `basename $0` --yesterday [--debug]" 209 | echo " `basename $0` --today [--debug]" 210 | echo " `basename $0` --detect [--debug]" 211 | echo " `basename $0` --delete-aggregations [--debug]" 212 | } 213 | 214 | isLeapYear() { 215 | year=$1 216 | 217 | # Must be dividable by 4 218 | if [ $(($year % 4 )) -ne 0 ]; then 219 | return 1 220 | fi 221 | #Must not be dividable by 100 222 | if [ $(($year % 100 )) -eq 0 ]; then 223 | #Must be dividable by 400 224 | if [ $(($year % 400 )) -ne 0 ]; then 225 | return 1 226 | fi 227 | fi 228 | #It is a leap year 229 | return 0 230 | } 231 | 232 | writeDailyAggregation() { 233 | mode=$1 # integral-all | integral-positives | integral-negatives | max | min | mean 234 | field=$2 235 | sourceMeasurement=$3 236 | targetMeasurement=$4 237 | year=$5 238 | month=$6 239 | day=$7 240 | additionalWhere=$8 241 | defaultZero=$9 242 | additionalTags=${10} 243 | 244 | printf -v fYear "%04d" $year 245 | printf -v fMonth "%02d" $month 246 | printf -v fDay "%02d" $day 247 | 248 | # Convert time to UTC for local timezone 249 | fromTime=$(date -d "`date -d ${fYear}-${fMonth}-${fDay}T00:00:00 +%FT%T%Z`" -u +%FT%TZ) 250 | toTime=$(date -d "`date -d ${fYear}-${fMonth}-${fDay}T23:59:59 +%FT%T%Z`" -u +%FT%TZ) 251 | timeCondition="time >= '${fromTime}' AND time <= '${toTime}'" 252 | 253 | query="" 254 | case $mode in 255 | integral-all) 256 | logDebug "${fYear}-${fMonth}-${fDay}: Aggregating energy of all values from $sourceMeasurement into ${targetMeasurement}" 257 | query="SELECT integral(\"$field\") / 3600 FROM \"$sourceMeasurement\" WHERE ${timeCondition} $additionalWhere GROUP BY time(1d) fill(0) tz('$TIMEZONE')" 258 | ;; 259 | integral-positives) 260 | logDebug "${fYear}-${fMonth}-${fDay}: Aggregating energy of positive values from $sourceMeasurement into ${targetMeasurement}" 261 | query="SELECT integral(\"subquery\") / 3600 FROM (SELECT mean(\"$field\") AS \"subquery\" FROM \"$sourceMeasurement\" WHERE ${timeCondition} $additionalWhere AND \"$field\" >=0 GROUP BY time(${ENERGY_SAMPLE_INTERVAL}) fill(0)) WHERE ${timeCondition} GROUP BY time(1d) fill(0) tz('$TIMEZONE')" 262 | ;; 263 | integral-negatives) 264 | logDebug "${fYear}-${fMonth}-${fDay}: Aggregating energy of negative values from $sourceMeasurement into ${targetMeasurement}" 265 | query="SELECT integral(\"subquery\") / -3600 FROM (SELECT mean(\"$field\") AS \"subquery\" FROM \"$sourceMeasurement\" WHERE ${timeCondition} $additionalWhere AND \"$field\" <=0 GROUP BY time(${ENERGY_SAMPLE_INTERVAL}) fill(0)) WHERE ${timeCondition} GROUP BY time(1d) fill(0) tz('$TIMEZONE')" 266 | ;; 267 | min) 268 | logDebug "${fYear}-${fMonth}-${fDay}: Aggregating minimums from $sourceMeasurement into ${targetMeasurement}" 269 | query="SELECT min(\"$field\") FROM \"$sourceMeasurement\" WHERE ${timeCondition} $additionalWhere GROUP BY time(1d) fill(none) tz('$TIMEZONE')" 270 | ;; 271 | max) 272 | logDebug "${fYear}-${fMonth}-${fDay}: Aggregating maximums from $sourceMeasurement into ${targetMeasurement}" 273 | query="SELECT max(\"$field\") FROM \"$sourceMeasurement\" WHERE ${timeCondition} $additionalWhere GROUP BY time(1d) fill(none) tz('$TIMEZONE')" 274 | ;; 275 | mean) 276 | logDebug "${fYear}-${fMonth}-${fDay}: Aggregating averages from $sourceMeasurement into ${targetMeasurement}" 277 | query="SELECT mean(\"$field\") FROM \"$sourceMeasurement\" WHERE ${timeCondition} $additionalWhere GROUP BY time(1d) fill(none) tz('$TIMEZONE')" 278 | ;; 279 | *) 280 | logError "Unknown query mode: '$mode'." 281 | exit 1 282 | ;; 283 | esac 284 | logDebug "Query: $query" 285 | 286 | queryResult=`influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -precision rfc3339 -execute "$query" | tail -n 1` 287 | logDebug "Query result (last row): $queryResult" 288 | timestamp=$(date -d "`date -d ${fYear}-${fMonth}-${fDay}T00:00:00 +%FT%T%Z`" -u +%s%9N) 289 | energy=0 290 | if [ `echo $queryResult | wc -w ` -eq 2 ]; then 291 | energy=`echo "$queryResult" | cut -d " " -f 2` 292 | else 293 | logDebug "There is no data from $sourceMeasurement for $targetMeasurement." 294 | fi 295 | if [ "$energy" != "0" ] || [ "$defaultZero" == "true" ]; then 296 | if [ "$additionalTags" != "" ]; then 297 | insertStatement="INSERT ${targetMeasurement},year=${fYear},month=${fMonth},day=${fDay},${additionalTags} value=${energy} ${timestamp}" 298 | else 299 | insertStatement="INSERT ${targetMeasurement},year=${fYear},month=${fMonth},day=${fDay} value=${energy} ${timestamp}" 300 | fi 301 | logDebug "Insert statement: $insertStatement" 302 | influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_AGGR_DB -username "$INFLUX_AGGR_USER" -password "$INFLUX_AGGR_PASSWORD" -execute "$insertStatement" 303 | fi 304 | } 305 | 306 | writeDailyPriceAggregation() { 307 | sourceMeasurement=$1 308 | targetMeasurement=$2 309 | year=$3 310 | month=$4 311 | day=$5 312 | additionalWhere=$6 313 | additionalTags=$7 314 | lastPrice=$8 315 | shift 8 316 | declare -a prices 317 | prices=("$@") 318 | 319 | printf -v fYear "%04d" $year 320 | printf -v fMonth "%02d" $month 321 | printf -v fDay "%02d" $day 322 | 323 | # Convert time to UTC for local timezone 324 | fromTime=$(date -d "`date -d ${fYear}-${fMonth}-${fDay}T00:00:00 +%FT%T%Z`" -u +%FT%TZ) 325 | toTime=$(date -d "`date -d ${fYear}-${fMonth}-${fDay}T23:59:59 +%FT%T%Z`" -u +%FT%TZ) 326 | timeCondition="time >= '${fromTime}' AND time <= '${toTime}'" 327 | 328 | logDebug "${fYear}-${fMonth}-${fDay}: Aggregating total price from $sourceMeasurement into ${targetMeasurement}" 329 | # logDebug "Arguments: sourceMeasurement=${sourceMeasurement} 330 | # targetMeasurement=${targetMeasurement} 331 | # year=${year} 332 | # month=${month} 333 | # day=${day} 334 | # additionalWhere=${additionalWhere} 335 | # additionalTags=${additionalTags} 336 | # lastPrice=${lastPrice} 337 | # prices=${prices[*]}" 338 | 339 | totalPrice=0 340 | query="SELECT integral(\"subquery\") / 3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"${sourceMeasurement}\" WHERE ${timeCondition} ${additionalWhere} GROUP BY time(${ENERGY_SAMPLE_INTERVAL}) fill(0)) WHERE ${timeCondition} GROUP BY time(${TARIFF_PRICE_INTERVAL}) fill(0) tz('$TIMEZONE')" 341 | logDebug "Query statement: $query" 342 | row=0 343 | while read -r value; do 344 | if [ "$value" != "" ]; then 345 | if [ "${prices[$row]}" == "" ]; then 346 | logDebug "Price for index $row is empty. Using last known price $lastPrice." 347 | totalPrice=$(echo "$totalPrice + $value * $lastPrice" | bc) 348 | else 349 | totalPrice=$(echo "$totalPrice + $value * ${prices[$row]}" | bc) 350 | lastPrice=${prices[$row]} 351 | fi 352 | row=$((row+1)) 353 | fi 354 | done < <(influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -precision rfc3339 -execute "$query" | tail -n +4 | awk '{print $2}') 355 | logDebug "Total daily price: ${totalPrice}€" 356 | 357 | 358 | if [ "$additionalTags" != "" ]; then 359 | insertStatement="INSERT ${targetMeasurement},year=${fYear},month=${fMonth},day=${fDay},${additionalTags} value=${totalPrice} ${timestamp}" 360 | else 361 | insertStatement="INSERT ${targetMeasurement},year=${fYear},month=${fMonth},day=${fDay} value=${totalPrice} ${timestamp}" 362 | fi 363 | logDebug "Insert statement: $insertStatement" 364 | influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_AGGR_DB -username "$INFLUX_AGGR_USER" -password "$INFLUX_AGGR_PASSWORD" -execute "$insertStatement" 365 | } 366 | 367 | writeDailyPriceAggregations() { 368 | year=$1 369 | month=$2 370 | day=$3 371 | 372 | printf -v fYear "%04d" $year 373 | printf -v fMonth "%02d" $month 374 | printf -v fDay "%02d" $day 375 | 376 | # Convert time to UTC for local timezone 377 | fromTime=$(date -d "`date -d ${fYear}-${fMonth}-${fDay}T00:00:00 +%FT%T%Z`" -u +%FT%TZ) 378 | toTime=$(date -d "`date -d ${fYear}-${fMonth}-${fDay}T23:59:59 +%FT%T%Z`" -u +%FT%TZ) 379 | timeCondition="time >= '${fromTime}' AND time <= '${toTime}'" 380 | 381 | timestamp=$(date -d "`date -d ${fYear}-${fMonth}-${fDay}T00:00:00 +%FT%T%Z`" -u +%s%9N) 382 | 383 | # Get grid prices 384 | # In case of fixed tariffs, prices are very infrequently updated. So we need to get the last available price as default. 385 | query="SELECT last("value") FROM "tariffGrid" WHERE time <= '${fromTime}' TZ('$TIMEZONE')" 386 | lastGridPrice=`influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -precision rfc3339 -execute "$query" | tail -n 1 | awk '{print $2}'` 387 | logDebug "Last queried grid price: $lastGridPrice" 388 | if [ "$lastGridPrice" == "" ]; then 389 | logDebug "No grid price found. Using 0." 390 | lastGridPrice=0 391 | fi 392 | 393 | query="SELECT last("value") FROM "tariffGrid" WHERE ${timeCondition} GROUP BY time($TARIFF_PRICE_INTERVAL) fill(previous) TZ('$TIMEZONE')" 394 | logDebug "Query: $query" 395 | declare -a gridPrices 396 | row=0 397 | while read value; do 398 | if [ "$value" != "" ]; then 399 | gridPrices[$row]=$value 400 | lastGridPrice=$value 401 | else 402 | logDebug "Price for index $row is empty. Using last grid price $lastGridPrice. Please make sure that a 'grid' tariff is configured in EVCC: https://docs.evcc.io/docs/reference/configuration/tariffs" 403 | gridPrices[$row]=$lastGridPrice 404 | fi 405 | row=$((row+1)) 406 | done < <(influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -precision rfc3339 -execute "$query" | tail -n +4 | awk '{print $2}') 407 | logDebug "Grid prices: ${gridPrices[*]}" 408 | 409 | # Get feed in prices 410 | # In case of fixed tariffs, prices are very infrequently updated. So we need to get the last available price as default. 411 | query="SELECT last("value") FROM "tariffFeedIn" WHERE time <= '${fromTime}' TZ('$TIMEZONE')" 412 | lastFeedInPrice=`influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -precision rfc3339 -execute "$query" | tail -n 1 | awk '{print $2}'` 413 | logDebug "Last queried feed in price: $lastFeedInPrice" 414 | if [ "$lastFeedInPrice" == "" ]; then 415 | logDebug "No feed in price found. Using 0." 416 | lastFeedInPrice=0 417 | fi 418 | 419 | query="SELECT last("value") FROM "tariffFeedIn" WHERE ${timeCondition} GROUP BY time($TARIFF_PRICE_INTERVAL) fill(previous) TZ('$TIMEZONE')" 420 | logDebug "Query: $query" 421 | declare -a feedInPrices 422 | row=0 423 | while read value; do 424 | if [ "$value" != "" ]; then 425 | feedInPrices[$row]=$value 426 | lastFeedInPrice=$value 427 | else 428 | logDebug "Price for index $row is empty. Using last feed-in price $lastFeedInPrice. Please make sure that a 'feedin' tariff is configured in EVCC: https://docs.evcc.io/docs/reference/configuration/tariffs" 429 | feedInPrices[$row]=$lastFeedInPrice 430 | fi 431 | row=$((row+1)) 432 | done < <(influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -precision rfc3339 -execute "$query" | tail -n +4 | awk '{print $2}') 433 | logDebug "Feed in prices: ${feedInPrices[*]}" 434 | 435 | # Get charge prices 436 | query="SELECT last("value") FROM "tariffPriceLoadpoints" WHERE time <= '${fromTime}' TZ('$TIMEZONE')" 437 | lastChargePrice=`influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -precision rfc3339 -execute "$query" | tail -n 1 | awk '{print $2}'` 438 | logDebug "Last queried grid price: $lastChargePrice" 439 | if [ "$lastChargePrice" == "" ]; then 440 | logDebug "No charge price found. Using 0." 441 | lastChargePrice=0 442 | fi 443 | 444 | # Charge prices can vary way more often than hourly. But let's assume that during one session we either do fast charging 445 | # or surplus charging, so let's hope an average over the tarif price interval is accurate enough. 446 | query="SELECT mean("value") FROM "tariffPriceLoadpoints" WHERE ${timeCondition} GROUP BY time($TARIFF_PRICE_INTERVAL) TZ('$TIMEZONE')" 447 | logDebug "Query: $query" 448 | declare -a chargePrices 449 | row=0 450 | while read value; do 451 | if [ "$value" != "" ]; then 452 | chargePrices[$row]=$value 453 | lastChargePrice=$value 454 | else 455 | logDebug "Price for index $row is empty. Using last carge price $lastChargePrice." 456 | chargePrices[$row]=$lastChargePrice 457 | fi 458 | row=$((row+1)) 459 | done < <(influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -precision rfc3339 -execute "$query" | tail -n +4 | awk '{print $2}') 460 | logDebug "Charge prices: ${chargePrices[*]}" 461 | 462 | # Run aggregations 463 | writeDailyPriceAggregation "gridPower" "energyPurchasedDailyPrice" $year $month $day "AND \"value\" >=0 AND value < $PEAK_POWER_LIMIT" "" $lastGridPrice "${gridPrices[@]}" 464 | writeDailyPriceAggregation "gridPower" "energySoldDailyPrice" $year $month $day "AND \"value\" <=0 AND value < $PEAK_POWER_LIMIT" "" $lastFeedInPrice "${feedInPrices[@]}" 465 | writeDailyPriceAggregation "homePower" "potentialHomeDailyPrice" $year $month $day "AND value < $PEAK_POWER_LIMIT" "" $lastGridPrice "${gridPrices[@]}" 466 | for loadpoint in "${LOADPOINTS[@]}"; do 467 | escapedLoadpoint=$(echo $loadpoint | sed 's/ /\\ /g') 468 | writeDailyPriceAggregation "chargePower" "potentialLoadpointDailyPrice" $year $month $day "AND value < $PEAK_POWER_LIMIT AND \"loadpoint\"::tag = '${loadpoint}'" "loadpoint=${escapedLoadpoint}" $lastGridPrice "${gridPrices[@]}" 469 | done 470 | if [ "$HOME_BATTERY" == "true" ]; then 471 | writeDailyPriceAggregation "batteryPower" "energyDischargeDailyPrice" $year $month $day "AND \"value\" >=0 AND value < $PEAK_POWER_LIMIT" "" $lastGridPrice "${gridPrices[@]}" 472 | writeDailyPriceAggregation "batteryPower" "energyChargeDailyPrice" $year $month $day "AND \"value\" <=0 AND value < $PEAK_POWER_LIMIT" "" $lastFeedInPrice "${feedInPrices[@]}" 473 | fi 474 | for vehicle in "${VEHICLES[@]}"; do 475 | escapedVehicle=$(echo $vehicle | sed 's/ /\\ /g') 476 | writeDailyPriceAggregation "chargePower" "vehicleChargeDailyPrice" $year $month $day "AND value < $PEAK_POWER_LIMIT AND \"vehicle\"::tag = '${vehicle}'" "vehicle=${escapedVehicle}" $lastChargePrice "${chargePrices[@]}" 477 | writeDailyPriceAggregation "chargePower" "potentialVehicleChargeDailyPrice" $year $month $day "AND value < $PEAK_POWER_LIMIT AND \"vehicle\"::tag = '${vehicle}'" "vehicle=${escapedVehicle}" $lastGridPrice "${gridPrices[@]}" 478 | done 479 | } 480 | 481 | aggregateDay() { 482 | ayear=$1 483 | amonth=$2 484 | aday=$3 485 | 486 | logInfo "Aggregating daily metrics for `printf "%04d" $ayear`-`printf "%02d" $amonth`-`printf "%02d" $aday`" 487 | 488 | writeDailyAggregation "integral-positives" "value" "pvPower" "pvDailyEnergy" $ayear $amonth $aday "AND value < $PEAK_POWER_LIMIT AND ("id"::tag = '')" "true" 489 | writeDailyAggregation "integral-positives" "value" "homePower" "homeDailyEnergy" $ayear $amonth $aday "AND value < $PEAK_POWER_LIMIT" "true" 490 | writeDailyAggregation "integral-positives" "value" "gridPower" "gridDailyEnergy" $ayear $amonth $aday "AND value < $PEAK_POWER_LIMIT" "true" 491 | writeDailyAggregation "integral-negatives" "value" "gridPower" "feedInDailyEnergy" $ayear $amonth $aday "AND value < $PEAK_POWER_LIMIT" "true" 492 | 493 | if [ "$HOME_BATTERY" == "true" ]; then 494 | writeDailyAggregation "integral-positives" "value" "batteryPower" "dischargeDailyEnergy" $ayear $amonth $aday "AND value < $PEAK_POWER_LIMIT AND ("id"::tag = '')" "true" 495 | writeDailyAggregation "integral-negatives" "value" "batteryPower" "chargeDailyEnergy" $ayear $amonth $aday "AND value < $PEAK_POWER_LIMIT AND ("id"::tag = '')" "true" 496 | writeDailyAggregation "min" "value" "batterySoc" "batteryMinSoc" $ayear $amonth $aday "AND value < 101 AND value > 0 AND ("id"::tag = '')" "false" 497 | writeDailyAggregation "max" "value" "batterySoc" "batteryMaxSoc" $ayear $amonth $aday "AND value < 101 AND ("id"::tag = '')" "false" 498 | else 499 | logDebug "Home battery aggregation is disabled." 500 | fi 501 | 502 | if [ "$DYNAMIC_TARIFF" == "true" ]; then 503 | writeDailyAggregation "min" "value" "tariffGrid" "tariffGridDailyMin" $ayear $amonth $aday "" "false" 504 | writeDailyAggregation "max" "value" "tariffGrid" "tariffGridDailyMax" $ayear $amonth $aday "" "false" 505 | writeDailyAggregation "mean" "value" "tariffGrid" "tariffGridDailyMean" $ayear $amonth $aday "" "false" 506 | else 507 | logDebug "Dynamic tariff aggregation is disabled." 508 | fi 509 | 510 | for vehicle in "${VEHICLES[@]}"; do 511 | logDebug "Aggregating vehicle $vehicle" 512 | escapedVehicle=$(echo $vehicle | sed 's/ /\\ /g') 513 | writeDailyAggregation "max" "value" "vehicleOdometer" "vehicleOdometerDailyMax" $ayear $amonth $aday "AND \"vehicle\"::tag = '${vehicle}'" "false" "vehicle=${escapedVehicle}" 514 | writeDailyAggregation "integral-positives" "value" "chargePower" "vehicleDailyEnergy" $ayear $amonth $aday "AND \"vehicle\"::tag = '${vehicle}' AND value < $PEAK_POWER_LIMIT" "true" "vehicle=${escapedVehicle}" 515 | done 516 | 517 | for loadpoint in "${LOADPOINTS[@]}"; do 518 | logDebug "Aggregating loadpoint $loadpoint" 519 | escapedLoadpoint=$(echo $loadpoint | sed 's/ /\\ /g') 520 | writeDailyAggregation "integral-positives" "value" "chargePower" "loadpointDailyEnergy" $ayear $amonth $aday "AND \"loadpoint\"::tag = '${loadpoint}' AND value < $PEAK_POWER_LIMIT" "true" "loadpoint=${escapedLoadpoint}" 521 | done 522 | 523 | for ext_device in "${EXT_DEVICES[@]}"; do 524 | logDebug "Aggregating ext device $ext_device" 525 | escapedExtDevice=$(echo $ext_device | sed 's/ /\\ /g') 526 | writeDailyAggregation "integral-positives" "value" "extPower" "extDailyEnergy" $ayear $amonth $aday "AND \"title\"::tag = '${ext_device}' AND value < $PEAK_POWER_LIMIT" "true" "title=${escapedExtDevice}" 527 | done 528 | 529 | for aux_device in "${AUX_DEVICES[@]}"; do 530 | logDebug "Aggregating aux device $aux_device" 531 | escapedAuxDevice=$(echo $aux_device | sed 's/ /\\ /g') 532 | writeDailyAggregation "integral-positives" "value" "auxPower" "auxDailyEnergy" $ayear $amonth $aday "AND \"title\"::tag = '${aux_device}' AND value < $PEAK_POWER_LIMIT" "true" "title=${escapedAuxDevice}" 533 | done 534 | 535 | writeDailyPriceAggregations $ayear $amonth $aday 536 | } 537 | 538 | writeMonthlyAggregations () { 539 | aggregation=$1 540 | field=$2 541 | dailytargetMeasurement=$3 542 | monthlytargetMeasurement=$4 543 | year=$5 544 | month=$6 545 | additionalWhere=$7 546 | additionalTags=$8 547 | 548 | numDays=${DAYS_OF_MONTH[$month]} 549 | 550 | printf -v fYear "%04d" $year 551 | printf -v fMonth "%02d" $month 552 | printf -v fDays "%02d" $numDays 553 | 554 | # Convert time to UTC for local timezone 555 | fromTime=$(date -d "`date -d ${fYear}-${fMonth}-01T00:00:00 +%FT%T%Z`" -u +%FT%TZ) 556 | toTime=$(date -d "`date -d ${fYear}-${fMonth}-${fDays}T23:59:59 +%FT%T%Z`" -u +%FT%TZ) 557 | timeCondition="time >= '${fromTime}' AND time <= '${toTime}'" 558 | 559 | logDebug "${fYear}-${fMonth}: Creating monthly aggregation from $dailytargetMeasurement into ${monthlytargetMeasurement}" 560 | logDebug "Month has $numDays days." 561 | if [ "$additionalWhere" != "" ]; then 562 | query="SELECT $aggregation(\"$field\") FROM $dailytargetMeasurement WHERE ${timeCondition} ${additionalWhere} tz('$TIMEZONE')" 563 | else 564 | query="SELECT $aggregation(\"$field\") FROM $dailytargetMeasurement WHERE ${timeCondition} tz('$TIMEZONE')" 565 | fi 566 | logDebug "Query: $query" 567 | 568 | queryResult=`influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_AGGR_DB -username "$INFLUX_AGGR_USER" -password "$INFLUX_AGGR_PASSWORD" -precision rfc3339 -execute "$query" | tail -n 1` 569 | logDebug "Query result (last row): $queryResult" 570 | timestamp=$(date -d "`date -d ${fYear}-${fMonth}-01T00:00:00 +%FT%T%Z`" -u +%s%9N) 571 | energy=0 572 | if [ `echo $queryResult | wc -w ` -eq 2 ]; then 573 | energy=`echo "$queryResult" | cut -d " " -f 2` 574 | else 575 | logDebug "There is no data from $dailytargetMeasurement for $monthlytargetMeasurement. Writing 0 as data point for this month." 576 | fi 577 | if [ "$additionalTags" != "" ]; then 578 | insertStatement="INSERT ${monthlytargetMeasurement},year=${fYear},month=${fMonth},${additionalTags} value=${energy} ${timestamp}" 579 | else 580 | insertStatement="INSERT ${monthlytargetMeasurement},year=${fYear},month=${fMonth} value=${energy} ${timestamp}" 581 | fi 582 | logDebug "Insert statement: $insertStatement" 583 | influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_AGGR_DB -username "$INFLUX_AGGR_USER" -password "$INFLUX_AGGR_PASSWORD" -execute "$insertStatement" 584 | } 585 | 586 | aggregateMonth() { 587 | ayear=$1 588 | amonth=$2 589 | 590 | logInfo "`printf "Aggregating monthly metrics for %04d" $ayear`-`printf "%02d" $amonth`" 591 | 592 | writeMonthlyAggregations "sum" "value" "pvDailyEnergy" "pvMonthlyEnergy" $ayear $amonth 593 | writeMonthlyAggregations "sum" "value" "homeDailyEnergy" "homeMonthlyEnergy" $ayear $amonth 594 | writeMonthlyAggregations "sum" "value" "gridDailyEnergy" "gridMonthlyEnergy" $ayear $amonth 595 | writeMonthlyAggregations "sum" "value" "feedInDailyEnergy" "feedInMonthlyEnergy" $ayear $amonth 596 | writeMonthlyAggregations "sum" "value" "energyPurchasedDailyPrice" "energyPurchasedMonthlyPrice" $ayear $amonth 597 | writeMonthlyAggregations "sum" "value" "energySoldDailyPrice" "energySoldMonthlyPrice" $ayear $amonth 598 | 599 | if [ "$HOME_BATTERY" == "true" ]; then 600 | writeMonthlyAggregations "sum" "value" "dischargeDailyEnergy" "dischargeMonthlyEnergy" $ayear $amonth 601 | writeMonthlyAggregations "sum" "value" "chargeDailyEnergy" "chargeMonthlyEnergy" $ayear $amonth 602 | else 603 | logDebug "Home battery aggregation is disabled" 604 | fi 605 | 606 | for vehicle in "${VEHICLES[@]}"; do 607 | logDebug "Aggregating vehicle $vehicle" 608 | escapedVehicle=$(echo $vehicle | sed 's/ /\\ /g') 609 | writeMonthlyAggregations "spread" "value" "vehicleOdometerDailyMax" "vehicleMonthlyDrivenKm" $ayear $amonth "AND \"vehicle\"::tag = '${vehicle}'" "vehicle=${escapedVehicle}" 610 | writeMonthlyAggregations "sum" "value" "vehicleDailyEnergy" "vehicleMonthlyEnergy" $ayear $amonth "AND \"vehicle\"::tag = '${vehicle}'" "vehicle=${escapedVehicle}" 611 | done 612 | 613 | for loadpoint in "${LOADPOINTS[@]}"; do 614 | logDebug "Aggregating loadpoint $loadpoint" 615 | escapedLoadpoint=$(echo $loadpoint | sed 's/ /\\ /g') 616 | writeMonthlyAggregations "sum" "value" "loadpointDailyEnergy" "loadpointMonthlyEnergy" $ayear $amonth "AND \"loadpoint\"::tag = '${loadpoint}'" "loadpoint=${escapedLoadpoint}" 617 | done 618 | 619 | for ext_device in "${EXT_DEVICES[@]}"; do 620 | logDebug "Aggregating ext device $ext_device" 621 | escapedExtDevice=$(echo $ext_device | sed 's/ /\\ /g') 622 | writeMonthlyAggregations "sum" "value" "extDailyEnergy" "extMonthlyEnergy" $ayear $amonth "AND \"title\"::tag = '${ext_device}'" "title=${escapedExtDevice}" 623 | done 624 | 625 | for aux_device in "${AUX_DEVICES[@]}"; do 626 | logDebug "Aggregating aux device $aux_device" 627 | escapedAuxDevice=$(echo $aux_device | sed 's/ /\\ /g') 628 | writeMonthlyAggregations "sum" "value" "auxDailyEnergy" "auxMonthlyEnergy" $ayear $amonth "AND \"title\"::tag = '${aux_device}'" "title=${escapedAuxDevice}" 629 | done 630 | } 631 | 632 | dropMeasurement() { 633 | measurement=$1 634 | logInfo "Deleting measurement $measurement" 635 | dropStatement="DROP MEASUREMENT ${measurement}" 636 | influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_AGGR_DB -username "$INFLUX_AGGR_USER" -password "$INFLUX_AGGR_PASSWORD" -execute "$dropStatement" 637 | } 638 | 639 | dropAggregations() { 640 | logWarning "You are about to delete all aggregated measurements. You will lose all historical measurements for the times, where realtime data is no longer available." 641 | logWarning "Are you sure you want to delete all aggregated data? Type 'YES' to continue." 642 | read confirmation 643 | if [ "$confirmation" == "YES" ]; then 644 | logInfo "Deleting all aggregated measurements in 3 seconds." 645 | sleep 1 646 | logInfo "Deleting all aggregated measurements in 2 seconds." 647 | sleep 1 648 | logInfo "Deleting all aggregated measurements in 1 seconds." 649 | sleep 1 650 | dropMeasurement "pvDailyEnergy" 651 | dropMeasurement "homeDailyEnergy" 652 | dropMeasurement "gridDailyEnergy" 653 | dropMeasurement "feedInDailyEnergy" 654 | dropMeasurement "dischargeDailyEnergy" 655 | dropMeasurement "chargeDailyEnergy" 656 | dropMeasurement "pvMonthlyEnergy" 657 | dropMeasurement "homeMonthlyEnergy" 658 | dropMeasurement "gridMonthlyEnergy" 659 | dropMeasurement "feedInMonthlyEnergy" 660 | dropMeasurement "dischargeMonthlyEnergy" 661 | dropMeasurement "chargeMonthlyEnergy" 662 | dropMeasurement "batteryMaxSoc" 663 | dropMeasurement "batteryMinSoc" 664 | dropMeasurement "tariffGridDailyMax" 665 | dropMeasurement "tariffGridDailyMean" 666 | dropMeasurement "tariffGridDailyMin" 667 | dropMeasurement "vehicleDailyEnergy" 668 | dropMeasurement "vehicleMonthlyEnergy" 669 | dropMeasurement "vehicleOdometerDailyMax" 670 | dropMeasurement "vehicleMonthlyDrivenKm" 671 | dropMeasurement "loadpointDailyEnergy" 672 | dropMeasurement "loadpointMonthlyEnergy" 673 | 674 | # Legacy measurements 675 | dropMeasurement "loadpoint1DailyEnergy" 676 | dropMeasurement "loadpoint2DailyEnergy" 677 | dropMeasurement "loadpoint1MonthlyEnergy" 678 | dropMeasurement "loadpoint2MonthlyEnergy" 679 | dropMeasurement "vehicle1DailyEnergy" 680 | dropMeasurement "vehicle1DrivenKm" 681 | dropMeasurement "vehicle1MonthlyEnergy" 682 | dropMeasurement "vehicle1Odometer" 683 | dropMeasurement "vehicle2DailyEnergy" 684 | dropMeasurement "vehicle2DrivenKm" 685 | dropMeasurement "vehicle2MonthlyEnergy" 686 | dropMeasurement "vehicle2Odometer" 687 | else 688 | logInfo "Deletion of aggregated measurements aborted." 689 | fi 690 | } 691 | 692 | detectValues() { 693 | # We are reading from vehicleOdometer as it typically contains entries for all vehicles and loadpoints, however has 694 | # the least amount of records for a speedy query result. 695 | 696 | # Detecting vehicles 697 | index=0 698 | vehicle_list=$(influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -execute "show tag values from vehicleOdometer with key=vehicle" | grep "^vehicle " | sed 's/^vehicle //' | sort) 699 | while read vehicle; do 700 | if [ "$vehicle" != "" ]; then 701 | VEHICLES[${index}]=$vehicle 702 | index=$((index+1)) 703 | logInfo "Detected vehicle $index: $vehicle" 704 | fi 705 | done <<< "$vehicle_list" 706 | logDebug "Detected ${#VEHICLES[*]} vehicles: ${VEHICLES[*]}" 707 | 708 | # Detecting loadpoints 709 | index=0 710 | loadpoint_list=$(influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -execute "show tag values from vehicleOdometer with key=loadpoint" | grep "^loadpoint " | sed 's/^loadpoint //' | sort) 711 | while read loadpoint; do 712 | if [ "$loadpoint" != "" ]; then 713 | LOADPOINTS[${index}]=$loadpoint 714 | index=$((index+1)) 715 | logInfo "Detected loadpoint $index: $loadpoint" 716 | fi 717 | done <<< "$loadpoint_list" 718 | 719 | # Detecting ext devices 720 | index=0 721 | ext_device_list=$(influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -execute "show tag values from extPower with key=title" | grep "^title " | sed 's/^title //' | sort) 722 | while read ext_device; do 723 | if [ "$ext_device" != "" ]; then 724 | EXT_DEVICES[${index}]=$ext_device 725 | index=$((index+1)) 726 | logInfo "Detected ext device $index: $ext_device" 727 | fi 728 | done <<< "$ext_device_list" 729 | 730 | # Detecting aux devices 731 | index=0 732 | aux_device_list=$(influx -host "$INFLUX_HOST" -port $INFLUX_PORT -database $INFLUX_EVCC_DB -username "$INFLUX_EVCC_USER" -password "$INFLUX_EVCC_PASSWORD" -execute "show tag values from auxPower with key=title" | grep "^title " | sed 's/^title //' | sort) 733 | while read aux_device; do 734 | if [ "$aux_device" != "" ]; then 735 | AUX_DEVICES[${index}]=$aux_device 736 | index=$((index+1)) 737 | logInfo "Detected aux device $index: $aux_device" 738 | fi 739 | done <<< "$aux_device_list" 740 | 741 | logDebug "Detected: vehicles ${#VEHICLES[*]} loadpoints: ${LOADPOINTS[*]} ext devices: ${EXT_DEVICES[*]} aux devices: ${AUX_DEVICES[*]}" 742 | } 743 | 744 | 745 | 746 | ############################################################################### 747 | ### MAIN 748 | ############################################################################### 749 | 750 | starttime=$(date +%s) 751 | parseArguments $@ 752 | 753 | if ! bc --version > /dev/null 2>&1; then 754 | logError "This script required the bc command. Please install bc, e.g. by running 'apt install bc'." 755 | exit 1 756 | fi 757 | 758 | # Check if timezone is set 759 | if [ "$TIMEZONE" == "" ]; then 760 | logError "Timezone is not set. Please set the script variable TIMEZONE to your timezone." 761 | exit 1 762 | fi 763 | 764 | # Start aggregation 765 | if [ "$DELETE_AGGREGATIONS" != "true" ]; then 766 | detectValues 767 | if [ "$DETECT_VALUES" != "true" ]; then 768 | logInfo "[`date '+%F %T'`] Starting aggregation..." 769 | fi 770 | fi 771 | 772 | if [ "$AGGREGATE_YEAR" -ne 0 ]; then 773 | if isLeapYear $AGGREGATE_YEAR; then 774 | logDebug "The year $AGGREGATE_YEAR is a leap year. February has 29 days." 775 | DAYS_OF_MONTH[2]=29 776 | fi 777 | for month in {1..12}; do 778 | for (( day=1; day<=${DAYS_OF_MONTH[$month]}; day++ )); do 779 | aggregateDay $AGGREGATE_YEAR $month $day 780 | done 781 | aggregateMonth $AGGREGATE_YEAR $month 782 | done 783 | elif [ "$AGGREGATE_MONTH_YEAR" -ne 0 ]; then 784 | if isLeapYear $AGGREGATE_MONTH_YEAR; then 785 | logDebug "The year $AGGREGATE_MONTH_YEAR is a leap year. February has 29 days." 786 | DAYS_OF_MONTH[2]=29 787 | fi 788 | for (( day=1; day<=${DAYS_OF_MONTH[$AGGREGATE_MONTH_MONTH]}; day++ )); do 789 | aggregateDay $AGGREGATE_MONTH_YEAR $AGGREGATE_MONTH_MONTH $day 790 | done 791 | aggregateMonth $AGGREGATE_MONTH_YEAR $AGGREGATE_MONTH_MONTH 792 | elif [ "$AGGREGATE_DAY_YEAR" -ne 0 ]; then 793 | if isLeapYear $AGGREGATE_DAY_YEAR; then 794 | logDebug "The year $AGGREGATE_DAY_YEAR is a leap year. February has 29 days." 795 | DAYS_OF_MONTH[2]=29 796 | fi 797 | aggregateDay $AGGREGATE_DAY_YEAR $AGGREGATE_DAY_MONTH $AGGREGATE_DAY_DAY 798 | aggregateMonth $AGGREGATE_DAY_YEAR $AGGREGATE_DAY_MONTH 799 | elif [ "$AGGREGATE_FROM_YEAR" -ne 0 ]; then 800 | for (( year=$AGGREGATE_FROM_YEAR; year<=$AGGREGATE_TO_YEAR; year++ )); do 801 | if isLeapYear $year; then 802 | logDebug "The year $year is a leap year. February has 29 days." 803 | DAYS_OF_MONTH[2]=29 804 | else 805 | logDebug "The year $year is not a leap year. February has 28 days." 806 | DAYS_OF_MONTH[2]=28 807 | fi 808 | 809 | startMonth=1 810 | endMonth=12 811 | if [ $year -eq $AGGREGATE_FROM_YEAR ]; then 812 | startMonth=$AGGREGATE_FROM_MONTH 813 | fi 814 | if [ $year -eq $AGGREGATE_TO_YEAR ]; then 815 | endMonth=$AGGREGATE_TO_MONTH 816 | fi 817 | 818 | for (( month=$startMonth; month<=$endMonth; month++ )); do 819 | startDay=1 820 | endDay=${DAYS_OF_MONTH[$month]} 821 | if [ $year -eq $AGGREGATE_FROM_YEAR ] && [ $month -eq $AGGREGATE_FROM_MONTH ]; then 822 | startDay=$AGGREGATE_FROM_DAY 823 | fi 824 | if [ $year -eq $AGGREGATE_TO_YEAR ] && [ $month -eq $AGGREGATE_TO_MONTH ]; then 825 | endDay=$AGGREGATE_TO_DAY 826 | fi 827 | for (( day=$startDay; day<=$endDay; day++ )); do 828 | aggregateDay $year $month $day 829 | done 830 | aggregateMonth $year $month 831 | done 832 | done 833 | elif [ "$AGGREGATE_YESTERDAY" == "true" ]; then 834 | year=`date -d yesterday +%Y` 835 | # Converting to a base 10 number, stripping of a leading 0 836 | month=$(( 10#`date -d yesterday +%m`)) 837 | day=$(( 10#`date -d yesterday +%d`)) 838 | if isLeapYear $year; then 839 | logDebug "The year $year is a leap year. February has 29 days." 840 | DAYS_OF_MONTH[2]=29 841 | fi 842 | aggregateDay $year $month $day 843 | aggregateMonth $year $month 844 | elif [ "$AGGREGATE_TODAY" == "true" ]; then 845 | year=`date +%Y` 846 | # Converting to a base 10 number, stripping of a leading 0 847 | month=$(( 10#`date +%m`)) 848 | day=$(( 10#`date +%d`)) 849 | if isLeapYear $year; then 850 | logDebug "The year $year is a leap year. February has 29 days." 851 | DAYS_OF_MONTH[2]=29 852 | fi 853 | aggregateDay $year $month $day 854 | aggregateMonth $year $month 855 | elif [ "$DELETE_AGGREGATIONS" == "true" ]; then 856 | dropAggregations 857 | fi 858 | 859 | duration=$(( $(date +%s) - $starttime )) 860 | hours=$((duration / 3600)) 861 | minutes=$(( (duration % 3600) / 60 )) 862 | seconds=$((duration % 60)) 863 | printf -v duration "%02dh %02dm %02ds" $hours $minutes $seconds 864 | echo 865 | logInfo "Aggregation finished after ${duration}." 866 | ### END -------------------------------------------------------------------------------- /dashboards/dashboards/EVCC_ Monat.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [ 3 | { 4 | "name": "DS_EVCC_AGGREGRATIONS", 5 | "label": "EVCC Aggregrations", 6 | "description": "", 7 | "type": "datasource", 8 | "pluginId": "influxdb", 9 | "pluginName": "InfluxDB" 10 | }, 11 | { 12 | "name": "DS_EXPRESSION", 13 | "label": "Expression", 14 | "description": "", 15 | "type": "datasource", 16 | "pluginId": "__expr__" 17 | }, 18 | { 19 | "name": "VAR_TIMEZONE", 20 | "type": "constant", 21 | "label": "Zeitzone", 22 | "value": "Europe/Berlin", 23 | "description": "" 24 | }, 25 | { 26 | "name": "VAR_PEAKPOWERLIMIT", 27 | "type": "constant", 28 | "label": "Filter für maximale Leistung / W", 29 | "value": "25000", 30 | "description": "" 31 | }, 32 | { 33 | "name": "VAR_INSTALLEDWATTPEAK", 34 | "type": "constant", 35 | "label": "Installierte Kapazität in Wp", 36 | "value": "9840", 37 | "description": "" 38 | }, 39 | { 40 | "name": "VAR_LOADPOINTBLOCKLIST", 41 | "type": "constant", 42 | "label": "Blocklist für Loadpoints", 43 | "value": "/^none$/", 44 | "description": "" 45 | } 46 | ], 47 | "__elements": { 48 | "f5f62a1c-c847-493c-89f7-06bd383a2025": { 49 | "name": "EVCC: Energien aufsummiert über die Zeit", 50 | "uid": "f5f62a1c-c847-493c-89f7-06bd383a2025", 51 | "kind": 1, 52 | "model": { 53 | "datasource": { 54 | "type": "influxdb", 55 | "uid": "${DS_EVCC_AGGREGRATIONS}" 56 | }, 57 | "description": "", 58 | "fieldConfig": { 59 | "defaults": { 60 | "color": { 61 | "fixedColor": "orange", 62 | "mode": "fixed" 63 | }, 64 | "custom": { 65 | "axisBorderShow": false, 66 | "axisCenteredZero": false, 67 | "axisColorMode": "text", 68 | "axisLabel": "", 69 | "axisPlacement": "hidden", 70 | "fillOpacity": 100, 71 | "gradientMode": "none", 72 | "hideFrom": { 73 | "legend": false, 74 | "tooltip": false, 75 | "viz": false 76 | }, 77 | "lineWidth": 1, 78 | "scaleDistribution": { 79 | "type": "linear" 80 | }, 81 | "thresholdsStyle": { 82 | "mode": "off" 83 | } 84 | }, 85 | "mappings": [], 86 | "thresholds": { 87 | "mode": "absolute", 88 | "steps": [ 89 | { 90 | "color": "green", 91 | "value": null 92 | } 93 | ] 94 | }, 95 | "unit": "kWh" 96 | }, 97 | "overrides": [ 98 | { 99 | "matcher": { 100 | "id": "byName", 101 | "options": "Netzbezug" 102 | }, 103 | "properties": [ 104 | { 105 | "id": "color", 106 | "value": { 107 | "fixedColor": "dark-yellow", 108 | "mode": "fixed" 109 | } 110 | } 111 | ] 112 | }, 113 | { 114 | "matcher": { 115 | "id": "byName", 116 | "options": "Einspeisung" 117 | }, 118 | "properties": [ 119 | { 120 | "id": "color", 121 | "value": { 122 | "fixedColor": "yellow", 123 | "mode": "fixed" 124 | } 125 | } 126 | ] 127 | }, 128 | { 129 | "matcher": { 130 | "id": "byName", 131 | "options": "Haus" 132 | }, 133 | "properties": [ 134 | { 135 | "id": "color", 136 | "value": { 137 | "fixedColor": "purple", 138 | "mode": "fixed" 139 | } 140 | } 141 | ] 142 | }, 143 | { 144 | "matcher": { 145 | "id": "byName", 146 | "options": "Garage" 147 | }, 148 | "properties": [ 149 | { 150 | "id": "color", 151 | "value": { 152 | "fixedColor": "orange", 153 | "mode": "fixed" 154 | } 155 | } 156 | ] 157 | }, 158 | { 159 | "matcher": { 160 | "id": "byName", 161 | "options": "Stellplatz" 162 | }, 163 | "properties": [ 164 | { 165 | "id": "color", 166 | "value": { 167 | "fixedColor": "dark-orange", 168 | "mode": "fixed" 169 | } 170 | } 171 | ] 172 | }, 173 | { 174 | "matcher": { 175 | "id": "byName", 176 | "options": "PV" 177 | }, 178 | "properties": [ 179 | { 180 | "id": "color", 181 | "value": { 182 | "fixedColor": "green", 183 | "mode": "fixed" 184 | } 185 | } 186 | ] 187 | } 188 | ] 189 | }, 190 | "options": { 191 | "barRadius": 0.2, 192 | "barWidth": 0.7, 193 | "fullHighlight": false, 194 | "groupWidth": 1, 195 | "legend": { 196 | "calcs": [], 197 | "displayMode": "list", 198 | "placement": "bottom", 199 | "showLegend": true 200 | }, 201 | "orientation": "auto", 202 | "showValue": "always", 203 | "stacking": "none", 204 | "tooltip": { 205 | "hideZeros": false, 206 | "mode": "single", 207 | "sort": "none" 208 | }, 209 | "xTickLabelRotation": 0, 210 | "xTickLabelSpacing": 0 211 | }, 212 | "pluginVersion": "12.1.1", 213 | "targets": [ 214 | { 215 | "alias": "Netzbezug", 216 | "datasource": { 217 | "type": "influxdb", 218 | "uid": "fe8sr664fohz4a" 219 | }, 220 | "hide": false, 221 | "query": "SELECT sum(\"value\") /1000 from gridDailyEnergy WHERE $timeFilter tz('$timezone')", 222 | "rawQuery": true, 223 | "refId": "Netzbezug", 224 | "resultFormat": "time_series" 225 | }, 226 | { 227 | "alias": "PV", 228 | "datasource": { 229 | "type": "influxdb", 230 | "uid": "fe8sr664fohz4a" 231 | }, 232 | "groupBy": [ 233 | { 234 | "params": [ 235 | "1h" 236 | ], 237 | "type": "time" 238 | }, 239 | { 240 | "params": [ 241 | "null" 242 | ], 243 | "type": "fill" 244 | } 245 | ], 246 | "measurement": "pvPower", 247 | "orderByTime": "ASC", 248 | "policy": "default", 249 | "query": "SELECT sum(\"value\") /1000 from pvDailyEnergy WHERE $timeFilter tz('$timezone')", 250 | "rawQuery": true, 251 | "refId": "pvEnergy", 252 | "resultFormat": "time_series", 253 | "select": [ 254 | [ 255 | { 256 | "params": [ 257 | "value" 258 | ], 259 | "type": "field" 260 | }, 261 | { 262 | "params": [], 263 | "type": "mean" 264 | } 265 | ] 266 | ], 267 | "tags": [] 268 | }, 269 | { 270 | "alias": "Haus", 271 | "datasource": { 272 | "type": "influxdb", 273 | "uid": "fe8sr664fohz4a" 274 | }, 275 | "groupBy": [ 276 | { 277 | "params": [ 278 | "$__interval" 279 | ], 280 | "type": "time" 281 | }, 282 | { 283 | "params": [ 284 | "null" 285 | ], 286 | "type": "fill" 287 | } 288 | ], 289 | "hide": false, 290 | "orderByTime": "ASC", 291 | "policy": "default", 292 | "query": "SELECT sum(\"value\") /1000 from homeDailyEnergy WHERE $timeFilter tz('$timezone')", 293 | "rawQuery": true, 294 | "refId": "consumedEnergy", 295 | "resultFormat": "time_series", 296 | "select": [ 297 | [ 298 | { 299 | "params": [ 300 | "value" 301 | ], 302 | "type": "field" 303 | }, 304 | { 305 | "params": [], 306 | "type": "mean" 307 | } 308 | ] 309 | ], 310 | "tags": [] 311 | }, 312 | { 313 | "alias": "$tag_loadpoint", 314 | "datasource": { 315 | "type": "influxdb", 316 | "uid": "fe8sr664fohz4a" 317 | }, 318 | "groupBy": [ 319 | { 320 | "params": [ 321 | "$__interval" 322 | ], 323 | "type": "time" 324 | }, 325 | { 326 | "params": [ 327 | "null" 328 | ], 329 | "type": "fill" 330 | } 331 | ], 332 | "hide": false, 333 | "orderByTime": "ASC", 334 | "policy": "default", 335 | "query": "SELECT sum(\"value\") /1000 from loadpointDailyEnergy WHERE $timeFilter AND \"loadpoint\"::tag !~ $loadpointBlocklist GROUP BY \"loadpoint\"::tag TZ('$timezone')", 336 | "rawQuery": true, 337 | "refId": "loadpoints", 338 | "resultFormat": "time_series", 339 | "select": [ 340 | [ 341 | { 342 | "params": [ 343 | "value" 344 | ], 345 | "type": "field" 346 | }, 347 | { 348 | "params": [], 349 | "type": "mean" 350 | } 351 | ] 352 | ], 353 | "tags": [] 354 | }, 355 | { 356 | "alias": "Einspeisung", 357 | "datasource": { 358 | "type": "influxdb", 359 | "uid": "fe8sr664fohz4a" 360 | }, 361 | "hide": false, 362 | "query": "SELECT sum(\"value\") /1000 from feedInDailyEnergy WHERE $timeFilter tz('$timezone')", 363 | "rawQuery": true, 364 | "refId": "Einspeisung", 365 | "resultFormat": "time_series" 366 | } 367 | ], 368 | "title": "Energie", 369 | "transparent": true, 370 | "type": "barchart" 371 | } 372 | }, 373 | "c872420b-86a9-4544-9e33-f367a07f9e40": { 374 | "name": "EVCC: Kennzahlen Gauges", 375 | "uid": "c872420b-86a9-4544-9e33-f367a07f9e40", 376 | "kind": 1, 377 | "model": { 378 | "datasource": { 379 | "type": "influxdb", 380 | "uid": "${DS_EVCC_AGGREGRATIONS}" 381 | }, 382 | "description": "", 383 | "fieldConfig": { 384 | "defaults": { 385 | "color": { 386 | "fixedColor": "semi-dark-green", 387 | "mode": "thresholds" 388 | }, 389 | "decimals": 0, 390 | "links": [], 391 | "mappings": [], 392 | "thresholds": { 393 | "mode": "absolute", 394 | "steps": [ 395 | { 396 | "color": "green", 397 | "value": null 398 | } 399 | ] 400 | }, 401 | "unit": "kWh" 402 | }, 403 | "overrides": [ 404 | { 405 | "matcher": { 406 | "id": "byName", 407 | "options": "Autarkie" 408 | }, 409 | "properties": [ 410 | { 411 | "id": "unit", 412 | "value": "percentunit" 413 | }, 414 | { 415 | "id": "thresholds", 416 | "value": { 417 | "mode": "absolute", 418 | "steps": [ 419 | { 420 | "color": "green", 421 | "value": null 422 | } 423 | ] 424 | } 425 | }, 426 | { 427 | "id": "displayName", 428 | "value": "Autarkie" 429 | } 430 | ] 431 | }, 432 | { 433 | "matcher": { 434 | "id": "byName", 435 | "options": "Eigenverbrauch" 436 | }, 437 | "properties": [ 438 | { 439 | "id": "unit", 440 | "value": "percentunit" 441 | }, 442 | { 443 | "id": "thresholds", 444 | "value": { 445 | "mode": "absolute", 446 | "steps": [ 447 | { 448 | "color": "purple", 449 | "value": null 450 | } 451 | ] 452 | } 453 | }, 454 | { 455 | "id": "displayName", 456 | "value": "Eigenverbrauch" 457 | } 458 | ] 459 | } 460 | ] 461 | }, 462 | "options": { 463 | "minVizHeight": 200, 464 | "minVizWidth": 200, 465 | "orientation": "auto", 466 | "reduceOptions": { 467 | "calcs": [ 468 | "lastNotNull" 469 | ], 470 | "fields": "", 471 | "values": false 472 | }, 473 | "showThresholdLabels": false, 474 | "showThresholdMarkers": true, 475 | "sizing": "auto", 476 | "text": { 477 | "titleSize": 12, 478 | "valueSize": 16 479 | } 480 | }, 481 | "pluginVersion": "11.5.2", 482 | "targets": [ 483 | { 484 | "alias": "PV", 485 | "datasource": { 486 | "type": "influxdb", 487 | "uid": "fe8sr664fohz4a" 488 | }, 489 | "groupBy": [ 490 | { 491 | "params": [ 492 | "1h" 493 | ], 494 | "type": "time" 495 | }, 496 | { 497 | "params": [ 498 | "null" 499 | ], 500 | "type": "fill" 501 | } 502 | ], 503 | "hide": true, 504 | "measurement": "pvPower", 505 | "orderByTime": "ASC", 506 | "policy": "default", 507 | "query": "SELECT sum(\"value\") from pvDailyEnergy WHERE $timeFilter tz('$timezone')", 508 | "rawQuery": true, 509 | "refId": "energyPV", 510 | "resultFormat": "time_series", 511 | "select": [ 512 | [ 513 | { 514 | "params": [ 515 | "value" 516 | ], 517 | "type": "field" 518 | }, 519 | { 520 | "params": [], 521 | "type": "mean" 522 | } 523 | ] 524 | ], 525 | "tags": [] 526 | }, 527 | { 528 | "datasource": { 529 | "type": "influxdb", 530 | "uid": "fe8sr664fohz4a" 531 | }, 532 | "hide": true, 533 | "query": "SELECT sum(\"value\") from gridDailyEnergy WHERE $timeFilter tz('$timezone')", 534 | "rawQuery": true, 535 | "refId": "Netzbezug", 536 | "resultFormat": "time_series" 537 | }, 538 | { 539 | "datasource": { 540 | "type": "influxdb", 541 | "uid": "fe8sr664fohz4a" 542 | }, 543 | "hide": true, 544 | "query": "SELECT sum(\"value\") from feedInDailyEnergy WHERE $timeFilter tz('$timezone')", 545 | "rawQuery": true, 546 | "refId": "Einspeisung", 547 | "resultFormat": "time_series" 548 | }, 549 | { 550 | "alias": "Haus", 551 | "datasource": { 552 | "type": "influxdb", 553 | "uid": "fe8sr664fohz4a" 554 | }, 555 | "groupBy": [ 556 | { 557 | "params": [ 558 | "$__interval" 559 | ], 560 | "type": "time" 561 | }, 562 | { 563 | "params": [ 564 | "null" 565 | ], 566 | "type": "fill" 567 | } 568 | ], 569 | "hide": true, 570 | "orderByTime": "ASC", 571 | "policy": "default", 572 | "query": "SELECT sum(\"value\") from homeDailyEnergy WHERE $timeFilter tz('$timezone')", 573 | "rawQuery": true, 574 | "refId": "energieHaus", 575 | "resultFormat": "time_series", 576 | "select": [ 577 | [ 578 | { 579 | "params": [ 580 | "value" 581 | ], 582 | "type": "field" 583 | }, 584 | { 585 | "params": [], 586 | "type": "mean" 587 | } 588 | ] 589 | ], 590 | "tags": [] 591 | }, 592 | { 593 | "alias": "Loadpoint1", 594 | "datasource": { 595 | "type": "influxdb", 596 | "uid": "fe8sr664fohz4a" 597 | }, 598 | "groupBy": [ 599 | { 600 | "params": [ 601 | "$__interval" 602 | ], 603 | "type": "time" 604 | }, 605 | { 606 | "params": [ 607 | "null" 608 | ], 609 | "type": "fill" 610 | } 611 | ], 612 | "hide": true, 613 | "orderByTime": "ASC", 614 | "policy": "default", 615 | "query": "SELECT sum(\"value\") FROM \"loadpointDailyEnergy\" WHERE $timeFilter TZ('$timezone')", 616 | "rawQuery": true, 617 | "refId": "energieLadepunkte", 618 | "resultFormat": "time_series", 619 | "select": [ 620 | [ 621 | { 622 | "params": [ 623 | "value" 624 | ], 625 | "type": "field" 626 | }, 627 | { 628 | "params": [], 629 | "type": "mean" 630 | } 631 | ] 632 | ], 633 | "tags": [] 634 | }, 635 | { 636 | "datasource": { 637 | "name": "Expression", 638 | "type": "__expr__", 639 | "uid": "__expr__" 640 | }, 641 | "expression": "1 - $Netzbezug/($energieHaus + $energieLadepunkte)", 642 | "hide": false, 643 | "refId": "Autarkie", 644 | "type": "math" 645 | }, 646 | { 647 | "datasource": { 648 | "name": "Expression", 649 | "type": "__expr__", 650 | "uid": "__expr__" 651 | }, 652 | "expression": "($energyPV - $Einspeisung) / $energyPV", 653 | "hide": false, 654 | "refId": "Eigenverbrauch", 655 | "type": "math" 656 | } 657 | ], 658 | "title": "Kennzahlen", 659 | "transparent": true, 660 | "type": "gauge" 661 | } 662 | }, 663 | "feio30f3nm0owe": { 664 | "name": "EVCC: Strombilanz", 665 | "uid": "feio30f3nm0owe", 666 | "kind": 1, 667 | "model": { 668 | "datasource": { 669 | "type": "influxdb", 670 | "uid": "${DS_EVCC_AGGREGRATIONS}" 671 | }, 672 | "description": "", 673 | "fieldConfig": { 674 | "defaults": { 675 | "color": { 676 | "mode": "thresholds" 677 | }, 678 | "decimals": 2, 679 | "links": [], 680 | "mappings": [], 681 | "thresholds": { 682 | "mode": "absolute", 683 | "steps": [ 684 | { 685 | "color": "red", 686 | "value": null 687 | }, 688 | { 689 | "color": "green", 690 | "value": 0 691 | } 692 | ] 693 | }, 694 | "unit": "€" 695 | }, 696 | "overrides": [ 697 | { 698 | "matcher": { 699 | "id": "byName", 700 | "options": "tariffGridDailyMean.mean" 701 | }, 702 | "properties": [ 703 | { 704 | "id": "displayName", 705 | "value": "Strompreis: Arithmetisches Mittel" 706 | }, 707 | { 708 | "id": "color", 709 | "value": { 710 | "fixedColor": "text", 711 | "mode": "fixed" 712 | } 713 | }, 714 | { 715 | "id": "unit", 716 | "value": "ct/kWh" 717 | } 718 | ] 719 | }, 720 | { 721 | "matcher": { 722 | "id": "byName", 723 | "options": "weightedAveragePrice" 724 | }, 725 | "properties": [ 726 | { 727 | "id": "displayName", 728 | "value": "Effektiver Strompreis, dynamisch" 729 | }, 730 | { 731 | "id": "color", 732 | "value": { 733 | "fixedColor": "blue", 734 | "mode": "fixed" 735 | } 736 | }, 737 | { 738 | "id": "unit", 739 | "value": "ct/KWh" 740 | } 741 | ] 742 | }, 743 | { 744 | "matcher": { 745 | "id": "byName", 746 | "options": "savedPrice" 747 | }, 748 | "properties": [ 749 | { 750 | "id": "displayName", 751 | "value": "Eingesparter Strompreis durch dynamischen Tarif" 752 | }, 753 | { 754 | "id": "unit", 755 | "value": "ct/kWh" 756 | } 757 | ] 758 | }, 759 | { 760 | "matcher": { 761 | "id": "byName", 762 | "options": "totalSavings" 763 | }, 764 | "properties": [ 765 | { 766 | "id": "displayName", 767 | "value": "Einsparung durch dynamischen Tarif" 768 | } 769 | ] 770 | }, 771 | { 772 | "matcher": { 773 | "id": "byName", 774 | "options": "potentialPurchased" 775 | }, 776 | "properties": [ 777 | { 778 | "id": "displayName", 779 | "value": "Potentieller Einkauf nach arithmetischen Preis" 780 | } 781 | ] 782 | } 783 | ] 784 | }, 785 | "options": { 786 | "colorMode": "value", 787 | "graphMode": "none", 788 | "justifyMode": "auto", 789 | "orientation": "auto", 790 | "percentChangeColorMode": "standard", 791 | "reduceOptions": { 792 | "calcs": [ 793 | "lastNotNull" 794 | ], 795 | "fields": "", 796 | "values": false 797 | }, 798 | "showPercentChange": false, 799 | "text": { 800 | "titleSize": 12, 801 | "valueSize": 20 802 | }, 803 | "textMode": "auto", 804 | "wideLayout": true 805 | }, 806 | "pluginVersion": "12.0.2", 807 | "targets": [ 808 | { 809 | "datasource": { 810 | "type": "influxdb", 811 | "uid": "fe8sr664fohz4a" 812 | }, 813 | "groupBy": [ 814 | { 815 | "params": [ 816 | "$__interval" 817 | ], 818 | "type": "time" 819 | }, 820 | { 821 | "params": [ 822 | "null" 823 | ], 824 | "type": "fill" 825 | } 826 | ], 827 | "hide": true, 828 | "orderByTime": "ASC", 829 | "policy": "default", 830 | "query": "SELECT sum(\"value\") /1000 from gridDailyEnergy WHERE $timeFilter tz('$timezone')", 831 | "rawQuery": true, 832 | "refId": "energyPurchased", 833 | "resultFormat": "time_series", 834 | "select": [ 835 | [ 836 | { 837 | "params": [ 838 | "value" 839 | ], 840 | "type": "field" 841 | }, 842 | { 843 | "params": [], 844 | "type": "mean" 845 | } 846 | ] 847 | ], 848 | "tags": [] 849 | }, 850 | { 851 | "alias": "", 852 | "datasource": { 853 | "type": "influxdb", 854 | "uid": "fe8sr664fohz4a" 855 | }, 856 | "groupBy": [ 857 | { 858 | "params": [ 859 | "$__interval" 860 | ], 861 | "type": "time" 862 | }, 863 | { 864 | "params": [ 865 | "null" 866 | ], 867 | "type": "fill" 868 | } 869 | ], 870 | "hide": false, 871 | "orderByTime": "ASC", 872 | "policy": "default", 873 | "query": "SELECT mean(\"value\") * 100 FROM \"tariffGridDailyMean\" WHERE $timeFilter", 874 | "rawQuery": true, 875 | "refId": "averagePrice", 876 | "resultFormat": "time_series", 877 | "select": [ 878 | [ 879 | { 880 | "params": [ 881 | "value" 882 | ], 883 | "type": "field" 884 | }, 885 | { 886 | "params": [], 887 | "type": "mean" 888 | } 889 | ] 890 | ], 891 | "tags": [] 892 | }, 893 | { 894 | "datasource": { 895 | "name": "Expression", 896 | "type": "__expr__", 897 | "uid": "__expr__" 898 | }, 899 | "expression": "($purchased * -100 )/ $energyPurchased", 900 | "hide": false, 901 | "refId": "weightedAveragePrice", 902 | "type": "math" 903 | }, 904 | { 905 | "datasource": { 906 | "name": "Expression", 907 | "type": "__expr__", 908 | "uid": "__expr__" 909 | }, 910 | "expression": "$averagePrice - $weightedAveragePrice", 911 | "hide": false, 912 | "refId": "savedPrice", 913 | "type": "math" 914 | }, 915 | { 916 | "datasource": { 917 | "name": "Expression", 918 | "type": "__expr__", 919 | "uid": "__expr__" 920 | }, 921 | "expression": "$averagePrice * $energyPurchased / -100", 922 | "hide": false, 923 | "refId": "potentialPurchased", 924 | "type": "math" 925 | }, 926 | { 927 | "alias": "Einkauf, dynamisch", 928 | "datasource": { 929 | "type": "influxdb", 930 | "uid": "fe8sr664fohz4a" 931 | }, 932 | "groupBy": [ 933 | { 934 | "params": [ 935 | "1d" 936 | ], 937 | "type": "time" 938 | }, 939 | { 940 | "params": [ 941 | "null" 942 | ], 943 | "type": "fill" 944 | } 945 | ], 946 | "measurement": "pvPower", 947 | "orderByTime": "ASC", 948 | "policy": "default", 949 | "query": "SELECT sum(value) * (-1) FROM energyPurchasedDailyPrice WHERE $timeFilter tz('$timezone')", 950 | "rawQuery": true, 951 | "refId": "purchased", 952 | "resultFormat": "time_series", 953 | "select": [ 954 | [ 955 | { 956 | "params": [ 957 | "value" 958 | ], 959 | "type": "field" 960 | }, 961 | { 962 | "params": [], 963 | "type": "max" 964 | } 965 | ] 966 | ], 967 | "tags": [] 968 | }, 969 | { 970 | "datasource": { 971 | "name": "Expression", 972 | "type": "__expr__", 973 | "uid": "__expr__" 974 | }, 975 | "expression": "$purchased - $potentialPurchased ", 976 | "hide": false, 977 | "refId": "totalSavings", 978 | "type": "math" 979 | }, 980 | { 981 | "alias": "Verkauf (Einspeisung)", 982 | "datasource": { 983 | "type": "influxdb", 984 | "uid": "fe8sr664fohz4a" 985 | }, 986 | "groupBy": [ 987 | { 988 | "params": [ 989 | "1d" 990 | ], 991 | "type": "time" 992 | }, 993 | { 994 | "params": [ 995 | "null" 996 | ], 997 | "type": "fill" 998 | } 999 | ], 1000 | "hide": false, 1001 | "measurement": "pvPower", 1002 | "orderByTime": "ASC", 1003 | "policy": "default", 1004 | "query": "SELECT sum(value) * (-1) FROM energySoldDailyPrice WHERE $timeFilter tz('$timezone')", 1005 | "rawQuery": true, 1006 | "refId": "sold", 1007 | "resultFormat": "time_series", 1008 | "select": [ 1009 | [ 1010 | { 1011 | "params": [ 1012 | "value" 1013 | ], 1014 | "type": "field" 1015 | }, 1016 | { 1017 | "params": [], 1018 | "type": "max" 1019 | } 1020 | ] 1021 | ], 1022 | "tags": [] 1023 | }, 1024 | { 1025 | "datasource": { 1026 | "name": "Expression", 1027 | "type": "__expr__", 1028 | "uid": "__expr__" 1029 | }, 1030 | "expression": "$purchased + $sold", 1031 | "hide": false, 1032 | "refId": "Bilanz", 1033 | "type": "math" 1034 | } 1035 | ], 1036 | "title": "Strombilanz", 1037 | "type": "stat" 1038 | } 1039 | }, 1040 | "ae8zwbjv24kqof": { 1041 | "name": "EVCC: Dynamischer Strompreis: Täglich", 1042 | "uid": "ae8zwbjv24kqof", 1043 | "kind": 1, 1044 | "model": { 1045 | "datasource": { 1046 | "type": "influxdb", 1047 | "uid": "${DS_EVCC_AGGREGRATIONS}" 1048 | }, 1049 | "description": "", 1050 | "fieldConfig": { 1051 | "defaults": { 1052 | "color": { 1053 | "mode": "palette-classic" 1054 | }, 1055 | "custom": { 1056 | "axisBorderShow": false, 1057 | "axisCenteredZero": false, 1058 | "axisColorMode": "text", 1059 | "axisLabel": "", 1060 | "axisPlacement": "auto", 1061 | "axisWidth": 80, 1062 | "barAlignment": 0, 1063 | "barWidthFactor": 0.6, 1064 | "drawStyle": "line", 1065 | "fillOpacity": 0, 1066 | "gradientMode": "none", 1067 | "hideFrom": { 1068 | "legend": false, 1069 | "tooltip": false, 1070 | "viz": false 1071 | }, 1072 | "insertNulls": false, 1073 | "lineInterpolation": "linear", 1074 | "lineWidth": 1, 1075 | "pointSize": 5, 1076 | "scaleDistribution": { 1077 | "type": "linear" 1078 | }, 1079 | "showPoints": "auto", 1080 | "showValues": false, 1081 | "spanNulls": true, 1082 | "stacking": { 1083 | "group": "A", 1084 | "mode": "none" 1085 | }, 1086 | "thresholdsStyle": { 1087 | "mode": "off" 1088 | } 1089 | }, 1090 | "decimals": 2, 1091 | "mappings": [], 1092 | "thresholds": { 1093 | "mode": "absolute", 1094 | "steps": [ 1095 | { 1096 | "color": "green", 1097 | "value": null 1098 | }, 1099 | { 1100 | "color": "red", 1101 | "value": 80 1102 | } 1103 | ] 1104 | }, 1105 | "unit": "ct/kWh" 1106 | }, 1107 | "overrides": [ 1108 | { 1109 | "matcher": { 1110 | "id": "byName", 1111 | "options": "Max" 1112 | }, 1113 | "properties": [ 1114 | { 1115 | "id": "color", 1116 | "value": { 1117 | "fixedColor": "red", 1118 | "mode": "fixed" 1119 | } 1120 | } 1121 | ] 1122 | }, 1123 | { 1124 | "matcher": { 1125 | "id": "byName", 1126 | "options": "Durchschnitt" 1127 | }, 1128 | "properties": [ 1129 | { 1130 | "id": "color", 1131 | "value": { 1132 | "fixedColor": "text", 1133 | "mode": "fixed" 1134 | } 1135 | } 1136 | ] 1137 | }, 1138 | { 1139 | "matcher": { 1140 | "id": "byName", 1141 | "options": "Min" 1142 | }, 1143 | "properties": [ 1144 | { 1145 | "id": "color", 1146 | "value": { 1147 | "fixedColor": "green", 1148 | "mode": "fixed" 1149 | } 1150 | } 1151 | ] 1152 | }, 1153 | { 1154 | "matcher": { 1155 | "id": "byName", 1156 | "options": "weightedAveragePrice" 1157 | }, 1158 | "properties": [ 1159 | { 1160 | "id": "displayName", 1161 | "value": "Effektiver Strompreis" 1162 | }, 1163 | { 1164 | "id": "color", 1165 | "value": { 1166 | "fixedColor": "blue", 1167 | "mode": "fixed" 1168 | } 1169 | } 1170 | ] 1171 | } 1172 | ] 1173 | }, 1174 | "options": { 1175 | "legend": { 1176 | "calcs": [], 1177 | "displayMode": "list", 1178 | "placement": "bottom", 1179 | "showLegend": true 1180 | }, 1181 | "tooltip": { 1182 | "hideZeros": false, 1183 | "mode": "multi", 1184 | "sort": "none" 1185 | } 1186 | }, 1187 | "pluginVersion": "12.2.1", 1188 | "targets": [ 1189 | { 1190 | "alias": "Max", 1191 | "datasource": { 1192 | "type": "influxdb", 1193 | "uid": "fe8sr664fohz4a" 1194 | }, 1195 | "query": "SELECT \"value\" * 100 FROM \"tariffGridDailyMax\" WHERE $timeFilter", 1196 | "rawQuery": true, 1197 | "refId": "maxPrice", 1198 | "resultFormat": "time_series" 1199 | }, 1200 | { 1201 | "alias": "Durchschnitt", 1202 | "datasource": { 1203 | "type": "influxdb", 1204 | "uid": "fe8sr664fohz4a" 1205 | }, 1206 | "groupBy": [ 1207 | { 1208 | "params": [ 1209 | "$__interval" 1210 | ], 1211 | "type": "time" 1212 | }, 1213 | { 1214 | "params": [ 1215 | "null" 1216 | ], 1217 | "type": "fill" 1218 | } 1219 | ], 1220 | "hide": false, 1221 | "orderByTime": "ASC", 1222 | "policy": "default", 1223 | "query": "SELECT \"value\" * 100 FROM \"tariffGridDailyMean\" WHERE $timeFilter", 1224 | "rawQuery": true, 1225 | "refId": "avgPrice", 1226 | "resultFormat": "time_series", 1227 | "select": [ 1228 | [ 1229 | { 1230 | "params": [ 1231 | "value" 1232 | ], 1233 | "type": "field" 1234 | }, 1235 | { 1236 | "params": [], 1237 | "type": "mean" 1238 | } 1239 | ] 1240 | ], 1241 | "tags": [] 1242 | }, 1243 | { 1244 | "datasource": { 1245 | "type": "influxdb", 1246 | "uid": "fe8sr664fohz4a" 1247 | }, 1248 | "groupBy": [ 1249 | { 1250 | "params": [ 1251 | "$__interval" 1252 | ], 1253 | "type": "time" 1254 | }, 1255 | { 1256 | "params": [ 1257 | "null" 1258 | ], 1259 | "type": "fill" 1260 | } 1261 | ], 1262 | "hide": true, 1263 | "orderByTime": "ASC", 1264 | "policy": "default", 1265 | "query": "SELECT value FROM energyPurchasedDailyPrice WHERE $timeFilter tz('$timezone')", 1266 | "rawQuery": true, 1267 | "refId": "purchased", 1268 | "resultFormat": "time_series", 1269 | "select": [ 1270 | [ 1271 | { 1272 | "params": [ 1273 | "value" 1274 | ], 1275 | "type": "field" 1276 | }, 1277 | { 1278 | "params": [], 1279 | "type": "mean" 1280 | } 1281 | ] 1282 | ], 1283 | "tags": [] 1284 | }, 1285 | { 1286 | "datasource": { 1287 | "type": "influxdb", 1288 | "uid": "fe8sr664fohz4a" 1289 | }, 1290 | "groupBy": [ 1291 | { 1292 | "params": [ 1293 | "$__interval" 1294 | ], 1295 | "type": "time" 1296 | }, 1297 | { 1298 | "params": [ 1299 | "null" 1300 | ], 1301 | "type": "fill" 1302 | } 1303 | ], 1304 | "hide": true, 1305 | "orderByTime": "ASC", 1306 | "policy": "default", 1307 | "query": "SELECT value/1000 from gridDailyEnergy WHERE $timeFilter tz('$timezone')", 1308 | "rawQuery": true, 1309 | "refId": "energyPurchased", 1310 | "resultFormat": "time_series", 1311 | "select": [ 1312 | [ 1313 | { 1314 | "params": [ 1315 | "value" 1316 | ], 1317 | "type": "field" 1318 | }, 1319 | { 1320 | "params": [], 1321 | "type": "mean" 1322 | } 1323 | ] 1324 | ], 1325 | "tags": [] 1326 | }, 1327 | { 1328 | "datasource": { 1329 | "name": "Expression", 1330 | "type": "__expr__", 1331 | "uid": "__expr__" 1332 | }, 1333 | "expression": "($purchased * 100 )/ $energyPurchased", 1334 | "hide": false, 1335 | "refId": "weightedAveragePrice", 1336 | "type": "math" 1337 | }, 1338 | { 1339 | "alias": "Min", 1340 | "datasource": { 1341 | "type": "influxdb", 1342 | "uid": "fe8sr664fohz4a" 1343 | }, 1344 | "hide": false, 1345 | "query": "SELECT \"value\" * 100 FROM \"tariffGridDailyMin\" WHERE $timeFilter", 1346 | "rawQuery": true, 1347 | "refId": "minPrice", 1348 | "resultFormat": "time_series" 1349 | } 1350 | ], 1351 | "title": "Strompreis", 1352 | "type": "timeseries" 1353 | } 1354 | }, 1355 | "b8787739-953e-4188-9507-0cc12b6ed91b": { 1356 | "name": "EVCC: Speicher Effizenz", 1357 | "uid": "b8787739-953e-4188-9507-0cc12b6ed91b", 1358 | "kind": 1, 1359 | "model": { 1360 | "datasource": { 1361 | "type": "influxdb", 1362 | "uid": "${DS_EVCC_AGGREGRATIONS}" 1363 | }, 1364 | "description": "", 1365 | "fieldConfig": { 1366 | "defaults": { 1367 | "color": { 1368 | "fixedColor": "light-blue", 1369 | "mode": "fixed" 1370 | }, 1371 | "mappings": [], 1372 | "thresholds": { 1373 | "mode": "absolute", 1374 | "steps": [ 1375 | { 1376 | "color": "green", 1377 | "value": null 1378 | }, 1379 | { 1380 | "color": "red", 1381 | "value": 80 1382 | } 1383 | ] 1384 | }, 1385 | "unit": "watth" 1386 | }, 1387 | "overrides": [ 1388 | { 1389 | "matcher": { 1390 | "id": "byName", 1391 | "options": "Speicher laden" 1392 | }, 1393 | "properties": [ 1394 | { 1395 | "id": "color", 1396 | "value": { 1397 | "fixedColor": "light-blue", 1398 | "mode": "fixed" 1399 | } 1400 | }, 1401 | { 1402 | "id": "displayName", 1403 | "value": "Speicher laden" 1404 | } 1405 | ] 1406 | }, 1407 | { 1408 | "matcher": { 1409 | "id": "byName", 1410 | "options": "Speicher entladen" 1411 | }, 1412 | "properties": [ 1413 | { 1414 | "id": "color", 1415 | "value": { 1416 | "fixedColor": "dark-blue", 1417 | "mode": "fixed" 1418 | } 1419 | }, 1420 | { 1421 | "id": "displayName", 1422 | "value": "Speicher entladen" 1423 | } 1424 | ] 1425 | }, 1426 | { 1427 | "matcher": { 1428 | "id": "byName", 1429 | "options": "Speicher Effizienz" 1430 | }, 1431 | "properties": [ 1432 | { 1433 | "id": "unit", 1434 | "value": "percentunit" 1435 | }, 1436 | { 1437 | "id": "color", 1438 | "value": { 1439 | "fixedColor": "text", 1440 | "mode": "fixed" 1441 | } 1442 | } 1443 | ] 1444 | }, 1445 | { 1446 | "matcher": { 1447 | "id": "byName", 1448 | "options": "Max SOC Ø" 1449 | }, 1450 | "properties": [ 1451 | { 1452 | "id": "color", 1453 | "value": { 1454 | "fixedColor": "light-blue", 1455 | "mode": "fixed" 1456 | } 1457 | }, 1458 | { 1459 | "id": "unit", 1460 | "value": "percent" 1461 | } 1462 | ] 1463 | }, 1464 | { 1465 | "matcher": { 1466 | "id": "byName", 1467 | "options": "Min SOC Ø" 1468 | }, 1469 | "properties": [ 1470 | { 1471 | "id": "color", 1472 | "value": { 1473 | "fixedColor": "dark-blue", 1474 | "mode": "fixed" 1475 | } 1476 | }, 1477 | { 1478 | "id": "unit", 1479 | "value": "percent" 1480 | } 1481 | ] 1482 | } 1483 | ] 1484 | }, 1485 | "maxDataPoints": 50000, 1486 | "options": { 1487 | "colorMode": "value", 1488 | "graphMode": "none", 1489 | "justifyMode": "auto", 1490 | "orientation": "horizontal", 1491 | "percentChangeColorMode": "standard", 1492 | "reduceOptions": { 1493 | "calcs": [ 1494 | "mean" 1495 | ], 1496 | "fields": "", 1497 | "values": false 1498 | }, 1499 | "showPercentChange": false, 1500 | "text": { 1501 | "titleSize": 12, 1502 | "valueSize": 20 1503 | }, 1504 | "textMode": "auto", 1505 | "wideLayout": true 1506 | }, 1507 | "pluginVersion": "11.5.2", 1508 | "targets": [ 1509 | { 1510 | "alias": "Speicher laden", 1511 | "datasource": { 1512 | "type": "influxdb", 1513 | "uid": "fe8sr664fohz4a" 1514 | }, 1515 | "hide": false, 1516 | "query": "SELECT sum(\"value\") from chargeDailyEnergy WHERE $timeFilter tz('$timezone')", 1517 | "rawQuery": true, 1518 | "refId": "laden", 1519 | "resultFormat": "time_series" 1520 | }, 1521 | { 1522 | "alias": "Speicher entladen", 1523 | "datasource": { 1524 | "type": "influxdb", 1525 | "uid": "fe8sr664fohz4a" 1526 | }, 1527 | "hide": false, 1528 | "query": "SELECT sum(\"value\") from dischargeDailyEnergy WHERE $timeFilter tz('$timezone')", 1529 | "rawQuery": true, 1530 | "refId": "entladen", 1531 | "resultFormat": "time_series" 1532 | }, 1533 | { 1534 | "datasource": { 1535 | "name": "Expression", 1536 | "type": "__expr__", 1537 | "uid": "__expr__" 1538 | }, 1539 | "expression": "$entladen/$laden", 1540 | "hide": false, 1541 | "refId": "Speicher Effizienz", 1542 | "type": "math" 1543 | }, 1544 | { 1545 | "alias": "Max SOC Ø", 1546 | "datasource": { 1547 | "type": "influxdb", 1548 | "uid": "fe8sr664fohz4a" 1549 | }, 1550 | "hide": false, 1551 | "query": "SELECT \"value\" FROM \"batteryMaxSoc\" WHERE $timeFilter tz('$timezone')", 1552 | "rawQuery": true, 1553 | "refId": "avgMaxSoc", 1554 | "resultFormat": "time_series" 1555 | }, 1556 | { 1557 | "alias": "Min SOC Ø", 1558 | "datasource": { 1559 | "type": "influxdb", 1560 | "uid": "fe8sr664fohz4a" 1561 | }, 1562 | "hide": false, 1563 | "query": "SELECT \"value\" FROM \"batteryMinSoc\" WHERE $timeFilter tz('$timezone')", 1564 | "rawQuery": true, 1565 | "refId": "avgMinSoc", 1566 | "resultFormat": "time_series" 1567 | } 1568 | ], 1569 | "transparent": true, 1570 | "type": "stat" 1571 | } 1572 | } 1573 | }, 1574 | "__requires": [ 1575 | { 1576 | "type": "datasource", 1577 | "id": "__expr__", 1578 | "version": "1.0.0" 1579 | }, 1580 | { 1581 | "type": "panel", 1582 | "id": "barchart", 1583 | "name": "Bar chart", 1584 | "version": "" 1585 | }, 1586 | { 1587 | "type": "grafana", 1588 | "id": "grafana", 1589 | "name": "Grafana", 1590 | "version": "12.2.1" 1591 | }, 1592 | { 1593 | "type": "datasource", 1594 | "id": "influxdb", 1595 | "name": "InfluxDB", 1596 | "version": "1.0.0" 1597 | }, 1598 | { 1599 | "type": "panel", 1600 | "id": "piechart", 1601 | "name": "Pie chart", 1602 | "version": "" 1603 | }, 1604 | { 1605 | "type": "panel", 1606 | "id": "stat", 1607 | "name": "Stat", 1608 | "version": "" 1609 | } 1610 | ], 1611 | "annotations": { 1612 | "list": [ 1613 | { 1614 | "builtIn": 1, 1615 | "datasource": { 1616 | "type": "grafana", 1617 | "uid": "-- Grafana --" 1618 | }, 1619 | "enable": true, 1620 | "hide": true, 1621 | "iconColor": "rgba(0, 211, 255, 1)", 1622 | "name": "Annotations & Alerts", 1623 | "target": { 1624 | "limit": 100, 1625 | "matchAny": false, 1626 | "tags": [], 1627 | "type": "dashboard" 1628 | }, 1629 | "type": "dashboard" 1630 | } 1631 | ] 1632 | }, 1633 | "editable": true, 1634 | "fiscalYearStartMonth": 0, 1635 | "graphTooltip": 1, 1636 | "id": null, 1637 | "links": [ 1638 | { 1639 | "asDropdown": false, 1640 | "icon": "dashboard", 1641 | "includeVars": false, 1642 | "keepTime": false, 1643 | "tags": [], 1644 | "targetBlank": false, 1645 | "title": "Aktueller Monat", 1646 | "tooltip": "", 1647 | "type": "link", 1648 | "url": "/d/4iQda7igz/monat?from=now%2FM&to=now%2FM" 1649 | }, 1650 | { 1651 | "asDropdown": false, 1652 | "icon": "dashboard", 1653 | "includeVars": false, 1654 | "keepTime": false, 1655 | "tags": [], 1656 | "targetBlank": false, 1657 | "title": "Letzter Monat", 1658 | "tooltip": "", 1659 | "type": "link", 1660 | "url": "/d/4iQda7igz/monat?from=now-1M%2FM&to=now-1M%2FM" 1661 | }, 1662 | { 1663 | "asDropdown": false, 1664 | "icon": "dashboard", 1665 | "includeVars": false, 1666 | "keepTime": false, 1667 | "tags": [], 1668 | "targetBlank": false, 1669 | "title": "Vorletzter Monat", 1670 | "tooltip": "", 1671 | "type": "link", 1672 | "url": "/d/4iQda7igz/monat?from=now-2M%2FM&to=now-2M%2FM" 1673 | }, 1674 | { 1675 | "asDropdown": true, 1676 | "icon": "external link", 1677 | "includeVars": false, 1678 | "keepTime": false, 1679 | "tags": [ 1680 | "PV" 1681 | ], 1682 | "targetBlank": false, 1683 | "title": "Dashboards", 1684 | "tooltip": "", 1685 | "type": "dashboards", 1686 | "url": "" 1687 | } 1688 | ], 1689 | "panels": [ 1690 | { 1691 | "collapsed": false, 1692 | "gridPos": { 1693 | "h": 1, 1694 | "w": 24, 1695 | "x": 0, 1696 | "y": 0 1697 | }, 1698 | "id": 33, 1699 | "panels": [], 1700 | "title": "PV", 1701 | "type": "row" 1702 | }, 1703 | { 1704 | "gridPos": { 1705 | "h": 10, 1706 | "w": 5, 1707 | "x": 0, 1708 | "y": 1 1709 | }, 1710 | "id": 19, 1711 | "libraryPanel": { 1712 | "uid": "f5f62a1c-c847-493c-89f7-06bd383a2025", 1713 | "name": "EVCC: Energien aufsummiert über die Zeit" 1714 | } 1715 | }, 1716 | { 1717 | "datasource": { 1718 | "type": "influxdb", 1719 | "uid": "${DS_EVCC_AGGREGRATIONS}" 1720 | }, 1721 | "description": "", 1722 | "fieldConfig": { 1723 | "defaults": { 1724 | "color": { 1725 | "fixedColor": "orange", 1726 | "mode": "fixed" 1727 | }, 1728 | "custom": { 1729 | "axisBorderShow": false, 1730 | "axisCenteredZero": false, 1731 | "axisColorMode": "text", 1732 | "axisLabel": "", 1733 | "axisPlacement": "auto", 1734 | "axisWidth": 80, 1735 | "fillOpacity": 100, 1736 | "gradientMode": "none", 1737 | "hideFrom": { 1738 | "legend": false, 1739 | "tooltip": false, 1740 | "viz": false 1741 | }, 1742 | "lineWidth": 0, 1743 | "scaleDistribution": { 1744 | "type": "linear" 1745 | }, 1746 | "thresholdsStyle": { 1747 | "mode": "off" 1748 | } 1749 | }, 1750 | "decimals": 2, 1751 | "links": [ 1752 | { 1753 | "title": "PV Today", 1754 | "url": "/d/7Ou-Y1Rgk/pv-today-tablet?orgId=1&time=${__value.time}&time.window=86400000" 1755 | } 1756 | ], 1757 | "mappings": [], 1758 | "thresholds": { 1759 | "mode": "absolute", 1760 | "steps": [ 1761 | { 1762 | "color": "red", 1763 | "value": 0 1764 | }, 1765 | { 1766 | "color": "text", 1767 | "value": 0 1768 | } 1769 | ] 1770 | }, 1771 | "unit": "watth" 1772 | }, 1773 | "overrides": [ 1774 | { 1775 | "matcher": { 1776 | "id": "byName", 1777 | "options": "Haus" 1778 | }, 1779 | "properties": [ 1780 | { 1781 | "id": "color", 1782 | "value": { 1783 | "fixedColor": "purple", 1784 | "mode": "fixed" 1785 | } 1786 | } 1787 | ] 1788 | }, 1789 | { 1790 | "matcher": { 1791 | "id": "byName", 1792 | "options": "Garage" 1793 | }, 1794 | "properties": [ 1795 | { 1796 | "id": "color", 1797 | "value": { 1798 | "mode": "palette-classic" 1799 | } 1800 | }, 1801 | { 1802 | "id": "color", 1803 | "value": { 1804 | "fixedColor": "orange", 1805 | "mode": "fixed" 1806 | } 1807 | } 1808 | ] 1809 | }, 1810 | { 1811 | "matcher": { 1812 | "id": "byName", 1813 | "options": "Netzbezug" 1814 | }, 1815 | "properties": [ 1816 | { 1817 | "id": "color", 1818 | "value": { 1819 | "fixedColor": "dark-yellow", 1820 | "mode": "fixed" 1821 | } 1822 | } 1823 | ] 1824 | }, 1825 | { 1826 | "matcher": { 1827 | "id": "byName", 1828 | "options": "Einspeisung" 1829 | }, 1830 | "properties": [ 1831 | { 1832 | "id": "color", 1833 | "value": { 1834 | "fixedColor": "light-yellow", 1835 | "mode": "fixed" 1836 | } 1837 | } 1838 | ] 1839 | }, 1840 | { 1841 | "matcher": { 1842 | "id": "byName", 1843 | "options": "Stellplatz" 1844 | }, 1845 | "properties": [ 1846 | { 1847 | "id": "color", 1848 | "value": { 1849 | "fixedColor": "dark-orange", 1850 | "mode": "fixed" 1851 | } 1852 | } 1853 | ] 1854 | }, 1855 | { 1856 | "matcher": { 1857 | "id": "byName", 1858 | "options": "PV" 1859 | }, 1860 | "properties": [ 1861 | { 1862 | "id": "color", 1863 | "value": { 1864 | "fixedColor": "green", 1865 | "mode": "fixed" 1866 | } 1867 | } 1868 | ] 1869 | } 1870 | ] 1871 | }, 1872 | "gridPos": { 1873 | "h": 13, 1874 | "w": 19, 1875 | "x": 5, 1876 | "y": 1 1877 | }, 1878 | "id": 25, 1879 | "options": { 1880 | "barRadius": 0, 1881 | "barWidth": 0.7, 1882 | "fullHighlight": false, 1883 | "groupWidth": 0.7, 1884 | "legend": { 1885 | "calcs": [], 1886 | "displayMode": "list", 1887 | "placement": "bottom", 1888 | "showLegend": true 1889 | }, 1890 | "orientation": "vertical", 1891 | "showValue": "never", 1892 | "stacking": "normal", 1893 | "tooltip": { 1894 | "hideZeros": false, 1895 | "mode": "multi", 1896 | "sort": "none" 1897 | }, 1898 | "xField": "Time", 1899 | "xTickLabelRotation": 0, 1900 | "xTickLabelSpacing": 0 1901 | }, 1902 | "pluginVersion": "12.2.1", 1903 | "targets": [ 1904 | { 1905 | "alias": "PV", 1906 | "datasource": { 1907 | "type": "influxdb", 1908 | "uid": "${DS_EVCC_AGGREGRATIONS}" 1909 | }, 1910 | "groupBy": [ 1911 | { 1912 | "params": [ 1913 | "$__interval" 1914 | ], 1915 | "type": "time" 1916 | }, 1917 | { 1918 | "params": [ 1919 | "null" 1920 | ], 1921 | "type": "fill" 1922 | } 1923 | ], 1924 | "hide": false, 1925 | "orderByTime": "ASC", 1926 | "policy": "default", 1927 | "query": "SELECT value FROM pvDailyEnergy WHERE $timeFilter tz('$timezone')", 1928 | "rawQuery": true, 1929 | "refId": "pvEnergy", 1930 | "resultFormat": "time_series", 1931 | "select": [ 1932 | [ 1933 | { 1934 | "params": [ 1935 | "value" 1936 | ], 1937 | "type": "field" 1938 | }, 1939 | { 1940 | "params": [], 1941 | "type": "mean" 1942 | } 1943 | ] 1944 | ], 1945 | "tags": [] 1946 | }, 1947 | { 1948 | "alias": "Netzbezug", 1949 | "datasource": { 1950 | "type": "influxdb", 1951 | "uid": "${DS_EVCC_AGGREGRATIONS}" 1952 | }, 1953 | "groupBy": [ 1954 | { 1955 | "params": [ 1956 | "$__interval" 1957 | ], 1958 | "type": "time" 1959 | }, 1960 | { 1961 | "params": [ 1962 | "null" 1963 | ], 1964 | "type": "fill" 1965 | } 1966 | ], 1967 | "hide": false, 1968 | "orderByTime": "ASC", 1969 | "policy": "default", 1970 | "query": "SELECT value FROM gridDailyEnergy WHERE $timeFilter tz('$timezone')", 1971 | "rawQuery": true, 1972 | "refId": "zugekauft", 1973 | "resultFormat": "time_series", 1974 | "select": [ 1975 | [ 1976 | { 1977 | "params": [ 1978 | "value" 1979 | ], 1980 | "type": "field" 1981 | }, 1982 | { 1983 | "params": [], 1984 | "type": "mean" 1985 | } 1986 | ] 1987 | ], 1988 | "tags": [] 1989 | }, 1990 | { 1991 | "alias": "Haus", 1992 | "datasource": { 1993 | "type": "influxdb", 1994 | "uid": "${DS_EVCC_AGGREGRATIONS}" 1995 | }, 1996 | "hide": false, 1997 | "query": "SELECT value * (-1) FROM homeDailyEnergy WHERE $timeFilter tz('$timezone')", 1998 | "rawQuery": true, 1999 | "refId": "haus", 2000 | "resultFormat": "time_series" 2001 | }, 2002 | { 2003 | "alias": "$tag_loadpoint", 2004 | "datasource": { 2005 | "type": "influxdb", 2006 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2007 | }, 2008 | "hide": false, 2009 | "query": "SELECT value * (-1) FROM loadpointDailyEnergy WHERE $timeFilter AND \"loadpoint\"::tag !~ $loadpointBlocklist GROUP BY (\"loadpoint\"::tag) tz('$timezone')", 2010 | "rawQuery": true, 2011 | "refId": "loadpoints", 2012 | "resultFormat": "time_series" 2013 | }, 2014 | { 2015 | "alias": "Einspeisung", 2016 | "datasource": { 2017 | "type": "influxdb", 2018 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2019 | }, 2020 | "groupBy": [ 2021 | { 2022 | "params": [ 2023 | "$__interval" 2024 | ], 2025 | "type": "time" 2026 | }, 2027 | { 2028 | "params": [ 2029 | "null" 2030 | ], 2031 | "type": "fill" 2032 | } 2033 | ], 2034 | "hide": false, 2035 | "orderByTime": "ASC", 2036 | "policy": "default", 2037 | "query": "SELECT value * (-1) FROM feedInDailyEnergy WHERE $timeFilter tz('$timezone')", 2038 | "rawQuery": true, 2039 | "refId": "eingespeist", 2040 | "resultFormat": "time_series", 2041 | "select": [ 2042 | [ 2043 | { 2044 | "params": [ 2045 | "value" 2046 | ], 2047 | "type": "field" 2048 | }, 2049 | { 2050 | "params": [], 2051 | "type": "mean" 2052 | } 2053 | ] 2054 | ], 2055 | "tags": [] 2056 | } 2057 | ], 2058 | "title": "Energie", 2059 | "type": "barchart" 2060 | }, 2061 | { 2062 | "datasource": { 2063 | "type": "influxdb", 2064 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2065 | }, 2066 | "description": "", 2067 | "fieldConfig": { 2068 | "defaults": { 2069 | "color": { 2070 | "fixedColor": "text", 2071 | "mode": "fixed" 2072 | }, 2073 | "mappings": [], 2074 | "thresholds": { 2075 | "mode": "absolute", 2076 | "steps": [ 2077 | { 2078 | "color": "green", 2079 | "value": 0 2080 | } 2081 | ] 2082 | }, 2083 | "unit": "kWh/kWp" 2084 | }, 2085 | "overrides": [] 2086 | }, 2087 | "gridPos": { 2088 | "h": 3, 2089 | "w": 5, 2090 | "x": 0, 2091 | "y": 11 2092 | }, 2093 | "id": 22, 2094 | "options": { 2095 | "colorMode": "value", 2096 | "graphMode": "area", 2097 | "justifyMode": "auto", 2098 | "orientation": "horizontal", 2099 | "percentChangeColorMode": "standard", 2100 | "reduceOptions": { 2101 | "calcs": [ 2102 | "lastNotNull" 2103 | ], 2104 | "fields": "", 2105 | "values": false 2106 | }, 2107 | "showPercentChange": false, 2108 | "text": { 2109 | "titleSize": 12, 2110 | "valueSize": 20 2111 | }, 2112 | "textMode": "auto", 2113 | "wideLayout": true 2114 | }, 2115 | "pluginVersion": "12.2.1", 2116 | "targets": [ 2117 | { 2118 | "alias": "PV", 2119 | "datasource": { 2120 | "type": "influxdb", 2121 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2122 | }, 2123 | "groupBy": [ 2124 | { 2125 | "params": [ 2126 | "1h" 2127 | ], 2128 | "type": "time" 2129 | }, 2130 | { 2131 | "params": [ 2132 | "null" 2133 | ], 2134 | "type": "fill" 2135 | } 2136 | ], 2137 | "hide": true, 2138 | "measurement": "pvPower", 2139 | "orderByTime": "ASC", 2140 | "policy": "default", 2141 | "query": "SELECT sum(\"value\") from pvDailyEnergy WHERE $timeFilter tz('$timezone')", 2142 | "rawQuery": true, 2143 | "refId": "pvEnergy", 2144 | "resultFormat": "time_series", 2145 | "select": [ 2146 | [ 2147 | { 2148 | "params": [ 2149 | "value" 2150 | ], 2151 | "type": "field" 2152 | }, 2153 | { 2154 | "params": [], 2155 | "type": "mean" 2156 | } 2157 | ] 2158 | ], 2159 | "tags": [] 2160 | }, 2161 | { 2162 | "datasource": { 2163 | "type": "__expr__", 2164 | "uid": "${DS_EXPRESSION}" 2165 | }, 2166 | "expression": "$pvEnergy/$installedWattPeak", 2167 | "hide": false, 2168 | "refId": "PV Energie/kWp", 2169 | "type": "math" 2170 | } 2171 | ], 2172 | "title": "Spezifischer Ertrag", 2173 | "transparent": true, 2174 | "type": "stat" 2175 | }, 2176 | { 2177 | "gridPos": { 2178 | "h": 6, 2179 | "w": 5, 2180 | "x": 0, 2181 | "y": 14 2182 | }, 2183 | "id": 24, 2184 | "libraryPanel": { 2185 | "uid": "c872420b-86a9-4544-9e33-f367a07f9e40", 2186 | "name": "EVCC: Kennzahlen Gauges" 2187 | } 2188 | }, 2189 | { 2190 | "datasource": { 2191 | "type": "influxdb", 2192 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2193 | }, 2194 | "description": "", 2195 | "fieldConfig": { 2196 | "defaults": { 2197 | "color": { 2198 | "fixedColor": "blue", 2199 | "mode": "fixed" 2200 | }, 2201 | "custom": { 2202 | "axisBorderShow": false, 2203 | "axisCenteredZero": false, 2204 | "axisColorMode": "text", 2205 | "axisLabel": "", 2206 | "axisPlacement": "auto", 2207 | "axisWidth": 80, 2208 | "fillOpacity": 100, 2209 | "gradientMode": "none", 2210 | "hideFrom": { 2211 | "legend": false, 2212 | "tooltip": false, 2213 | "viz": false 2214 | }, 2215 | "lineWidth": 1, 2216 | "scaleDistribution": { 2217 | "type": "linear" 2218 | }, 2219 | "thresholdsStyle": { 2220 | "mode": "off" 2221 | } 2222 | }, 2223 | "links": [ 2224 | { 2225 | "title": "PV Today", 2226 | "url": "/d/7Ou-Y1Rgk/pv-today-tablet?orgId=1&time=${__value.time}&time.window=86400000" 2227 | } 2228 | ], 2229 | "mappings": [], 2230 | "max": 1, 2231 | "min": 0, 2232 | "thresholds": { 2233 | "mode": "absolute", 2234 | "steps": [ 2235 | { 2236 | "color": "purple", 2237 | "value": 0 2238 | } 2239 | ] 2240 | }, 2241 | "unit": "percentunit" 2242 | }, 2243 | "overrides": [ 2244 | { 2245 | "matcher": { 2246 | "id": "byName", 2247 | "options": "Eigenverbrauch" 2248 | }, 2249 | "properties": [ 2250 | { 2251 | "id": "color", 2252 | "value": { 2253 | "fixedColor": "purple", 2254 | "mode": "fixed" 2255 | } 2256 | }, 2257 | { 2258 | "id": "displayName", 2259 | "value": "Eigenverbrauch" 2260 | } 2261 | ] 2262 | }, 2263 | { 2264 | "matcher": { 2265 | "id": "byName", 2266 | "options": "Autarkie" 2267 | }, 2268 | "properties": [ 2269 | { 2270 | "id": "color", 2271 | "value": { 2272 | "fixedColor": "green", 2273 | "mode": "fixed" 2274 | } 2275 | }, 2276 | { 2277 | "id": "displayName", 2278 | "value": "Autarkie" 2279 | } 2280 | ] 2281 | } 2282 | ] 2283 | }, 2284 | "gridPos": { 2285 | "h": 6, 2286 | "w": 19, 2287 | "x": 5, 2288 | "y": 14 2289 | }, 2290 | "id": 6, 2291 | "options": { 2292 | "barRadius": 0.2, 2293 | "barWidth": 0.97, 2294 | "fullHighlight": false, 2295 | "groupWidth": 0.7, 2296 | "legend": { 2297 | "calcs": [], 2298 | "displayMode": "list", 2299 | "placement": "bottom", 2300 | "showLegend": true 2301 | }, 2302 | "orientation": "auto", 2303 | "showValue": "auto", 2304 | "stacking": "none", 2305 | "tooltip": { 2306 | "hideZeros": false, 2307 | "mode": "multi", 2308 | "sort": "none" 2309 | }, 2310 | "xField": "Time", 2311 | "xTickLabelRotation": 0, 2312 | "xTickLabelSpacing": 0 2313 | }, 2314 | "pluginVersion": "12.2.1", 2315 | "targets": [ 2316 | { 2317 | "datasource": { 2318 | "type": "influxdb", 2319 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2320 | }, 2321 | "hide": true, 2322 | "query": "SELECT value FROM gridDailyEnergy WHERE $timeFilter tz('$timezone')", 2323 | "rawQuery": true, 2324 | "refId": "zugekaufteEnergie", 2325 | "resultFormat": "time_series" 2326 | }, 2327 | { 2328 | "datasource": { 2329 | "type": "influxdb", 2330 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2331 | }, 2332 | "groupBy": [ 2333 | { 2334 | "params": [ 2335 | "$__interval" 2336 | ], 2337 | "type": "time" 2338 | }, 2339 | { 2340 | "params": [ 2341 | "null" 2342 | ], 2343 | "type": "fill" 2344 | } 2345 | ], 2346 | "hide": true, 2347 | "orderByTime": "ASC", 2348 | "policy": "default", 2349 | "query": "SELECT SUM(\"last\") FROM\n(\n SELECT last(\"value\") FROM \"loadpointDailyEnergy\" WHERE $timeFilter GROUP BY time(1d),\"loadpoint\"::tag tz('$timezone')\n) GROUP BY time(1d) tz('$timezone')", 2350 | "rawQuery": true, 2351 | "refId": "energieLoadpoints", 2352 | "resultFormat": "time_series", 2353 | "select": [ 2354 | [ 2355 | { 2356 | "params": [ 2357 | "value" 2358 | ], 2359 | "type": "field" 2360 | }, 2361 | { 2362 | "params": [], 2363 | "type": "mean" 2364 | } 2365 | ] 2366 | ], 2367 | "tags": [] 2368 | }, 2369 | { 2370 | "datasource": { 2371 | "type": "influxdb", 2372 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2373 | }, 2374 | "groupBy": [ 2375 | { 2376 | "params": [ 2377 | "$__interval" 2378 | ], 2379 | "type": "time" 2380 | }, 2381 | { 2382 | "params": [ 2383 | "null" 2384 | ], 2385 | "type": "fill" 2386 | } 2387 | ], 2388 | "hide": true, 2389 | "orderByTime": "ASC", 2390 | "policy": "default", 2391 | "query": "SELECT value FROM homeDailyEnergy WHERE $timeFilter tz('$timezone')", 2392 | "rawQuery": true, 2393 | "refId": "energieHaus", 2394 | "resultFormat": "time_series", 2395 | "select": [ 2396 | [ 2397 | { 2398 | "params": [ 2399 | "value" 2400 | ], 2401 | "type": "field" 2402 | }, 2403 | { 2404 | "params": [], 2405 | "type": "mean" 2406 | } 2407 | ] 2408 | ], 2409 | "tags": [] 2410 | }, 2411 | { 2412 | "datasource": { 2413 | "type": "__expr__", 2414 | "uid": "${DS_EXPRESSION}" 2415 | }, 2416 | "expression": "1-$zugekaufteEnergie/($energieLoadpoints + $energieHaus)", 2417 | "hide": false, 2418 | "refId": "Autarkie", 2419 | "type": "math" 2420 | }, 2421 | { 2422 | "datasource": { 2423 | "type": "influxdb", 2424 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2425 | }, 2426 | "groupBy": [ 2427 | { 2428 | "params": [ 2429 | "$__interval" 2430 | ], 2431 | "type": "time" 2432 | }, 2433 | { 2434 | "params": [ 2435 | "null" 2436 | ], 2437 | "type": "fill" 2438 | } 2439 | ], 2440 | "hide": true, 2441 | "orderByTime": "ASC", 2442 | "policy": "default", 2443 | "query": "SELECT value FROM pvDailyEnergy WHERE $timeFilter tz('$timezone')", 2444 | "rawQuery": true, 2445 | "refId": "energiePV", 2446 | "resultFormat": "time_series", 2447 | "select": [ 2448 | [ 2449 | { 2450 | "params": [ 2451 | "value" 2452 | ], 2453 | "type": "field" 2454 | }, 2455 | { 2456 | "params": [], 2457 | "type": "mean" 2458 | } 2459 | ] 2460 | ], 2461 | "tags": [] 2462 | }, 2463 | { 2464 | "datasource": { 2465 | "type": "influxdb", 2466 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2467 | }, 2468 | "hide": true, 2469 | "query": "SELECT value FROM feedInDailyEnergy WHERE $timeFilter tz('$timezone')", 2470 | "rawQuery": true, 2471 | "refId": "eingespeisteEnergie", 2472 | "resultFormat": "time_series" 2473 | }, 2474 | { 2475 | "datasource": { 2476 | "type": "__expr__", 2477 | "uid": "${DS_EXPRESSION}" 2478 | }, 2479 | "expression": "($energiePV - $eingespeisteEnergie)/$energiePV", 2480 | "hide": false, 2481 | "refId": "Eigenverbrauch", 2482 | "type": "math" 2483 | } 2484 | ], 2485 | "title": "Kennzahlen", 2486 | "type": "barchart" 2487 | }, 2488 | { 2489 | "collapsed": false, 2490 | "gridPos": { 2491 | "h": 1, 2492 | "w": 24, 2493 | "x": 0, 2494 | "y": 20 2495 | }, 2496 | "id": 34, 2497 | "panels": [], 2498 | "title": "Haus", 2499 | "type": "row" 2500 | }, 2501 | { 2502 | "datasource": { 2503 | "type": "influxdb", 2504 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2505 | }, 2506 | "description": "Die Formel für 'Sonstige' muss je nach Verfügbarkeit von AUX und EXT Metern angepasst werden. Siehe https://github.com/ha-puzzles/evcc-grafana-dashboards/tree/main/dashboards#formel-für-sonstige-anpassen für mehr Informationen.", 2507 | "fieldConfig": { 2508 | "defaults": { 2509 | "color": { 2510 | "fixedColor": "orange", 2511 | "mode": "palette-classic-by-name" 2512 | }, 2513 | "custom": { 2514 | "hideFrom": { 2515 | "legend": false, 2516 | "tooltip": false, 2517 | "viz": false 2518 | } 2519 | }, 2520 | "decimals": 2, 2521 | "links": [ 2522 | { 2523 | "title": "PV Today", 2524 | "url": "/d/7Ou-Y1Rgk/pv-today-tablet?orgId=1&time=${__value.time}&time.window=86400000" 2525 | } 2526 | ], 2527 | "mappings": [], 2528 | "unit": "watth" 2529 | }, 2530 | "overrides": [ 2531 | { 2532 | "matcher": { 2533 | "id": "byName", 2534 | "options": "Sonstige" 2535 | }, 2536 | "properties": [ 2537 | { 2538 | "id": "color", 2539 | "value": { 2540 | "fixedColor": "#808080", 2541 | "mode": "fixed" 2542 | } 2543 | } 2544 | ] 2545 | } 2546 | ] 2547 | }, 2548 | "gridPos": { 2549 | "h": 11, 2550 | "w": 5, 2551 | "x": 0, 2552 | "y": 21 2553 | }, 2554 | "id": 32, 2555 | "options": { 2556 | "legend": { 2557 | "displayMode": "table", 2558 | "placement": "bottom", 2559 | "showLegend": true, 2560 | "values": [ 2561 | "value" 2562 | ] 2563 | }, 2564 | "pieType": "donut", 2565 | "reduceOptions": { 2566 | "calcs": [ 2567 | "sum" 2568 | ], 2569 | "fields": "", 2570 | "values": false 2571 | }, 2572 | "sort": "desc", 2573 | "tooltip": { 2574 | "hideZeros": false, 2575 | "mode": "single", 2576 | "sort": "none" 2577 | } 2578 | }, 2579 | "pluginVersion": "12.2.1", 2580 | "targets": [ 2581 | { 2582 | "alias": "Haus", 2583 | "datasource": { 2584 | "type": "influxdb", 2585 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2586 | }, 2587 | "hide": true, 2588 | "query": "SELECT value FROM homeDailyEnergy WHERE $timeFilter tz('$timezone')", 2589 | "rawQuery": true, 2590 | "refId": "homeTotal", 2591 | "resultFormat": "time_series" 2592 | }, 2593 | { 2594 | "alias": "", 2595 | "datasource": { 2596 | "type": "influxdb", 2597 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2598 | }, 2599 | "hide": true, 2600 | "query": "SELECT SUM(value) FROM\n(\n SELECT value FROM extDailyEnergy WHERE $timeFilter AND \"title\"::tag !~ $loadpointBlocklist GROUP BY (\"title\"::tag) tz('$timezone')\n) GROUP BY time(1d) tz('$timezone')", 2601 | "rawQuery": true, 2602 | "refId": "extEnergiesSum", 2603 | "resultFormat": "time_series" 2604 | }, 2605 | { 2606 | "alias": "", 2607 | "datasource": { 2608 | "type": "influxdb", 2609 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2610 | }, 2611 | "hide": true, 2612 | "query": "SELECT SUM(value) FROM\n(\n SELECT value FROM auxDailyEnergy WHERE $timeFilter AND \"title\"::tag !~ $loadpointBlocklist GROUP BY (\"title\"::tag) tz('$timezone')\n) GROUP BY time(1d) tz('$timezone')", 2613 | "rawQuery": true, 2614 | "refId": "auxEnergiesSum", 2615 | "resultFormat": "time_series" 2616 | }, 2617 | { 2618 | "datasource": { 2619 | "type": "__expr__", 2620 | "uid": "${DS_EXPRESSION}" 2621 | }, 2622 | "expression": "$homeTotal - $extEnergiesSum", 2623 | "hide": false, 2624 | "refId": "Sonstige", 2625 | "type": "math" 2626 | }, 2627 | { 2628 | "alias": "$tag_title", 2629 | "datasource": { 2630 | "type": "influxdb", 2631 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2632 | }, 2633 | "hide": false, 2634 | "query": "SELECT value FROM extDailyEnergy WHERE $timeFilter AND \"title\"::tag !~ $loadpointBlocklist GROUP BY (\"title\"::tag) tz('$timezone')", 2635 | "rawQuery": true, 2636 | "refId": "extEnergies", 2637 | "resultFormat": "time_series" 2638 | }, 2639 | { 2640 | "alias": "$tag_title", 2641 | "datasource": { 2642 | "type": "influxdb", 2643 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2644 | }, 2645 | "hide": false, 2646 | "query": "SELECT value FROM auxDailyEnergy WHERE $timeFilter AND \"title\"::tag !~ $loadpointBlocklist GROUP BY (\"title\"::tag) tz('$timezone')", 2647 | "rawQuery": true, 2648 | "refId": "auxEnergies", 2649 | "resultFormat": "time_series" 2650 | } 2651 | ], 2652 | "title": "Haus: Energieverteilung", 2653 | "transparent": true, 2654 | "type": "piechart" 2655 | }, 2656 | { 2657 | "datasource": { 2658 | "type": "influxdb", 2659 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2660 | }, 2661 | "description": "Die Formel für 'Sonstige' muss je nach Verfügbarkeit von AUX und EXT Metern angepasst werden. Siehe https://github.com/ha-puzzles/evcc-grafana-dashboards/tree/main/dashboards#formel-für-sonstige-anpassen für mehr Informationen.", 2662 | "fieldConfig": { 2663 | "defaults": { 2664 | "color": { 2665 | "fixedColor": "orange", 2666 | "mode": "palette-classic-by-name" 2667 | }, 2668 | "custom": { 2669 | "axisBorderShow": false, 2670 | "axisCenteredZero": false, 2671 | "axisColorMode": "text", 2672 | "axisLabel": "", 2673 | "axisPlacement": "auto", 2674 | "fillOpacity": 100, 2675 | "gradientMode": "none", 2676 | "hideFrom": { 2677 | "legend": false, 2678 | "tooltip": false, 2679 | "viz": false 2680 | }, 2681 | "lineWidth": 1, 2682 | "scaleDistribution": { 2683 | "type": "linear" 2684 | }, 2685 | "thresholdsStyle": { 2686 | "mode": "off" 2687 | } 2688 | }, 2689 | "decimals": 2, 2690 | "links": [ 2691 | { 2692 | "title": "PV Today", 2693 | "url": "/d/7Ou-Y1Rgk/pv-today-tablet?orgId=1&time=${__value.time}&time.window=86400000" 2694 | } 2695 | ], 2696 | "mappings": [], 2697 | "thresholds": { 2698 | "mode": "absolute", 2699 | "steps": [ 2700 | { 2701 | "color": "red", 2702 | "value": 0 2703 | }, 2704 | { 2705 | "color": "text", 2706 | "value": 0 2707 | } 2708 | ] 2709 | }, 2710 | "unit": "watth" 2711 | }, 2712 | "overrides": [ 2713 | { 2714 | "matcher": { 2715 | "id": "byName", 2716 | "options": "Sonstige" 2717 | }, 2718 | "properties": [ 2719 | { 2720 | "id": "color", 2721 | "value": { 2722 | "fixedColor": "#808080", 2723 | "mode": "fixed" 2724 | } 2725 | } 2726 | ] 2727 | } 2728 | ] 2729 | }, 2730 | "gridPos": { 2731 | "h": 11, 2732 | "w": 19, 2733 | "x": 5, 2734 | "y": 21 2735 | }, 2736 | "id": 31, 2737 | "options": { 2738 | "barRadius": 0, 2739 | "barWidth": 0.7, 2740 | "fullHighlight": false, 2741 | "groupWidth": 0.7, 2742 | "legend": { 2743 | "calcs": [], 2744 | "displayMode": "table", 2745 | "placement": "right", 2746 | "showLegend": true, 2747 | "sortBy": "Name", 2748 | "sortDesc": false 2749 | }, 2750 | "orientation": "auto", 2751 | "showValue": "never", 2752 | "stacking": "normal", 2753 | "tooltip": { 2754 | "hideZeros": false, 2755 | "mode": "multi", 2756 | "sort": "none" 2757 | }, 2758 | "xField": "Time", 2759 | "xTickLabelRotation": 0, 2760 | "xTickLabelSpacing": 0 2761 | }, 2762 | "pluginVersion": "12.2.1", 2763 | "targets": [ 2764 | { 2765 | "alias": "Haus", 2766 | "datasource": { 2767 | "type": "influxdb", 2768 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2769 | }, 2770 | "hide": true, 2771 | "query": "SELECT value FROM homeDailyEnergy WHERE $timeFilter tz('$timezone')", 2772 | "rawQuery": true, 2773 | "refId": "homeTotal", 2774 | "resultFormat": "time_series" 2775 | }, 2776 | { 2777 | "alias": "", 2778 | "datasource": { 2779 | "type": "influxdb", 2780 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2781 | }, 2782 | "hide": true, 2783 | "query": "SELECT SUM(value) FROM\n(\n SELECT value FROM extDailyEnergy WHERE $timeFilter AND \"title\"::tag !~ $loadpointBlocklist GROUP BY (\"title\"::tag) tz('$timezone')\n) GROUP BY time(1d) tz('$timezone')", 2784 | "rawQuery": true, 2785 | "refId": "extEnergiesSum", 2786 | "resultFormat": "time_series" 2787 | }, 2788 | { 2789 | "alias": "", 2790 | "datasource": { 2791 | "type": "influxdb", 2792 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2793 | }, 2794 | "hide": true, 2795 | "query": "SELECT SUM(value) FROM\n(\n SELECT value FROM auxDailyEnergy WHERE $timeFilter AND \"title\"::tag !~ $loadpointBlocklist GROUP BY (\"title\"::tag) tz('$timezone')\n) GROUP BY time(1d) tz('$timezone')", 2796 | "rawQuery": true, 2797 | "refId": "auxEnergiesSum", 2798 | "resultFormat": "time_series" 2799 | }, 2800 | { 2801 | "datasource": { 2802 | "type": "__expr__", 2803 | "uid": "${DS_EXPRESSION}" 2804 | }, 2805 | "expression": "$homeTotal - $extEnergiesSum", 2806 | "hide": false, 2807 | "refId": "Sonstige", 2808 | "type": "math" 2809 | }, 2810 | { 2811 | "alias": "$tag_title", 2812 | "datasource": { 2813 | "type": "influxdb", 2814 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2815 | }, 2816 | "hide": false, 2817 | "query": "SELECT value FROM extDailyEnergy WHERE $timeFilter AND \"title\"::tag !~ $loadpointBlocklist GROUP BY (\"title\"::tag) tz('$timezone')", 2818 | "rawQuery": true, 2819 | "refId": "extEnergies", 2820 | "resultFormat": "time_series" 2821 | }, 2822 | { 2823 | "alias": "$tag_title", 2824 | "datasource": { 2825 | "type": "influxdb", 2826 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2827 | }, 2828 | "hide": false, 2829 | "query": "SELECT value FROM auxDailyEnergy WHERE $timeFilter AND \"title\"::tag !~ $loadpointBlocklist GROUP BY (\"title\"::tag) tz('$timezone')", 2830 | "rawQuery": true, 2831 | "refId": "auxEnergies", 2832 | "resultFormat": "time_series" 2833 | } 2834 | ], 2835 | "title": "Haus: Energieverbrauch", 2836 | "type": "barchart" 2837 | }, 2838 | { 2839 | "datasource": { 2840 | "type": "influxdb", 2841 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2842 | }, 2843 | "description": "", 2844 | "fieldConfig": { 2845 | "defaults": { 2846 | "color": { 2847 | "fixedColor": "orange", 2848 | "mode": "palette-classic-by-name" 2849 | }, 2850 | "custom": { 2851 | "hideFrom": { 2852 | "legend": false, 2853 | "tooltip": false, 2854 | "viz": false 2855 | } 2856 | }, 2857 | "decimals": 2, 2858 | "links": [ 2859 | { 2860 | "title": "PV Today", 2861 | "url": "/d/7Ou-Y1Rgk/pv-today-tablet?orgId=1&time=${__value.time}&time.window=86400000" 2862 | } 2863 | ], 2864 | "mappings": [], 2865 | "unit": "watth" 2866 | }, 2867 | "overrides": [ 2868 | { 2869 | "matcher": { 2870 | "id": "byName", 2871 | "options": "Haus" 2872 | }, 2873 | "properties": [ 2874 | { 2875 | "id": "color", 2876 | "value": { 2877 | "fixedColor": "purple", 2878 | "mode": "fixed" 2879 | } 2880 | } 2881 | ] 2882 | }, 2883 | { 2884 | "matcher": { 2885 | "id": "byName", 2886 | "options": "Garage" 2887 | }, 2888 | "properties": [ 2889 | { 2890 | "id": "color", 2891 | "value": { 2892 | "fixedColor": "light-orange", 2893 | "mode": "fixed" 2894 | } 2895 | } 2896 | ] 2897 | }, 2898 | { 2899 | "matcher": { 2900 | "id": "byName", 2901 | "options": "Stellplatz" 2902 | }, 2903 | "properties": [ 2904 | { 2905 | "id": "color", 2906 | "value": { 2907 | "fixedColor": "dark-orange", 2908 | "mode": "fixed" 2909 | } 2910 | } 2911 | ] 2912 | }, 2913 | { 2914 | "matcher": { 2915 | "id": "byName", 2916 | "options": "batteryTotal" 2917 | }, 2918 | "properties": [ 2919 | { 2920 | "id": "color", 2921 | "value": { 2922 | "fixedColor": "blue", 2923 | "mode": "fixed" 2924 | } 2925 | }, 2926 | { 2927 | "id": "displayName", 2928 | "value": "Speicher" 2929 | } 2930 | ] 2931 | } 2932 | ] 2933 | }, 2934 | "gridPos": { 2935 | "h": 11, 2936 | "w": 5, 2937 | "x": 0, 2938 | "y": 32 2939 | }, 2940 | "id": 36, 2941 | "options": { 2942 | "legend": { 2943 | "displayMode": "table", 2944 | "placement": "bottom", 2945 | "showLegend": true, 2946 | "values": [ 2947 | "value" 2948 | ] 2949 | }, 2950 | "pieType": "donut", 2951 | "reduceOptions": { 2952 | "calcs": [ 2953 | "sum" 2954 | ], 2955 | "fields": "", 2956 | "values": false 2957 | }, 2958 | "sort": "desc", 2959 | "tooltip": { 2960 | "hideZeros": false, 2961 | "mode": "single", 2962 | "sort": "none" 2963 | } 2964 | }, 2965 | "pluginVersion": "12.2.1", 2966 | "targets": [ 2967 | { 2968 | "alias": "Haus", 2969 | "datasource": { 2970 | "type": "influxdb", 2971 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2972 | }, 2973 | "hide": false, 2974 | "query": "SELECT value FROM homeDailyEnergy WHERE $timeFilter tz('$timezone')", 2975 | "rawQuery": true, 2976 | "refId": "homeTotal", 2977 | "resultFormat": "time_series" 2978 | }, 2979 | { 2980 | "alias": "$tag_loadpoint", 2981 | "datasource": { 2982 | "type": "influxdb", 2983 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2984 | }, 2985 | "hide": false, 2986 | "query": "SELECT value FROM loadpointDailyEnergy WHERE $timeFilter AND \"loadpoint\"::tag !~ $loadpointBlocklist GROUP BY (\"loadpoint\"::tag) tz('$timezone')", 2987 | "rawQuery": true, 2988 | "refId": "loadpointEnergies", 2989 | "resultFormat": "time_series" 2990 | }, 2991 | { 2992 | "alias": "Haus", 2993 | "datasource": { 2994 | "type": "influxdb", 2995 | "uid": "${DS_EVCC_AGGREGRATIONS}" 2996 | }, 2997 | "hide": true, 2998 | "query": "SELECT value FROM chargeDailyEnergy WHERE $timeFilter tz('$timezone')", 2999 | "rawQuery": true, 3000 | "refId": "chargeEnergy", 3001 | "resultFormat": "time_series" 3002 | }, 3003 | { 3004 | "alias": "Haus", 3005 | "datasource": { 3006 | "type": "influxdb", 3007 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3008 | }, 3009 | "hide": true, 3010 | "query": "SELECT value FROM dischargeDailyEnergy WHERE $timeFilter tz('$timezone')", 3011 | "rawQuery": true, 3012 | "refId": "dischargeEnergy", 3013 | "resultFormat": "time_series" 3014 | }, 3015 | { 3016 | "datasource": { 3017 | "type": "__expr__", 3018 | "uid": "${DS_EXPRESSION}" 3019 | }, 3020 | "expression": "$chargeEnergy - $dischargeEnergy", 3021 | "hide": false, 3022 | "refId": "batteryTotal", 3023 | "type": "math" 3024 | } 3025 | ], 3026 | "title": "Gesamt: Energieverteilung", 3027 | "transparent": true, 3028 | "type": "piechart" 3029 | }, 3030 | { 3031 | "datasource": { 3032 | "type": "influxdb", 3033 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3034 | }, 3035 | "description": "", 3036 | "fieldConfig": { 3037 | "defaults": { 3038 | "color": { 3039 | "fixedColor": "orange", 3040 | "mode": "palette-classic-by-name" 3041 | }, 3042 | "custom": { 3043 | "axisBorderShow": false, 3044 | "axisCenteredZero": false, 3045 | "axisColorMode": "text", 3046 | "axisLabel": "", 3047 | "axisPlacement": "auto", 3048 | "fillOpacity": 80, 3049 | "gradientMode": "none", 3050 | "hideFrom": { 3051 | "legend": false, 3052 | "tooltip": false, 3053 | "viz": false 3054 | }, 3055 | "lineWidth": 1, 3056 | "scaleDistribution": { 3057 | "type": "linear" 3058 | }, 3059 | "thresholdsStyle": { 3060 | "mode": "off" 3061 | } 3062 | }, 3063 | "decimals": 2, 3064 | "links": [ 3065 | { 3066 | "title": "PV Today", 3067 | "url": "/d/7Ou-Y1Rgk/pv-today-tablet?orgId=1&time=${__value.time}&time.window=86400000" 3068 | } 3069 | ], 3070 | "mappings": [], 3071 | "thresholds": { 3072 | "mode": "absolute", 3073 | "steps": [ 3074 | { 3075 | "color": "green", 3076 | "value": 0 3077 | }, 3078 | { 3079 | "color": "red", 3080 | "value": 80 3081 | } 3082 | ] 3083 | }, 3084 | "unit": "watth" 3085 | }, 3086 | "overrides": [ 3087 | { 3088 | "matcher": { 3089 | "id": "byName", 3090 | "options": "Haus" 3091 | }, 3092 | "properties": [ 3093 | { 3094 | "id": "color", 3095 | "value": { 3096 | "fixedColor": "purple", 3097 | "mode": "fixed" 3098 | } 3099 | } 3100 | ] 3101 | }, 3102 | { 3103 | "matcher": { 3104 | "id": "byName", 3105 | "options": "Garage" 3106 | }, 3107 | "properties": [ 3108 | { 3109 | "id": "color", 3110 | "value": { 3111 | "fixedColor": "light-orange", 3112 | "mode": "fixed" 3113 | } 3114 | } 3115 | ] 3116 | }, 3117 | { 3118 | "matcher": { 3119 | "id": "byName", 3120 | "options": "Stellplatz" 3121 | }, 3122 | "properties": [ 3123 | { 3124 | "id": "color", 3125 | "value": { 3126 | "fixedColor": "dark-orange", 3127 | "mode": "fixed" 3128 | } 3129 | } 3130 | ] 3131 | }, 3132 | { 3133 | "matcher": { 3134 | "id": "byName", 3135 | "options": "batteryTotal" 3136 | }, 3137 | "properties": [ 3138 | { 3139 | "id": "color", 3140 | "value": { 3141 | "fixedColor": "blue", 3142 | "mode": "fixed" 3143 | } 3144 | }, 3145 | { 3146 | "id": "displayName", 3147 | "value": "Speicher" 3148 | } 3149 | ] 3150 | } 3151 | ] 3152 | }, 3153 | "gridPos": { 3154 | "h": 11, 3155 | "w": 19, 3156 | "x": 5, 3157 | "y": 32 3158 | }, 3159 | "id": 37, 3160 | "options": { 3161 | "barRadius": 0, 3162 | "barWidth": 0.97, 3163 | "fullHighlight": false, 3164 | "groupWidth": 0.7, 3165 | "legend": { 3166 | "calcs": [], 3167 | "displayMode": "list", 3168 | "placement": "bottom", 3169 | "showLegend": true 3170 | }, 3171 | "orientation": "auto", 3172 | "showValue": "auto", 3173 | "stacking": "normal", 3174 | "tooltip": { 3175 | "hideZeros": false, 3176 | "mode": "single", 3177 | "sort": "none" 3178 | }, 3179 | "xTickLabelRotation": 0, 3180 | "xTickLabelSpacing": 0 3181 | }, 3182 | "pluginVersion": "12.2.1", 3183 | "targets": [ 3184 | { 3185 | "alias": "Haus", 3186 | "datasource": { 3187 | "type": "influxdb", 3188 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3189 | }, 3190 | "groupBy": [ 3191 | { 3192 | "params": [ 3193 | "$__interval" 3194 | ], 3195 | "type": "time" 3196 | }, 3197 | { 3198 | "params": [ 3199 | "null" 3200 | ], 3201 | "type": "fill" 3202 | } 3203 | ], 3204 | "hide": true, 3205 | "orderByTime": "ASC", 3206 | "policy": "default", 3207 | "query": "SELECT value FROM chargeDailyEnergy WHERE $timeFilter tz('$timezone')", 3208 | "rawQuery": true, 3209 | "refId": "chargeEnergy", 3210 | "resultFormat": "time_series", 3211 | "select": [ 3212 | [ 3213 | { 3214 | "params": [ 3215 | "value" 3216 | ], 3217 | "type": "field" 3218 | }, 3219 | { 3220 | "params": [], 3221 | "type": "mean" 3222 | } 3223 | ] 3224 | ], 3225 | "tags": [] 3226 | }, 3227 | { 3228 | "alias": "Haus", 3229 | "datasource": { 3230 | "type": "influxdb", 3231 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3232 | }, 3233 | "groupBy": [ 3234 | { 3235 | "params": [ 3236 | "$__interval" 3237 | ], 3238 | "type": "time" 3239 | }, 3240 | { 3241 | "params": [ 3242 | "null" 3243 | ], 3244 | "type": "fill" 3245 | } 3246 | ], 3247 | "hide": true, 3248 | "orderByTime": "ASC", 3249 | "policy": "default", 3250 | "query": "SELECT value FROM dischargeDailyEnergy WHERE $timeFilter tz('$timezone')", 3251 | "rawQuery": true, 3252 | "refId": "dischargeEnergy", 3253 | "resultFormat": "time_series", 3254 | "select": [ 3255 | [ 3256 | { 3257 | "params": [ 3258 | "value" 3259 | ], 3260 | "type": "field" 3261 | }, 3262 | { 3263 | "params": [], 3264 | "type": "mean" 3265 | } 3266 | ] 3267 | ], 3268 | "tags": [] 3269 | }, 3270 | { 3271 | "datasource": { 3272 | "type": "__expr__", 3273 | "uid": "${DS_EXPRESSION}" 3274 | }, 3275 | "expression": "$chargeEnergy-$dischargeEnergy", 3276 | "hide": false, 3277 | "refId": "batteryTotal", 3278 | "type": "math" 3279 | }, 3280 | { 3281 | "alias": "Haus", 3282 | "datasource": { 3283 | "type": "influxdb", 3284 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3285 | }, 3286 | "hide": false, 3287 | "query": "SELECT value FROM homeDailyEnergy WHERE $timeFilter tz('$timezone')", 3288 | "rawQuery": true, 3289 | "refId": "homeTotal", 3290 | "resultFormat": "time_series" 3291 | }, 3292 | { 3293 | "alias": "$tag_loadpoint", 3294 | "datasource": { 3295 | "type": "influxdb", 3296 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3297 | }, 3298 | "hide": false, 3299 | "query": "SELECT value FROM loadpointDailyEnergy WHERE $timeFilter AND \"loadpoint\"::tag !~ $loadpointBlocklist GROUP BY (\"loadpoint\"::tag) tz('$timezone')", 3300 | "rawQuery": true, 3301 | "refId": "loadpointEnergies", 3302 | "resultFormat": "time_series" 3303 | } 3304 | ], 3305 | "title": "Gesamt: Energieverteilung", 3306 | "transparent": true, 3307 | "type": "barchart" 3308 | }, 3309 | { 3310 | "gridPos": { 3311 | "h": 15, 3312 | "w": 5, 3313 | "x": 0, 3314 | "y": 43 3315 | }, 3316 | "id": 30, 3317 | "libraryPanel": { 3318 | "uid": "feio30f3nm0owe", 3319 | "name": "EVCC: Strombilanz" 3320 | } 3321 | }, 3322 | { 3323 | "gridPos": { 3324 | "h": 8, 3325 | "w": 19, 3326 | "x": 5, 3327 | "y": 43 3328 | }, 3329 | "id": 26, 3330 | "libraryPanel": { 3331 | "uid": "ae8zwbjv24kqof", 3332 | "name": "EVCC: Dynamischer Strompreis: Täglich" 3333 | } 3334 | }, 3335 | { 3336 | "datasource": { 3337 | "type": "influxdb", 3338 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3339 | }, 3340 | "fieldConfig": { 3341 | "defaults": { 3342 | "color": { 3343 | "mode": "fixed" 3344 | }, 3345 | "custom": { 3346 | "axisBorderShow": false, 3347 | "axisCenteredZero": false, 3348 | "axisColorMode": "text", 3349 | "axisLabel": "", 3350 | "axisPlacement": "auto", 3351 | "axisWidth": 80, 3352 | "fillOpacity": 100, 3353 | "gradientMode": "none", 3354 | "hideFrom": { 3355 | "legend": false, 3356 | "tooltip": false, 3357 | "viz": false 3358 | }, 3359 | "lineWidth": 1, 3360 | "scaleDistribution": { 3361 | "type": "linear" 3362 | }, 3363 | "thresholdsStyle": { 3364 | "mode": "off" 3365 | } 3366 | }, 3367 | "decimals": 2, 3368 | "links": [ 3369 | { 3370 | "title": "PV Today", 3371 | "url": "/d/7Ou-Y1Rgk/pv-today-tablet?orgId=1&time=${__value.time}&time.window=86400000" 3372 | } 3373 | ], 3374 | "mappings": [], 3375 | "thresholds": { 3376 | "mode": "absolute", 3377 | "steps": [ 3378 | { 3379 | "color": "green", 3380 | "value": 0 3381 | }, 3382 | { 3383 | "color": "red", 3384 | "value": 0 3385 | } 3386 | ] 3387 | }, 3388 | "unit": "currencyEUR" 3389 | }, 3390 | "overrides": [ 3391 | { 3392 | "matcher": { 3393 | "id": "byName", 3394 | "options": "Einkauf" 3395 | }, 3396 | "properties": [ 3397 | { 3398 | "id": "color", 3399 | "value": { 3400 | "fixedColor": "red", 3401 | "mode": "fixed" 3402 | } 3403 | } 3404 | ] 3405 | }, 3406 | { 3407 | "matcher": { 3408 | "id": "byName", 3409 | "options": "Verkauf" 3410 | }, 3411 | "properties": [ 3412 | { 3413 | "id": "color", 3414 | "value": { 3415 | "fixedColor": "green", 3416 | "mode": "fixed" 3417 | } 3418 | } 3419 | ] 3420 | }, 3421 | { 3422 | "matcher": { 3423 | "id": "byName", 3424 | "options": "total" 3425 | }, 3426 | "properties": [ 3427 | { 3428 | "id": "displayName", 3429 | "value": "Bilanz" 3430 | }, 3431 | { 3432 | "id": "color", 3433 | "value": { 3434 | "fixedColor": "blue", 3435 | "mode": "fixed" 3436 | } 3437 | } 3438 | ] 3439 | } 3440 | ] 3441 | }, 3442 | "gridPos": { 3443 | "h": 7, 3444 | "w": 19, 3445 | "x": 5, 3446 | "y": 51 3447 | }, 3448 | "id": 28, 3449 | "options": { 3450 | "barRadius": 0.2, 3451 | "barWidth": 0.97, 3452 | "fullHighlight": false, 3453 | "groupWidth": 0.7, 3454 | "legend": { 3455 | "calcs": [], 3456 | "displayMode": "list", 3457 | "placement": "bottom", 3458 | "showLegend": true 3459 | }, 3460 | "orientation": "auto", 3461 | "showValue": "auto", 3462 | "stacking": "none", 3463 | "tooltip": { 3464 | "hideZeros": false, 3465 | "mode": "multi", 3466 | "sort": "none" 3467 | }, 3468 | "xTickLabelRotation": 0, 3469 | "xTickLabelSpacing": 0 3470 | }, 3471 | "pluginVersion": "12.2.1", 3472 | "targets": [ 3473 | { 3474 | "alias": "Einkauf", 3475 | "datasource": { 3476 | "type": "influxdb", 3477 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3478 | }, 3479 | "groupBy": [ 3480 | { 3481 | "params": [ 3482 | "1d" 3483 | ], 3484 | "type": "time" 3485 | }, 3486 | { 3487 | "params": [ 3488 | "null" 3489 | ], 3490 | "type": "fill" 3491 | } 3492 | ], 3493 | "measurement": "pvPower", 3494 | "orderByTime": "ASC", 3495 | "policy": "default", 3496 | "query": "SELECT value FROM energyPurchasedDailyPrice WHERE $timeFilter tz('$timezone')", 3497 | "rawQuery": true, 3498 | "refId": "purchased", 3499 | "resultFormat": "time_series", 3500 | "select": [ 3501 | [ 3502 | { 3503 | "params": [ 3504 | "value" 3505 | ], 3506 | "type": "field" 3507 | }, 3508 | { 3509 | "params": [], 3510 | "type": "max" 3511 | } 3512 | ] 3513 | ], 3514 | "tags": [] 3515 | }, 3516 | { 3517 | "alias": "Verkauf", 3518 | "datasource": { 3519 | "type": "influxdb", 3520 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3521 | }, 3522 | "groupBy": [ 3523 | { 3524 | "params": [ 3525 | "1d" 3526 | ], 3527 | "type": "time" 3528 | }, 3529 | { 3530 | "params": [ 3531 | "null" 3532 | ], 3533 | "type": "fill" 3534 | } 3535 | ], 3536 | "hide": false, 3537 | "measurement": "pvPower", 3538 | "orderByTime": "ASC", 3539 | "policy": "default", 3540 | "query": "SELECT value FROM energySoldDailyPrice WHERE $timeFilter tz('$timezone')", 3541 | "rawQuery": true, 3542 | "refId": "sold", 3543 | "resultFormat": "time_series", 3544 | "select": [ 3545 | [ 3546 | { 3547 | "params": [ 3548 | "value" 3549 | ], 3550 | "type": "field" 3551 | }, 3552 | { 3553 | "params": [], 3554 | "type": "max" 3555 | } 3556 | ] 3557 | ], 3558 | "tags": [] 3559 | }, 3560 | { 3561 | "datasource": { 3562 | "type": "__expr__", 3563 | "uid": "${DS_EXPRESSION}" 3564 | }, 3565 | "expression": "$purchased + $sold", 3566 | "hide": true, 3567 | "refId": "total", 3568 | "type": "math" 3569 | } 3570 | ], 3571 | "title": "Stromkosten", 3572 | "type": "barchart" 3573 | }, 3574 | { 3575 | "collapsed": false, 3576 | "gridPos": { 3577 | "h": 1, 3578 | "w": 24, 3579 | "x": 0, 3580 | "y": 58 3581 | }, 3582 | "id": 35, 3583 | "panels": [], 3584 | "title": "Speicher", 3585 | "type": "row" 3586 | }, 3587 | { 3588 | "gridPos": { 3589 | "h": 7, 3590 | "w": 5, 3591 | "x": 0, 3592 | "y": 59 3593 | }, 3594 | "id": 16, 3595 | "libraryPanel": { 3596 | "uid": "b8787739-953e-4188-9507-0cc12b6ed91b", 3597 | "name": "EVCC: Speicher Effizenz" 3598 | } 3599 | }, 3600 | { 3601 | "datasource": { 3602 | "type": "influxdb", 3603 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3604 | }, 3605 | "description": "", 3606 | "fieldConfig": { 3607 | "defaults": { 3608 | "color": { 3609 | "mode": "fixed" 3610 | }, 3611 | "custom": { 3612 | "axisBorderShow": false, 3613 | "axisCenteredZero": false, 3614 | "axisColorMode": "text", 3615 | "axisLabel": "", 3616 | "axisPlacement": "auto", 3617 | "axisWidth": 80, 3618 | "fillOpacity": 100, 3619 | "gradientMode": "none", 3620 | "hideFrom": { 3621 | "legend": false, 3622 | "tooltip": false, 3623 | "viz": false 3624 | }, 3625 | "lineWidth": 1, 3626 | "scaleDistribution": { 3627 | "type": "linear" 3628 | }, 3629 | "thresholdsStyle": { 3630 | "mode": "off" 3631 | } 3632 | }, 3633 | "links": [ 3634 | { 3635 | "title": "PV Today", 3636 | "url": "/d/7Ou-Y1Rgk/pv-today-tablet?orgId=1&time=${__value.time}&time.window=86400000" 3637 | } 3638 | ], 3639 | "mappings": [], 3640 | "thresholds": { 3641 | "mode": "absolute", 3642 | "steps": [ 3643 | { 3644 | "color": "green", 3645 | "value": 0 3646 | }, 3647 | { 3648 | "color": "red", 3649 | "value": 80 3650 | } 3651 | ] 3652 | } 3653 | }, 3654 | "overrides": [ 3655 | { 3656 | "matcher": { 3657 | "id": "byName", 3658 | "options": "Speicher max" 3659 | }, 3660 | "properties": [ 3661 | { 3662 | "id": "color", 3663 | "value": { 3664 | "fixedColor": "blue", 3665 | "mode": "fixed" 3666 | } 3667 | } 3668 | ] 3669 | }, 3670 | { 3671 | "matcher": { 3672 | "id": "byName", 3673 | "options": "Speicher min" 3674 | }, 3675 | "properties": [ 3676 | { 3677 | "id": "color", 3678 | "value": { 3679 | "fixedColor": "#686868", 3680 | "mode": "fixed" 3681 | } 3682 | } 3683 | ] 3684 | } 3685 | ] 3686 | }, 3687 | "gridPos": { 3688 | "h": 7, 3689 | "w": 19, 3690 | "x": 5, 3691 | "y": 59 3692 | }, 3693 | "id": 11, 3694 | "options": { 3695 | "barRadius": 0.2, 3696 | "barWidth": 0.97, 3697 | "fullHighlight": false, 3698 | "groupWidth": 0.7, 3699 | "legend": { 3700 | "calcs": [], 3701 | "displayMode": "list", 3702 | "placement": "bottom", 3703 | "showLegend": true 3704 | }, 3705 | "orientation": "auto", 3706 | "showValue": "auto", 3707 | "stacking": "none", 3708 | "tooltip": { 3709 | "hideZeros": false, 3710 | "mode": "multi", 3711 | "sort": "none" 3712 | }, 3713 | "xTickLabelRotation": 0, 3714 | "xTickLabelSpacing": 0 3715 | }, 3716 | "pluginVersion": "12.2.1", 3717 | "targets": [ 3718 | { 3719 | "alias": "Speicher max", 3720 | "datasource": { 3721 | "type": "influxdb", 3722 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3723 | }, 3724 | "groupBy": [ 3725 | { 3726 | "params": [ 3727 | "10m" 3728 | ], 3729 | "type": "time" 3730 | }, 3731 | { 3732 | "params": [ 3733 | "none" 3734 | ], 3735 | "type": "fill" 3736 | } 3737 | ], 3738 | "hide": false, 3739 | "measurement": "batterySoc", 3740 | "orderByTime": "ASC", 3741 | "policy": "default", 3742 | "query": "SELECT \"value\" FROM \"batteryMaxSoc\" WHERE $timeFilter tz('$timezone')", 3743 | "rawQuery": true, 3744 | "refId": "soc_max", 3745 | "resultFormat": "time_series", 3746 | "select": [ 3747 | [ 3748 | { 3749 | "params": [ 3750 | "value" 3751 | ], 3752 | "type": "field" 3753 | }, 3754 | { 3755 | "params": [], 3756 | "type": "max" 3757 | } 3758 | ] 3759 | ], 3760 | "tags": [] 3761 | }, 3762 | { 3763 | "alias": "Speicher min", 3764 | "datasource": { 3765 | "type": "influxdb", 3766 | "uid": "${DS_EVCC_AGGREGRATIONS}" 3767 | }, 3768 | "groupBy": [ 3769 | { 3770 | "params": [ 3771 | "10m" 3772 | ], 3773 | "type": "time" 3774 | }, 3775 | { 3776 | "params": [ 3777 | "none" 3778 | ], 3779 | "type": "fill" 3780 | } 3781 | ], 3782 | "hide": false, 3783 | "measurement": "batterySoc", 3784 | "orderByTime": "ASC", 3785 | "policy": "default", 3786 | "query": "SELECT \"value\" FROM \"batteryMinSoc\" WHERE $timeFilter tz('$timezone')", 3787 | "rawQuery": true, 3788 | "refId": "soc_min", 3789 | "resultFormat": "time_series", 3790 | "select": [ 3791 | [ 3792 | { 3793 | "params": [ 3794 | "value" 3795 | ], 3796 | "type": "field" 3797 | }, 3798 | { 3799 | "params": [], 3800 | "type": "max" 3801 | } 3802 | ] 3803 | ], 3804 | "tags": [] 3805 | } 3806 | ], 3807 | "title": "Hausspeicher Stände", 3808 | "type": "barchart" 3809 | } 3810 | ], 3811 | "refresh": "", 3812 | "schemaVersion": 42, 3813 | "tags": [ 3814 | "PV" 3815 | ], 3816 | "templating": { 3817 | "list": [ 3818 | { 3819 | "description": "Zeitzone: TZ Identifier wie hier gelistet: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List", 3820 | "hide": 2, 3821 | "label": "Zeitzone", 3822 | "name": "timezone", 3823 | "query": "${VAR_TIMEZONE}", 3824 | "skipUrlSync": true, 3825 | "type": "constant", 3826 | "current": { 3827 | "value": "${VAR_TIMEZONE}", 3828 | "text": "${VAR_TIMEZONE}", 3829 | "selected": false 3830 | }, 3831 | "options": [ 3832 | { 3833 | "value": "${VAR_TIMEZONE}", 3834 | "text": "${VAR_TIMEZONE}", 3835 | "selected": false 3836 | } 3837 | ] 3838 | }, 3839 | { 3840 | "description": "Grenze der maximalen Leistung in W, über diese hinaus Leistungswerte als Ausreißer ignoriert werden.", 3841 | "hide": 2, 3842 | "label": "Filter für maximale Leistung / W", 3843 | "name": "peakPowerLimit", 3844 | "query": "${VAR_PEAKPOWERLIMIT}", 3845 | "skipUrlSync": true, 3846 | "type": "constant", 3847 | "current": { 3848 | "value": "${VAR_PEAKPOWERLIMIT}", 3849 | "text": "${VAR_PEAKPOWERLIMIT}", 3850 | "selected": false 3851 | }, 3852 | "options": [ 3853 | { 3854 | "value": "${VAR_PEAKPOWERLIMIT}", 3855 | "text": "${VAR_PEAKPOWERLIMIT}", 3856 | "selected": false 3857 | } 3858 | ] 3859 | }, 3860 | { 3861 | "description": "Installierte Kapazität der Solarpanele in Wp", 3862 | "hide": 2, 3863 | "label": "Installierte Kapazität in Wp", 3864 | "name": "installedWattPeak", 3865 | "query": "${VAR_INSTALLEDWATTPEAK}", 3866 | "skipUrlSync": true, 3867 | "type": "constant", 3868 | "current": { 3869 | "value": "${VAR_INSTALLEDWATTPEAK}", 3870 | "text": "${VAR_INSTALLEDWATTPEAK}", 3871 | "selected": false 3872 | }, 3873 | "options": [ 3874 | { 3875 | "value": "${VAR_INSTALLEDWATTPEAK}", 3876 | "text": "${VAR_INSTALLEDWATTPEAK}", 3877 | "selected": false 3878 | } 3879 | ] 3880 | }, 3881 | { 3882 | "description": "Liste der Loadpoints, die NICHT angezeigt werden sollen. Der Ausdruck ist eine reguläre Expression, die mit / anfangen und mit / enden muss. Sie darf nicht leer sein, wenn also nichts gefiltert werden sollte, muss hier eine reguläre Expression stehen, die keinen der Einträge matched.\n\nBeispiele:\nKeine Einträge: /^none$/\nFiltere 'Garage' aus: /^Garage$/\nFiltere 'Garage' und 'Stellplatz' aus: /^Garage$|^Stellplatz$/\nFiltere alles, das mit 'foo' beginnt aus: /^foo.*$/", 3883 | "hide": 2, 3884 | "label": "Blocklist für Loadpoints", 3885 | "name": "loadpointBlocklist", 3886 | "query": "${VAR_LOADPOINTBLOCKLIST}", 3887 | "skipUrlSync": true, 3888 | "type": "constant", 3889 | "current": { 3890 | "value": "${VAR_LOADPOINTBLOCKLIST}", 3891 | "text": "${VAR_LOADPOINTBLOCKLIST}", 3892 | "selected": false 3893 | }, 3894 | "options": [ 3895 | { 3896 | "value": "${VAR_LOADPOINTBLOCKLIST}", 3897 | "text": "${VAR_LOADPOINTBLOCKLIST}", 3898 | "selected": false 3899 | } 3900 | ] 3901 | } 3902 | ] 3903 | }, 3904 | "time": { 3905 | "from": "now/M", 3906 | "to": "now/M" 3907 | }, 3908 | "timepicker": {}, 3909 | "timezone": "", 3910 | "title": "EVCC: Monat", 3911 | "uid": "4iQda7igz", 3912 | "version": 249, 3913 | "weekStart": "" 3914 | } --------------------------------------------------------------------------------