From 251c3ead5981e99783ea325b5eaa6cf6ac89d955 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Tue, 28 Jul 2026 22:46:52 +0000 Subject: [PATCH] Fetch MQTT credentials from plant's own settings integration Was reading the shared central mqtt integration, which meant plant silently authenticated as whichever app's credentials were pasted there (no plant/# ACL on any of them, so no telemetry ever arrived). Now reads mqtt_plant instead, its own dedicated slug. Co-Authored-By: Claude Sonnet 5 --- backend/src/lib/mqtt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/lib/mqtt.js b/backend/src/lib/mqtt.js index 19b4829..d30281a 100644 --- a/backend/src/lib/mqtt.js +++ b/backend/src/lib/mqtt.js @@ -21,7 +21,7 @@ let prefixMap = [] // [{ prefix, assetId }], longest prefix first so overlapping let subscribedTopics = new Set() async function getCredentials() { - const url = `${process.env.SETTINGS_URL}/settings/api/internal/integration/mqtt` + const url = `${process.env.SETTINGS_URL}/settings/api/internal/integration/mqtt_plant` const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.SETTINGS_SECRET}` }, signal: AbortSignal.timeout(5000),