- Create PostgreSQL-FlexMeasures datasource in Grafana (id: 31) - Update dashboard queries to read from FlexMeasures DB (timed_belief) - Replace FlexMeasures logo in navbar template with Cariflex logo - Dashboard now shows real data from Cariflex simulator
87 lines
3.6 KiB
JSON
87 lines
3.6 KiB
JSON
{
|
|
"dashboard": {
|
|
"id": null,
|
|
"uid": "cariflex-main",
|
|
"title": "Cariflex - Supervision Énergétique",
|
|
"tags": ["cariflex", "energy", "martinique"],
|
|
"timezone": "America/Martinique",
|
|
"refresh": "30s",
|
|
"time": {"from": "now-24h", "to": "now"},
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"title": "Production PV (kW) - 10 panneaux",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
|
|
"datasource": {"type": "postgres", "uid": "31"},
|
|
"targets": [{
|
|
"rawSql": "SELECT event_start as time, SUM(event_value) as power_kw FROM timed_belief WHERE sensor_id BETWEEN 41 AND 50 AND event_start > NOW() - INTERVAL '24 hours' GROUP BY event_start ORDER BY event_start",
|
|
"refId": "A"
|
|
}],
|
|
"fieldConfig": {"defaults": {"unit": "kW", "min": 0, "max": 50}}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "Consommation Bornes VE (kW) - 10 bornes",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
|
|
"datasource": {"type": "postgres", "uid": "31"},
|
|
"targets": [{
|
|
"rawSql": "SELECT event_start as time, SUM(event_value) as power_kw FROM timed_belief WHERE sensor_id BETWEEN 61 AND 70 AND event_start > NOW() - INTERVAL '24 hours' GROUP BY event_start ORDER BY event_start",
|
|
"refId": "A"
|
|
}],
|
|
"fieldConfig": {"defaults": {"unit": "kW", "min": 0, "max": 220}}
|
|
},
|
|
{
|
|
"id": 3,
|
|
"title": "Batteries - État de Charge (kWh)",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 8, "x": 0, "y": 8},
|
|
"datasource": {"type": "postgres", "uid": "31"},
|
|
"targets": [{
|
|
"rawSql": "SELECT event_start as time, AVG(event_value) as soc_kwh FROM timed_belief WHERE sensor_id BETWEEN 51 AND 60 AND event_start > NOW() - INTERVAL '24 hours' GROUP BY event_start ORDER BY event_start",
|
|
"refId": "A"
|
|
}],
|
|
"fieldConfig": {"defaults": {"unit": "kWh", "min": 0, "max": 100}}
|
|
},
|
|
{
|
|
"id": 4,
|
|
"title": "VE V2G - État de Charge (kWh)",
|
|
"type": "timeseries",
|
|
"gridPos": {"h": 8, "w": 8, "x": 8, "y": 8},
|
|
"datasource": {"type": "postgres", "uid": "31"},
|
|
"targets": [{
|
|
"rawSql": "SELECT event_start as time, AVG(event_value) as soc_kwh FROM timed_belief WHERE sensor_id BETWEEN 71 AND 80 AND event_start > NOW() - INTERVAL '24 hours' GROUP BY event_start ORDER BY event_start",
|
|
"refId": "A"
|
|
}],
|
|
"fieldConfig": {"defaults": {"unit": "kWh", "min": 0, "max": 75}}
|
|
},
|
|
{
|
|
"id": 5,
|
|
"title": "Flexibilité Totale (kW)",
|
|
"type": "stat",
|
|
"gridPos": {"h": 8, "w": 8, "x": 16, "y": 8},
|
|
"datasource": {"type": "postgres", "uid": "31"},
|
|
"targets": [{
|
|
"rawSql": "SELECT SUM(event_value) as flex_kw FROM timed_belief WHERE sensor_id BETWEEN 51 AND 80 AND event_start > NOW() - INTERVAL '1 hour' GROUP BY sensor_id ORDER BY event_start DESC LIMIT 1",
|
|
"refId": "A"
|
|
}],
|
|
"fieldConfig": {"defaults": {"unit": "kW", "min": 0}}
|
|
},
|
|
{
|
|
"id": 6,
|
|
"title": "Carte des Actifs Cariflex",
|
|
"type": "geomap",
|
|
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 16},
|
|
"datasource": {"type": "postgres", "uid": "31"},
|
|
"targets": [{
|
|
"rawSql": "SELECT g.name, g.latitude, g.longitude, gt.name as type FROM generic_asset g JOIN generic_asset_type gt ON g.generic_asset_type_id = gt.id ORDER BY gt.id, g.id",
|
|
"refId": "A"
|
|
}],
|
|
"options": {"view": {"center": [14.6, -61.2], "zoom": 10}}
|
|
}
|
|
]
|
|
},
|
|
"overwrite": true
|
|
}
|