# Profil "data-only" : que les flux open-data + pose YOLO, vers SC + oF.
#
# Pas de sclang/oscope/web → la chaine consomatrice est libre de
# brancher ce qu'elle veut sur les ports 57121 / 57123.
#
# Lancer avec :  uv run python bridge.py -c config.data-only.toml -v

[osc]
targets = [
    { host = "127.0.0.1", port = 57121 },  # SuperCollider (si lance)
    { host = "127.0.0.1", port = 57123 },  # openFrameworks
    { host = "127.0.0.1", port = 57124 },  # Web dashboard data-only
]
prefix = "/data"

# -- Pose / webcam --------------------------------------------------------
[feeds.pose]
# Active uniquement quand le pont tourne dans le bundle launcher (TCC OK).
# En CLI le prompt webcam ne peut pas apparaitre -> camera silently refused.
enabled  = true
model       = "yolov8n-pose.pt"
device      = "mps"
camera      = 0
width       = 640
height      = 480
target_fps  = 20
conf_thresh = 0.35
max_persons = 4
emit_keypoints = true

# -- Sismique / géophysique ------------------------------------------------
[feeds.usgs]
enabled  = true
url      = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_hour.geojson"
poll_seconds = 60

[feeds.swpc]
enabled  = true
url_plasma = "https://services.swpc.noaa.gov/products/solar-wind/plasma-1-day.json"
url_mag    = "https://services.swpc.noaa.gov/products/solar-wind/mag-1-day.json"
url_kp     = "https://services.swpc.noaa.gov/products/noaa-planetary-k-index.json"
url_xray   = "https://services.swpc.noaa.gov/json/goes/primary/xrays-1-day.json"
poll_seconds = 60

# -- Réseau électrique -----------------------------------------------------
[feeds.netzfrequenz]
# WARN : mainsfrequenz.de a ferme son WS public (NXDOMAIN 2026-05).
# Garde a false jusqu'a trouver une source alternative (gridradar ?
# swissgrid open data ?).
enabled  = true
ws_url   = "wss://www.mainsfrequenz.de/frequenz.socket"

[feeds.rte_eco2mix]
enabled  = true
client_id     = ""
client_secret = ""
poll_seconds  = 900

# -- Foudre / atmosphère ---------------------------------------------------
[feeds.blitzortung]
enabled  = true
ws_url   = "wss://ws1.blitzortung.org:443/"

# -- Aviation / mouvement --------------------------------------------------
[feeds.opensky]
enabled  = true
url      = "https://opensky-network.org/api/states/all"
# API anonyme : 10 req / 1 min credit-based. On reste a 60s pour ne
# jamais epuiser le credit en cas de fork de process / restart rapide.
# Les 429 vus en 2026-05 etaient dus au poll 15s/20s precedent.
poll_seconds = 60
bbox     = [45.5, 4.6, 46.0, 5.2]

# -- Pouls numérique -------------------------------------------------------
[feeds.bluesky]
enabled  = true
ws_url   = "wss://jetstream2.us-east.bsky.network/subscribe?wantedCollections=app.bsky.feed.post"
sample_rate = 0.02

[feeds.mempool]
enabled  = true
ws_url   = "wss://mempool.space/api/v1/ws"

[feeds.github]
enabled  = true
url      = "https://api.github.com/events"
poll_seconds = 30

# -- Meteo locale (Open-Meteo, sans cle) ----------------------------------
[feeds.openmeteo]
enabled  = true
lat      = 48.8566    # Paris par defaut
lon      = 2.3522
poll_seconds = 600

# -- Qualite de l'air (OpenAQ v3, sans cle) -------------------------------
[feeds.openaq]
enabled  = true
lat      = 48.8566
lon      = 2.3522
radius_m = 25000
poll_seconds = 900

# -- Station spatiale (ISS / wheretheiss.at) ------------------------------
[feeds.iss]
enabled  = true
lat      = 48.8566
lon      = 2.3522
pass_radius_km = 1500
poll_seconds = 5

# -- Volcans actifs (Smithsonian GVP 7-jours JSON) ------------------------
[feeds.volcano]
enabled  = true
url      = "https://volcano.si.edu/feeds/eruptions7days.json"
poll_seconds = 3600

# -- Pouls social (Reddit hot + HackerNews top) ---------------------------
[feeds.social_buzz]
enabled  = true
poll_seconds = 60

# -- GDELT (evenements monde 15-min) --------------------------------------
[feeds.gdelt]
enabled  = true
poll_seconds = 900

# -- Wikipedia recent changes ---------------------------------------------
[feeds.wikimedia]
enabled  = true
sample_rate = 0.05
rate_window_s = 5

# -- NOAA tides + lune ----------------------------------------------------
[feeds.tides]
enabled  = true
station  = "8443970"
poll_seconds = 360

# -- LiveATC hubs ---------------------------------------------------------
[feeds.atc]
enabled  = true
hubs     = ["KJFK", "KLAX", "KSFO", "KORD", "EGLL", "LFPG"]
poll_seconds = 300

[feeds.gcn]
enabled  = false
client_id     = ""
client_secret = ""
