Redux - Smart Filament runout sensor

Hello everyone.
I was following this conversation

Need Plugin for Smart Filament runout sensor

but it doesn't quite answer the question I have.

So:
Is there currently a plugin which is able to correctly mate that BTT Smart sensor to Octoprint through the control board and not in conjunction with a Rasbpi?

The configuration my Octoprint controls is mostly stock Ender 3 Pro, one of either the Creality Default board or a new SKR Mini E3.
Octoprint is running on a regular Linux laptop which also functions as my slicer.

Thanks.
M.

You mean: connect the sensor to the printer?

This is supported in Marlin, you just have to enable it and build the firmware. Videos on YouTube etc. will show you how. Enable HOST_ACTION_COMMANDS and HOST_PROMPT_SUPPORT and OctoPrint will know when the sensor is triggered because the firmware will tell it.

1 Like

Hi.
appreciate the help ..

Yes, I did see that Marlin has support for it as you mention, but support seemed only to apply to jobs run off the local sdcard.

As far as current posts suggest, the proper support in Octoprint requires a plugin, which #Octoprint-Smart-Filament-Sensor has been lauded as 'the one'.

But alas I see nothing but pi referenced :slight_smile:

M.

I gave you the solution in my post:

This is the way to do it without the plugin, when the sensor is connected to the printer. It will then tell OctoPrint this information at any time.

I have this sensor, I can tell you it works :wink:

1 Like

@Charlie_Powell Thanks for the info!
Just to clarify, If I enable the HOST_ACTION items you mentioned and then hook the sensor to the motherboard, then the printer will send the out_of_filament command to OctoPrint and OctoPrint will pause until the Filament change has been completed and it doesn't matter if the print is being run from OctoPrint or the SD card?
I would assume that you would need to enable all of the required Filament RunOut settings as well and then you wouldn't need the OctoPrint Filament Plugin?

I couldn't get the plugin to work plugged into the Pi, it seemed like it wasn't processing the signals sent. I could see the state of the pin fluctuating, but the plugin never registered that the filament was moving so this would be a great fix!

Correct on everything there I think. OctoPrint supports the pause action commands out of the box so there is no need for the plugin. For the printer to actually do anything when filament is run out, you would need the advanced pause and filament change feature enabled (M600 & co.).

More on the supported commands :point_right: Action Commands β€” OctoPrint documentation

@Charlie_Powell Thanks a million and thanks for the link! I like to actually understand WHY and HOW something works!

1 Like

@Charlie_Powell Sorry to bother you, but in looking at the Marlin firmware in the Filament Run Out section, it has the following comment:

  • IMPORTANT: Runout will only trigger if Marlin is aware that a print job is running.

  • Marlin knows a print job is running when:

    1. Running a print job from media started with M24.
    1. The Print Job Timer has been started with M75.
    1. The heaters were turned on and PRINTJOB_TIMER_AUTOSTART is enabled.

Does Octoprint send any of those commands when it starts a print?
I would test it but I am waiting on some parts to get my printer back up and running so figured I would make some firmware changes.
Again, thanks a million!

Not on its own, but you can use OctoPrint's GCODE scripts to make it send an M75. Also you can set PRINTJOB_TIMER_AUTOSTART in the firmware config, as mentioned, which will have it consider a print job going on as long as the heaters are active.

1 Like

I had a feeling that there was more to it than what was mentioned. So what would be a better solution? I would think to set the Start Script with the M75, but it seems like a more fail safe method would be to enable the PRINTJOB_TIMER_AUTOSTART but are there any drawbacks with having the timer running every time the heaters are turned on?
If I use the M75 gcode in the start script, should I put the M77 in the end code script?