# Session Resume - 2026-05-25 ## Objectifs Diagnostiquer et corriger : OpenRemote Bad Gateway + Grafana dashboard sans données. ## Diagnostic effectué ### Problème 1 : OpenRemote Bad Gateway (CRITIQUE) - **Cause** : `timescaledb_toolkit` extension PostgreSQL manquante - Image `timescale/timescaledb:latest-pg15` (Alpine) n'inclut PAS `timescaledb_toolkit` - Flyway tente de créer l'extension au démarrage → échoue → Manager crash en boucle - **Action** : Changement d'image PostgreSQL → `timescale/timescaledb-ha:pg15` (Debian, inclut timescaledb_toolkit) - **Statut** : Image téléchargée (2.25GB), container PG recréé (volume supprimé et recréé) - **À reprendre** : `cd /home/eric/openremote && docker-compose up -d postgresql` puis `docker-compose up -d` ### Problème 2 : Telegraf crash en boucle (CORRIGÉ) - **Cause 1** : Noms de containers incorrects dans `telegraf.conf` - `smart-city-mosquitto` → devrait être `smart-city-digital-twin-martinique-mosquitto-1` - `bunkerm_bunkerm_1` → devrait être `bunkerm-bunkerm-1` - **Cause 2** : Consumer BunkerM avec auth bloquait tout Telegraf ("not Authorized") - **Correction** : Modifié `telegraf.conf` (noms corrigés + BunkerM commenté) - **Statut** : Telegraf UP, consumers EMQX + Mosquitto connectés sans erreur ### Problème 3 : Dashboard Grafana sans données - Le simulateur envoie bien les données vers EMQX (logs confirment) - Le Mosquitto du projet est en fait celui de ChirpStack (même réseau, même config) - Telegraf fixé mais pas encore vérifié l'écriture réussie dans InfluxDB - Pipeline : Simulateur → MQTT (EMQX + Mosquitto) → Telegraf → InfluxDB → Grafana ## Fichiers modifiés - `/home/eric/smart-city-digital-twin-martinique/telegraf.conf` — noms containers corrigés + BunkerM commenté - `/home/eric/openremote/docker-compose.yml` — image PG changée pour timescaledb-ha:pg15 - `/home/eric/TODO.md` — à mettre à jour - `/home/eric/smart-city-digital-twin-martinique/TODO.md` — à mettre à jour ## Containers critiques actuels - `openremote-postgresql` — RECREÉ avec image timescaledb-ha:pg15 (health: starting) - `openremote-keycloak` — Up 25h (healthy) - `openremote-manager` — Up mais health: starting (attendre PG ready) - `smart-city-telegraf` — UP, connecté à EMQX + Mosquitto - `smart-city-simulator` — UP, publie 60 capteurs (MQTT OK: 1/2) ## Prochaines étapes 1. Reprendre OpenRemote : vérifier que le PG est healthy puis le Manager 2. Vérifier Telegraf → InfluxDB : `docker exec smart-city-influxdb influx query 'from(bucket:"smartcity") |> range(start:-5m) |> limit(n:5)' --token my-super-token --org digitribe` 3. Vérifier Grafana dashboard smart city 4. BunkerM : vérifier le port (1883 vs 1900) et réactiver dans Telegraf 5. Commit Gitea + push