Keeps a QIDI Q2 printer's QIDI Box slots in sync with Spoolman.
Set a spool's location in Spoolman to e.g. QIDI Box Slot 1, and this service tells the
printer (via Moonraker) which Spoolman spool is in that slot, and what filament type/color it
is, so the QIDI touchscreen and QIDI Studio show the right thing.
See SPEC.MD for the full behavior spec.
- A QIDI Q2 with a QIDI Box, running stock firmware (Klipper + Moonraker).
- The printer-side macros in
SPEC.MD§1.1, included fromprinter.cfg. - Spoolman already connected to the printer in Moonraker, with spool locations matching
the slot names you configure below (default
QIDI Box Slot 1..4).
- Copy
.env.exampleto.envand fill in your realSPOOLMAN_URLandMOONRAKER_URL(andMOONRAKER_API_KEYif your Moonraker instance requires one — otherwise this host's IP must be in Moonraker'strusted_clients)..envis gitignored — never commit it. - Run with
DRY_RUN=truefirst. This logs exactly what it would send to the printer without sending anything. Check the logs match what you expect before flipping it off. - Add the macros from
SPEC.MD§1.1 to aspoolman.cfgon the printer, included fromprinter.cfg, if they aren't there already. docker compose up -d --build— or skip building locally and use the prebuilt image (see below).- Once you're confident, set
DRY_RUN=falsein.envand restart.
CI publishes a multi-arch (amd64/arm64) image to GitHub Container Registry on every push to
main and on version tags:
docker pull ghcr.io/mikiahgroff/qidi-spoolman-sync:latestTo use it instead of building locally, swap docker-compose.yml's build: . for:
image: ghcr.io/mikiahgroff/qidi-spoolman-sync:latestAll configuration is via environment variables (see .env.example):
| Variable | Default | Notes |
|---|---|---|
SPOOLMAN_URL |
— (required) | e.g. http://spoolman:7912 |
MOONRAKER_URL |
— (required) | e.g. http://192.168.1.50:7125 |
MOONRAKER_API_KEY |
empty | Sent as X-Api-Key if set. Otherwise the host must be in Moonraker trusted_clients. |
SLOT_LOCATIONS |
QIDI Box Slot 1,…,QIDI Box Slot 4 |
Comma-separated, index = printer slot |
POLL_INTERVAL |
30 |
seconds |
DEFER_WHILE_PRINTING |
true |
Don't touch filament-info variables mid-print |
MATERIAL_ALIASES |
{"PLA+": "PLA", "PLA PLUS": "PLA", "PETG+": "PETG"} |
JSON object |
STATE_FILE |
/data/state.json |
Mount a volume at /data |
DRY_RUN |
false |
Log the commands it would send, send nothing |
LOG_LEVEL |
INFO |
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytestTest fixtures in tests/fixtures/ are synthetic examples shaped like a real
officiall_filas_list.cfg / saved_variables.cfg, covering the entries this project's mapping
logic depends on — not a dump of any specific printer.
- Writing NFC tags, KlipperScreen, changing QIDI's own macros or
value_tN. - Pushing data back into Spoolman — locations are the source of truth.
- More than one printer.
MIT — see LICENSE.