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

Open
opened 2022-02-27 18:02:01 +00:00 by asoretmadolell · 1 comment
asoretmadolell commented 2022-02-27 18:02:01 +00:00 (Migrated from github.com)

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:

  • Until 2022-02-27 18:28:37,050 - All is working fine (except for the DHT sensor, though it was solved earlier in the afternoon) and the Smart Filament Sensor plugin is enabled
  • 2022-02-27 18:31:13,611 - LED lights are toggled, exception is thrown
  • 2022-02-27 18:31:46,299 - LED lights are toggled once more, with the same result
  • 2022-02-27 18:33:20,496 - Smart Filametn Sensor plugin is disabled
  • After that, LEDs toggle perfectly (ignore DHT errors)

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!

**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](https://github.com/vitormhenrique/OctoPrint-Enclosure/files/8149144/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: - Until 2022-02-27 18:28:37,050 - All is working fine (except for the DHT sensor, though it was solved earlier in the afternoon) and the Smart Filament Sensor plugin is enabled - 2022-02-27 18:31:13,611 - LED lights are toggled, exception is thrown - 2022-02-27 18:31:46,299 - LED lights are toggled once more, with the same result - 2022-02-27 18:33:20,496 - Smart Filametn Sensor plugin is disabled - After that, LEDs toggle perfectly (ignore DHT errors) 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](https://user-images.githubusercontent.com/5720652/155893942-e0d81811-e17a-488d-9caf-18fa58da4121.PNG) And here is one with the Smart Filament Sensor DISABLED: ![without plugin](https://user-images.githubusercontent.com/5720652/155893963-4098a3c0-a514-4d32-b9de-702dc8dc9786.PNG) 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 2022-04-30 13:28:02 +01:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#483