OctoClaw - Enhanced Octoprint Control Skill
You are now controlling an Octoprint 3D printer instance with advanced monitoring, analysis, and notification capabilities.
Helper Script Location
$SKILL_DIR/scripts/octoprint.py
Core Commands
Status & Monitoring
Get Formatted Status (Recommended for user display)
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py status-pretty
Shows beautifully formatted status with:
- •Color-coded printer state
- •Temperature readouts with status indicators
- •Progress bar for active prints
- •Time elapsed, remaining, and ETA
- •Filament usage estimates
Get Raw Status JSON
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py status
Returns raw JSON for parsing.
Check for Errors
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py check-errors
Monitors for:
- •Printer error states
- •Temperature anomalies (deviation from target, overheating)
- •Connection issues
- •Stalled prints Returns JSON with errors/warnings array.
File Management
List Files
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py list-files
Upload File
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py upload <local-filepath> [remote-filename]
Analyze GCode
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py analyze <filepath>
Extracts metadata from gcode files:
- •Layer count
- •Estimated print time
- •Filament length/volume
- •Bed and hotend temperatures
- •Bounding box dimensions
Print Control
Start Print
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py print <filename>
Control Print
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py control <pause|resume|cancel>
Set Temperature
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py temp <tool0|bed> <temperature>
Webcam Features
Capture Snapshot
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py snapshot [output-path]
Captures current webcam image. If no path provided, saves to /tmp with timestamp.
Telegram Integration
Send Status to Telegram
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py telegram-status
Sends formatted status message to configured Telegram chat.
Send Snapshot to Telegram
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py telegram-snapshot
Captures and sends webcam snapshot with progress caption to Telegram.
Send Custom Message
python3 ~/.claude/skills/octoclaw/scripts/octoprint.py telegram-msg "Your message here"
Sends arbitrary message to Telegram (supports Markdown formatting).
Workflow Examples
Monitor Active Print
- •Use
status-prettyto show formatted status with progress - •Optionally capture snapshot to see current state
- •Use
check-errorsto verify no issues - •Send snapshot to Telegram for remote monitoring
Start New Print
- •Check printer state with
status-pretty - •Ensure printer is Operational (not printing/error)
- •List files or upload new gcode
- •Optionally analyze gcode to show estimates
- •Start print
- •Send Telegram notification that print started
Troubleshoot Issues
- •Run
check-errorsto identify problems - •Check temperatures are reaching target
- •Verify printer connection status
- •Capture snapshot to visually inspect
- •Send diagnostic info to Telegram
Remote Monitoring
- •Periodically send snapshots to Telegram
- •Send status updates at milestones (25%, 50%, 75%)
- •Alert on errors or completion
- •Provide ETA estimates
Response Formatting
When showing status to users:
- •Use
status-prettyfor terminal display (includes colors and formatting) - •Parse
statusJSON when you need programmatic access - •Always show progress percentage, time remaining, and ETA for active prints
- •Include temperature info (actual/target)
- •Mention filament usage if available
Telegram Setup
To enable Telegram features, the config.json must include:
- •
telegram_bot_token- Get from @BotFather on Telegram - •
telegram_chat_id- Your chat ID with the bot
To create a bot:
- •Message @BotFather on Telegram
- •Send
/newbotcommand - •Follow prompts to name your bot
- •Copy the bot token to config.json
To get your chat ID:
- •Message your bot
- •Visit:
https://api.telegram.org/bot<TOKEN>/getUpdates - •Find your chat ID in the response
Error Handling
The skill will automatically detect:
- •Critical errors: Printer error state, connection lost, extreme temperature deviations (>15°C)
- •Warnings: Moderate temperature deviations (5-15°C), potential stalled prints
When errors detected, recommend:
- •Send error details to Telegram for immediate alert
- •Capture snapshot to assess situation
- •Pause print if temperature deviation detected
- •Cancel print if critical error
Arguments
When invoked with arguments, use $ARGUMENTS to route commands:
- •
/octoclaw status→ Show pretty formatted status - •
/octoclaw check→ Run error check - •
/octoclaw snapshot→ Capture and show snapshot path - •
/octoclaw telegram→ Send status to Telegram - •
/octoclaw telegram snap→ Send snapshot to Telegram - •
/octoclaw print <file>→ Start printing - •
/octoclaw pause→ Pause print - •
/octoclaw resume→ Resume print - •
/octoclaw cancel→ Cancel print - •
/octoclaw analyze <file>→ Analyze gcode file
If no arguments provided, show formatted status by default.
Best Practices
- •Always check status before starting prints
- •Use error monitoring during long prints - Periodically run
check-errors - •Send Telegram notifications for important events - Print start/finish, errors
- •Capture snapshots at milestones - Beginning, 50%, completion
- •Analyze gcode before printing - Give users time estimates and filament requirements
- •Format output appropriately - Use pretty status for humans, JSON for parsing