BambuSharp 1.0.0
dotnet add package BambuSharp --version 1.0.0
NuGet\Install-Package BambuSharp -Version 1.0.0
<PackageReference Include="BambuSharp" Version="1.0.0" />
<PackageVersion Include="BambuSharp" Version="1.0.0" />
<PackageReference Include="BambuSharp" />
paket add BambuSharp --version 1.0.0
#r "nuget: BambuSharp, 1.0.0"
#:package BambuSharp@1.0.0
#addin nuget:?package=BambuSharp&version=1.0.0
#tool nuget:?package=BambuSharp&version=1.0.0
BambuSharp
An open source .NET API for Bambu Lab printers.
Overview
BambuSharp is a comprehensive .NET library for communicating with Bambu Lab 3D printers over the local network. It provides real-time monitoring of printer status, temperatures, print progress, AMS (Automatic Material System) units, and much more through an easy-to-use API with full INotifyPropertyChanged support.
Features
- Real-time Printer Monitoring - Live updates via MQTT connection
- Comprehensive Status Information
- Print progress, current file, layer information
- Bed and nozzle temperatures
- Extruder details with accurate temperature conversion
- Nozzle specifications (diameter, type, wear percentage)
- AMS units with filament information (type, color, remaining length)
- IP camera settings and resolution
- Light status (chamber light, work light, etc.)
- Network interfaces and IP addresses
- AI features (spaghetti detector, first layer inspector, etc.)
- File upload status and progress
- Cloud connectivity status
- Terminal UI - Cross-platform terminal-based monitoring interface with colored filament display
- INotifyPropertyChanged Support - Easy integration with MVVM applications
- Type-Safe API - Strongly-typed properties with units (using Meadow.Units for temperatures)
Installation
dotnet add package BambuSharp
Quick Start
Basic Connection and Monitoring
using BambuSharp;
// Create a printer instance with IP address and access code
var printer = new LocalPrinter("192.168.1.100", "your-access-code");
// Subscribe to property changes
printer.PropertyChanged += (sender, e) =>
{
Console.WriteLine($"Property changed: {e.PropertyName}");
};
// Connect to the printer
await printer.Connect();
// Access printer status
Console.WriteLine($"State: {printer.State}");
Console.WriteLine($"Progress: {printer.PrintProgress}%");
Console.WriteLine($"Current File: {printer.CurrentFileName}");
Console.WriteLine($"Bed Temperature: {printer.BedTemperature.Celsius:F1}°C");
Console.WriteLine($"Nozzle Temperature: {printer.NozzleTemperature.Celsius:F1}°C");
Console.WriteLine($"Layer: {printer.CurrentLayer}/{printer.TotalLayers}");
// Access AMS information
foreach (var ams in printer.AmsUnits)
{
Console.WriteLine($"AMS Unit {ams.Id}: {ams.Humidity}% humidity");
foreach (var tray in ams.Trays)
{
Console.WriteLine($" Tray {tray.Id}: {tray.FilamentType} - {tray.Color}");
Console.WriteLine($" Remaining: {tray.Remaining}mm of {tray.TotalLength}mm");
}
}
// Disconnect when done
await printer.Disconnect();
printer.Dispose();
Available Properties
Core Status
State- Current printer state (Idle, Printing, Paused, etc.)PrintProgress- Print completion percentage (0-100)CurrentFileName- Name of the currently loaded/printing fileCurrentLayer/TotalLayers- Layer progress informationRemainingMinutes- Estimated time remaining
Temperature Monitoring
BedTemperature- Current heated bed temperatureNozzleTemperature- Current nozzle temperatureExtruder- Detailed extruder information including:CurrentTemperature- Current nozzle temperature (device-level)TargetTemperature- Target nozzle temperatureFilamentTemperature- Filament temperatureStatus- Extruder status code
Hardware Information
Nozzle- Nozzle specifications:Diameter- Nozzle diameter (e.g., 0.4mm)Type- Nozzle type (e.g., "HX01")WearPercent- Nozzle wear percentage
IpCamera- Camera settings:Resolution- Camera resolutionRecordingSetting- Recording configuration
Lights- List of lights (chamber, work, etc.) with on/off statusNetworks- Network interfaces with IP addresses and subnet masks
AMS (Automatic Material System)
AmsUnits- List of AMS units, each containing:- Humidity and temperature
- Trays with filament information (type, color, remaining length, temperature settings)
Advanced Features
AI- AI camera features:PrintingMonitor- AI monitoring enabled/disabledFirstLayerInspector- First layer inspectionSpaghettiDetector- Spaghetti failure detectionBuildPlateMarkerDetector- Build plate marker detectionPrintHalt- Automatic print halt on detectionHaltPrintSensitivity- Sensitivity levelAllowSkipParts- Allow skipping detected issues
UploadStatus- File upload progress:Status- Upload statusProgress- Upload percentageSpeed- Upload speedFileSize/FinishSize- File size informationTimeRemaining- Estimated upload time remaining
Files- List of available print files on printer storageCloudStatus- Cloud connectivity:BambuLabCloudConnected- Bambu Lab cloud connection statusExternalCloudConnected- External cloud connection statusVersion- Protocol version
Terminal UI
BambuSharp includes a cross-platform terminal-based monitoring interface built with Terminal.Gui:
- Real-time expandable tree view of all printer properties
- Colored filament display for AMS trays with high-contrast backgrounds
- Live updates without page refreshes
- Navigate with keyboard (arrow keys to expand/collapse)
Technical Details
MQTT Communication
BambuSharp communicates with Bambu Lab printers using MQTT over the local network:
- Real-time status updates (~1 second intervals)
- Automatic JSON deserialization with custom converters
- Reliable connection management
Requirements
- .NET 8.0 or later
- Network access to Bambu Lab printer
- Printer access code (found in printer settings)
Acknowledgments
- Built with Meadow.Units for type-safe unit handling
- Terminal UI powered by Terminal.Gui
- MQTT communication via MQTTnet
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Meadow.Units (>= 2.4.0.15-beta)
- MQTTnet (>= 5.0.1.1416)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 282 | 11/27/2025 |
| 0.9.0-beta | 432 | 11/20/2025 |