[Enclosure plugin] How to extend what I'm doing with power control

I picked up an Ender-5 Pro over the holidays and have been playing with it. I'm pretty happy for the most part but I was really unhappy with the loose wires all over the place and they are too short to be dressed cleanly. So I started playing.... And one thing let to another.

First I've moved the power supply/control board enclosure to the back of the printer cube, it's temporally mounted with 3M removable velcro, I will eventually drill 4 more holes and hard mount it to the outside of the frame. I got my wires dressed and zip tied down, I just had to get a longer 10 IDC cable to connect to the display. I still have to print some cable chain to keep some wires from snagging but much better then it was.

I decided to add octoprint via a Raspberry Pi 3B+ (RPi) and also add a power-strip (https://smile.amazon.com/gp/product/B00WV7GMA2/ref=ppx_yo_dt_b_asin_title_o01_s01?ie=UTF8&psc=1) that can be controlled via GPIO pins. I plugged the RPi into the always on socket in the strip and the printer into one of the the controlled outlets. Added wires from ground and pin 26 from the GPIO.

Then I added the Enclosure Plugin to my Octoprint installation and in moments I had full control of power to the printer with a button on screen "Perfect". All good. Then I started playing and I had this idea:

What if I could connect to Octoprint, select a file to print, click print and then the rest of this just happens: Octoprint turns on the printer, waited some amount of time (10-15 seconds) connects to the printer on the serial port, sends the print, waits until it is done, then turns off the printer unless I overide that with in a minute of the print completing.

Some of this seems doable but the flip on the power, wait 10-15 seconds and do the serial connection at first blush appear to be outside the abilities of the Enclosure plugin, but I'm new to using OctoPrint so asking questions here.

I really like the idea but I'm unsure if the Enclosure plugin is the right way to go with this or do I need to spend some time writing a custom plugin?

Thoughts, suggestions?

Thanks

Hi @dmandala,
I don't have an "out-of-the-box-solution" for you, but some Plugins (maybe as an inspiration):

1 Like

Too many choices...

The previous response sounds like what you're looking for otherwise.

I'm planning on using the "Serpentine cable management" for the X cable management and the hot bed cable management. Then some of the "Coiled-tube sleeve cable management" for the other loose wires that are now zip tied but still somewhat messy.

The prior response the autostart plugin seems to assume you are booting octopi and the software kicks in when octopi starts, I am leaving octopi running and the 3D printer is hard powered off from the relay. So what ever I end up using has to when told to print, hard toggle the GPIO pin to power the printer on, wait for it to get stable and fully booted, then connect octopi via the serial port to the printer, then send the print, finish the print and then toggle the GPIO pin back and hard shutoff the printer. I can probley modify the Automatic shutdown to toggle the GPIO pin to hard shutoff the printer. So possibly that might be part of the solution but not sure. Still digging around and learning.