Enclosure Plugin Replacement / Python 3 upgrade

Hello,
I would like to upgrade to python 3. I am using the Enclosure plugin to control my GPIO light. From what I have read the Enclosure plugin is not Python 3 compliant. I am looking for a replacement plugin/method to automatically turn my GPIO pin on (for my light) as soon as a print starts and turn my GPIO pin off after a predetermined time (something like 15 minutes) after the print job completes/fails. That way my light is on when I am removing my print. The Enclosure plugin does exactly that but I cannot find a replacement plugin that has the same the function. Does anyone have a good idea on this? I can use a python script if needed but I would need to trigger the script on start/complete of the print job. I am sure I am just missing a simple solution/plugin but I've looked for hours without finding one.

Ok, guess I solved my own problem. I was able to get the behavior I wanted with 2 different plugins. LEDStripControl and LightsOut using the M150 command. Seems to work fine with testing. Now to remove Enclosure, backup and upgrade...

Hello @psonoda !

Sure it runs on Python 3:

grafik

1 Like

Hi @Ewald_Ikemann, I was going by this on the the Enclosure github. Maybe it works on Python 3, didn't try it myself...
https://github.com/vitormhenrique/OctoPrint-Enclosure/issues/302

Yeah, I'm fairly certain there was a big push in development after that post and Enclosure is python 3 compatible.

1 Like

@jneilliii I will give the plugin a shot in the morning as I've upgraded Python. From how I read issue 302, it is still open on github but I am probably misunderstanding something. I don't spend a ton of time on github. The workaround I came up with does work but it's a bit of a cludge. Enclosure plugin is much cleaner. Thanks for the help.

@jneilliii @Ewald_Ikemann Thank you, you are both absolutely right. Enclosure plugin does seem to be working fine for me under Python 3. Had to clear data (from previous backed up info) on the plugin to get it going.

2 Likes