120 lines
4.7 KiB
HTML
120 lines
4.7 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<title>Smart City Data Flow Diagram</title>
|
||
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
|
||
<script>
|
||
mermaid.initialize({ startOnLoad: true, theme: 'dark' });
|
||
</script>
|
||
<style>
|
||
body {
|
||
background-color: #1a1a1a;
|
||
color: white;
|
||
font-family: Arial, sans-serif;
|
||
padding: 20px;
|
||
}
|
||
.mermaid {
|
||
background-color: #2a2a2a;
|
||
padding: 20px;
|
||
border-radius: 10px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<h1>Smart City Digital Twin - Data Flow Diagram</h1>
|
||
<p>Updated: 2026-05-06 - Architecture with 3 IoT Agents (one per MQTT broker)</p>
|
||
<div class="mermaid">
|
||
graph TB
|
||
subgraph Simulateur["🖥️ Simulateur (Host Python)"]
|
||
SIM[Smart City Simulator<br/>10 capteurs<br/>Intervalle: configurable]
|
||
end
|
||
|
||
subgraph MQTT_Brokers["📡 MQTT Brokers"]
|
||
EMQ[EMQX<br/>port 11883]
|
||
MOS[Mosquitto<br/>port 1883]
|
||
BUN[BunkerM<br/>port 1900<br/>MQTTS/TLS]
|
||
end
|
||
|
||
subgraph IoT_Agent["🤖 3 IoT Agents (NGSI-LD)"]
|
||
IOTA_EMQ[IoT-Agent-EMQX<br/>port 4041<br/>Ecoute EMQX]
|
||
IOTA_MOS[IoT-Agent-Mosquitto<br/>port 4042<br/>Ecoute Mosquitto]
|
||
IOTA_BUN[IoT-Agent-BunkerM<br/>port 4043<br/>Ecoute BunkerM]
|
||
end
|
||
|
||
subgraph CB["🔗 Context Brokers (NGSI-LD)"]
|
||
ORI[Orion-LD<br/>NGSI-v2<br/>port 1026]
|
||
STE[Stellio<br/>NGSI-LD<br/>port 8080]
|
||
FRO[FROST-Server<br/>SensorThings<br/>port 8080]
|
||
end
|
||
|
||
subgraph Analytics["📈 Analytics & Time-Series"]
|
||
QL[QuantumLeap<br/>NGSI-LD → CrateDB<br/>port 8668]
|
||
CRATEDB[CrateDB<br/>PostgreSQL-compatible<br/>port 4200/5432]
|
||
end
|
||
|
||
subgraph Storage["💾 Stockage & Métriques"]
|
||
INF[InfluxDB<br/>Bucket: iot_data<br/>port 8086]
|
||
PRO[Prometheus<br/>Scrape: /metrics<br/>port 9090]
|
||
GEO[GeoServer<br/>WMS/WFS/WMTS<br/>port 8080]
|
||
end
|
||
|
||
subgraph IoT_Platform["🏢 Plateforme IoT"]
|
||
ORM[OpenRemote Manager<br/>MQTT Agent<br/>port 8080]
|
||
KC[Keycloak<br/>port 8080]
|
||
end
|
||
|
||
subgraph VIZ["📊 Visualisation"]
|
||
GRA[Grafana<br/>Dashboards<br/>port 3001]
|
||
MAP[MapStore<br/>WMS/WFS<br/>port 8080]
|
||
end
|
||
|
||
%% ── Flux Simulateur ──────────────────────────────────────────
|
||
SIM -->|"1️⃣ MQTT publish<br/>smartcity-api-key/{id}/attrs"| EMQ
|
||
SIM -->|"1️⃣ MQTT publish"| MOS
|
||
SIM -->|"1️⃣ MQTT publish"| BUN
|
||
SIM -->|"5️⃣ InfluxDB v2 API<br/>async non-bloquant"| INF
|
||
|
||
%% ── Flux MQTT → IoT Agents ──────────────────────────────────
|
||
EMQ -->|"MQTT subscribe<br/>smartcity-api-key/#"| IOTA_EMQ
|
||
MOS -->|"MQTT subscribe"| IOTA_MOS
|
||
BUN -->|"MQTT subscribe"| IOTA_BUN
|
||
|
||
%% ── Flux IoT Agents → Context Brokers ───────────────────────
|
||
IOTA_EMQ -->|"2️⃣ NGSI-v2 POST<br/>/v2/entities"| ORI
|
||
IOTA_MOS -->|"2️⃣ NGSI-v2 POST"| ORI
|
||
IOTA_BUN -->|"2️⃣ NGSI-v2 POST"| ORI
|
||
|
||
%% ── Flux Context Brokers → QuantumLeap ───────────────────
|
||
ORI -->|"NGSI-v2 Subscription<br/>→ QuantumLeap"| QL
|
||
|
||
%% ── Flux QuantumLeap → CrateDB ────────────────────────────
|
||
QL -->|"Insert<br/>PostgreSQL wire"| CRATEDB
|
||
|
||
%% ── Visualisation ───────────────────────────────────────────
|
||
CRATEDB -->|"PostgreSQL Datasource"| GRA
|
||
INF -->|"Datasource Flux IoT"| GRA
|
||
ORI -->|"NGSI-v2 Datasource"| GRA
|
||
GEO -->|"WMS/WMTS"| MAP
|
||
ORM -->|MapSettings<br/>Martinique| MAP
|
||
ORM -->|"Live assets<br/>REST"| GRA
|
||
|
||
%% ── OpenRemote MQTT Agent ───────────────────────────────────
|
||
EMQ -->|"6️⃣ Subscribe<br/>city/sensors/#"| ORM
|
||
MOS -->|"6️⃣ Subscribe"| ORM
|
||
BUN -->|"6️⃣ Subscribe"| ORM
|
||
|
||
%% ── Métriques Prometheus ───────────────────────────────────
|
||
SIM -->|"7️⃣ /metrics<br/>port 8001"| PRO
|
||
EMQ -->|"/api/v5/metrics"| PRO
|
||
STE -->|"/actuator/prometheus"| PRO
|
||
INF -->|"/metrics"| PRO
|
||
ORM -->|"/actuator/prometheus"| PRO
|
||
GRA -->|"/metrics"| PRO
|
||
IOTA_EMQ -->|"/metrics"| PRO
|
||
IOTA_MOS -->|"/metrics"| PRO
|
||
IOTA_BUN -->|"/metrics"| PRO
|
||
QL -->|"/metrics"| PRO
|
||
</div>
|
||
</body>
|
||
</html>
|