I'm so frustrated. I am in the same boat as you, Ryan. I spent hours yesterday trying to get my filament sensor working, but neither Filament Sensor Reloaded nor Filament Sensor NG work. I have checked the wiring of the switch with a multimeter to ensure it is working properly and I have also confirmed the pin is being read correctly by the Raspberry Pi via SSH and the command 'gpio readall'. The pin does indeed go from low to high when filament runs out, but the filament sensor plugins do not pause the print even though they are set up "correctly" no matter what.
Is this an issue with new versions of OctoPrint? With the current state of things, is there no way to use a filament sensor with OctoPrint?
Does someone need to make a new filament sensor plugin?
Probably the original plugin authors were inundated by issues with people who'd purchased the many types of strange runout switches out there and wanted free support. It looks like nobody is actively developing nor maintaining these at the moment.
I have a solution! @Ewald_Ikemann recommended I try "Enclosure Plugin" and it works great! It can be configured to with the filament sensor in order to pause the print!
[sudo] password for pi:
The user pi' is already a member of gpio'.
pi@octopi:~ which wiringpi
pi@octopi:~ sudo apt-get install wiringpi
Reading package lists... Done
Building dependency tree
Reading state information... Done
wiringpi is already the newest version (2.46).
0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
Also, the filiment sensor is a switch... it is either closed or open. There is no more complex way needed to solve the runout problem, so idk what you mean about supporting switches.
I'm going to fit a filliment sensor and occured to me that the sensor will be at the top of the printer ( i3plus)
Would be nice to let the filliment run for a little longer to minimize wastage at the end of a roll.
So my question is can I input a gcode to pause the print after a certain time rather than pausing instantly?
Sorry if it been asked before. Did a quick search but couldn't find anything.
In python, it's something like this to sleep for a number of seconds. But you don't want the main thread of OctoPrint just stopping for a while. So when you call your script, it's best to run it "in the background" with the ampersand like this...
/home/pi/scripts/myscript.py &
Then whatever magic you use in your script needs to incorporate your sleep command, include something called a shebang at the top to tell Raspbian that we're trying to use Python to run this and then it does something at the end. In theory, you'd run this from the Gcode Systems Commands plugin.
But a more straightforward way would be to create a plugin, I'm guessing.