vitormhenrique / OctoPrint-Enclosure

OctoPrint Enclosure Plugin
GNU General Public License v3.0
395 stars 201 forks source link

Regular IOs don't toggle when plugin "Smart-Filament-Sensor" is enabled #483

Open asoretmadolell opened 2 years ago

asoretmadolell commented 2 years ago

Describe the bug Regular IOs don't toggle when plugin "Octoprint-Smart-Filament-Sensor" is enabled, however the output test script does work.

To Reproduce Steps to reproduce the behavior:

  1. Create a "Regular IO" output type, IO number 15, and hook up an LED to it.
  2. Test that toggling the output turns the LED on and off.
  3. Install plugin "Octoprint-Smart-Filament-Sensor" https://plugins.octoprint.org/plugins/smartfilamentsensor/
  4. Test toggling the LED again and now it doesn't work, however using the output test script it does work.
  5. Disable plugin "Octoprint-Smart-Filament-Sensor".
  6. Toggling the LED on and off now works again.

Expected behavior Being able to use existing working configuration of "OctoPrint-Enclosure" with the plugin "Octoprint-Smart-Filament-Sensor" enabled.

Additional context Hello! I know that very recently you have marked the plugin as deprecated after lots of debate. I think it's still a great plugin with the features it already has! However I think I have found a bug. I have read the troubleshooting guide thoroughly, so much so that I even solved an issue myself that I was already having with my DHT sensor (you will notice from the log file). octoprint.zip Like I said, when enabling the plugin "Octoprint-Smart-Filament-Sensor", something happens. Let me point you to the timestamp in the log file for the following actions:

Funny thing is that the output test script works perfectly. Therefore, I thought that it could have something to do perhaps with the toggle switch in the navbar. Just in case, here is a screenshot of the Smart Filament Sensor plugin ENABLED: with plugin And here is one with the Smart Filament Sensor DISABLED: without plugin There doesn't seem to be much of a difference, but at this point I didn't know where else to look. What's even more funny is that the Smart Filament Sensor works perfectly, using different pins, and pausing the printer correctly when there is a filament runout. I'll be more than happy to take your guidelines and help you test a bit further. Enjoy your coffee! Thank you for everything!

XDTZ commented 2 years ago

Have you looked up about modifying GPIO cleanup command in Smart Filament Sensor source code? It fixed the issue for me with another plug-in.