585 lines
18 KiB
JSON
585 lines
18 KiB
JSON
{
|
|
"templating": {
|
|
"list": []
|
|
},
|
|
"uid": "evcs-vehicules",
|
|
"title": "Les vehicules",
|
|
"description": "Ce que chaque voiture encaisse, session par session et sur la periode choisie. L'etiquette vient d'un selecteur manuel : elle peut etre fausse, et rien ne permet de la verifier — les deux vehicules sont electriquement indiscernables et leur routine s'inverse le week-end. Vehicules : VW, JEEP, ZERO (moto) ; « Invite » = tout autre (Megane de service, amis).",
|
|
"tags": [
|
|
"evcs"
|
|
],
|
|
"timezone": "Europe/Paris",
|
|
"editable": true,
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "5m",
|
|
"time": {
|
|
"from": "now-7d",
|
|
"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": "table",
|
|
"title": "Sur la periode",
|
|
"description": "kWh charges par vehicule sur la plage choisie (compteur de la borne). « Invite » = tout vehicule hors foyer (Megane de service, amis). « A confirmer » compte les sessions dont l'etiquette vient du selecteur sans confirmation : la seule mesure honnete de l'incertitude.",
|
|
"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": "SELECT round(coalesce(sum(coalesce(energie_station_kwh, energie_kwh)) FILTER (WHERE vehicule = 'VW'), 0)::numeric, 1) AS \"VW\",\n round(coalesce(sum(coalesce(energie_station_kwh, energie_kwh)) FILTER (WHERE vehicule = 'JEEP'), 0)::numeric, 1) AS \"JEEP\",\n round(coalesce(sum(coalesce(energie_station_kwh, energie_kwh)) FILTER (WHERE vehicule = 'ZERO'), 0)::numeric, 1) AS \"ZERO\",\n round(coalesce(sum(coalesce(energie_station_kwh, energie_kwh)) FILTER (WHERE vehicule NOT IN ('VW', 'JEEP', 'ZERO')), 0)::numeric, 1) AS \"Invite\",\n round(coalesce(sum(coalesce(energie_station_kwh, energie_kwh)) FILTER (WHERE vehicule IS NULL), 0)::numeric, 1) AS \"Non etiquete\",\n count(*) AS \"Sessions\",\n count(*) FILTER (WHERE NOT vehicule_sur OR vehicule IS NULL) AS \"A confirmer\"\nFROM session_charge WHERE $__timeFilter(debut)"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 0,
|
|
"w": 24,
|
|
"h": 4
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"align": "left",
|
|
"cellOptions": {
|
|
"type": "auto"
|
|
},
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "VW"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "kwatth"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 1
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-text"
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "blue"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "JEEP"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "kwatth"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 1
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-text"
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "green"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "ZERO"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "kwatth"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 1
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-text"
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "purple"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Invite"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "kwatth"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 1
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-text"
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "yellow"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Non etiquete"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "kwatth"
|
|
},
|
|
{
|
|
"id": "decimals",
|
|
"value": 1
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-text"
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "orange"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "A confirmer"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-text"
|
|
}
|
|
},
|
|
{
|
|
"id": "thresholds",
|
|
"value": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "orange",
|
|
"value": 1
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "thresholds"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm",
|
|
"footer": {
|
|
"show": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "barchart",
|
|
"title": "Energie par periode et par vehicule",
|
|
"description": "Le pas suit la plage choisie : l'heure jusqu'a 4 jours, le jour jusqu'a 70, le mois au-dela. « Non etiquete » est ce qui a ete charge sans que le selecteur soit renseigne — a interpreter, pas a ignorer.",
|
|
"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),\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)\nSELECT to_char(date_trunc(pas.unite, debut), pas.forme) AS \"Periode\",\n round(coalesce(sum(coalesce(energie_station_kwh, energie_kwh)) FILTER (WHERE vehicule = 'VW'), 0)::numeric, 2) AS \"VW\",\n round(coalesce(sum(coalesce(energie_station_kwh, energie_kwh)) FILTER (WHERE vehicule = 'JEEP'), 0)::numeric, 2) AS \"JEEP\",\n round(coalesce(sum(coalesce(energie_station_kwh, energie_kwh)) FILTER (WHERE vehicule = 'ZERO'), 0)::numeric, 2) AS \"ZERO\",\n round(coalesce(sum(coalesce(energie_station_kwh, energie_kwh)) FILTER (WHERE vehicule NOT IN ('VW', 'JEEP', 'ZERO')), 0)::numeric, 2) AS \"Invite\",\n round(coalesce(sum(coalesce(energie_station_kwh, energie_kwh)) FILTER (WHERE vehicule IS NULL), 0)::numeric, 2) AS \"Non etiquete\"\nFROM session_charge, pas\nWHERE $__timeFilter(debut)\nGROUP BY date_trunc(pas.unite, debut), pas.forme\nORDER BY date_trunc(pas.unite, debut)"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 4,
|
|
"w": 24,
|
|
"h": 9
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "kwatth",
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"lineWidth": 1,
|
|
"fillOpacity": 80,
|
|
"gradientMode": "none",
|
|
"axisBorderShow": false
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "VW"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "blue"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "JEEP"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "green"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "ZERO"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "purple"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Invite"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "yellow"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Non etiquete"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "fixed",
|
|
"fixedColor": "orange"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "table",
|
|
"title": "Les sessions",
|
|
"description": "« kWh » vient du compteur de la BORNE, qui compte depuis le vrai debut de la session. « kWh integres » est mon propre calcul, qui ne couvre que ce que le service a vu — un ecart entre les deux signale un demarrage ou un redemarrage en cours de session, pas une erreur de mesure. « Debranche » confirme le vehicule apres coup : les deux partent a des heures differentes. « dont reseau » se fonde sur le mode source declare par le controleur — son intention — et non sur la puissance reseau instantanee, qui peut alimenter la maison pendant que le soleil alimente la voiture.",
|
|
"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": "SELECT to_char(debut, 'Dy DD/MM HH24:MI') AS \"Debut\",\n coalesce(vehicule, '?') AS \"Vehicule\",\n CASE WHEN vehicule_sur THEN 'confirme' ELSE 'a confirmer' END AS \"Etiquette\",\n round((extract(epoch FROM fin - debut) / 60)::numeric) AS \"Minutes\",\n round(coalesce(energie_station_kwh, energie_kwh)::numeric, 2) AS \"kWh\",\n round(energie_kwh::numeric, 2) AS \"kWh integres\",\n round(energie_reseau_kwh::numeric, 2) AS \"dont reseau\",\n round(p_max_w::numeric) AS \"P max\",\n consigne_max_a AS \"Consigne max\",\n source_mode AS \"Source au depart\",\n to_char(debranche_a, 'Dy HH24:MI') AS \"Debranche\"\nFROM session_charge WHERE $__timeFilter(debut) ORDER BY debut DESC"
|
|
}
|
|
],
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 13,
|
|
"w": 24,
|
|
"h": 11
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"align": "left",
|
|
"cellOptions": {
|
|
"type": "auto"
|
|
},
|
|
"filterable": true
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Vehicule"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 100
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"type": "color-text"
|
|
}
|
|
},
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"type": "value",
|
|
"options": {
|
|
"VW": {
|
|
"color": "blue",
|
|
"index": 0
|
|
},
|
|
"JEEP": {
|
|
"color": "green",
|
|
"index": 1
|
|
},
|
|
"ZERO": {
|
|
"color": "purple",
|
|
"index": 2
|
|
},
|
|
"?": {
|
|
"color": "orange",
|
|
"index": 3
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Doute"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 150
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "kWh"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "kwatth"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "kWh integres"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "kwatth"
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 110
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "dont reseau"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "kwatth"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "P max"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "watt"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"showHeader": true,
|
|
"cellHeight": "sm",
|
|
"footer": {
|
|
"show": false
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|