Skip to content

Using plugins

Plugins are managed with oc-plugin over SSH:

Command What it does
oc-plugin search [word] The plugin catalog, or the entries matching a word.
oc-plugin install <id, git URL or folder> Download and enable a plugin, by its catalog id, from any git URL, or from a folder on the printer. --ref <branch or tag> picks a version.
oc-plugin list Installed plugins, their version, whether they're enabled, and the git branch and commit. Plugins not made for this printer are marked.
oc-plugin update [id] Pull the newest version of one plugin, or all of them.
oc-plugin disable <id> / enable <id> Turn a plugin off or back on without removing it.
oc-plugin remove <id> Uninstall it. --keep-data keeps its settings for a reinstall.
oc-plugin status Each plugin's background programs: running or stopped, and their log file.
oc-plugin logs <id> [item] The end of a plugin's logs, 50 lines by default. -n 200 for more lines, -f to keep following (one item only).
oc-plugin start / stop / restart <id> [item] Start, stop or restart a plugin's background programs.
oc-plugin sync Redo the links and includes; see How it works.
oc-plugin moonraker [URL] Tunneled printers: show or set the SBC's Moonraker. --find looks for it, --scan lists every one and asks which. See Tunneled printers.

After a change, oc-plugin restarts Klipper and/or Moonraker itself, whichever the plugin needs. It never does that while the printer is printing or paused: it says so, and the change takes effect at the next restart. --no-restart skips the restart (on install, update, remove, enable and disable).

Which service restarts depends on what the plugin has: Klipper for klippy_extras or klipper_config, Moonraker for moonraker_components or moonraker_config, plus whatever its manifest lists under restart. Removing a plugin whose manifest can't be read restarts both.

What each command does

  • install clones the repository with its full history (Moonraker's update manager doesn't work with shallow clones) into a temporary folder, checks the manifest and compatibility, and moves it to plugins/<id>. Then it runs the plugin's install script, links its parts in and starts its startup items. If the script fails, or a part can't be linked, the plugin is removed again: a half-installed plugin is worse than none. An unofficial catalog plugin prints a note that it isn't made or checked by OpenCreator.
  • update runs git pull --ff-only in each plugin's folder. When the new version has a broken manifest or isn't made for this printer, it resets to the old commit and says not updated ... kept <commit>. Otherwise it stops the startup items, runs the update script, and starts them again (unless the plugin is disabled). A plugin installed from a folder isn't a git checkout: update says so, and you install it again instead.
  • remove stops the startup items, runs the uninstall script, deletes the plugin folder and, without --keep-data, its data folder.
  • disable keeps the plugin folder but removes its links and stops its startup items. enable links it in again and starts them.

Plugins can say which printers and installs they're made for. install refuses one that isn't made for yours, and update keeps the old version if a new one isn't, or if its manifest is broken. --force installs it anyway. The SSH login banner shows how many plugins are installed.

To see what's installed without SSH, run the OC_PLUGINS macro, or tap Plugins in GrumpyScreen's macros. It opens a dialog listing every plugin with its version, greyed out if it's disabled and red if its manifest is broken. Tap one for its description, author, what it adds to Klipper and Moonraker, and where it came from. oc-plugin sync rebuilds the list (as config/plugins/_oc-plugins.cfg) every time Klipper starts, so it stays current. Installing, updating and removing still happen over SSH.

Troubleshooting

oc-plugin prints problems as error: ... and stops, or as warning: ... and carries on.

Message What it means and what to do
<id> isn't in the plugin catalog (oc-plugin search lists it) No catalog entry has that id. Check the spelling with oc-plugin search, or install from the git URL.
note: couldn't get the plugin catalog (...); using ... The printer couldn't download the catalog, so it uses the last download or the copy that came with OpenCreator. Newly listed plugins may be missing.
not installed: made for the Creator 5 Pro, not the Creator 5 (or made for SoC installs, not SBC) The plugin's requires doesn't match this printer. --force installs it anyway.
warning: couldn't tell the printer model; made for the ... The model couldn't be read, so the model check is skipped.
git clone failed: ... git isn't installed, the URL is wrong, or there's no internet. git comes from Entware (opkg install git).
no opencreator-plugin.json ... in ... The repository has no manifest at its top level.
<id> is already installed; use oc-plugin update <id> Remove it first to reinstall, or update it.
... already exists and is not a plugin link; not replacing it A file that oc-plugin didn't make is where a link should go. Move it away and run oc-plugin sync.
Klippy already has a module called <name> A Klippy module has the same name as one of Kalico's. The plugin has to rename it.
not installed: install script failed (exit <n>) or ... took longer than 15 minutes The plugin's install script failed; its output is printed above. The plugin was removed again. A failing update or uninstall script only gives a warning.
Printer is printing: restart klipper yourself when it's done. The change is made, but the restart waits for you.
Couldn't restart klipper (...); restart it yourself. Moonraker didn't answer. Restart from Fluidd or Mainsail.
<name> BROKEN ... in oc-plugin list The plugin's manifest can't be read. It's not linked until that's fixed; oc-plugin update or remove it.

A plugin that misbehaves can stop printing. Disable it with oc-plugin disable <id> to check whether it's the cause. For a support request, run support-zip.sh (GrumpyScreen runs it from its menu too). Its support.zip includes the logs in /tmp, so the plugins' startup item logs and /tmp/oc-plugin-boot.log are in it; add the output of oc-plugin list.