PSU Control - protect from power off when printing from SD card

I usually use my printer from OctoPi, but sometimes, I print from the SDCard.

What's the proper way to make sure the PSU control plugin wouldn't turn off the printer mid-print?

It seems that "Sensing: Internal" is not the right approach, but what is? Thanks.

I've honestly never tested the plugin when printing from SD as I always print from OctoPrint. The reason this occurs is because commands aren't sent from OctoPrint to reset the auto-off timer. It might be possible to detect if printing from SD and not turn off the supply but it's not something on my list. If there is a generic non firmware specific solution that can be implemented I would consider the PR.

As a workaround you could turn off "Automatically turn PSU OFF when idle".

This thread seems related, but I'll be happy to start a new one if it makes sense.

Is there a way to configure the plugin such that the PSU stays on through a server restart? Not a reboot of the RPi, obviously. Its just that there are times where I'm experimenting with settings on some plug-ins, and they often require a server restart ... orr the server restarts itself for reasons unknown, but the printer may be operating independently, such as when printing from the SD card.

Thanks!

PS. I'm using a 5V relay that seems to be quite satisfied with 3V3, and GPIO21 for switching (although for some odd reason PSU Control's configuration page always shows "G-Code Command" even though I'd previously selected GPIO Pin). Sensing is set to internal.

Hello! (Three years later) :slight_smile:

I have the same problem and it is annoying. Most of the time I start my print from my computer, but sometimes via the menu on my Prusa. 30 minutes later, the PSU Control plugin shuts down my Shelly wifi plug mid print.

I use the workaround, i.e shutting down the printer after three hours of idle via the plugin settings. It works as long as I print small objects (which is normally the case) but is it possible to update the plugin so it can sense if it is printing from SD-card and make the printer stay on?