Skip to main content

MQTT Republish

O.D.I.N. can forward printer events to any external MQTT broker. Use this to integrate with Home Assistant, Node-RED, Ignition SCADA, or any other MQTT-capable system.


Overview

When MQTT Republish is enabled, O.D.I.N. publishes events to your broker as they occur — printer telemetry, job lifecycle events, alerts, and fleet summaries. Your external system subscribes to the relevant topics and reacts to the data.

Common use cases:

  • Home Assistant sensors showing printer temperatures and job status on a dashboard
  • Node-RED flows triggering automations (e.g., turn on a light when a print completes)
  • SCADA/Ignition visualization of fleet status

Configuration

Navigate to Settings → Integrations → MQTT Republish (admin only).

FieldDescriptionDefault
EnabledToggle MQTT republish on/offOff
HostExternal broker hostname or IP
PortBroker port1883
UsernameMQTT username (optional)
PasswordMQTT password (Fernet-encrypted at rest)
Topic PrefixBase topic prefix for all messagesodin
Use TLSEnable TLS for broker connectionOff
MQTT Password Is Encrypted at Rest

The MQTT republish password is stored Fernet-encrypted in the database. However, the password travels in plaintext over the MQTT connection unless TLS is enabled.

Recommendation: Enable TLS (Use TLS = on) for any broker not on your local network. If using Mosquitto, configure TLS certificates. If using a cloud broker (HiveMQ, EMQX Cloud, CloudMQTT), TLS is typically on by default.


Published Topics

All topics use the format {prefix}/{printer_name}/{topic} where printer_name is the printer's name lowercased with spaces replaced by underscores.

Topic PatternPayloadTrigger
odin/{printer_name}/statusFull printer status: temps, state, progress, filamentOn every telemetry update (MQTT monitor tick)
odin/{printer_name}/jobJob event: name, event type, filament used, durationOn job start, completion, failure, cancellation
odin/alertsAlert: type, severity, title, message, printer referenceOn any alert dispatched
odin/fleetFleet summary: online count, total, printing, idlePeriodically
odin/{printer_name}/amsAMS slot data: material, color, remaining %On AMS update (Bambu only)
odin/testTest message published on connection testOn "Test Connection" button click

Home Assistant Integration

Add MQTT sensors to your configuration.yaml:

mqtt:
sensor:
- name: "Printer X1C — Nozzle Temp"
state_topic: "odin/x1c/status"
value_template: "{{ value_json.nozzle_temp }}"
unit_of_measurement: "°C"
device_class: temperature

- name: "Printer X1C — Print Progress"
state_topic: "odin/x1c/status"
value_template: "{{ value_json.print_progress }}"
unit_of_measurement: "%"

- name: "Printer X1C — Job Status"
state_topic: "odin/x1c/status"
value_template: "{{ value_json.gcode_state }}"

- name: "ODIN Fleet — Printing Count"
state_topic: "odin/fleet"
value_template: "{{ value_json.printing }}"

Reload the MQTT integration (or restart HA) after updating configuration.yaml.


Node-RED Example

Subscribe to the job topic and trigger a notification when a print completes:

  1. Add an MQTT In node, set topic to odin/+/job
  2. Add a JSON node to parse the payload
  3. Add a Switch node: msg.payload.event == "completed"
  4. Connect to a notification node (Pushbullet, Telegram, etc.)

See Also