The OctoPrint MQTT plugin needs to be configured in a specific way in order for Adafruit IO to act as the MQTT broker. For more information on the Adafruit IO MQTT API, check out the documentation page.

MQTT Broker Settings

In OctoPrint Settings, navigate to the MQTT page under Plugins. This displays the MQTT plugin configuration.

In the Broker tab, enter io.adafruit.com in the Host box. Enter 8883 in the Port box. Under Protocol version, select MQTTv311

Further down in the Broker tab, check off "The broker requires username and password to connect." Enter your Adafruit IO username in the Username box and your Adafruit IO password key in the Password box.

Then check off "The broker requires TLS to connect."

MQTT Topics

For Adafruit IO to subscribe to the MQTT topics in the MQTT plugin, their topic names need to match the Adafruit IO feed format: {Adafruit IO username}/feeds/{feed name}. This can be configured in the Topics tab.

There are many possible MQTT topics to subscribe to in the MQTT plugin. For the purposes of this project, only a few will be selected. If you are on the free tier of Adafruit IO with a ten feed limit, this project may max out your feeds if you select too many topics since the feeds are created automatically as they are received by Adafruit IO. For more feeds, you can consider upgrading to Adafruit IO+.

If you are on the free tier of Adafruit IO, you only have a maximum of 10 feeds available. You can have additional feeds with IO+.

Under General, in the Topics tab, enter your Adafruit IO username followed by a forward slash ( / ).

Under Event messages, check off "Activate event messages". 

In the Topic box, enter feeds/{event}. This will let the individual events automatically create feeds in your Adafruit IO account named for the event.

For topics, select Server events, Communication events and Printing events.

Under Progress messages, check off "Activate progress messages". This allows for the printing progress percentage messages to be monitored.

When you're finished, click the Save button at the bottom of the window.

Feeds in Adafruit IO

After configuring the plugin, navigate to your Feeds tab in Adafruit IO. As your printer performs tasks, you should see feeds begin to populate with the MQTT topics from OctoPrint that you selected in the plugin.

This guide was first published on Feb 08, 2023. It was last updated on Mar 27, 2024.

This page (Configuring the OctoPrint MQTT Plugin) was last updated on Mar 08, 2024.

Text editor powered by tinymce.