Description
n8n-nodes-bambulab
This is an n8n community node that lets you control and monitor Bambu Lab 3D printers directly from your n8n workflows.
n8n is a fair-code licensed workflow automation platform.
Installation
Operations
Credentials
Compatibility
Usage
Resources
Installation
Follow the installation guide in the n8n community nodes documentation.
Manual Installation
- Navigate to your n8n installation directory
- Install the package:
npm install n8n-nodes-bambulab - Restart your n8n instance
Prerequisites
IMPORTANT: Before using this node, you MUST enable Developer Mode on your Bambu Lab printer. This grants local network access via MQTT and FTP.
⚠️ Security Warning: Developer Mode disables authentication and allows full control over your printer. Use only on trusted networks.
Enabling Developer Mode
- On your printer, go to Settings → General → Developer Mode
- Enable Developer Mode
- Note your LAN Access Code from Settings → Network → LAN Access Code
- Note your Serial Number from Settings → Device → Serial Number
- Ensure your printer is connected to the same network as your n8n instance
📖 Official Guide: Enable Developer Mode
Security Considerations
IMPORTANT: Please read and understand these security implications before using this node.
TLS Certificate Validation
This node disables TLS certificate validation for both MQTT and FTP connections because Bambu Lab printers use self-signed certificates. This creates a man-in-the-middle (MITM) vulnerability.
Known Limitations
-
Single MQTT Client: P1P/P1S and A1 Mini printers only support one local MQTT client at a time. Close Bambu Studio or other MQTT clients before using this node.
-
No Certificate Pinning: Future versions may support certificate pinning for enhanced security.
-
Local Network Only: This node only supports local network connections (LAN mode). Cloud API integration is not supported.
Operations
Print Resource
Control print jobs on your printer.
- Start: Start a print job from a file on the printer's SD card
- File name (required)
- Options: Bed leveling, flow calibration, vibration calibration, layer inspect, use AMS
- Pause: Pause the current print job
- Resume: Resume a paused print job
- Stop: Stop the current print job
Status Resource
Monitor printer status and get information.
- Get Current Status: Retrieve full printer status (temperatures, progress, state, etc.)
- Get Print Progress: Get progress information for the current print job
- Get Temperature: Get current temperature readings (nozzle, bed, chamber)
File Resource
Manage files on the printer via FTP.
- Upload: Upload a G-code or 3MF file to the printer
- File content (required)
- File name (required)
- Remote path (default:
/)
- List: List files on the printer's SD card
- Path (default:
/)
- Path (default:
- Delete: Delete a file from the printer
- File path (required)
Camera Resource
Access the printer's camera.
- Get Stream URL: Get URLs for the camera stream (RTSP and HTTP)
- Get Snapshot: Get URL for capturing a snapshot
Security Note: The RTSP URL includes your access code for authentication (rtsp://bblp:YOUR_ACCESS_CODE@PRINTER_IP/...). Be careful not to expose these URLs in logs or share them publicly.
Control Resource
Control printer hardware and settings.
- Set LED: Control printer LED lights (chamber light, work light, logo LED)
- LED selection
- Mode: on, off, flashing
- Set Speed: Set print speed percentage (50-166%)
- Speed percentage
- Home Axes: Home all printer axes
Credentials
This node requires Bambu Lab API credentials. You need the following information from your printer:
- Printer IP Address: The local network IP address of your printer
- Find in Settings → Network → IP Address
- Access Code: The LAN access code
- Find in Settings → Network → LAN Access Code
- Serial Number: The printer's serial number
- Find in Settings → Device → Serial Number
- MQTT Port (optional): Default is 8883 for secure connection
- Use TLS (optional): Default is enabled. Uses self-signed certificates.
- FTP Port (optional): Default is 990 for FTPS
Compatibility
- n8n Version: 1.0.0+
- Node.js Version: 22.0.0+
- Supported Printers: X1 Series, P1 Series, A1 Series, A1 Mini
This node uses:
- MQTT for printer control and status monitoring
- FTP/FTPS for file operations
Usage
Example: Upload and Print Workflow
This workflow uploads a G-code file and starts printing:
[HTTP Request] Download .gcode file
↓
[Bambu Lab - File: Upload] Upload to printer
↓
[Bambu Lab - Print: Start] Start printing
Example: Print Status Monitor
Monitor print progress every 30 seconds:
[Schedule Trigger] Every 30 seconds
↓
[Bambu Lab - Status: Get Progress]
↓
[IF] Check if progress > 50%
↓
[Send Email] Notify when print is halfway done
Example: Temperature Monitor
Check temperatures and send alert if too high:
[Schedule Trigger] Every minute
↓
[Bambu Lab - Status: Get Temperature]
↓
[IF] Nozzle temp > 250°C
↓
[Slack] Send alert to #printer-alerts
Example Workflow JSON
See the /examples directory for complete workflow JSON files that you can import into n8n.
Troubleshooting
Connection Issues
Problem: "MQTT connection timeout" or "Failed to connect to FTP server"
Solutions:
- Verify your printer is on the same network as n8n
- Check that Developer Mode is enabled
- Confirm the printer IP address is correct
- Ensure firewall isn't blocking ports 8883 (MQTT) or 990 (FTP)
- Try pinging the printer:
ping <printer-ip>
Authentication Errors
Problem: "MQTT connection error: Not authorized"
Solutions:
- Verify your Access Code is correct (Settings → Network → LAN Access Code)
- Ensure Developer Mode is enabled
- Try resetting the Access Code on the printer
File Upload Failures
Problem: File upload fails or times out
Solutions:
- Check that the file is a valid .gcode or .3MF file
- Ensure sufficient space on printer's SD card
- Try uploading a smaller file first to test connection
- Check FTP port (default: 990) is accessible
Print Won't Start
Problem: Print command succeeds but print doesn't start
Solutions:
- Verify the file name matches exactly (case-sensitive)
- Check that the file exists on the printer's SD card (use File → List)
- Ensure the printer is in IDLE state (not already printing)
- Check printer display for error messages
Resources
- n8n Community Nodes Documentation
- Bambu Lab Wiki – Developer Mode
- OpenBambuAPI Documentation
- Bambu Lab Official Website
Development
Building
npm run build
Testing
npm test
Linting
npm run lint
npm run lintfix
Local Development
To test this node locally with n8n:
# Build the node
npm run build
# Link globally
npm link
# In your n8n directory
npm link n8n-nodes-bambulab
# Start n8n
n8n start
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
License
This project is licensed under the MIT License – see the LICENSE file for details.
Disclaimer
This is a community-developed node and is not officially supported by Bambu Lab. Use at your own risk. The developers are not responsible for any damage to your printer or failed prints.
Acknowledgments
- Built with n8n
- MQTT API documentation from OpenBambuAPI
- Bambu Lab for creating excellent 3D printers
Made with ❤️ for the n8n and 3D printing communities