OctoClaw
Scanned@peterhanily
npx machina-cli add skill @peterhanily/octoclaw-print --openclawOctoClaw — OctoPrint Control
Helper script: scripts/octoprint.py (relative to this skill directory).
Config: config.json (same directory) with octoprint_url and api_key.
Resolve all paths relative to this skill's directory.
Commands
All commands: python3 <skill-dir>/scripts/octoprint.py <command> [args]
Status
status-pretty— Formatted status with temps, progress bar, ETA (show this to users)status— Raw JSONcheck-errors— Returns JSON with errors/warnings (temp anomalies, stalls, connection issues)
Print Control
print <filename>— Start a printcontrol <pause|resume|cancel>— Control active printtemp <tool0|bed> <temperature>— Set temperature
Files
list-files— List uploaded filesupload <local-path> [remote-name]— Upload gcodeanalyze <filepath>— Extract gcode metadata (layers, time, filament, temps, dimensions)
Webcam
snapshot [output-path]— Capture webcam image (default: /tmp with timestamp)
Telegram (if configured)
telegram-status— Send formatted status to Telegramtelegram-snapshot— Send webcam snapshot with progress captiontelegram-msg "message"— Send custom message
Workflows
Check on a print: status-pretty → optionally snapshot → check-errors
Start a print: status-pretty (verify Operational) → list-files or upload → optionally analyze → print <file>
Error detection: check-errors returns critical errors (>15°C deviation, connection lost) and warnings (5-15°C deviation, stalled prints). Recommend pausing on temp issues, cancelling on critical errors.
Formatting
- Use
status-prettyoutput for user display - Always show progress %, time remaining, ETA for active prints
- Include temperature actual/target
Overview
OctoClaw provides a CLI to manage an OctoPrint-enabled 3D printer. It can monitor temps and progress, capture webcam snapshots, start/pause/cancel prints, upload and analyze gcode, and detect errors to keep prints running smoothly.
How This Skill Works
Run the script with: python3 <skill-dir>/scripts/octoprint.py <command> [args]. It reads config.json for octoprint_url and api_key, resolves paths relative to the skill directory, and communicates with OctoPrint to fetch status, list files, upload gcode, or control prints. Status commands return either a formatted display (status-pretty) or raw JSON (status), while analyze extracts gcode metadata and check-errors reports issues.
When to Use It
- You want a real-time view of your printer's temps, progress, ETA, and a formatted status for user display.
- You need to start a print by uploading or selecting a gcode file, then verify it before printing.
- You must pause, resume, or cancel an active print from the command line.
- You want to snapshot the live webcam to share progress or verify print integrity.
- You suspect issues and want to run error checks to surface temperature anomalies or connection problems.
Quick Start
- Step 1: Ensure config.json contains your OctoPrint URL and API key, and that python3 is installed.
- Step 2: Check status: python3 <skill-dir>/scripts/octoprint.py status-pretty; optionally capture a snapshot with snapshot.
- Step 3: Start or manage prints: list-files or upload a file, then print <filename>, and use control <pause|resume|cancel> as needed.
Best Practices
- Always use status-pretty to show a user-friendly view with progress, ETA, and temps before taking action.
- If starting a print, verify Operability with status-pretty or status, then use list-files or upload before printing.
- After starting a print, optionally run analyze on the selected file to estimate layers, time, filament, temps, and dimensions.
- Run check-errors regularly to detect critical (e.g., >15°C deviation) and warning (5-15°C) issues and respond by pausing or canceling as appropriate.
- Capture frequent snapshots (snapshot) during long prints to monitor progress, and share via Telegram if configured.
Example Use Cases
- A technician checks a long print's temperature and progress with status-pretty and then captures a snapshot to share a progress update.
- A user uploads a new G-code file, analyzes it for estimated print time and filament usage, and then starts the print.
- The system detects a temp deviation; check-errors flags it, and the user pauses the print to investigate.
- During a print, a quick snapshot is taken to verify layer adhesion and shared with a team via Telegram.
- A printer is monitored end-to-end from status-pretty to periodic snapshots, with a final check-errors report after completion.