MQTT bridge recipe

Keep Mosquitto or Home Assistant MQTT on your LAN and mirror readings to ThermalTrace over HTTPS for household freeze and leak alerts and history.

Close-up of white Cat-5e Ethernet cables with RJ45 connectors
Probe JSON usually leaves the LAN over Ethernet or a nearby relay, not the public internet directly. Photo: DiscDepotDundee.co.uk. CC BY-SA 4.0

ThermalTrace is not an MQTT broker. Keep Mosquitto, ESPHome, or Home Assistant MQTT on your LAN, then mirror selected topics over HTTPS so household freeze and leak SMS/email and history live in the cloud without exposing the broker.

Quick bridge (curl)

Create a push device under Dashboard → Devices, copy the ingest key, map JSON keys to match your MQTT payload, then POST:

curl -X POST "https://thermaltrace.dev/api/ingest/mqtt" \
  -H "Content-Type: application/json" \
  -H "X-Ingest-Key: YOUR_DEVICE_KEY" \
  -d '{"topic":"home/garage/temp","message":{"temp1":42.5,"humidity":38}}'

Full device creation (push vs pull) is covered in Adding push and pull devices. Payload shapes and outbound alert webhooks: Ingest API and alert webhooks.

Home Assistant rest_command

Prefer automatic entities from a share link? Use the official HACS integration. For MQTT-only mirroring:

# configuration.yaml
rest_command:
  thermaltrace_ingest:
    url: "https://thermaltrace.dev/api/ingest/mqtt"
    method: POST
    headers:
      Content-Type: application/json
      X-Ingest-Key: !secret thermaltrace_ingest_key
    payload: >
      {"topic":"{{ trigger.topic }}","payload":{{ trigger.payload }}}
automation:
  - alias: ThermalTrace MQTT bridge
    trigger:
      - platform: mqtt
        topic: home/garage/temp
    action:
      - service: rest_command.thermaltrace_ingest

Node-RED

Import mqtt-to-thermaltrace.json, point MQTT nodes at your broker, set THERMALTRACE_INGEST_KEY, and deploy. Extended write-up: developer MQTT bridge docs.

Related

FAQ

Do I have to abandon MQTT for ThermalTrace?
No. Keep Mosquitto/Home Assistant for local automations and POST HTTPS ingest for ThermalTrace freeze/leak alerts and history.

What does the MQTT bridge publish?
It maps broker topics into ThermalTrace ingest JSON (temps, doors, leaks). Details: thermaltrace.dev/about/mqtt-bridge.

Is TLS required to thermaltrace.dev?
Yes for cloud ingest. Local MQTT can stay on your LAN; the bridge or device must HTTPS POST to your ingest URL.