Interactive CLI installer for the SpoolSense ecosystem. Sets up both the scanner firmware and the middleware in one pass.
curl -sL https://raw.githubusercontent.com/SpoolSense/spoolsense-installer/main/install.sh -o /tmp/install.sh && bash /tmp/install.shPrefer a browser? You can flash the scanner firmware without installing anything using the Web Flasher (Chrome/Edge), then run this installer with "Middleware only" on your printer host.
The installer asks a series of questions (WiFi, MQTT, board type, etc.) and then:
- Scanner — Downloads a pre-built firmware binary, generates a per-user NVS config partition, verifies the connected chip, and flashes both to the ESP32 via
esptool - Middleware — Clones SpoolSense, installs Python dependencies, generates
config.yaml, and creates a systemd service. The installer asks for your setup type and generates the appropriate scanner config:- AFC shared scanner (
afc_stage) — one scanner for all BoxTurtle/NightOwl lanes - AFC per-lane (
afc_lane) — one scanner per lane - Toolchanger shared scanner (
toolhead_stage) — one scanner for all toolheads (klipper-toolchanger) - Toolchanger per-toolhead (
toolhead) — one scanner per tool - Single toolhead (
single) — one scanner, one extruder - Happy Hare MMU (
happy_hare_stage) — one shared scanner; select a gate (MMU_SELECT GATE=N), scan a spool, and the middleware binds it via Happy Hare'sMMU_SPOOLMAN SPOOLID/GATEcommand. Optional mobile flow assigns tags to any gate from your phone. Requires Happy Hare in pull mode, Spoolman, and middleware ≥ 1.8.6 (installed automatically)
- AFC shared scanner (
- Klipper macros — Copies the macros your setup needs to
~/printer_data/config/:spoolsense.cfg(ASSIGN_SPOOL/UPDATE_TAG, all setups),spoolman_macros.cfg(direct-toolhead setups), andtoolhead_macros_example.cfg(multi-tool setups). AddUPDATE_TAGto yourPRINT_ENDmacro for automatic filament tracking. - Spoolman — Optionally creates the scanner's extra fields in Spoolman (
nfc_id,tag_format,aspect,dry_temp,dry_time_hours,active_toolhead,nfc_link) needed for full tag data tracking, and offers to add the[spoolman]section tomoonraker.conf. (Happy Hare declares its own fields on startup — the installer doesn't create any for it.) - Updates — Offers to register the middleware with Moonraker's update manager (
[update_manager spoolsense], stable channel) so updates show up in Mainsail/Fluidd. Fresh installs are pinned to the latest middleware release (use--devfor branch head).
- Scanner + Middleware — everything in one pass (recommended, run on the printer host)
- Scanner only — flash the ESP32 (e.g. from a laptop)
- Middleware only — printer-host setup without flashing (also the right choice after using the Web Flasher)
- Config only — for source builds: writes
spoolsense_nvs.csv/.binto the current directory so you can flash config without reflashing firmware
python3 install.py --setup-fields [--spoolman-url http://spoolman.local:7912]Re-creates just the required Spoolman extra fields (useful if Spoolman wasn't running during the initial install). (--happy-hare is a deprecated no-op — Happy Hare declares its own fields since middleware v1.8.6.)
python3 install.py --devTracks the middleware branch head instead of pinning to the latest release tag.
python3 install.py --firmware-version 1.7.6Flashes a specific scanner firmware release instead of the latest.
Run this installer from your printer host (Raspberry Pi) with the ESP32 connected via USB. This installs everything in one pass — scanner firmware and middleware.
If your printer host has no free USB port:
- Flash the scanner from your laptop (choose "Scanner only")
- Run the installer again on the Pi (choose "Middleware only")
After installation, open http://spoolsense.local in your browser to retrieve your Scanner Device ID — you'll need this for the middleware configuration.
Note: SpoolSense middleware must run on the printer host.
| Board | Flash | Status |
|---|---|---|
| ESP32-WROOM DevKit | 4MB | Tested |
| ESP32-S3-Zero (Waveshare) | 4MB | Tested |
| ESP32-C3 SuperMini / DevKitM-1 | 4MB | Tested |
| ESP32-S3-DevKitC-1-N16R8 | 16MB + 8MB PSRAM | Tested |
| Seeed Studio XIAO ESP32-C6 | 4MB | Untested |
| ESP32-C6-DevKitC-1 | 8MB | Tested |
Other boards: compile from source via PlatformIO.
The installer verifies the connected chip type and flash size before flashing to prevent accidental misconfiguration.
- Pre-built firmware binary (from GitHub Releases)
- NVS config partition with your WiFi, MQTT, and Spoolman settings
- Config is stored separately from firmware — update settings without reflashing
- SpoolSense Python middleware (cloned to
~/SpoolSense, pinned to the latest release) - Python dependencies in a dedicated virtualenv (
~/SpoolSense/.venv) - Generated
config.yamlwith your settings - Optional slicer integration (
publish_lane_data) — publishes spool data for Orca Slicer. AFC and Happy Hare users don't need this. - systemd service (
spoolsense.service) — starts on boot
- Python 3.9+
- git
- USB cable (for scanner flashing)
- Network access (to download firmware and clone repos)
Run the same command again to update or reconfigure. The installer will:
- Download the latest firmware release
- Warn before overwriting existing middleware config
- Reflash the scanner with new settings
