I can load a version of Marlin on my Ender 3 V2 that supports filament runout detection with the sensor connected to the printer motherboard. But, I read a post that says that won't work if using Octoprint, since Octoprint will have no way to know the runout event occurred and will just keep sending GCode.
On the other hand, another post said that there will be a long delay between when sensor indicates runout and the GCode quits streaming from Octoprint, if the connection is made to a RPI gpio. Probably too long a delay so that the end of the filament moves too far past the sensor and into the Bowden tube making it hard to remove.
So, what's the preferred way to connect? I could connect to both, I guess.
Also, will Octoprint respond to an RPI connected sensor if the printer is printing from its SD card?