Lade und Entladestrom zusammenfassen

Hier könnt Ihr Eure Dashborads den anderen Mitgliedern zur Verfügung stellen. Bitte immer auch ein Screenshot dazu laden, damit man sieht wie das Dashboard aussieht und unbedingt auch für welchen Regler / Wechselrichter es ist.

Moderator: Ulrich

Antworten
KFZKlaus
Beiträge: 19
Registriert: Mo 15. Jan 2024, 12:07
Hat sich bedankt: 3 Mal
Danksagung erhalten: 1 Mal

Lade und Entladestrom zusammenfassen

Beitrag von KFZKlaus »

Irgendwie empfand ich es als störend das Lade und Entladestrom der Batterie nicht als + und - Werte vorliegen und dadurch Platz, Übersicht und intuitives Sehen für mich gestört waren.

Und so hab ich so lange herumprobiert und dabei viel über Grafana gelernt bis ichs hatte. Wenn mans mal weiß ists eigentlich einfach.
In der Query für Entladestrom hab ich ein "math (*-1) in der Zeile SELECT drangehängt um diesen Wert erstmal negativ zu erhalten.

Danach unten anstatt einer Add Query die "Expression" augewählt und $A+$B (Ladestrom + Entladestrom je nach Buchstabe fürs richtige Feld) angegeben.
Letzlich noch die 2 Ursprünglichen Query´s auf Disable Query (das Augen-Symbol) gestellt damit sie unsichtbar werden und das wars eigentlich auch schon.

Anbei der wohl recht Umfangreiche Code mit meiner Visualisierung davon (nur Tacho, keine Langzeitaufzeichnung)

{
"datasource": {
"uid": "ea5616d0-69d9-46e9-a58c-6028bf4fabb9",
"type": "influxdb"
},
"fieldConfig": {
"defaults": {
"custom": {
"neutral": 0
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 2500
}
]
},
"color": {
"mode": "thresholds"
},
"decimals": 2,
"max": 5000,
"min": 0
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Ladestrom A"
},
"properties": [
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "dark-green",
"value": null
},
{
"color": "dark-red",
"value": 30
}
]
}
},
{
"id": "max",
"value": 80
},
{
"id": "unit",
"value": "amp"
},
{
"id": "displayName",
"value": "Ladestrom"
}
]
},
{
"matcher": {
"id": "byName",
"options": "A"
},
"properties": [
{
"id": "max",
"value": 80
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "dark-red",
"value": null
},
{
"value": -30,
"color": "semi-dark-orange"
},
{
"color": "dark-green",
"value": 0
},
{
"color": "dark-purple",
"value": 30
}
]
}
},
{
"id": "unit",
"value": "amp"
},
{
"id": "displayName",
"value": "Batteriestrom"
},
{
"id": "custom.neutral",
"value": 0
},
{
"id": "min",
"value": -80
},
{
"id": "decimals"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Spannung"
},
"properties": [
{
"id": "unit",
"value": "volt"
},
{
"id": "displayName",
"value": "Spannung"
},
{
"id": "min",
"value": 45
},
{
"id": "max",
"value": 63
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "dark-red",
"value": null
},
{
"color": "dark-orange",
"value": 50.8
},
{
"color": "semi-dark-green",
"value": 54
},
{
"color": "dark-green",
"value": 56
},
{
"color": "semi-dark-red",
"value": 59
}
]
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Spannung"
},
"properties": [
{
"id": "decimals",
"value": 2
}
]
},
{
"matcher": {
"id": "byName",
"options": "Entladestrom A"
},
"properties": [
{
"id": "max",
"value": 80
},
{
"id": "unit",
"value": "amp"
},
{
"id": "displayName",
"value": "Entladestrom"
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 30
}
]
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Kapazität"
},
"properties": [
{
"id": "unit",
"value": "percent"
},
{
"id": "max",
"value": 100
},
{
"id": "decimals",
"value": 0
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "dark-red",
"value": null
},
{
"color": "dark-orange",
"value": 50
},
{
"color": "light-green",
"value": 70
},
{
"color": "semi-dark-green",
"value": 80
},
{
"value": 90,
"color": "dark-green"
}
]
}
},
{
"id": "min",
"value": 40
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 0
},
"id": 19,
"interval": "1m",
"options": {
"reduceOptions": {
"values": false,
"calcs": [
"lastNotNull"
],
"fields": "",
"limit": 4
},
"orientation": "auto",
"showThresholdLabels": true,
"showThresholdMarkers": true,
"sizing": "auto",
"minVizWidth": 200,
"minVizHeight": 200
},
"pluginVersion": "10.2.3",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "ea5616d0-69d9-46e9-a58c-6028bf4fabb9"
},
"alias": "Spannung",
"groupBy": [
{
"params": [
"10s"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "Batterie",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"Wirkleistung\") FROM \"AC\" WHERE $timeFilter GROUP BY time(10s) fill(null)",
"rawQuery": false,
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"Spannung_WR"
],
"type": "field"
},
{
"params": [],
"type": "last"
}
]
],
"tags": []
},
{
"datasource": {
"type": "influxdb",
"uid": "ea5616d0-69d9-46e9-a58c-6028bf4fabb9"
},
"alias": "Ladestrom A",
"groupBy": [
{
"params": [
"10s"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": true,
"measurement": "Batterie",
"orderByTime": "ASC",
"policy": "default",
"refId": "C",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"Ladestrom"
],
"type": "field"
},
{
"params": [],
"type": "last"
}
]
],
"tags": []
},
{
"datasource": {
"type": "influxdb",
"uid": "ea5616d0-69d9-46e9-a58c-6028bf4fabb9"
},
"alias": "Entladestrom A",
"groupBy": [
{
"params": [
"10s"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": true,
"measurement": "Batterie",
"orderByTime": "ASC",
"policy": "default",
"refId": "D",
"resultFormat": "time_series",
"select": [
[
{
"type": "field",
"params": [
"Entladestrom"
]
},
{
"type": "last",
"params": []
},
{
"type": "math",
"params": [
" *-1"
]
}
]
],
"tags": []
},
{
"datasource": {
"type": "__expr__",
"uid": "__expr__",
"name": "Expression"
},
"refId": "A",
"type": "math",
"hide": false,
"expression": "$C+$D"
},
{
"datasource": {
"uid": "ea5616d0-69d9-46e9-a58c-6028bf4fabb9",
"type": "influxdb"
},
"refId": "E",
"hide": false,
"policy": "default",
"resultFormat": "time_series",
"orderByTime": "ASC",
"tags": [],
"groupBy": [
{
"type": "time",
"params": [
"$__interval"
]
},
{
"type": "fill",
"params": [
"null"
]
}
],
"select": [
[
{
"type": "field",
"params": [
"Kapazitaet"
]
},
{
"type": "last",
"params": []
}
]
],
"measurement": "Batterie",
"alias": "Kapazität"
}
],
"title": "Batterie",
"transformations": [],
"transparent": true,
"type": "gauge",
"description": ""
}

Antworten

Zurück zu „Dashboards von Mitgliedern“