bchanudet / OctoPrint-Octorant

Discord plugin for OctoPrint
MIT License
26 stars 14 forks source link

OctoPrint-OctoRant 1.3.4

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).

GitHub license GitHub stars GitHub issues

OctoRant is only a notifier!

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

Changelog

1.3.0+

A lot of improvements came with this new version. Follow the πŸŽ‡ icon in this file to see what's new.

History

See the release history to get a quick summary of what's new in the latest versions.

Setup

Install the plugin

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/bchanudet/OctoPrint-Octorant/archive/master.zip

Create the WebHook in Discord

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.

Configuration

The plugin can be configured in the configuration panel, under the "OctoRant" panel.

Discord Settings

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!

Message Settings

Here you can customize every message handled by OctoRant.

πŸŽ‡ Smart progress notifications

Coming in v1.3.0, OctoRant now includes several progress criterias that can be combined altogther:

Considering those three criteria could generate a massive amount of messages, a fourth value is available:

Scripts Settings

πŸŽ‡Depreciation notice: Those settings are now deprecated and will be removed in a further release of the plugin. This is mostly due by the fact that Octoprint offers a much more powerful option with the Event Manager, and also because I always thought I did a half-assed feature. In order to use the Event Manager with OctoRant, 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.

Octorant allows you to launch scripts everytime a message is sent:

Script configuration was made voluntarily a little harder, as running scripts exposes much more the host computer. You can find more indications on the wiki

Message format

Messages are regular Discord messages, which means you can use :

Some events also support variables. πŸŽ‡ The list of variables is now directly visible on the configuration page.

For more reference, you can go to the Octoprint documentation on Events

Issues and Help

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!