Suite du correctif de l onglet Home Assistant. « La journee » avait le meme angle mort : cadre sur le jour civil, il s arretait a l heure en cours. Fenetre portee a la journee ENTIERE (dashboard() gagne un parametre `jusqu`), serie « Encore attendu » en gris translucide a la suite des barres mesurees, et colonne « Reste attendu » dans le bandeau du haut, a cote de « Solaire produit ». Sur le telephone, aucun panneau ajoute — un panneau de plus y est un ecran de plus a faire defiler. « Soleil restant » rejoint le bandeau Maintenant, a cote de Excedent ; « Soleil demain » rejoint La nuit qui vient, puisque c est lui qui decide jusqu ou la batterie peut descendre. Trois pieges, tous dans la meme direction. La mesure ne doit pas suivre la fenetre dans le futur : ENERGIE_SQL construisait son axe entre les deux macros puis reportait la derniere valeur connue, ce qui aurait rempli les heures a venir avec la puissance de l instant et gonfle l energie du jour — sa borne haute est desormais least($__timeTo(), now()). FULL OUTER JOIN et non LEFT : une periode a venir n a aucune ligne de mesure. Et borne haute stricte, sans quoi une barre « 18/09 00 h » apparaissait dans La journee. L heure EN COURS n a volontairement pas de barre de prevision : elle est deja mesuree pour ses minutes ecoulees. 73/73 requetes valides — mais ce controle prouve l execution, pas la grandeur. Les deux requetes de La journee ont donc ete rejouees a la main avec la vraie fenetre : 24 lignes, mesures jusqu a 02 h, prevision de 03 h a 23 h, somme des barres 36,95 kWh contre 37,0 annonces par le bandeau. C est ce recoupement qui a fait apparaitre le troisieme piege. Corrige au passage la note du 08/09 sur l acces a l API Grafana : les apostrophes du .env sont SIMPLES et non doubles, verifie a l octet. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwpFpy2aQ2rJok6tNQSbVj
1302 lines
43 KiB
JSON
1302 lines
43 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": false,
|
|
"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) AND genre <> 'bilan' 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: [\"_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: [\"_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: [\"_value\"])\n |> rename(columns: {_value: \"Courant\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 0,
|
|
"w": 5,
|
|
"h": 7
|
|
},
|
|
"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: -24h)\n |> filter(fn: (r) => r._measurement == \"W\" and r.entity_id == \"victron_consumption_power_l1\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_value\"])\n |> rename(columns: {_value: \"Consommation\"})"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -24h)\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: [\"_value\"])\n |> rename(columns: {_value: \"Frequence\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 5,
|
|
"y": 0,
|
|
"w": 4,
|
|
"h": 7
|
|
},
|
|
"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: -24h)\n |> filter(fn: (r) => r._measurement == \"%\" and r.entity_id == \"victron_battery_soc\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_value\"])\n |> rename(columns: {_value: \"Charge\"})"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -24h)\n |> filter(fn: (r) => r._measurement == \"W\" and r.entity_id == \"victron_battery_power\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_value\"])\n |> rename(columns: {_value: \"Puissance\"})"
|
|
},
|
|
{
|
|
"refId": "C",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -24h)\n |> filter(fn: (r) => r._measurement == \"V\" and r.entity_id == \"victron_battery_voltage\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_value\"])\n |> rename(columns: {_value: \"Tension\"})"
|
|
},
|
|
{
|
|
"refId": "D",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -24h)\n |> filter(fn: (r) => r._measurement == \"A\" and r.entity_id == \"victron_battery_current\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_value\"])\n |> rename(columns: {_value: \"Courant\"})"
|
|
},
|
|
{
|
|
"refId": "E",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -24h)\n |> filter(fn: (r) => r._measurement == \"°C\" and r.entity_id == \"victron_battery_temperature\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_value\"])\n |> rename(columns: {_value: \"Temperature\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 9,
|
|
"y": 0,
|
|
"w": 9,
|
|
"h": 7
|
|
},
|
|
"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": 22,
|
|
"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": "datasource",
|
|
"uid": "-- Mixed --"
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -24h)\n |> filter(fn: (r) => r._measurement == \"W\" and r.entity_id == \"victron_evcs_ac_power\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_value\"])\n |> rename(columns: {_value: \"Puissance\"})"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -24h)\n |> filter(fn: (r) => r._measurement == \"A\" and r.entity_id == \"victron_evcs_current\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_value\"])\n |> rename(columns: {_value: \"Courant\"})"
|
|
},
|
|
{
|
|
"refId": "C",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -24h)\n |> filter(fn: (r) => r._measurement == \"A\" and r.entity_id == \"victron_evcs_set_current\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_value\"])\n |> rename(columns: {_value: \"Consigne\"})"
|
|
},
|
|
{
|
|
"refId": "D",
|
|
"datasource": {
|
|
"type": "grafana-postgresql-datasource",
|
|
"uid": "evcs-pg"
|
|
},
|
|
"format": "table",
|
|
"rawQuery": true,
|
|
"editorMode": "code",
|
|
"rawSql": "-- Le compteur de la BORNE, repris de la table des sessions : il\n-- compte depuis le vrai debut, la ou une integration ne couvre que\n-- ce que le service a vu. Session close depuis plus de 2 h : rien.\nSELECT round(coalesce(energie_station_kwh, energie_kwh)::numeric, 2) AS \"Session\"\nFROM session_charge\nWHERE fin > now() - interval '2 hours'\nORDER BY debut DESC LIMIT 1"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 18,
|
|
"y": 0,
|
|
"w": 6,
|
|
"h": 7
|
|
},
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Session"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "kwatth"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 2
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "green"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"lastNotNull"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"orientation": "horizontal",
|
|
"textMode": "auto",
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"percentChangeColorMode": "standard",
|
|
"noValue": "—",
|
|
"text": {
|
|
"valueSize": 22,
|
|
"titleSize": 11
|
|
},
|
|
"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: -24h)\n |> filter(fn: (r) => r._measurement == \"W\" and r.entity_id == \"victron_pv_power_system\" and r._field == \"value\")\n |> last()\n |> keep(columns: [\"_value\"])\n |> rename(columns: {_value: \"Production\"})"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"datasource": {
|
|
"type": "influxdb",
|
|
"uid": "evcs-influx"
|
|
},
|
|
"query": "from(bucket: \"evcs\")\n |> range(start: -24h)\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: [\"_value\"])\n |> rename(columns: {_value: \"Moyenne 10 min\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 7,
|
|
"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": 7,
|
|
"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: [\"_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: [\"_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: [\"_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: [\"_value\"])\n |> rename(columns: {_value: \"Sante\"})"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 18,
|
|
"y": 7,
|
|
"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 (array_agg(valeur ORDER BY ts DESC) FILTER (WHERE cle = 'sensor.victron_pv_power_system'))[1] AS d_Solaire,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_grid_power_l1') AS Reseau,\n (array_agg(valeur ORDER BY ts DESC) FILTER (WHERE cle = 'sensor.victron_grid_power_l1'))[1] AS d_Reseau,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_battery_power') AS Batterie,\n (array_agg(valeur ORDER BY ts DESC) FILTER (WHERE cle = 'sensor.victron_battery_power'))[1] AS d_Batterie,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_consumption_power_l1') AS Maison,\n (array_agg(valeur ORDER BY ts DESC) FILTER (WHERE cle = 'sensor.victron_consumption_power_l1'))[1] AS d_Maison,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_evcs_ac_power') AS Voiture,\n (array_agg(valeur ORDER BY ts DESC) FILTER (WHERE cle = 'sensor.victron_evcs_ac_power'))[1] AS d_Voiture\n FROM mesure WHERE $__timeFilter(ts) GROUP BY 1\n),\npaliers AS (\n SELECT t,\n Solaire, count(d_Solaire) OVER (ORDER BY t) AS g_Solaire,\n Reseau, count(d_Reseau) OVER (ORDER BY t) AS g_Reseau,\n Batterie, count(d_Batterie) OVER (ORDER BY t) AS g_Batterie,\n Maison, count(d_Maison) OVER (ORDER BY t) AS g_Maison,\n Voiture, count(d_Voiture) OVER (ORDER BY t) AS g_Voiture,\n d_Solaire,\n d_Reseau,\n d_Batterie,\n d_Maison,\n d_Voiture\n FROM par_minute\n),\nreport AS (\n SELECT t,\n coalesce(Solaire, first_value(d_Solaire) OVER (PARTITION BY g_Solaire ORDER BY t)) AS Solaire,\n coalesce(Reseau, first_value(d_Reseau) OVER (PARTITION BY g_Reseau ORDER BY t)) AS Reseau,\n coalesce(Batterie, first_value(d_Batterie) OVER (PARTITION BY g_Batterie ORDER BY t)) AS Batterie,\n coalesce(Maison, first_value(d_Maison) OVER (PARTITION BY g_Maison ORDER BY t)) AS Maison,\n coalesce(Voiture, first_value(d_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": 15,
|
|
"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 -- ⚠️ LA MESURE NE PEUT PAS DEPASSER MAINTENANT. « La journee » s'etend\n -- desormais jusqu'a la fin du jour pour montrer la prevision ; sans ce\n -- garde-fou, le report de la derniere valeur connue (plus bas) remplirait les\n -- heures a venir avec la puissance de l'instant et gonflerait l'energie.\n SELECT $__timeFrom()::timestamptz AS d,\n least($__timeTo()::timestamptz, now()) 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 (array_agg(valeur ORDER BY ts DESC) FILTER (WHERE cle = 'sensor.victron_pv_power_system'))[1] AS d_Solaire,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_grid_power_l1') AS Reseau,\n (array_agg(valeur ORDER BY ts DESC) FILTER (WHERE cle = 'sensor.victron_grid_power_l1'))[1] AS d_Reseau,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_consumption_power_l1') AS Maison,\n (array_agg(valeur ORDER BY ts DESC) FILTER (WHERE cle = 'sensor.victron_consumption_power_l1'))[1] AS d_Maison,\n avg(valeur) FILTER (WHERE cle = 'sensor.victron_evcs_ac_power') AS Voiture,\n (array_agg(valeur ORDER BY ts DESC) FILTER (WHERE cle = 'sensor.victron_evcs_ac_power'))[1] AS d_Voiture\n FROM mesure WHERE $__timeFilter(ts) GROUP BY 1\n),\npar_minute AS (\n SELECT axe.t, releve.Solaire, releve.d_Solaire, releve.Reseau, releve.d_Reseau, releve.Maison, releve.d_Maison, releve.Voiture, releve.d_Voiture\n FROM axe LEFT JOIN releve USING (t)\n),\npaliers AS (\n SELECT t, Solaire, d_Solaire, Reseau, d_Reseau, Maison, d_Maison, Voiture, d_Voiture,\n count(d_Solaire) OVER (ORDER BY t) AS g_Solaire,\n count(d_Reseau) OVER (ORDER BY t) AS g_Reseau,\n count(d_Maison) OVER (ORDER BY t) AS g_Maison,\n count(d_Voiture) OVER (ORDER BY t) AS g_Voiture\n FROM par_minute\n),\nreport AS (\n SELECT t,\n coalesce(Solaire, first_value(d_Solaire) OVER (PARTITION BY g_Solaire ORDER BY t)) AS Solaire,\n coalesce(Reseau, first_value(d_Reseau) OVER (PARTITION BY g_Reseau ORDER BY t)) AS Reseau,\n coalesce(Maison, first_value(d_Maison) OVER (PARTITION BY g_Maison ORDER BY t)) AS Maison,\n coalesce(Voiture, first_value(d_Voiture) OVER (PARTITION BY g_Voiture ORDER BY t)) AS Voiture\n FROM paliers\n),\nmesure_par_periode AS (\n SELECT date_trunc(pas.unite, t) AS b,\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\"\n FROM report, pas\n GROUP BY date_trunc(pas.unite, t)\n HAVING count(Solaire) > 0 OR count(Reseau) > 0 OR count(Maison) > 0 OR count(Voiture) > 0\n)\n\nSELECT to_char(b, (SELECT forme FROM pas)) AS \"Heure\",\n \"Solaire\",\n \"Reseau\",\n \"Maison\",\n \"Voiture\"\nFROM mesure_par_periode\nORDER BY b"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 24,
|
|
"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)$"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|