454 lines
12 KiB
HTML
454 lines
12 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="generator" content="pandoc" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||
<title>data-flow-diagram</title>
|
||
<style>
|
||
/* Default styles provided by pandoc.
|
||
** See https://pandoc.org/MANUAL.html#variables-for-html for config info.
|
||
*/
|
||
html {
|
||
color: #1a1a1a;
|
||
background-color: #fdfdfd;
|
||
}
|
||
body {
|
||
margin: 0 auto;
|
||
max-width: 36em;
|
||
padding-left: 50px;
|
||
padding-right: 50px;
|
||
padding-top: 50px;
|
||
padding-bottom: 50px;
|
||
hyphens: auto;
|
||
overflow-wrap: break-word;
|
||
text-rendering: optimizeLegibility;
|
||
font-kerning: normal;
|
||
}
|
||
@media (max-width: 600px) {
|
||
body {
|
||
font-size: 0.9em;
|
||
padding: 12px;
|
||
}
|
||
h1 {
|
||
font-size: 1.8em;
|
||
}
|
||
}
|
||
@media print {
|
||
html {
|
||
background-color: white;
|
||
}
|
||
body {
|
||
background-color: transparent;
|
||
color: black;
|
||
font-size: 12pt;
|
||
}
|
||
p, h2, h3 {
|
||
orphans: 3;
|
||
widows: 3;
|
||
}
|
||
h2, h3, h4 {
|
||
page-break-after: avoid;
|
||
}
|
||
}
|
||
p {
|
||
margin: 1em 0;
|
||
}
|
||
a {
|
||
color: #1a1a1a;
|
||
}
|
||
a:visited {
|
||
color: #1a1a1a;
|
||
}
|
||
img {
|
||
max-width: 100%;
|
||
}
|
||
svg {
|
||
height: auto;
|
||
max-width: 100%;
|
||
}
|
||
h1, h2, h3, h4, h5, h6 {
|
||
margin-top: 1.4em;
|
||
}
|
||
h5, h6 {
|
||
font-size: 1em;
|
||
font-style: italic;
|
||
}
|
||
h6 {
|
||
font-weight: normal;
|
||
}
|
||
ol, ul {
|
||
padding-left: 1.7em;
|
||
margin-top: 1em;
|
||
}
|
||
li > ol, li > ul {
|
||
margin-top: 0;
|
||
}
|
||
blockquote {
|
||
margin: 1em 0 1em 1.7em;
|
||
padding-left: 1em;
|
||
border-left: 2px solid #e6e6e6;
|
||
color: #606060;
|
||
}
|
||
code {
|
||
font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
|
||
font-size: 85%;
|
||
margin: 0;
|
||
hyphens: manual;
|
||
}
|
||
pre {
|
||
margin: 1em 0;
|
||
overflow: auto;
|
||
}
|
||
pre code {
|
||
padding: 0;
|
||
overflow: visible;
|
||
overflow-wrap: normal;
|
||
}
|
||
.sourceCode {
|
||
background-color: transparent;
|
||
overflow: visible;
|
||
}
|
||
hr {
|
||
border: none;
|
||
border-top: 1px solid #1a1a1a;
|
||
height: 1px;
|
||
margin: 1em 0;
|
||
}
|
||
table {
|
||
margin: 1em 0;
|
||
border-collapse: collapse;
|
||
width: 100%;
|
||
overflow-x: auto;
|
||
display: block;
|
||
font-variant-numeric: lining-nums tabular-nums;
|
||
}
|
||
table caption {
|
||
margin-bottom: 0.75em;
|
||
}
|
||
tbody {
|
||
margin-top: 0.5em;
|
||
border-top: 1px solid #1a1a1a;
|
||
border-bottom: 1px solid #1a1a1a;
|
||
}
|
||
th {
|
||
border-top: 1px solid #1a1a1a;
|
||
padding: 0.25em 0.5em 0.25em 0.5em;
|
||
}
|
||
td {
|
||
padding: 0.125em 0.5em 0.25em 0.5em;
|
||
}
|
||
header {
|
||
margin-bottom: 4em;
|
||
text-align: center;
|
||
}
|
||
#TOC li {
|
||
list-style: none;
|
||
}
|
||
#TOC ul {
|
||
padding-left: 1.3em;
|
||
}
|
||
#TOC > ul {
|
||
padding-left: 0;
|
||
}
|
||
#TOC a:not(:hover) {
|
||
text-decoration: none;
|
||
}
|
||
code{white-space: pre-wrap;}
|
||
span.smallcaps{font-variant: small-caps;}
|
||
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
||
div.column{flex: auto; overflow-x: auto;}
|
||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||
/* The extra [class] is a hack that increases specificity enough to
|
||
override a similar rule in reveal.js */
|
||
ul.task-list[class]{list-style: none;}
|
||
ul.task-list li input[type="checkbox"] {
|
||
font-size: inherit;
|
||
width: 0.8em;
|
||
margin: 0 0.8em 0.2em -1.6em;
|
||
vertical-align: middle;
|
||
}
|
||
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<nav id="TOC" role="doc-toc">
|
||
<ul>
|
||
<li><a href="#smart-city-digital-twin-diagramme-des-flux-de-données"
|
||
id="toc-smart-city-digital-twin-diagramme-des-flux-de-données">Smart
|
||
City Digital Twin — Diagramme des Flux de Données</a>
|
||
<ul>
|
||
<li><a href="#vue-densemble" id="toc-vue-densemble">Vue
|
||
d’ensemble</a></li>
|
||
<li><a href="#diagramme-mermaid" id="toc-diagramme-mermaid">Diagramme
|
||
Mermaid</a></li>
|
||
<li><a href="#description-des-flux"
|
||
id="toc-description-des-flux">Description des flux</a>
|
||
<ul>
|
||
<li><a href="#génération-des-données-simulator"
|
||
id="toc-génération-des-données-simulator">1. <strong>Génération des
|
||
données (Simulator)</strong></a></li>
|
||
<li><a href="#ingestion-mqtt-brokers" id="toc-ingestion-mqtt-brokers">2.
|
||
<strong>Ingestion MQTT (Brokers)</strong></a></li>
|
||
<li><a href="#context-brokers-ngsi-ld-sensorthings"
|
||
id="toc-context-brokers-ngsi-ld-sensorthings">3. <strong>Context Brokers
|
||
(NGSI-LD & SensorThings)</strong></a></li>
|
||
<li><a href="#plateforme-iot-openremote"
|
||
id="toc-plateforme-iot-openremote">4. <strong>Plateforme IoT
|
||
(OpenRemote)</strong></a></li>
|
||
<li><a href="#stockage-métriques" id="toc-stockage-métriques">5.
|
||
<strong>Stockage & Métriques</strong></a></li>
|
||
<li><a href="#visualisation-analyse" id="toc-visualisation-analyse">6.
|
||
<strong>Visualisation & Analyse</strong></a></li>
|
||
</ul></li>
|
||
<li><a href="#technologies-clés" id="toc-technologies-clés">Technologies
|
||
clés</a></li>
|
||
<li><a href="#fichiers-associés" id="toc-fichiers-associés">Fichiers
|
||
associés</a></li>
|
||
</ul></li>
|
||
</ul>
|
||
</nav>
|
||
<h1 id="smart-city-digital-twin-diagramme-des-flux-de-données">Smart
|
||
City Digital Twin — Diagramme des Flux de Données</h1>
|
||
<h2 id="vue-densemble">Vue d’ensemble</h2>
|
||
<p>Ce diagramme illustre le flux complet des données IoT du simulateur
|
||
vers les différentes couches de traitement, de stockage et de
|
||
visualisation.</p>
|
||
<hr />
|
||
<h2 id="diagramme-mermaid">Diagramme Mermaid</h2>
|
||
<pre class="mermaid"><code>graph TB
|
||
SIM[Smart City Simulator]
|
||
SENS[Capteurs IoT Reels]
|
||
EMQ[EMQX]
|
||
MOS[Mosquitto]
|
||
BUN[BunkerM]
|
||
ORI[Orion-LD]
|
||
STE[Stellio]
|
||
FRO[FROST-Server]
|
||
ORM[OpenRemote Manager]
|
||
KC[Keycloak]
|
||
INF[InfluxDB]
|
||
PRO[Prometheus]
|
||
GEO[GeoServer]
|
||
GRA[Grafana]
|
||
MAP[MapStore]
|
||
UI[OpenRemote UI]
|
||
|
||
SIM --> EMQ
|
||
SIM --> MOS
|
||
SIM --> BUN
|
||
SENS --> EMQ
|
||
SENS --> MOS
|
||
SENS --> BUN
|
||
SENS -.-> ORM
|
||
EMQ --> ORI
|
||
EMQ --> STE
|
||
EMQ --> FRO
|
||
EMQ --> ORM
|
||
MOS --> ORM
|
||
BUN --> ORM
|
||
ORM --> UI
|
||
ORM -.-> KC
|
||
SIM --> INF
|
||
ORI --> GRA
|
||
STE --> GRA
|
||
FRO --> GRA
|
||
ORI -.-> GEO
|
||
STE -.-> GEO
|
||
FRO -.-> GEO
|
||
GEO --> MAP
|
||
ORM --> GRA
|
||
EMQ -.-> PRO
|
||
ORI -.-> PRO
|
||
STE -.-> PRO
|
||
ORM -.-> PRO</code></pre>
|
||
<hr />
|
||
<h2 id="description-des-flux">Description des flux</h2>
|
||
<h3 id="génération-des-données-simulator">1. <strong>Génération des
|
||
données (Simulator)</strong></h3>
|
||
<ul>
|
||
<li><strong>Smart City Simulator</strong> (Python) génère des données
|
||
pour 10 capteurs (Traffic, Air Quality, Parking, Noise, Weather,
|
||
Light)</li>
|
||
<li>Intervalle de publication : 10 secondes</li>
|
||
<li>Protocoles : MQTT (vers brokers uniquement)</li>
|
||
<li><strong>⚠️ Projet</strong> : Le simulateur n’envoie PAS directement
|
||
à OpenRemote (pas de REST API)</li>
|
||
</ul>
|
||
<h3 id="ingestion-mqtt-brokers">2. <strong>Ingestion MQTT
|
||
(Brokers)</strong></h3>
|
||
<ul>
|
||
<li><strong>EMQX</strong> (port 11883) : Broker public, reçoit tous les
|
||
capteurs</li>
|
||
<li><strong>Mosquitto</strong> (port 1883) : Via Traefik, accès
|
||
externe</li>
|
||
<li><strong>BunkerM</strong> (port 1900) : MQTTS (TLS), accès
|
||
sécurisé</li>
|
||
</ul>
|
||
<h3 id="context-brokers-ngsi-ld-sensorthings">3. <strong>Context Brokers
|
||
(NGSI-LD & SensorThings)</strong></h3>
|
||
<ul>
|
||
<li><strong>Orion-LD</strong> : Reçoit les données au format NGSI-LD
|
||
<ul>
|
||
<li>10 entités (TrafficFlowObserved, AirQualityObserved, etc.)</li>
|
||
<li>Smart Data Models utilisés</li>
|
||
</ul></li>
|
||
<li><strong>Stellio</strong> : Alternative NGSI-LD
|
||
<ul>
|
||
<li>14 payloads entités</li>
|
||
<li>Contexte :
|
||
<code>https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld</code></li>
|
||
</ul></li>
|
||
<li><strong>FROST-Server</strong> : SensorThings API
|
||
<ul>
|
||
<li>21 256+ observations</li>
|
||
<li>PostgreSQL + TimescaleDB</li>
|
||
</ul></li>
|
||
</ul>
|
||
<h3 id="plateforme-iot-openremote">4. <strong>Plateforme IoT
|
||
(OpenRemote)</strong></h3>
|
||
<ul>
|
||
<li><strong>OpenRemote Manager</strong> (realm <code>smartcity</code>)
|
||
<ul>
|
||
<li>33 assets IoT configurés</li>
|
||
<li>Carte Martinique (mapsettings.json)</li>
|
||
<li>Réception via <strong>MQTT Agent</strong> depuis les brokers (EMQX,
|
||
Mosquitto, BunkerM)</li>
|
||
<li>Peut aussi recevoir directement des capteurs IoT (via MQTT)</li>
|
||
</ul></li>
|
||
<li><strong>Keycloak</strong> : Authentification OpenID Connect
|
||
<ul>
|
||
<li>Client <code>openremote</code> avec Service Account</li>
|
||
<li>Token endpoint :
|
||
<code>/auth/realms/smartcity/protocol/openid-connect/token</code></li>
|
||
</ul></li>
|
||
</ul>
|
||
<h3 id="stockage-métriques">5. <strong>Stockage &
|
||
Métriques</strong></h3>
|
||
<ul>
|
||
<li><strong>InfluxDB</strong> : Stockage temporel pour Grafana
|
||
<ul>
|
||
<li>Bucket : <code>iot_data</code></li>
|
||
<li>Datasource dans Grafana</li>
|
||
</ul></li>
|
||
<li><strong>Prometheus</strong> : Collecte des métriques
|
||
<ul>
|
||
<li>MQTT brokers, Context brokers, OpenRemote</li>
|
||
</ul></li>
|
||
<li><strong>GeoServer</strong> : Données géospatiales
|
||
<ul>
|
||
<li>PostGIS pour centralisation</li>
|
||
<li>WMS/WFS pour MapStore</li>
|
||
</ul></li>
|
||
</ul>
|
||
<h3 id="visualisation-analyse">6. <strong>Visualisation &
|
||
Analyse</strong></h3>
|
||
<ul>
|
||
<li><strong>Grafana</strong> (port 3001)
|
||
<ul>
|
||
<li>Dashboard : <code>smartcity-martinique-2026</code></li>
|
||
<li>Datasources : InfluxDB, FROST, Orion-LD</li>
|
||
</ul></li>
|
||
<li><strong>MapStore</strong> : Cartographie
|
||
<ul>
|
||
<li>Sources WMS/WFS depuis GeoServer</li>
|
||
</ul></li>
|
||
<li><strong>OpenRemote UI</strong> : Manager Interface
|
||
<ul>
|
||
<li>Visualisation des assets realm Smart City</li>
|
||
</ul></li>
|
||
</ul>
|
||
<hr />
|
||
<h2 id="technologies-clés">Technologies clés</h2>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Composant</th>
|
||
<th>Technologie</th>
|
||
<th>Port</th>
|
||
<th>Statut</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>Simulator</td>
|
||
<td>Python + paho-mqtt</td>
|
||
<td>Interne</td>
|
||
<td>✅ Actif</td>
|
||
</tr>
|
||
<tr>
|
||
<td>EMQX</td>
|
||
<td>MQTT Broker</td>
|
||
<td>11883</td>
|
||
<td>✅ Connecté</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Orion-LD</td>
|
||
<td>NGSI-LD Broker</td>
|
||
<td>1026</td>
|
||
<td>⚠️ À vérifier</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Stellio</td>
|
||
<td>NGSI-LD Broker</td>
|
||
<td>8080</td>
|
||
<td>⚠️ À vérifier</td>
|
||
</tr>
|
||
<tr>
|
||
<td>FROST-Server</td>
|
||
<td>SensorThings API</td>
|
||
<td>8080</td>
|
||
<td>⚠️ À vérifier</td>
|
||
</tr>
|
||
<tr>
|
||
<td>OpenRemote</td>
|
||
<td>IoT Platform</td>
|
||
<td>8080</td>
|
||
<td>⚠️ 403 (Service Account)</td>
|
||
</tr>
|
||
<tr>
|
||
<td>InfluxDB</td>
|
||
<td>Time Series DB</td>
|
||
<td>8086</td>
|
||
<td>✅ Configuré</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Grafana</td>
|
||
<td>Visualization</td>
|
||
<td>3001</td>
|
||
<td>✅ Dashboard créé</td>
|
||
</tr>
|
||
<tr>
|
||
<td>GeoServer</td>
|
||
<td>GeoServer</td>
|
||
<td>8080</td>
|
||
<td>⚠️ À intégrer</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Prometheus</td>
|
||
<td>Metrics</td>
|
||
<td>9090</td>
|
||
<td>✅ En cours</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<hr />
|
||
<h2 id="fichiers-associés">Fichiers associés</h2>
|
||
<ul>
|
||
<li><strong>Simulator</strong> :
|
||
<code>~/smart-city-digital-twin-martinique/simulator.py</code></li>
|
||
<li><strong>Dashboard Grafana</strong> :
|
||
<code>~/smart-city-digital-twin-martinique/grafana_dashboard_smartcity.json</code></li>
|
||
<li><strong>Ce diagramme</strong> :
|
||
<code>~/smart-city-digital-twin-martinique/data-flow-diagram.md</code></li>
|
||
<li><strong>Session Resume</strong> :
|
||
<code>~/smart-city-digital-twin-martinique/session_resume_2026-05-04.md</code></li>
|
||
</ul>
|
||
<hr />
|
||
<p><strong>Dernière mise à jour :</strong> 04 Mai 2026<br />
|
||
<strong>Projet :</strong> Smart City Digital Twin Martinique<br />
|
||
<strong>URL Grafana :</strong>
|
||
http://localhost:3001/d/smartcity-martinique-2026</p>
|
||
</body>
|
||
</html>
|