0

In short: I was wondering if it is possible to send a command to a smart plug when the pi is good to kill it's power.

background I'm running a 3d printer which I'm going to control with a rpi 4 using octopi / octoprint. Well, with this I want to buy a smart plug to power on and off the printer. This is well documented. But what I hope to do is after a successful print shut down the pi and switch off the smart plug to which the pi is connected/powered.

But how do I send a command to the smart switch, on the right moment. So the pi doesn't power of too soon, but the pi is still able to send it's command.

The plugs I'm planning to buy are not yet decided. But I'm thinking about tp-link hs-100 or p100.

When I remotely want to start the pi I simply use the tp-link phone app to power the pi on, which can power on the printer later.

3
  • you would need something to relay the command from the pi with a delay. P100 has a timer that can be set to a scheduled on/off. Rather than commanding power off from pi, set schedule to power off in 30 seconds or something like that. – Abel Jan 15 at 13:29
  • So, like an extra device to send the kill power command? Like a man-in-the-middle? – Tim Jan 15 at 21:35
  • P100 can "be" that extra device, albeit via time instead of a sensor. Just have to tell it to turn off in a few minutes (via its "timer"), and then shutdown the pi. You may have to see what signal to send by looking at network traffic as you set the timer manually. – Abel Jan 23 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.