Le filtre de vue fonctionne sur le graphique en barres — la capture du proprietaire montrait bien « Solaire, Voiture » seuls — et echouait sur « Les flux » avec « Data is missing a time field ». La seule difference entre les deux etait le format de sortie : `table` d'un cote, `time_series` de l'autre. Un panneau time series accepte parfaitement une trame de type table des lors qu'elle porte une colonne temporelle, et le rendu est identique. On aligne donc « Les flux » sur le format dont on a la PREUVE qu'il se laisse filtrer, plutot que de continuer a deviner comment `time_series` nomme son champ temporel. Changement circonscrit a ce seul panneau : les trois autres tableaux utilisent le meme generateur de requete, n'ont pas de filtre de vue, et restent en time_series. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KKzkkVTG6KXnGXFFC7X9XJ
1264 lines
40 KiB
JSON
1264 lines
40 KiB
JSON
{
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"name": "vue",
|
|
"label": "Vue",
|
|
"type": "custom",
|
|
"hide": 0,
|
|
"skipUrlSync": false,
|
|
"query": "Vue generale : Solaire|Reseau|Batterie|Maison|Voiture,Consommation : Maison|Voiture,Reseau : Reseau|Maison,Batterie : Batterie|Solaire|Maison,Chargeur VE : Voiture|Solaire",
|
|
"options": [
|
|
{
|
|
"selected": true,
|
|
"text": "Vue generale",
|
|
"value": "Solaire|Reseau|Batterie|Maison|Voiture"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "Consommation",
|
|
"value": "Maison|Voiture"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "Reseau",
|
|
"value": "Reseau|Maison"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "Batterie",
|
|
"value": "Batterie|Solaire|Maison"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "Chargeur VE",
|
|
"value": "Voiture|Solaire"
|
|
}
|
|
],
|
|
"current": {
|
|
"selected": true,
|
|
"text": "Vue generale",
|
|
"value": "Solaire|Reseau|Batterie|Maison|Voiture"
|
|
},
|
|
"multi": false,
|
|
"includeAll": false
|
|
}
|
|
]
|
|
},
|
|
"uid": "evcs-systeme",
|
|
"title": "Le systeme",
|
|
"description": "Replique locale de la vue generale VRM. La console Victron est hebergee dans le cloud : elle disparait quand une coupure d'orage emporte Internet. Tout ce qui est affiche ici est lu sur le reseau local.",
|
|
"tags": [
|
|
"evcs"
|
|
],
|
|
"timezone": "Europe/Paris",
|
|
"editable": true,
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "30s",
|
|
"time": {
|
|
"from": "now-24h",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {
|
|
"refresh_intervals": [
|
|
"30s",
|
|
"1m",
|
|
"5m",
|
|
"15m",
|
|
"1h"
|
|
]
|
|
},
|
|
"annotations": {
|
|
"list": [
|
|
{
|
|
"builtIn": 1,
|
|
"datasource": {
|
|
"type": "grafana",
|
|
"uid": "-- Grafana --"
|
|
},
|
|
"enable": true,
|
|
"hide": true,
|
|
"name": "Annotations & Alerts",
|
|
"iconColor": "rgba(0, 211, 255, 1)",
|
|
"type": "dashboard"
|
|
},
|
|
{
|
|
"name": "Evenements",
|
|
"datasource": {
|
|
"type": "grafana-postgresql-datasource",
|
|
"uid": "evcs-pg"
|
|
},
|
|
"enable": true,
|
|
"iconColor": "semi-dark-orange",
|
|
"hide": false,
|
|
"target": {
|
|
"format": "table",
|
|
"rawQuery": true,
|
|
"editorMode": "code",
|
|
"rawSql": "SELECT ts AS time, resume AS text, genre || ',' || coalesce(source,'?') AS tags FROM evenement WHERE $__timeFilter(ts) ORDER BY 1"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"panels": [
|
|
{
|
|
"type": "stat",
|
|
"title": "Reseau",
|
|
"description": "Positif : le reseau alimente la maison. Le contacteur EDF est pilote par le workflow d'hysteresis, pas depuis ici.",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"W\" and r.entity_id == \"victron_grid_power_l1\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Puissance\"})"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"V\" and r.entity_id == \"airtria_mpii_v1_input_voltage_l1\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Tension\"})"
|
|
},
|
|
{
|
|
"refId": "C",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"A\" and r.entity_id == \"gx_device_grid_current_l1\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Courant\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 0,
|
|
"w": 5,
|
|
"h": 5
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "text",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"mappings": []
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Puissance"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "watt"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Tension"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "volt"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Courant"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "amp"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"textMode": "auto",
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"percentChangeColorMode": "standard",
|
|
"noValue": "—",
|
|
"wideLayout": true
|
|
}
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Charges CA",
|
|
"description": "Ce que la maison consomme, voiture comprise.",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"W\" and r.entity_id == \"victron_consumption_power_l1\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Consommation\"})"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"Hz\" and r.entity_id == \"airtria_mpii_v1_output_frequency_l1\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Frequence\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 5,
|
|
"y": 0,
|
|
"w": 4,
|
|
"h": 5
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "text",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"mappings": []
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Consommation"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "watt"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Frequence"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "hertz"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"textMode": "auto",
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"percentChangeColorMode": "standard",
|
|
"noValue": "—",
|
|
"wideLayout": true
|
|
}
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Batterie",
|
|
"description": "Puissance positive : la batterie se charge. Sept modules actifs sur huit, un pack bloquant la charge vers 94 %.",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"%\" and r.entity_id == \"victron_battery_soc\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Charge\"})"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"W\" and r.entity_id == \"victron_battery_power\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Puissance\"})"
|
|
},
|
|
{
|
|
"refId": "C",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"V\" and r.entity_id == \"victron_battery_voltage\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Tension\"})"
|
|
},
|
|
{
|
|
"refId": "D",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"A\" and r.entity_id == \"victron_battery_current\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Courant\"})"
|
|
},
|
|
{
|
|
"refId": "E",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"°C\" and r.entity_id == \"victron_battery_temperature\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Temperature\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 9,
|
|
"y": 0,
|
|
"w": 10,
|
|
"h": 5
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "text",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"mappings": []
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Charge"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "percent"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
},
|
|
{
|
|
"id": "thresholds",
|
|
"value": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "red",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 25
|
|
},
|
|
{
|
|
"color": "yellow",
|
|
"value": 40
|
|
},
|
|
{
|
|
"color": "green",
|
|
"value": 60
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Puissance"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "watt"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Tension"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "volt"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 2
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Courant"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "amp"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 1
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Temperature"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "celsius"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"textMode": "auto",
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"percentChangeColorMode": "standard",
|
|
"noValue": "—",
|
|
"text": {
|
|
"valueSize": 26,
|
|
"titleSize": 11
|
|
},
|
|
"wideLayout": true
|
|
}
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Chargeur VE",
|
|
"description": "Consigne = ce que le controleur demande a la borne, reecrit toutes les 30 s. Courant = ce que la voiture prend reellement.",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"W\" and r.entity_id == \"victron_evcs_ac_power\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Puissance\"})"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"A\" and r.entity_id == \"victron_evcs_current\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Courant\"})"
|
|
},
|
|
{
|
|
"refId": "C",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"A\" and r.entity_id == \"victron_evcs_set_current\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Consigne\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 19,
|
|
"y": 0,
|
|
"w": 5,
|
|
"h": 5
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "text",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"mappings": []
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Puissance"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "watt"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Courant"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "amp"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 1
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Consigne"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "amp"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"textMode": "auto",
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"percentChangeColorMode": "standard",
|
|
"noValue": "—",
|
|
"wideLayout": true
|
|
}
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Chargeur PV",
|
|
"description": "Rappel qui vaut pour toute lecture de cette valeur : sans injection, la production MESUREE vaut min(ressource, consommation + absorption batterie). Basse ne veut pas dire mauvais temps.",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"W\" and r.entity_id == \"victron_pv_power_system\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Production\"})"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -6h)\n |> filter(fn: (r) => r._measurement == \"W\" and r.entity_id == \"victron_pv_power_10m_avg\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Moyenne 10 min\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 5,
|
|
"w": 5,
|
|
"h": 8
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "text",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"mappings": []
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Production"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "watt"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Moyenne 10 min"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "watt"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"textMode": "auto",
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"percentChangeColorMode": "standard",
|
|
"noValue": "—",
|
|
"wideLayout": true
|
|
}
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "Detail par tracker",
|
|
"description": "Les 52 panneaux en quatre plans : sud-est 40 degres, trois chaines sud 35 degres, ouest 45 degres. Le suiveur de trois panneaux ne publie pas de mode de fonctionnement et n'apparait donc pas ici.",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "import \"strings\"\n\nbase = from(bucket: \"evcs\")\n |> range(start: -30m)\n |> filter(fn: (r) => r._field == \"value\")\n |> filter(fn: (r) => r._measurement == \"V\" or r._measurement == \"A\" or r._measurement == \"W\")\n |> last()\n\nrs = base\n |> filter(fn: (r) => strings.containsStr(v: r.entity_id, substr: \"pv_tracker_solar_\"))\n |> map(fn: (r) => ({ r with tracker:\n if strings.containsStr(v: r.entity_id, substr: \"solar_1\") then \"Sud 1 (10 pan.)\"\n else if strings.containsStr(v: r.entity_id, substr: \"solar_2\") then \"Sud 2 (10 pan.)\"\n else if strings.containsStr(v: r.entity_id, substr: \"solar_3\") then \"Sud 3 (10 pan.)\"\n else \"Ouest (9 pan.)\" }))\n\nse = base\n |> filter(fn: (r) => r.entity_id == \"airtria_mppt1_pv_bus_voltage\"\n or r.entity_id == \"airtria_mppt1_pv_current\"\n or r.entity_id == \"airtria_mppt1_pv_yield_power\")\n |> map(fn: (r) => ({ r with tracker: \"Sud-est (10 pan.)\" }))\n\nunion(tables: [rs, se])\n |> keep(columns: [\"tracker\", \"_measurement\", \"_value\"])\n |> pivot(rowKey: [\"tracker\"], columnKey: [\"_measurement\"], valueColumn: \"_value\")\n |> sort(columns: [\"tracker\"])"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 5,
|
|
"y": 5,
|
|
"w": 13,
|
|
"h": 8
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"align": "left",
|
|
"cellOptions": {
|
|
"type": "auto"
|
|
},
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "tracker"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "Tracker"
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 200
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "V"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "Tension"
|
|
},
|
|
{
|
|
"id": "unit",
|
|
"value": "volt"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "A"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "Courant"
|
|
},
|
|
{
|
|
"id": "unit",
|
|
"value": "amp"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 1
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "W"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "Puissance"
|
|
},
|
|
{
|
|
"id": "unit",
|
|
"value": "watt"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "gauge",
|
|
"mode": "gradient"
|
|
}
|
|
},
|
|
{
|
|
"id": "max",
|
|
"value": 3100
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm",
|
|
"footer": {
|
|
"show": false
|
|
}
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"indexByName": {
|
|
"tracker": 0,
|
|
"V": 1,
|
|
"A": 2,
|
|
"W": 3
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "stat",
|
|
"title": "Ce que le BMS impose",
|
|
"description": "« Charge max » est la limite que le BMS impose au systeme entier. Le 04/09 elle est tombee de 150 a 20 A en trois minutes, des 76 % de charge, au moment ou l'alarme de tension de cellule s'est declenchee — le parc n'etait alors qu'a 50,76 V pour 53,2 V autorises. Ce n'est pas le parc qui sature, c'est une cellule.",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -48h)\n |> filter(fn: (r) => r._measurement == \"A\" and r.entity_id == \"airtria_8_us2000c_maximum_allowed_charge_current\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Charge max\"})"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -48h)\n |> filter(fn: (r) => r._measurement == \"sensor.airtria_8_us2000c_tension_de_cellule_elevee\" and r._field == \"state\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Tension cellule\"})"
|
|
},
|
|
{
|
|
"refId": "C",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -48h)\n |> filter(fn: (r) => r._measurement == \"sensor.airtria_8_us2000c_cell_imbalance\" and r._field == \"state\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Desequilibre\"})"
|
|
},
|
|
{
|
|
"refId": "D",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -48h)\n |> filter(fn: (r) => r._measurement == \"%\" and r.entity_id == \"airtria_8_us2000c_state_of_health\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_time\", \"_value\"])\n |> rename(columns: {_value: \"Sante\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 18,
|
|
"y": 5,
|
|
"w": 6,
|
|
"h": 8
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "text",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"mappings": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"no_alarm": {
|
|
"text": "OK",
|
|
"color": "green",
|
|
"index": 0
|
|
},
|
|
"warning": {
|
|
"text": "AVERTISSEMENT",
|
|
"color": "orange",
|
|
"index": 1
|
|
},
|
|
"alarm": {
|
|
"text": "ALARME",
|
|
"color": "red",
|
|
"index": 2
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Charge max"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "amp"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Sante"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "percent"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "/.*/",
|
|
"values": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"textMode": "auto",
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"percentChangeColorMode": "standard",
|
|
"noValue": "—",
|
|
"text": {
|
|
"valueSize": 24,
|
|
"titleSize": 11
|
|
},
|
|
"wideLayout": true
|
|
}
|
|
},
|
|
{
|
|
"type": "timeseries",
|
|
"title": "Les flux",
|
|
"description": "Batterie positive : elle se charge. Reseau positif : il alimente. Aux instants ou tout est a zero sauf la maison, c'est la batterie qui porte tout.",
|
|
"datasource": {
|
|
"type": "grafana-postgresql-datasource",
|
|
"uid": "evcs-pg"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "grafana-postgresql-datasource",
|
|
"uid": "evcs-pg"
|
|
},
|
|
"format": "table",
|
|
"rawQuery": true,
|
|
"editorMode": "code",
|
|
"rawSql": "WITH par_minute AS (\n SELECT date_trunc('minute', ts) AS t,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_pv_power_system') AS Solaire,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_grid_power_l1') AS Reseau,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_battery_power') AS Batterie,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_consumption_power_l1') AS Maison,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_evcs_ac_power') AS Voiture\n FROM mesure WHERE $__timeFilter(ts) GROUP BY 1\n),\npaliers AS (\n SELECT t, Solaire, Reseau, Batterie, Maison, Voiture,\n count(Solaire) OVER (ORDER BY t) AS g_Solaire,\n count(Reseau) OVER (ORDER BY t) AS g_Reseau,\n count(Batterie) OVER (ORDER BY t) AS g_Batterie,\n count(Maison) OVER (ORDER BY t) AS g_Maison,\n count(Voiture) OVER (ORDER BY t) AS g_Voiture\n FROM par_minute\n),\nreport AS (\n SELECT t,\n first_value(Solaire) OVER (PARTITION BY g_Solaire ORDER BY t) AS Solaire,\n first_value(Reseau) OVER (PARTITION BY g_Reseau ORDER BY t) AS Reseau,\n first_value(Batterie) OVER (PARTITION BY g_Batterie ORDER BY t) AS Batterie,\n first_value(Maison) OVER (PARTITION BY g_Maison ORDER BY t) AS Maison,\n first_value(Voiture) OVER (PARTITION BY g_Voiture ORDER BY t) AS Voiture\n FROM paliers\n)\nSELECT t AS time,\n Solaire AS \"Solaire\",\n Reseau AS \"Reseau\",\n Batterie AS \"Batterie\",\n Maison AS \"Maison\",\n Voiture AS \"Voiture\"\nFROM report ORDER BY t"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 13,
|
|
"w": 24,
|
|
"h": 9
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "watt",
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"lineWidth": 2,
|
|
"fillOpacity": 8,
|
|
"showPoints": "never",
|
|
"spanNulls": true,
|
|
"axisBorderShow": false,
|
|
"gradientMode": "opacity"
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Solaire"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "yellow"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Reseau"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "red"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Batterie"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "blue"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Maison"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "text"
|
|
}
|
|
},
|
|
{
|
|
"id": "custom.fillOpacity",
|
|
"value": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Voiture"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "green"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true,
|
|
"calcs": []
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "desc"
|
|
}
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "filterFieldsByName",
|
|
"options": {
|
|
"include": {
|
|
"pattern": "^(Time|time|Heure|$vue)$"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "barchart",
|
|
"title": "Energie par periode",
|
|
"description": "Le pas suit la periode choisie : l'heure jusqu'a 4 jours, le jour jusqu'a 70, le mois au-dela. Obtenue en integrant la puissance, PAS en lisant les compteurs kWh du GX : ceux-ci se remettent a zero sans le signaler (verifie le 04/09, -373 kWh enregistres sur une heure cote Home Assistant).",
|
|
"datasource": {
|
|
"type": "grafana-postgresql-datasource",
|
|
"uid": "evcs-pg"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "grafana-postgresql-datasource",
|
|
"uid": "evcs-pg"
|
|
},
|
|
"format": "table",
|
|
"rawQuery": true,
|
|
"editorMode": "code",
|
|
"rawSql": "WITH bornes AS (\n SELECT $__timeFrom()::timestamptz AS d, $__timeTo()::timestamptz AS f\n),\n-- Le pas s'adapte a la plage choisie. Sans cela, « 30 derniers jours » rend\n-- 720 barres illisibles — c'est exactement ce que fait VRM en passant de\n-- l'heure au jour puis au mois.\npas AS (\n SELECT CASE WHEN f - d > interval '70 days' THEN 'month'\n WHEN f - d > interval '4 days' THEN 'day'\n ELSE 'hour' END AS unite,\n CASE WHEN f - d > interval '70 days' THEN 'MM/YYYY'\n WHEN f - d > interval '4 days' THEN 'DD/MM'\n ELSE 'DD/MM HH24' END AS forme\n FROM bornes\n),\naxe AS (\n SELECT generate_series(date_trunc('minute', (SELECT d FROM bornes)),\n date_trunc('minute', (SELECT f FROM bornes)),\n interval '1 minute') AS t\n),\nreleve AS (\n SELECT date_trunc('minute', ts) AS t,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_pv_power_system') AS Solaire,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_grid_power_l1') AS Reseau,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_consumption_power_l1') AS Maison,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_evcs_ac_power') AS Voiture\n FROM mesure WHERE $__timeFilter(ts) GROUP BY 1\n),\npar_minute AS (\n SELECT axe.t, releve.Solaire, releve.Reseau, releve.Maison, releve.Voiture\n FROM axe LEFT JOIN releve USING (t)\n),\npaliers AS (\n SELECT t, Solaire, Reseau, Maison, Voiture,\n count(Solaire) OVER (ORDER BY t) AS g_Solaire,\n count(Reseau) OVER (ORDER BY t) AS g_Reseau,\n count(Maison) OVER (ORDER BY t) AS g_Maison,\n count(Voiture) OVER (ORDER BY t) AS g_Voiture\n FROM par_minute\n),\nreport AS (\n SELECT t,\n first_value(Solaire) OVER (PARTITION BY g_Solaire ORDER BY t) AS Solaire,\n first_value(Reseau) OVER (PARTITION BY g_Reseau ORDER BY t) AS Reseau,\n first_value(Maison) OVER (PARTITION BY g_Maison ORDER BY t) AS Maison,\n first_value(Voiture) OVER (PARTITION BY g_Voiture ORDER BY t) AS Voiture\n FROM paliers\n)\nSELECT to_char(date_trunc(pas.unite, t), pas.forme) AS \"Heure\",\n round((avg(Solaire) * count(Solaire) / 60.0 / 1000.0)::numeric, 2) AS \"Solaire\",\n round((avg(Reseau) * count(Reseau) / 60.0 / 1000.0)::numeric, 2) AS \"Reseau\",\n round((avg(Maison) * count(Maison) / 60.0 / 1000.0)::numeric, 2) AS \"Maison\",\n round((avg(Voiture) * count(Voiture) / 60.0 / 1000.0)::numeric, 2) AS \"Voiture\"\nFROM report, pas\nGROUP BY date_trunc(pas.unite, t), pas.forme\nHAVING count(Solaire) > 0 OR count(Reseau) > 0 OR count(Maison) > 0 OR count(Voiture) > 0\nORDER BY date_trunc(pas.unite, t)"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 22,
|
|
"w": 24,
|
|
"h": 9
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "kwatth",
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"lineWidth": 1,
|
|
"fillOpacity": 80,
|
|
"gradientMode": "none",
|
|
"axisBorderShow": false
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"orientation": "auto",
|
|
"xTickLabelRotation": -45,
|
|
"showValue": "never",
|
|
"stacking": "none",
|
|
"groupWidth": 0.7,
|
|
"barWidth": 0.9,
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "filterFieldsByName",
|
|
"options": {
|
|
"include": {
|
|
"pattern": "^(Time|time|Heure|$vue)$"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|