OctoRant is a plugin allowing Octoprint to send notifications to a Discord channel via a webhook URL. When wanted it can directly send a snapshot to Discord (without needing third-party services).
OctoRant is one-way only, from your printer to your Discord channel. This plugin is not able to receive commands for your printer from Discord. However a good fellow @cameroncros forked the plugin exactly to add this feature. Feel free to try DiscordRemote
License : MIT
- Fixed most errors happening when sending messages
- Messages can now be sent as Embeds with useful information displayed by default
- Scripts support has now been completely removed
- You can now brag by sending messages when you unlock achievements!
See the release history to get a quick summary of what's new in the latest versions.
Install via the bundled Plugin Manager or manually using this URL:
https://github.com/bchanudet/OctoPrint-Octorant/archive/master.zip
Please follow Discord's official guide on Webhooks to create a Webhook URL. Once you have it, head over to the plugin configuration to finish the setup.
The plugin can be configured in the configuration panel, under the "OctoRant" panel.
- WebHook URL : please follow the Setup procedure to retrieve the URL of the WebHook.
- Bot name : You can override the name you put on the WebHook description in Discord by a name. Useful if the webhook is not specific to OctoRant and also used for other things.
- Bot Avatar URL : You can also override the avatar us put in Discord for the WebHook. The URL needs to be globally accessible (it will be retrieved by Discord's servers).
In order for you to be sure these settings work, every time you change one of them, a test message will be sent to the corresponding Discord Channel. If you don't receive it, something is most likely wrong!
Here you can customize every message handled by OctoRant.
- Toggle the message: by unchecking the checkbox in front of the message title, you can disable the message. It won't be sent to Discord.
- Message: you can change the default content here. See the section Message format for more information.
- Include media: Embed a media with your message. Depending on the message you can choose which media to send:
- Webcam snapshot: If configured in Octoprint, a snapshot of your webcam watching your printer
- GCode thumbnail: If your gcode files contains a preview thumbnail (according to PrusaSlicer format), OctoRant will send it.
- Timelapse movie: Only on the "timelapse done" message, you can make OctoRant try to send the timelapse to Discord. Beware of the upload limit of your destination server though (8MB by default, but can be more if the server is boosted)
- Display as embed: Check this to use the new message format which includes useful variables by default.
Coming in v1.3.0, OctoRant now includes several progress criterias that can be combined altogther:
- Percentage of completion: Be notified every
X% during the print. This is the new name of the option that existed in < 1.3.0 under the "Notify every XX%" - Timed interval: For long prints where percentage change too slowly, you can enable a timed notification every
Xseconds, from as low as every second. - Height: (in Beta) Be notified for each
Xmm. A quick'n'dirty algorithm was set to discard unrelated movements (like hovering above the plate to do Z-homing at the center), but false positives are still possible
Considering those three criteria could generate a massive amount of messages, a fourth value is available:
- Throttle notification: When enabled, a minimum of
Xseconds between progress notifications will be respected.
Caution
NOW REMOVED
Script support has been completed removed in v1.4.0. Octoprint offers a much more powerful option with the Event Manager. Two new events are available: plugin_octorant_before_notify and plugin_octorant_after_notify. An {event} variable is available to know which event was triggered by OctoRant.
Warning
Depreciation notice
As of v1.3.0+, those settings are now deprecated and will be removed in a further release of the plugin. Documentation is still available on the wiki
Messages are regular Discord messages, which means you can use :
**markdown**format (see Discord Documentation):emoji:shortcuts to display emojis- Mentions are a little trickier:
Some events also support variables. Available variables are listed on the configuration page.
For more reference, you can go to the Octoprint documentation on Events
If you encounter any trouble don't hesitate to open an issue. I'll gladly do my best to help you setup this plugin.
This is my first project ever in Python, so if you happen to be more experimented and you noticed some bad things, feel free to tell me!