Remote Shutdown

Powering down the printer...

I have a Creaility Ender 5, and a Raspberry Pi, running Octoprint. synced with Cura on my laptop.

The 3D Printer is in my office, and the fans etc are noisy - There appears to be a menu option to "shutdown" but I think that just stops the software.

Is there a way of telling the printer to power down completely?

I also notice, that if I turn the switch on the printer to off, and the Pi is plugged in via the USB, the display stays active - I am guessing that it is proving some level of DC power which is enough to keep the control board awake, but not the motors/heaters.

I would love to be able to shutdown everything (well, OK, printer side - keeping the pi running is not a big power drain), under software/remote control, and for that matter, probably power it all up. Is this feasible? Anyone given this a try?

Several of my plugins are designed to control IOT power devices. Some are simple plugs (TPLink SmartPlug, Wemo), some are inline relays (any device flashed with Tasmota).

Would that be one of these, or do I have to "flash" this with some SW changes...

You do have to flash the sonoff devices to work. Any of the ones listed at the link below should work.

I've recently had reports that the Wemo devices were having problems with the plugin and weren't able to be controlled, but I just received one and will be verifying that tonight. The easiest confirmed working method at this time is The TP-Link SmartPlug devices.

So my testing thus far with the wemo is successful, and that device and plugin combo is pretty straight forward as well and doesn't require flashing the device with custom firmware.

1 Like

So, I grabbed a Tp-link HS110 (bargain price, too) - just getting it set up.

1 Like

I have many of these things. They're awesome.

Yup, tempted to get some more - local box store has them 1/3 off. But, then I really need to get up and move more - walking 10 feet to turn off a lamp rather than controlling it with an app - But my Printer is another story... (Hey, whatever happened to the "clappers").

But... This seems to be doing it's thing now. However, given the Pi is plugged in to the printer's USB, it powers the backlight for the display, which remains on, even if the printer is powered down - a) worried about "burn in" b) it's an eerie glow at night...

I am planning on getting an MKS Gen L, and TFT28 but suspect that wont make much difference.

I have one of these in the other room with an Ikea three-plug outlet. In each of those are: 1) the printer controller board, 2) the 5V adapter for the Raspberry Pi and 3) a second 5V adapter for the Raspberry Pi 3B with a Sense Hat that mainly just adds heat to the build area and to display the temperature opposite of the internal webcam.

So I can toggle on all three from the KASA phone app, the Alexa phone app or I can just say "Computer, turn on the 3D printer" from either room (Alexa Echo and Spot).

In my mind, this is the simplest way of dealing with your Pi ghost-powering the printer's display.

And yet, others try to use my own OctoPrint-USBControl plugin (search the forum here). Or you could use the TPLinkSmartplug plugin that's listed in the registry. Or just search here on the forum for uhubctl since several people have done scripts for toggling USB power.

I have another of these next to me for my development rig. I just touch the button and it powers the printer board, the TFT display and the Raspberry (same Ikea outlet since they sell them in a two-pack).

The HS-110 gathers power statistics as well if I remember correctly. Search the forum; I'm sure one of us has included some code to report that information.

The latest version of TPLinkSmartplug plugin will show snapshots of power usage during prints and if polling is enabled.

1 Like

Can you tell me how to make this work please? I have the latest version and I am unable to get the plug in to perform and react to anything other than the M81 192.168.1.174 which switches the plug off.

I though that it was possible to use the plugin to issue a command to the plug to switch off in 60s but shutdown the Pi immediately - I have tried all variations of the settings but the only way to shout down is to issue M81 at the end of print Gcode :frowning:

The power usage at the bottom of the Octoprint screen doesn't show anything either

Thanks

Iain

Not sure, I haven't gotten to the embedded Gcode path for switching off the printer...

My power usage is working - are you running a HS100 or HS110?

I have plugged in the Octoprint-USBControl, and it seems to work....

But........

When I next fired up, having used USB 2 as the generic, I found that it would appear that my webcam (on a different port on the Rpi wasn't working, so I presume I had powered everything off (including it). Question is, how are the Rpi ports numbered - (I.E. top left/top right - facing the board etc).

I have an HS100, does this mean that the power won’t work?

It should still close down the pi gracefully before switching the plug off though I would have thought though?

@Iain_Morrison if you upgrade from a prior version there is a chance that you got one that potentially corrupted your plugs configs. If you add new plugs with the same set-up and delete the older plugs out completely and restart octoprint it may resolve your issue.

Just sent a reply to your previous post @Iain_Morrison not realizing you had a HS100, Those don't include energy monitoring so you will never get the data to display.

The power down/power up should work fine - the difference with the HS100 and HS110 is that the HS100 doesn't have the monitoring capability of the HS110, so you won't get the "power used" data in the bottom left corner...

Arguably, @OutsourcedGuru or is it @jneilliii - which ever is deving that bit, the "display power" panel should test for HS110 over HS100 if that test is doable, and not display anything if it's not a HS110.

I'm the plugin author, the side panel will display only for a short period while the web interface is loading and then hide completely if the device isn't energy monitoring compatible.

1 Like

It is still possible that if @Iain_Morrison upgraded there may be some backend issues causing the unit to not power cycle properly. It would be great if you could post an issue in the repo with logs, settings configuration, etc. for better tracking.

If you want to get rid of the 5V DC power the raspberry is giving to your ender 5 you can easily use a piece of scotch tape covering the 5V line in the USB socket. The 5V line is not needed for communication to the printer.

Works very well for my ender 3 pro.