PSA - Spagetti Detection Working Flawlessly via Octoprint

TLDR at the bottom of the post.

I sold my Creality and immediately felt something was missing when I started using the A1. It felt like a Ferrari with a dumb entertainment system. I really missed the AI spagetti detection. Oh and the camera! Can’t say how much I hate the A1 camera.

So I kept searching over and over and couldn’t find anything that could bring hope, except that few people on reddit said that there’s a way to make it work by setting up a “virtual printer”.

One day I decided to search for “bambu” on github and came by few plugins which I installed but didn’t notice anything different in Octoprint.

I then found this plugin. It worked but it wasn’t an automated process. I used it for few days.

A week later I was going through Octoprint settings when I noticed that I have a “Bambu Printer” option under Plugins. I clicked on it and it asked for the printer’s IP address, serial number and access code. Hmmm… where did this come from?

I also noticed that I have a “BAMBU” option under Printer > Connection > Serial Port.

After setting it up and choosing Bambu from the serial port, I started printing a model and immediate got an email+notification on my phone from the Obico app saying that a print has started! Print time and progress were accurate and I was getting screenshots throughout the printing process. Today I had the first failure detection which successfully paused the print while I was away from the printer!

I can’t express how happy I am with this. Viewing my camera feed -even outside home- from the Logitech 920 is eye candy!

Let me recap;
To make it work you’ll need the following:
1- Setup Octoprint (lots of videos on Youtube). I have it running on an OrangePi.
2- Connect a usb camera to Octoprint. I like the Logitech 920 Pro.
3- Install and setup this plugin: GitHub - jneilliii/OctoPrint-BambuPrinter
4- Install and setup Obico plugin on Octoprint (or other spagetti detection plugins of your choice)
5- Install Obico app to get notification/screenshots on your phone and be able to pause prints manually if needed (Obico does it automatically).
6- Profit.

I believe that’s it. My Octoprint installation wasn’t fresh. I did have many plugins installed since I had the Creality before. Give it try and please report back.

I’m not a dev. If you are, please contribute to the project with hope of making it more polished. I don’t know if Octolapse works or not. I haven’t tested it yet.

Peace

14 Likes

As an added bonus, you can download the time-lapses from Obico. I still prefer Octolapse and I hope that people can find a way to make it work. However right now I’m happy at least I got AI detection working.

1 Like

Thats amazing, thanks for sharing will definately give it a try

Did you manage to try it out? I’m looking for ways to enable timelapses from Octoprint.

how did you make the time-lapse step by step please

so I’m trying to take time-lapse with octoprint , but octoprint can’t read gcode.3mf file

also I’m thinking to add trigger switch on the Purge Wiper and connect it to raspberry pi gipo pins

i print multi color AMS through bambu slicer because not working for me if i print through octoprint

i used the switch method but not perfect and will not work with multi color print

I’m using Obico Spagetti Detection which automatically records timelapses. It’s not the kind of timelapse I like, but it’s better than nothing and the video quality is miles ahead of the A1 camera (Logitech 920 Pro).

I prefer Octolapse as it can produce timelapses with stabilized effect, but I’m not sure how to make it work with the A1.

I’ve been able to connect using this plugin (it’s able to see files on the A1’s SD card), but the connection times out before I’m able to do anything like send a print. Was this an issue you came across at all?

The only time I had connection issues, was when I had my secret code entered wrong.

I was getting “too many attempts” error even though the connection was successful.

I had to take one extra step, since I am printing directly from Bambu Studio, I had to ‘start’ the print from the Bambu SD Card in Octoprint to change the state of the printer from operational to printing. Once I did that Obico started showing spaghetti detection.

Alright man I’m loving this! I’ve been using Octoeverywhere which I do like for the most part except having a heck of a time being able to successfully install onto a rb pi zero 2 w… I’m running 3 instances of bambu connect but now when it comes to setting up a USB camera they suggest using [Camera-stream] which is so vague in installation details I’ve been stuck with little help from the provided guide…

Any details I could use?

is Octoprint any better? I know its definitely been around longer.

I’ve been using the below script for over a year, and in the installation process there’s a step to add a camera. You do have to input the stream + scnapshot URL inside the Octoprint settings in order for the video feed to show up, but to be honest I don’t remember how I figured out the correct URL:

2 Likes

Thanks for posting this. I actually just discovered this pluggin today. I got it install and configured but I’m having trouble getting it to communicate with the printer after populated the Bambu Printer plugin page. It generates and key when I click login and everything seems to be correct. From the interface I can see the SD card contents and even see timelapses of old prints. That part appears to be working. Temperatures show 0 or 21.3 degrees. It swaps back and forth as I have been playing around. Currently they are at 0. When I try to print I find this error in my Octoprint.log. I’m not sure its related or not.

Do you think you could give me a hand trying to figure this out?

2024-07-30 20:56:34,280 - octoprint.plugins.bambu_printer.BambuPrinter - DEBUG - processing gcode M220 command = M220 S100
2024-07-30 20:56:34,295 - octoprint.plugins.bambu_printer.BambuPrinter.gcode_executor - DEBUG - Executing M220 (Set Feedrate Percentage)
2024-07-30 20:56:34,321 - octoprint.plugins.bambu_printer.BambuPrinter.gcode_executor - ERROR - Error during gcode M220 (Set Feedrate Percentage)
2024-07-30 20:56:34,341 - octoprint.plugins.bambu_printer.BambuPrinter.serial - INFO - ValueError: invalid literal for int() with base 10: '220 S100'

2024-07-30 20:56:34,357 - octoprint.plugins.bambu_printer.BambuPrinter.serial - DEBUG - Closing IO read loop
2024-07-30 20:56:34,384 - octoprint.plugins.pluginmanager - INFO - Loaded notice data from disk, was still valid
2024-07-30 20:57:04,268 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2024-07-30 20:57:05,277 - octoprint.util.comm - ERROR - Could not write anything to the serial port in 5 tries, something appears to be wrong with the printer communication
2024-07-30 20:57:05,280 - pybambu - WARNING - On Disconnect: Disconnected from Broker: 0
2024-07-30 20:57:05,787 - octoprint.util.comm - ERROR - Error while trying to close serial port
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/util/comm.py", line 1250, in close
    self._serial.close()
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint_bambu_printer/printer/bambu_virtual_printer.py", line 575, in close
    self._serial_io.close()
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint_bambu_printer/printer/printer_serial_io.py", line 98, in close
    self.flush()
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint_bambu_printer/printer/printer_serial_io.py", line 104, in flush
    self.raise_if_error()
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint_bambu_printer/printer/printer_serial_io.py", line 108, in raise_if_error
    raise self._error_detected
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint_bambu_printer/printer/printer_serial_io.py", line 72, in run
    self._process_input_gcode_line(line)
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint_bambu_printer/printer/printer_serial_io.py", line 184, in _process_input_gcode_line
    self._handle_command_callback(gcode, command)
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint_bambu_printer/printer/bambu_virtual_printer.py", line 466, in _process_gcode_serial_command
    handled = self.gcode_executor.execute(self, gcode, full_command)
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint_bambu_printer/printer/gcode_executor.py", line 307, in execute
    return self.gcode_handlers[gcode](printer, data)
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint_bambu_printer/printer/bambu_virtual_printer.py", line 443, in _set_feedrate_percent
    percent = int(data[1:])
ValueError: invalid literal for int() with base 10: '220 S100'
2024-07-30 20:57:05,789 - pybambu - WARNING - On Disconnect: Disconnected from Broker: 0
2024-07-30 20:57:05,828 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Offline after error"
2024-07-30 20:57:05,854 - octoprint.filemanager.analysis - INFO - Starting analysis of local:_3DBenchy_PLA_37m35s.gcode
2024-07-30 20:57:05,859 - octoprint.filemanager.analysis - INFO - Invoking analysis command: /home/pi/oprint/bin/python -m octoprint analysis gcode --speed-x=6000 --speed-y=6000 --max-t=10 --throttle=0.0 --throttle-lines=100 --bed-z=0.0 /home/pi/.octoprint/uploads/_3DBenchy_PLA_37m35s.gcode

Hi. I’m not sure to be honest. Probably best to post on the plugin github page.

Are you sure the printer is showing as connected in octoprint? You have to select “Bambu” and hit connect.

how do you run spagetti detect. because obica wants jetson nano or more

Octoeverywhere and Obico don’t need to run locally. So an orangepi or raspberrypi can easily do the job.

I’m used to plugging an RPi directly into my printers (Prusa) for OctoPrint. With this plugin, are we just installing OctoPrint on a Pi and it’s communicating over the network?

Yes, there’s no need for a cable connection to the printer.