ich möchte in Grafana einen Wert pro Tag (Measurement "Info", Wert "Firmware") von 00:00:xx in einer Tabelle darstellen lassen, die z.B. 356 Tage zurückreicht.
Mit PV-Werten habe ich es schon gemacht, jedoch mit dem größten Wert pro Tag und nicht mit dem Wert von 00:00:xx:
Code: Alles auswählen
{
"datasource": {
"type": "datasource",
"uid": "-- Mixed --"
},
"fieldConfig": {
"defaults": {
"custom": {
"align": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false,
"filterable": false,
"minWidth": 15
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"color": {
"mode": "fixed"
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Time"
},
"properties": [
{
"id": "displayName",
"value": "Time"
},
{
"id": "unit",
"value": "time: YYYY-MM-DD"
},
{
"id": "custom.width",
"value": 100
}
]
},
{
"matcher": {
"id": "byName",
"options": "Leistung"
},
"properties": [
{
"id": "unit",
"value": "watt"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.width",
"value": 100
}
]
},
{
"matcher": {
"id": "byName",
"options": "Spannung"
},
"properties": [
{
"id": "unit",
"value": "volt"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.width",
"value": 100
}
]
},
{
"matcher": {
"id": "byName",
"options": "Strom"
},
"properties": [
{
"id": "unit",
"value": "amp"
},
{
"id": "decimals",
"value": 2
},
{
"id": "custom.width",
"value": 100
}
]
}
]
},
"gridPos": {
"h": 10,
"w": 5,
"x": 0,
"y": 96
},
"id": 128,
"links": [],
"options": {
"showHeader": true,
"cellHeight": "sm",
"footer": {
"show": true,
"reducer": [
"mean"
],
"countRows": false,
"fields": []
},
"sortBy": [
{
"desc": true,
"displayName": "Time"
}
]
},
"pluginVersion": "10.0.2",
"targets": [
{
"alias": "Leistung",
"datasource": {
"type": "influxdb",
"uid": "ozSPx5Rgk"
},
"groupBy": [
{
"params": [
"1d"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "PV",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT (max(\"Leistung\")) FROM \"PV\" WHERE $timeFilter GROUP BY time(1d) fill(null) tz('Europe/Berlin')",
"rawQuery": true,
"refId": "K",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"Leistung"
],
"type": "field"
},
{
"params": [],
"type": "sum"
}
]
],
"tags": []
},
{
"alias": "Spannung",
"datasource": {
"type": "influxdb",
"uid": "ozSPx5Rgk"
},
"hide": false,
"query": "SELECT (max(\"Spannung1\")) FROM \"PV\" WHERE $timeFilter GROUP BY time(1d) fill(null) tz('Europe/Berlin')",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series"
},
{
"alias": "Strom",
"datasource": {
"type": "influxdb",
"uid": "ozSPx5Rgk"
},
"hide": false,
"query": "SELECT (max(\"Strom1\")) FROM \"PV\" WHERE $timeFilter GROUP BY time(1d) fill(null) tz('Europe/Berlin')",
"rawQuery": true,
"refId": "B",
"resultFormat": "time_series"
}
],
"timeFrom": "365d",
"title": "PV Tag / Maximale Peaks",
"transformations": [
{
"id": "seriesToColumns",
"options": {
"reducers": []
}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": false
},
"indexByName": {
"Autark": 9,
"Bezug": 4,
"Eigenverbr.": 3,
"Einspeisung": 5,
"Erspart": 8,
"Gesamtverbr.": 6,
"Tagesprod.": 1,
"Time": 0,
"Verbrauch": 2,
"Vergütung": 7
},
"renameByName": {
"Verbrauch": ""
}
}
}
],
"type": "table",
"description": ""
}
Gruss Sebastian