All notable changes to this project will be documented in this file.
- On-Demand MQTT Monitoring
- New endpoint:
POST /v1/iot-service/api/user/device/realtime/start- Start 2-minute MQTT monitoring session - New endpoint:
GET /v1/iot-service/api/user/device/realtime?device_id={id}- Get cached real-time MQTT data - New endpoint:
GET /admin/mqtt- View active MQTT session status - Background cleanup thread automatically disconnects expired sessions
- Session-based model prevents resource exhaustion
- Only POST endpoint allowed in strict mode (doesn't modify printer state)
- New endpoint:
-
Proxy Server (servers/proxy.py):
- Changed from automatic monitoring of all devices to on-demand session model
- Added
mqtt_sessionsdict to track active monitoring sessions - Added configurable session duration (120 seconds) and cleanup interval (30 seconds)
- Updated
/healthendpoint to show active MQTT sessions count - Modified strict mode check to allow MQTT session start POST endpoint
-
Test Suite (tests/manual/test_proxy_server.py):
- Updated MQTT tests to use on-demand session workflow
- Increased MQTT wait time from 3 to 5 seconds for better data retrieval
- Added detailed status output for MQTT session creation and data retrieval
- Simplified Installation - All features now included in base install
- No longer need
[server]or[all]extras pip install bambu-lab-cloud-apinow includes everything- Server dependencies (Flask, Flask-CORS, Flask-Limiter) included by default
- Only
[dev]extra remains for development tools (pytest, pytest-cov)
- No longer need
-
Proxy Server Rate Limiting
- Per-token rate limiting (not per-IP)
- Conservative limits at 1/4 of Bambu Cloud API limits
- Device queries: 30/min, User endpoints: 15/min, Admin: 10/min
- Automatic endpoint classification
- Clear HTTP 429 responses with retry guidance
-
Proxy Server Token Management
- Support for UUID, random, and named tokens
-
Proxy Testing Changes
- Full test suite:
tests/manual/test_proxy_server.py - Tests all GET endpoints
- Validates response structure
- Security testing (POST rejection)
- Full test suite:
- Updated
INSTALL.md- Simplified installation instructions - Updated
README.md- Reflects new installation method - Removed symbols that may not show on all systems
- Two-Factor Authentication Support
BambuAuthenticatorclass for complete login flow with 2FA- Automatic email verification code handling
- MFA (multi-factor authentication) support
- Token persistence with secure file storage (0600 permissions)
- Token validation and auto-refresh functionality
- Support for both Global and China API regions
- CLI Authentication Tool (
cli_tools/login.py)- Interactive login with email verification code prompt
- Non-interactive mode with command-line arguments
- Token verification and testing
- Force new login option
- Authentication Documentation
- Updated API_AUTHENTICATION.md with complete login flow
- Authentication Tests
- Unit tests for
BambuAuthenticatorclass - Token save/load/verify functionality tests
- Mock-based login flow testing
- 12/12 tests passing
- Unit tests for
- Enhanced
bambulab/__init__.pyto exportBambuAuthenticatorandBambuAuthError - Updated README.md with authentication quick start guide
- Improved auth.py with comprehensive 2FA flow implementation
This release provides a comprehensive, library and documentation for interacting with Bambu Lab printers via cloud and local protocols without requiring developer mode.
- Complete Python Library (
bambulab/)BambuClient- Full Cloud API implementation with authentication, token management, and auto-refreshMQTTClient- Real-time MQTT monitoring with comprehensive message parsingLocalFTPClient- Secure FTP file upload for local network operationsJPEGFrameStream/RTSPStream- Video streaming support for camera integration
- Comprehensive Documentation
- API reference split into logical modules: Authentication, Devices, Users, Files/Printing, AMS/Filament, Camera, MQTT
- Python, JavaScript, and cURL examples for all endpoints
- Complete response schemas with actual field documentation
- G-code and MQTT command references
- Testing Suite (
tests/)- Comprehensive test coverage for all API endpoints
- MQTT stream monitoring and validation
- File upload testing with cloud and local FTP
- Camera stream integration tests
- Detailed output of all API responses for verification
- CLI Tools (
cli_tools/)- Device query and management utilities
- Real-time MQTT monitoring tools
- File upload helpers
- Server Components (
servers/)- Compatibility layer bridging legacy local API to cloud API
- Proxy servers with read-only and full access modes
- Custom authentication support
- All API endpoints fully documented with request/response examples
- MQTT message structure and topic documentation
- Camera streaming protocols (TUTK/RTSP/JPEG)
- FTP upload procedures for local and cloud
- Authentication flows with token lifecycle management
- Cloud API: 40+ endpoints across devices, users, projects, tasks, messages, preferences, filaments
- MQTT: Real-time status, temperatures, fan speeds, print progress, AMS status, HMS error codes
- File Operations: Cloud upload, local FTP, project management
- Camera: TTCode retrieval, local JPEG/RTSP streaming
- Authentication: Email/password, verification codes, token refresh, multi-device support
- CLI tools for device queries
- Proxy server implementation
- Local FTP client integration
- Enhanced MQTT message parsing
- Token refresh timing issues
- MQTT reconnection handling
- File upload content-type headers
- Video streaming documentation
- Camera TTCode endpoint integration
- JPEG frame extraction utilities
- Improved error handling for API requests
- Enhanced logging throughout library
- MQTT connection stability
- Authentication token expiration edge cases
- Multi-device selection logic
- Comprehensive test suite foundation
- MQTT client implementation
- Real-time printer monitoring
- AMS filament status tracking
- G-code command reference
- Refactored authentication module
- Consolidated API base URLs
- Project listing and management endpoints
- Task history retrieval
- Message and notification APIs
- Response parsing for nested structures
- User profile endpoints
- Device firmware information
- Print status monitoring
- Improved response field documentation
- Authentication header formatting
- Device listing pagination
- Error response handling
- Basic examples for common operations
- Core authentication implementation
- Basic device listing
- HTTP client foundation
- Initial API endpoint discovery
See CONTRIBUTING.md for guidelines.