Interfaces¶
This page covers how you and other software reach the printer, and the Creator 5 specific code inside Kalico. Paths are the ones on the printer's SoC; on a tunneled printer Klipper, Moonraker and the web UI run on the SBC instead.
Klipper, Moonraker and the web UI¶
| Interface | Where | Notes |
|---|---|---|
| Klippy API | Unix socket /tmp/uds |
Moonraker's link to Klipper |
| Moonraker | Port 7125 | The HTTP and websocket API everything else uses: the web UI, the touchscreen, slicers, plugins and OpenCreator's own scripts |
| Web UI | Port 80 | nginx (/usr/prog/nginx) serves Fluidd or Mainsail, whichever you chose in the installer, and passes API requests to Moonraker |
| Cameras | Ports 8080 to 8083 | The camera streamer's own ports. The web UI's /webcam/ paths redirect there, so nginx doesn't relay every frame |
| SSH and SFTP | SSH server | Stock's dropbear, with SFTP through Entware's sftp-server (see Root login) |
The web UI and the touchscreen both talk to the same Moonraker, so anything you start from one shows up in the other. Mainsail/Fluidd exposes virtual Misc switches for flow calibration, purge and the other switches.
Moonraker components¶
OpenCreator adds three Moonraker components, kept in
/usr/data/opencreator/moonraker/ and linked into Moonraker at boot by
20-msmr.sh:
| Component | What it does |
|---|---|
opencreator_3mf |
Accepts sliced 3MF uploads (OrcaSlicer or Bambu Studio gcode.3mf) in the G-code folder by repacking them as UFP, which Moonraker already unpacks |
opencreator_machine |
A machine provider for the printer. Moonraker would take FlashForge's busybox init for a container and block reboot and shutdown, and couldn't restart Klipper or itself. This one reboots and powers off with busybox's commands, restarts Klipper by stopping Klippy so 10-klipper.sh starts it again, and lets Moonraker restart itself. |
opencreator_cancel |
Cancels during print start. A cancel normally waits for the running command, and print start is one long command; this sends an interrupt as soon as Moonraker announces the cancel, and print start stops at its next step. |
Moonraker's update manager has an opencreator entry for the opencreator-fs checkout, next to Kalico, Moonraker, Mainsail and Fluidd. Updating it hands the new files to the updater (see Firmware, installer and updates).
Graphs¶
Two scripts draw calibration results as images in the config folder, so you
can open them from the web UI's file list. They use Pillow, since the
printer's Python has no matplotlib, and are run by Klipper through
gcode_shell_command:
| Script | Draws | Output |
|---|---|---|
shaper_graph.py |
A SHAPER_CALIBRATE result, the way Klipper's calibrate_shaper.py does, using Kalico's own shaper code |
config/input_shaper/shaper_<axis>.png |
vfa_graph.py |
One motor's ripple across speeds before and after VFA_MOTORS GRAPH=1, per harmonic and direction |
config/vfa/vfa_<stepper>.png |
See Input shaper graphs.
Fluidd¶
Two startup scripts adjust Fluidd: 25-fluidd-macros.sh seeds its macro
categories in Moonraker's database and adds new macros to their category,
and 26-fluidd-brand.sh shows AFC's spool brand on Fluidd 1.38's lane
cards. The installer also sets up the OpenCreator Fluidd theme.
Touchscreen¶
The installer puts one touchscreen UI on the printer, GrumpyScreen or
HelixScreen. Both talk to Moonraker like the web UI does. Both can be
installed, but only one runs: 40-grumpyscreen.sh and 41-helixscreen.sh
each start their screen only when its binary is executable.
oc-switchscreen grumpy or oc-switchscreen helix switches between them
over SSH, right away and without a reboot. It refuses during a print
(HelixScreen needs about 60 MB more memory), and records the choice in
install.json so a later install or update keeps it.
GrumpyScreen work is separate from the core Klipper and filesystem
repositories, and is mostly kept up to date and committed to mainline
SimpleAF GrumpyScreen. Its config is grumpyscreen.cfg in the config folder.
On a tunneled printer, point it at the SBC (host under [moonraker] in
/usr/data/grumpyscreen/grumpyscreen.cfg).
Kalico's Creator 5 modules¶
Kalico is Klipper with the Creator 5 support in it. The Creator 5 specific
host modules in klippy/extras/:
| Module | Config section | What it does |
|---|---|---|
creator5_toolchanger.py |
[creator5_toolchanger] (printer.creator5.cfg) |
The toolchanger: pickup and docking motion, dock and grab pin checks, levelboard calibration and the motion interlocks (C5_TOOL_SELECT, C5_TOOL_DOCK, C5_TOOL_STATUS) |
AFC*.py |
AFC/AFC.cfg, printer.afc-standalone.cfg |
AFC, the filament and tool manager (below), including the ACE units |
mclib.py |
[mclib stepper_x/y/z] |
Sends each motor's settings to the mainboard's MCLib; the MCLIB_* commands. See MCLib and motor control. |
mclib_ripple.py |
[mclib_ripple] |
Measures and calibrates the motors' ripple for VFA correction |
stepper_resonance_tester.py |
[stepper_resonance_tester] |
The stock VFA damping calibration (STEPPER_RESONANCE_*), with OpenCreator's fixes |
c5_motion_guard.py |
[c5_motion_guard] |
Skipped step and stall detection for X, Y and Z |
c5_mcu_flash.py |
[c5_mcu_flash] |
C5_MCU_BOOTLOADER, which puts the eBoard, heaterboard and levelboard into their boot stage for a live firmware update |
c5_board_fans.py |
[c5_board_fans] |
The mainboard and power supply fans, from the mainboard MCU's temperature and the printer's load (see Mainboard and power supply fans) |
pa_adjust.py |
[pa_adjust] |
The eBoard's pressure-advance measurement (PA_GET, PA_ACTION), used by flow calibration |
creator5_beeper.py, creator5_remote_beeper.py |
[creator5_beeper], [creator5_remote_beeper] |
The buzzer, through the SoC's PWM (cmd_pwm). The remote version works on the SoC and from a tunnel SBC, where it forwards to the printer over the USB link |
creator5_midi.py |
[creator5_midi] |
Plays MIDI files from config/midi on the buzzer (PLAY_MIDI) |
creator5_dryer.py |
[creator5_dryer] (printer.dryer.cfg) |
The two-chamber VDS filament dryer on the SoC's /dev/ttyS3 (see Filament dryer) |
Kalico also has Creator 5 changes in its core files. Its print dispatcher in
virtual_sdcard.py builds a C5_PRINT_START line for files that don't have
one (see Print workflow), and its motion start after
idle sends the first half second of steps before queuing the rest of a long
burst, so moves after a toolchange aren't late.
AFC and tool changing¶
The printer configuration currently uses AFC standalone mode, not a BoxTurtle or AMS-like
mechanism. AFC owns T0 to T3 and the filament state of each; creator5_toolchanger.py
owns the machine-specific motion and safety checks.
- Which tool is mounted comes only from the eight physical dock and grab
inputs (
extruder_pos1..4andextruder_grab1..4) on the heaterboard. Filament switches and AFC's saved selection don't decide it, and missing or contradictory switches report no tool and block tool motion. - A toolchange docks the current tool and picks up the next one,
checking the dock and grab inputs before and after the motion. If the check
after motion fails, heaters are turned off. Slicer
T0toT3commands only swap tools; loading filament and the print purge are separate commands. - Dock positions default to the factory values decoded from FlashForge's
firmware. Measured values in
/usr/data/firmwareRes/config/extruder.jsontake priority, and the per-tool Z adjustments inzoffset.jsonare added on top. - Notower replaces the slicer's prime tower on multi-tool prints: after
each toolchange the new tool purges a set weight into the purge bucket.
It's on when the G-code has a
poop=<grams>line and uses more than one tool. See Notower. - ACE units can feed the tools through AFC. See ACE Pro and ACE 2 Pro.
All four tools share one extruder motor; see Hardware.
Plugins¶
Plugins add Klipper modules and configs, Moonraker components and startup
items without touching Kalico's or Moonraker's own files. oc-plugin
(/usr/data/opencreator/plugin-manager/) installs them as git checkouts in
/usr/data/opencreator/plugins/ and links their parts in;
10-klipper.sh and 20-msmr.sh sync the links before every Klipper and
Moonraker start, and startup.sh starts their startup items at boot. The
catalog shown in the plugin manager is plugin-manager/catalog.json.
Everything about writing and using them is on Plugins.