Action Command Notification support

The OctoPrint Action Command Notification Support Plugin comes bundled with OctoPrint (starting with 1.4.1).

It allows firmware to trigger notifications users with the PLUGIN_ACTION_COMMAND_NOTIFICATION_SHOW permission using action commands about relevant events. These notifications will be shown in the sidebar and if configured also as popup messages. The notifications in the sidebar panel can also be cleared by users with the ``PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR` permission.

Simple notification example

Fig. 5 A simple notification example triggered by the firmware

Configuring the plugin

The plugin supports the following configuration keys:

  • enable: Whether to enable the support of notifications (enabled by default).

  • enable_popup: Whether to enable the additional display of notifications as popups in the UI (disabled by default).

You can modify them either through the plugin’s configuration dialog under Settings, or by directly editing config.yaml.

Supported action commands

notification <message>

Displays the notification <message>

Example communication with the firmware

To display the above notification the firmware sent this action command:

//action:notification Hello World!

Source code

The source of the Action Command Prompt Notification plugin is bundled with OctoPrint and can be found in its source repository under src/octoprint/plugins/action_command_notification.