After configuring the MQTT plugin, you can setup the MQTT Subscribe plugin. The MQTT Subscribe plugin listens for REST requests on MQTT topics. These REST requests correspond with the OctoPrint REST API. For more information on the OctoPrint REST API, check out the documentation page.
Before configuring the plugin, you'll need to generate an API key. Navigate to the MQTT Subscribe tab under the Plugins section. Next to the API KEY box, click on the blue plus sign (+) button. You'll see your API key populate in the box.
Add the Topics
The MQTT topics that MQTT Subscribe will listen to will need to match the Adafruit IO feed format: {Adafruit IO username}/feeds/{feed name}.
This will open a blank MQTT Topic Editor window. You will add six topics to match the CircuitPython code. You'll edit the Topic, Type, REST API and REST Parameters sections for each topic. You can reference the charts below to see how each topic should be setup.
Topic: |
{Adafruit IO username}/feeds/shutdown |
Type: |
post |
REST API: |
/api/system/commands/core/restart |
REST Parameters: |
{"command":"restart"} |
Topic: |
{Adafruit IO username}/feeds/heatup |
Type: |
post |
REST API: |
/api/printer/tool |
REST Parameters: |
{ |
Topic: |
{Adafruit IO username}/feeds/cooldown |
Type: |
post |
REST API: |
/api/printer/tool |
REST Parameters: |
{ |
Topic: |
{Adafruit IO username}/feeds/printpaused |
Type: |
post |
REST API: |
/api/job |
REST Parameters: |
{ |
Topic: |
{Adafruit IO username}/feeds/printresumed |
Type: |
post |
REST API |
/api/job |
REST Parameters: |
{ |
Topic: |
{Adafruit IO username}/feeds/printcancelled |
Type: |
post |
REST API: |
/api/job |
REST Parameters: |
{ |
Text editor powered by tinymce.