All Filament Sensor Plugins Do Not Work Anymore

No filament sensor plugins work now, even though the GPIO pins are verified to respond correctly to the filament sensor microswitch. I have confirmed this via SSH and the command 'gpio readall'. The pin goes from low to high when filament runs out, therefore the sensor is operating correctly and the pin is being read correctly by the Raspberry Pi. Even though the pin responds correctly, neither "Filament Sensor Reloaded" nor "Filament Sensor NG" pause the print even though they are configured completely correctly.

I am on the latest version of OctoPi. Is this an issue with new versions of OctoPi? Does someone need to create a new updated version of a filament sensor plugin?

If you are on the latest version of OctoPi, I urge you to test these filament sensor plugins and report whether they work for you or not. This is a big issue, since there currently appears to be no way to have a filament sensor working with OctoPi.

Have you tried Enclosure plugin?
It works fine for me with a momentary switch to turn on/off the light on the printer witth OctoPrint 1.3.12

3 Likes

I have not tried Enclosure plugin. Can this plugin be rigged up to pause the print when a filament sensor is triggered? If so, I will give it a try as soon as I have time.

Yes it can. On my last printer I used it for just that purpose.

2 Likes

The Enclosure plugin is working great! Thank you so much for your recommendation! :slight_smile:

2 Likes

None of them are working for me either.

I'm trying to get the enclosure one working but that also seems broken.

For reference, I'm using an RPI4, and the triangle labs sensor.

I've tried using Pin 7 (GPIO4) and Pin 11 (GPIO17).

Looks like I will have to give up on octoprint and compile the sensor into marlin sigh

I have also been trying the new Filament Sensor Revolutions plugin that was released at the end of November -- NO LUCK with it either. I have determined that the sensors operate correctly (using the provided API for checking sensor status via GET). With much experimentation I determined that if the filament out sensor is definitely checked when a print is starting (e.g. no filament loaded will cause the print to abort), however it doesn't ever seem to be checked after the print is running. I wonder if the I/O pins are ever being polled once the print is in progress.

I will have to give the Enclosure Plugin a try.

Just would like to follow up, I've tested almost every filament sensor plugin with no luck(even the one from november). I also used the Enclosure Plugin which works, however for some reason it executes the output gcode twice. Anyone have that issue?

I don't no why, but see the same bug in at least 2 filament plugins:

Using Filament Sensor Reloaded, I changed the following in init.py:

def check_gpio(self, channel):
     state = GPIO.input(self.pin)
     if state != self.switch:    # If the sensor is tripped do the pause thing

into

def check_gpio(self, channel):
     state = GPIO.input(self.pin)
     if state == self.switch:    # If the sensor is tripped do the pause thing

Then it works. (See my explanation in the Filament Sensor NG topic),

Alfi66, for the less knowledgeable, can you tell us the path of the init.py file you changed?

Sure!

"/home/pi/oprint/lib/python2.7/site-packages/octoprint_filamentreload/--init--.pyc"

(replace both '--' with underscores, the forum removes these)

Mind the following:

  • This is the "Filament Sensor Reloaded" plugin I am talking about

  • If there is an update for this plugin, and this bug is not fixed, you will need to change it again.

@ arhi I don't think this impacts, Octoprint-Filament-Reloaded-OrangePi

I can't test right now, can you confirm?

-Thanks

I can't find the "def check_gpio(self, channel):" statement in the init.py file. it doesn't appear the code has been updated as Github shows only 2 releases, none recent. Any idea where I went astray?

Alfi66, the “—init—.pyc” seems to be a compiled file. Is there a simple to uncompile and edit it?

It's not a compiled file, it is plain text python code. Open it in terminal with vi to edit.

I confirm . It is compiled. Maybe you have older version of plugin.

I see I goofed up, my apologies! It is “—init—.py” NOT “—init—.pyc”.

Using Filament Sensor Revolutions my printer detects when filament has run out and ejects for reload. Once reloaded the printer goes to continue printing by returning to the correct point on the print but then tells me filament has run out again. This is stuck in a continuous loop! I've tried different filaments just in case and I'm still stuck in this loop! Any ideas? My printer is still waiting to continue the print!

I had that problem when trying to set Revolutions up on my printer and I forget which of the following I changed to make it work properly.
1.Check "Send GCODE only once when out of filament."
2. I had the switch setup as NO and had to switch it to NC for it to work reliably.

HTH

Send GCode only Once seems to have resolved the issue. I'd missed that box! Thanks for your help.