Add FlexMeasures plugins, USEF protocol, and Cariflex simulator
- flexmeasures-entsoe: ENTSO-E data plugin - flexmeasures-weather: Weather data plugin - USEF Flex Trading Protocol PDF (2.4MB) - Cariflex simulator (publishes to Redis) - Dashboard Grafana updated with correct InfluxDB queries - All tools extracted in /tools/
This commit is contained in:
134
config/cariflex-dashboard.json
Normal file
134
config/cariflex-dashboard.json
Normal file
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"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": "Capteurs Air Quality (10)",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
|
||||
"datasource": {"type": "influxdb", "uid": "influxdb-v2"},
|
||||
"targets": [{
|
||||
"query": "from(bucket:\"smartcity\") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r[\"_measurement\"] == \"mqtt_consumer\") |> filter(fn: (r) => r[\"topic\"] =~ /airquality/) |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)",
|
||||
"refId": "A"
|
||||
}],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "none"},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"title": "Capteurs Weather (10)",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
|
||||
"datasource": {"type": "influxdb", "uid": "influxdb-v2"},
|
||||
"targets": [{
|
||||
"query": "from(bucket:\"smartcity\") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r[\"_measurement\"] == \"mqtt_consumer\") |> filter(fn: (r) => r[\"topic\"] =~ /weather/) |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)",
|
||||
"refId": "A"
|
||||
}],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "celsius", "min": 15, "max": 40},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"title": "Capteurs Traffic (10)",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 8},
|
||||
"datasource": {"type": "influxdb", "uid": "influxdb-v2"},
|
||||
"targets": [{
|
||||
"query": "from(bucket:\"smartcity\") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r[\"_measurement\"] == \"mqtt_consumer\") |> filter(fn: (r) => r[\"topic\"] =~ /traffic/) |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)",
|
||||
"refId": "A"
|
||||
}],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "kmh", "min": 0, "max": 100},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"title": "Capteurs Parking (10)",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 8},
|
||||
"datasource": {"type": "influxdb", "uid": "influxdb-v2"},
|
||||
"targets": [{
|
||||
"query": "from(bucket:\"smartcity\") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r[\"_measurement\"] == \"mqtt_consumer\") |> filter(fn: (r) => r[\"topic\"] =~ /parking/) |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)",
|
||||
"refId": "A"
|
||||
}],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "percent", "min": 0, "max": 100},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"title": "Battery Level (tous capteurs)",
|
||||
"type": "gauge",
|
||||
"gridPos": {"h": 6, "w": 6, "x": 0, "y": 16},
|
||||
"datasource": {"type": "influxdb", "uid": "influxdb-v2"},
|
||||
"targets": [{
|
||||
"query": "from(bucket:\"smartcity\") |> range(start: -5m) |> filter(fn: (r) => r[\"_measurement\"] == \"mqtt_consumer\") |> filter(fn: (r) => r[\"_field\"] == \"battery_level\") |> mean()",
|
||||
"refId": "A"
|
||||
}],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "percent", "min": 0, "max": 100, "thresholds": {"steps": [{"color": "red", "value": 0}, {"color": "yellow", "value": 20}, {"color": "green", "value": 50}]}},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"title": "Temperature (°C)",
|
||||
"type": "stat",
|
||||
"gridPos": {"h": 6, "w": 6, "x": 6, "y": 16},
|
||||
"datasource": {"type": "influxdb", "uid": "influxdb-v2"},
|
||||
"targets": [{
|
||||
"query": "from(bucket:\"smartcity\") |> range(start: -5m) |> filter(fn: (r) => r[\"_measurement\"] == \"mqtt_consumer\") |> filter(fn: (r) => r[\"_field\"] == \"temperature_celsius\") |> mean()",
|
||||
"refId": "A"
|
||||
}],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "celsius", "min": 15, "max": 40},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"title": "Noise Level (dB)",
|
||||
"type": "stat",
|
||||
"gridPos": {"h": 6, "w": 6, "x": 12, "y": 16},
|
||||
"datasource": {"type": "influxdb", "uid": "influxdb-v2"},
|
||||
"targets": [{
|
||||
"query": "from(bucket:\"smartcity\") |> range(start: -5m) |> filter(fn: (r) => r[\"_measurement\"] == \"mqtt_consumer\") |> filter(fn: (r) => r[\"_field\"] == \"noise_level_db\") |> mean()",
|
||||
"refId": "A"
|
||||
}],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "dB", "min": 0, "max": 120},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"title": "Rain (mm)",
|
||||
"type": "stat",
|
||||
"gridPos": {"h": 6, "w": 6, "x": 18, "y": 16},
|
||||
"datasource": {"type": "influxdb", "uid": "influxdb-v2"},
|
||||
"targets": [{
|
||||
"query": "from(bucket:\"smartcity\") |> range(start: -1h) |> filter(fn: (r) => r[\"_measurement\"] == \"mqtt_consumer\") |> filter(fn: (r) => r[\"_field\"] == \"rain_mm\") |> sum()",
|
||||
"refId": "A"
|
||||
}],
|
||||
"fieldConfig": {
|
||||
"defaults": {"unit": "mm", "min": 0},
|
||||
"overrides": []
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"overwrite": true
|
||||
}
|
||||
87
config/docker-compose-citrineos.yml
Normal file
87
config/docker-compose-citrineos.yml
Normal file
@@ -0,0 +1,87 @@
|
||||
# Cariflex - CitrineOS docker-compose (adapté pour l'intégration Cariflex)
|
||||
# Basé sur https://github.com/citrineos/citrineos-core
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
citrineos-server:
|
||||
image: ghcr.io/citrineos/citrineos-server:latest
|
||||
container_name: cariflex-citrineos-server
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
APP_NAME: "all"
|
||||
APP_ENV: "docker"
|
||||
AWS_REGION: us-east-1
|
||||
AWS_ACCESS_KEY_ID: minioadmin
|
||||
AWS_SECRET_ACCESS_KEY: minioadmin
|
||||
DB_STRATEGY: "migrate"
|
||||
BOOTSTRAP_CITRINEOS_DATABASE_HOST: "cariflex-citrineos-db"
|
||||
BOOTSTRAP_CITRINEOS_CONFIG_FILENAME: "config.json"
|
||||
BOOTSTRAP_CITRINEOS_FILE_ACCESS_TYPE: "local"
|
||||
BOOTSTRAP_CITRINEOS_FILE_ACCESS_LOCAL_DEFAULT_FILE_PATH: "/data"
|
||||
CONFIG_CITRINEOS_WIPE_FILE_ON_START: "true"
|
||||
depends_on:
|
||||
cariflex-citrineos-db:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- 8080:8080
|
||||
- 8443:8443
|
||||
volumes:
|
||||
- citrineos-data:/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "node -e \"const net = require('net'); const client = net.createConnection(8080, '127.0.0.1', () => { client.end(); process.exit(0); }); client.on('error', () => process.exit(1)); client.setTimeout(5000, () => { client.destroy(); process.exit(1); });\""]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
networks:
|
||||
- traefik-public
|
||||
- cariflex-internal
|
||||
|
||||
cariflex-citrineos-db:
|
||||
image: postgis/postgis:16-3.5
|
||||
container_name: cariflex-citrineos-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: citrine
|
||||
POSTGRES_USER: citrine
|
||||
POSTGRES_PASSWORD: citrine
|
||||
volumes:
|
||||
- citrineos-db-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: "pg_isready --username=citrine"
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
networks:
|
||||
- cariflex-internal
|
||||
|
||||
cariflex-amqp:
|
||||
image: rabbitmq:3-management
|
||||
container_name: cariflex-amqp
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: guest
|
||||
RABBITMQ_DEFAULT_PASS: guest
|
||||
volumes:
|
||||
- citrineos-amqp-data:/var/lib/rabbitmq
|
||||
healthcheck:
|
||||
test: rabbitmq-diagnostics -q check_port_connectivity
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
networks:
|
||||
- cariflex-internal
|
||||
|
||||
volumes:
|
||||
citrineos-data:
|
||||
driver: local
|
||||
citrineos-db-data:
|
||||
driver: local
|
||||
citrineos-amqp-data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
traefik-public:
|
||||
external: true
|
||||
cariflex-internal:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user