Complete Klipper configuration backup for the Creality Ender 3 V3 SE, running a full Mainsail stack on a Raspberry Pi 5, with automatic GitHub backups triggered from Home Assistant.
| Component | Role |
|---|---|
| Klipper | 3D printer firmware |
| Moonraker | API server |
| Mainsail | Web interface |
| KlipperScreen | Touchscreen UI |
| Spyglass | Camera streaming (Pi 5 camera module via flex cable) |
| Moonraker-Timelapse | Timelapse generation |
Host: Raspberry Pi 5
Klipper-Backup/
│
├── printer.cfg # Main Klipper config — steppers, bed, hotend, probing
├── macros.cfg # Custom macros (START_PRINT, END_PRINT, PAUSE, etc.)
├── shell-macros.cfg # Shell command macros — includes GitHub backup trigger
├── variables.cfg # Persistent runtime variables (auto-updated by Klipper)
│
├── moonraker.conf # Moonraker API configuration
├── mainsail.cfg # Mainsail-specific settings
│
├── KlipperScreen.conf # Touchscreen UI configuration
├── spyglass.conf # Camera stream configuration (Pi camera module)
├── timelapse.cfg # Timelapse plugin configuration
│
├── scripts/ # Shell scripts called by Klipper shell macros
│
└── .gitignore
Backups are triggered by a Klipper shell macro defined in shell-macros.cfg, which calls a script in scripts/ that does a git commit and push.
It is invoked from three places:
- On print start — saves config state before each print
- On standby — saves final state after print completion
- From Home Assistant — via
button.impresora_3d_macro_backup_github_klipper, allowing on-demand remote backup
The backup script is essentially:
cd ~/printer_data/config
git add -A
git commit -m "Klipper backup: $(date '+%Y-%m-%d %H:%M')"
git push origin mainThe commit history in this repo reflects the actual usage history of the printer.
- Probe: CR Touch — mesh bed leveling configured with
[bltouch]and[bed_mesh] - Input shaper: Resonance compensation tuned via
[resonance_tester]with ADXL345 - PID autotune: Hotend and bed PIDs are recalibrated automatically when ambient temperature drifts significantly — triggered via Home Assistant
- Pressure advance: Tuned per filament type
- Filament runout sensor: Mapped to a pause macro with Alexa voice announcement via HA
- Camera: Raspberry Pi camera module connected via flex cable, streamed via Spyglass
- Timelapse: Rendered per-print via Moonraker-Timelapse using the Pi camera feed
This printer is monitored and controlled from Home Assistant via the Moonraker integration:
- Print state, progress and ETA exposed as HA sensors
- Print start/finish events send Telegram notifications with gcode thumbnail previews
- Filament runout triggers an Alexa announcement across all rooms
- Power managed via a Zigbee smart plug (
switch.ender_3_v3_se) - Automatic PID recalibration triggered when ambient temperature drifts > 4°C from the last calibration run
⚠️ This is a personal backup, not a plug-and-play config. Use it as reference — hardware offsets, PID values, and probe positions are specific to this machine and will need recalibration on yours.
- Install Klipper, Moonraker and Mainsail on your Raspberry Pi (e.g. via KIAUH)
- Use this repo as a structural reference
- Always run PID autotune and bed mesh calibration on your own machine before printing
- Adjust
[stepper_*]rotation_distanceandposition_*values to match your specific hardware
If this saved you time and you feel like it, a coffee is always welcome — but absolutely no pressure.
MIT — reference and adapt freely.
Ender 3 V3 SE running in Benidorm, Spain. Backed up automatically so nothing is ever lost.