bambu-js
v2.2.2
Published
Tools to interact with Bambu Lab printers over MQTT and FTP.
Downloads
307
Readme
Bambu JS
Tools to interact with Bambu Lab printers over MQTT and FTP.
Example
import { BambuPrinter } from "bambu-js";
(async () => {
// Create the printer
const printer = new BambuPrinter("192.168.68.1", "01P0XX1XX2XX", "12345678");
// Connect to the printer
await printer.connect();
// Manipulate files on the SD card
await printer.manipulateFiles((context) => {
let dir = await context.readDir("models");
console.log(dir);
});
// Start a print job
printer.printProjectFile(
"models/project.3mf",
"plate_1.gcode",
"Plate 1",
"66b1ea1d91b15ace6f74ea1456ba1456",
{
timelapse: false,
},
);
// Log the printer state
console.log(printer.state);
})();