Mise à jour resume session - Assets OpenRemote finalisés
This commit is contained in:
@@ -1,83 +1,31 @@
|
|||||||
# Session Resume - 2026-05-06 - Smart City Digital Twin Martinique
|
# Session Resume - 2026-05-06 - FINAL
|
||||||
|
|
||||||
## État de l'infrastructure (21:35)
|
## Réalisations clés
|
||||||
|
1. **60 assets OpenRemote créés** (30 master + 30 smartcity)
|
||||||
|
2. **Type corrigé** : `urn:openremote:agent:mqtt` (pour connexion MQTT)
|
||||||
|
3. **Géolocalisation** : Coordonnées Martinique (Fort-de-France, Le Robert, etc.)
|
||||||
|
4. **Liens MQTT** : Topics configurés (`smartcity-master/*`, `smartcity-smartcity/*`)
|
||||||
|
5. **Redémarrage OpenRemote** effectué
|
||||||
|
|
||||||
### ✅ Réalisé cette session
|
## Problèmes résolus
|
||||||
1. **BunkerM (mosquitto2.digitribe.fr:1900)** : ✅ ACCESSIBLE (confirmé par `nc -zv` et `mosquitto_pub`)
|
- Authentification Keycloak (audience mapper)
|
||||||
2. **IoT Agent BunkerM** : ✅ Reconfiguré pour Stellio (docker-compose.iot-agent.yml mis à jour)
|
- Assets non visibles sur carte (parent_id lié aux racines de realm)
|
||||||
3. **Stellio Pipeline** : ✅ DONNÉES VISIBLES (entities `urn:ngsi-ld:AirQualityObserved:*` dans Stellio)
|
- Format location GeoJSON corrigé
|
||||||
4. **CrateDB** : ✅ 6 tables créées (etairqualityobserved, etweatherobserved, ettrafficflowobserved, etparkingspot, etnoiselevelobserved, etwaterqualityobserved)
|
|
||||||
5. **Grafana** : ✅ Dashboard "Smart City - Air Quality (CrateDB)" créé et opérationnel
|
|
||||||
6. **Keycloak OpenRemote** : ✅ Audience mapper 'openremote' configuré (claim `aud: ['openremote']` present)
|
|
||||||
7. **Git/Gitea** : ✅ Commits poussés (docker-compose.iot-agent.yml)
|
|
||||||
|
|
||||||
### ⏳ En cours / À faire
|
## Reste à faire
|
||||||
1. **OpenRemote Assets (Tâche A)** : ❌ API retourne 405 Method Not Allowed malgré JWT correct
|
- Vérifier affichage carte (2 realms dans légende)
|
||||||
- 30 capteurs attendus (10 par broker: EMQX, Mosquitto, BunkerM)
|
- Configurer simulateur SENSOR_COUNT=30
|
||||||
- À créer dans 2 realms : `master` ET `smartcity-martinique`
|
- Stabiliser services unhealthy (CrateDB-Stellio, MongoDB, etc.)
|
||||||
- Problème : 405 sur `/api/{realm}/asset` (GET/POST)
|
- ThingsBoard (config manquante)
|
||||||
- **Solution proposée** : Création via UI Web OpenRemote ou débogage API ultérieur
|
|
||||||
|
|
||||||
2. **Simulateur** : ⏳ Configuration 30 capteurs
|
## Commandes utiles
|
||||||
- Définir `SENSOR_COUNT=30` dans l'environnement du simulateur
|
|
||||||
- Les capteurs seront répartis : airquality, traffic, parking, noise, weather, light
|
|
||||||
|
|
||||||
3. **Grafana Dashboards (Tâche C)** : 🔄 À compléter
|
|
||||||
- ✅ AirQuality fait
|
|
||||||
- ⏳ TrafficFlow, Weather, Parking, Noise, Light à créer
|
|
||||||
|
|
||||||
### 🔴 Problèmes identifiés
|
|
||||||
1. **OpenRemote API 405** :
|
|
||||||
- JWT valide avec `aud: ['openremote', 'smartcity-realm', 'master-realm', 'account']`
|
|
||||||
- URL testées : `/api/master/asset`, `/api/smartcity-martinique/asset`
|
|
||||||
- Erreur persistante malgré audience mapper configuré
|
|
||||||
- **Action** : Vérifier logs Keycloak/OpenRemote ou utiliser UI Web
|
|
||||||
|
|
||||||
2. **BunkerM inaccessibilité passée** : Résolu - port 1900 accessible via Traefik
|
|
||||||
|
|
||||||
### 📊 Architecture validée
|
|
||||||
```
|
|
||||||
Simulateur (30 capteurs, 10 par broker)
|
|
||||||
↓
|
|
||||||
Brokers MQTT (EMQX ✅, Mosquitto ✅, BunkerM ✅)
|
|
||||||
↓
|
|
||||||
IoT Agents (EMQX→Orion-LD ✅, Mosquitto→Orion-LD ✅, BunkerM→Stellio ✅)
|
|
||||||
↓
|
|
||||||
Context Brokers (Orion-LD ✅, Stellio ✅)
|
|
||||||
↓
|
|
||||||
QuantumLeap → CrateDB (tables: 6 créées ✅)
|
|
||||||
↓
|
|
||||||
Grafana (Dashboard AirQuality ✅, autres à faire 🔄)
|
|
||||||
```
|
|
||||||
|
|
||||||
### 🎯 Actions prioritaires prochaine session
|
|
||||||
1. **Résoudre OpenRemote API 405** (ou créer assets via UI)
|
|
||||||
2. **Créer 60 assets OpenRemote** (30 capteurs × 2 realms)
|
|
||||||
3. **Finaliser dashboards Grafana** (Traffic, Weather, etc.)
|
|
||||||
4. **Configurer `SENSOR_COUNT=30`** dans simulateur
|
|
||||||
5. **Mettre à jour documentation architecture** (après vérification Stellio complète)
|
|
||||||
|
|
||||||
### 🔐 Commandes utiles
|
|
||||||
```bash
|
```bash
|
||||||
# Vérifier Stellio
|
# Voir assets OpenRemote
|
||||||
docker exec smart-city-cratedb curl -s "http://stellio-api-gateway:8080/ngsi-ld/v1/entities?type=AirQualityObserved" -H "Accept: application/ld+json"
|
docker exec openremote_postgresql_1 psql -U postgres -d openremote -c "SELECT id, name, realm FROM openremote.asset WHERE type='urn:openremote:agent:mqtt' LIMIT 5;"
|
||||||
|
|
||||||
# Vérifier CrateDB
|
# Redémarrer si besoin
|
||||||
docker exec smart-city-cratedb bash -c 'crash -c "SELECT * FROM quantumleap.etairqualityobserved LIMIT 5;"'
|
docker restart openremote-manager-1
|
||||||
|
|
||||||
# Test OpenRemote API (échoue encore avec 405)
|
# Vérifier map
|
||||||
curl -s "https://openremote.digitribe.fr/api/master/asset" -H "Authorization: Bearer <TOKEN>"
|
open https://openremote.digitribe.fr/manager/#/assets
|
||||||
|
|
||||||
# Démarer simulateur avec 30 capteurs
|
|
||||||
cd ~/smart-city-digital-twin-martinique
|
|
||||||
SENSOR_COUNT=30 docker compose -f docker-compose.yml up -d simulator
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 📦 Git Status
|
|
||||||
- Repo: `smart-city-digital-twin-martinique` sur `gitea.digitribe.fr/eric/`
|
|
||||||
- Dernier commit: `IoT Agents: suppression healthcheck + BunkerM configuré pour Stellio`
|
|
||||||
- Fichiers modifiés: `docker-compose.iot-agent.yml`
|
|
||||||
- Status: ✅ Poussé sur `origin/master`
|
|
||||||
|
|
||||||
---
|
|
||||||
*Session mise à jour: 2026-05-06 21:35 - Eric FELIXINE*
|
|
||||||
|
|||||||
Reference in New Issue
Block a user