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).
| Field | Description | Default |
|---|---|---|
| Enabled | Toggle MQTT republish on/off | Off |
| Host | External broker hostname or IP | — |
| Port | Broker port | 1883 |
| Username | MQTT username (optional) | — |
| Password | MQTT password (Fernet-encrypted at rest) | — |
| Topic Prefix | Base topic prefix for all messages | odin |
| Use TLS | Enable TLS for broker connection | Off |
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 Pattern | Payload | Trigger |
|---|---|---|
odin/{printer_name}/status | Full printer status: temps, state, progress, filament | On every telemetry update (MQTT monitor tick) |
odin/{printer_name}/job | Job event: name, event type, filament used, duration | On job start, completion, failure, cancellation |
odin/alerts | Alert: type, severity, title, message, printer reference | On any alert dispatched |
odin/fleet | Fleet summary: online count, total, printing, idle | Periodically |
odin/{printer_name}/ams | AMS slot data: material, color, remaining % | On AMS update (Bambu only) |
odin/test | Test message published on connection test | On "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:
- Add an MQTT In node, set topic to
odin/+/job - Add a JSON node to parse the payload
- Add a Switch node:
msg.payload.event == "completed" - Connect to a notification node (Pushbullet, Telegram, etc.)
See Also
- Smart Plug Control — power automation via HA
- Alerts & Notifications — O.D.I.N.'s built-in notification channels
- Webhooks — HTTP-based outbound events (alternative to MQTT)