🇺🇦 We stand with Ukraine! 🇺🇦

Looking for a "power management plugin"


I'm looking for an existing plugin that does this :

  • react to a GPIO pulse (button or anything sending an information)
  • trigger a shutdown procedure
  • ask for confirmation if a file is being printed, or the hotend is too hot
  • then toggle a GPIO pin if conditions are satisfied, or if the user confirms
  • optionally toggle this pin on a gcode and also if the printer is iddle after it cooled down, with a delay

I had no luck with PSU Control : I can read the sensing GPIO pin (confirmed by the navbar green bolt), but nothing happens... (I set switching option to a GPIO pin, and also tested a system command (sudo shutdown -h now). Nothing happens...

Does such a plugin exist ?
Should I develop my own ?

I don't think something quite that specific is created, but it may be possible with some clever scripting, or maybe with the 'Physical Button plugin' to read the button presses and 'do something'. Developers · kantlivelong/OctoPrint-PSUControl Wiki · GitHub

PSU control does list a set of helpers that other plugins can use, so it may be possible to write a simple plugin to go on top of it for the button sensing.

PSU control's sensing option is for sensing if the power supply is turned on or not, not for a button to control it.

yeah, if you want something like that you would have to use physical button or enclosure plugins.

Thanks !
Now I understand : PSU control is intended for a server that's running 100% of the time, and it manages the printer PSU only !

Browsing the plugins database, and their sources, I found a couple plugins that contain interesting code, and are simpler than PSU Control for a beginner :

OctoPrint-ShutdownButtonLEDBuzzer : does not ask for confirmation while prinnting ; I already do that with a input pin and dtoverrlay shutdown !

OctoPrint-Gpioshutdown : does the job, but the bells and whistles (user interaction) I want are missing ; it does not shutdown while printing, but does while the hotend is cooling down.

OctoPrint-ShutdownPrinter : no GPIO but many interesting features

OctoPrint-AutomaticShutdown : no GPIO input, does not really care about the hotend (temporisation only).