This project has been archived as a better option has come along: OctoEverywhere [GitHub] which now supports BambuLabs printers.
I'd rather point people in that direction than use my "example code" that most likely will get very little focus from me with my limited free time.
This is a listener & notifier for Bambu Labs printers using MQTT to listen on the messages the printer sends and provide print notifications via Discord.
While this works (and is enough for my needs) this is meant to just be a starting point & inspiration for other developers. I don't have the capacity at this time to take on & support another project.
This has only been tested on a P1P as that's the only printer I have. If you have a X1C and are willing to test this out, please visit https://github.com/derekantrican/BambuLabsListener/issues/2
For this to work, you need to be on the same network as your printer
cd
into the repository folderdotnet run
dotnet run
again and the application will start listening to messages from your printerAs mentioned in https://github.com/derekantrican/BambuLabsListener/issues/3#issuecomment-1714352307 I had some issues getting this to work unless I installed MQTT Explorer first & got it working listening to my printer's message stream. After that, this tool seemed to work (no idea why that might be).
Thank you so much for considering donating to this project! The more donations I get, the more I can justify putting work into this project.
Todos:
It has been suggested that I turn this into an OctoPrint-like interface. That would be a lot of work (and a lot of learning new things for me), but I can see the value in it. If this gets enough demand and there's enough sponsorship of this project, I'll be able to justify time towards this feature.
Theoretically, MQTT could also be used to send (publish) messages TO the printer (eg starting a print job). I haven't tested that and don't know if it works. I have no plans to do this currently - this repository is only meant to serve as a small tool & example code for building something similar. But anyone is welcome to fork & create a PR to contribute!