Add a GPIO control to interface to turn printer on or off

My printer has three basic states…on and off of course and usb powered electronics only. I prefer to keep the main supply off when I am not around. The USB powered electronics stay on if the astrobox is connected but I would like to have a relay control to power up the main supply and connect the heater. I think a simple on/off switch that controlled a GPIO would do it…not sure given the various hardware running astroprint if this is feasible or not.

It would be nice to have an option to turn this off automatically at the end of a print as well.

4 Likes

+1 on this - I really dont want to leave my 3D printer fully powered up 24/7, so connecting the PSU to a GPIO pin is next on my to-do list (found a good doc here: https://github.com/foosel/OctoPrint/wiki/Control-your-printer’s-ATX-PSU-through-a-RAMPS-board-using-OctoPrint).

Or at least somehow provide hooks for custom controls and let the users implement them.

Hello you can control allready just head to terminal and get the purple and böack to ramps.

M80 atx on
M81 atx off

If you want vutton for it look the www page and try to reproduce like fan button.

2 Likes

I’ll try that.

Thanks!

Please let us know what you find as this is something I have been waiting for.

Any updates on this?
I would definitely like the possibility to turn my Wanhao i3 on/off before/after prints.

Off would have to be AFTER cooldown, maybe when bed + extruder <35C f.ex.

1 Like

Any luck?? Maybe some good news?

Really sorry, I have not had time to try it (dealing with weird calibration issues lately). It is still on my to-do list (I still have the tab open in Chrome :slight_smile: ). I see no reason why it wouldn’t work though.

1 Like

Alternatively I was thinking of using a USB-relay connected to a power outlet, or a box between the outlet and the printer.

Would be cool if AstroPrint could support a USB-relay in the same way as a printer.

I am also wondering if those feature will be added soon. I mainly want to control a GPIO pin to turn a relay on and off to control the printer, but other uses would be very interesting!

I was also thinking about this and tought of using a WIFI socket! it can be found for cheap on ebay.

we can just leave our printer connected and control on off through the wifi plug app! will it harm the printer?

I actually do something similar using an Insteon relay module…it actually turns off both the printer and the astrobox at the wall. It is a bit inconvenient as you have to use a separate app to turn things on then wait for the astrobox to boot up, but not a big problem and you could just leave the astrobox on by plugging it in bypassing the Insteon box but as I do occasionally have issues with my astrobox not being reachable from the internet being able to power cycle it remotely can be helpful.

Note: I don’t work for SmartHome, makers of Insteon, but I did many years ago and have several of their products in my home which is why I chose this tech, I am sure there are cheaper but similar solutions out there.

I’m trying to replaicate the porcess but is there any way to add this to the UI.