Turning on a device from another system

I have two 3d printers which a powered on by smart outlets. I use two octoprint instances running under docker on a separate linux system to control print jobs sent to these printers. If the printers are not on when the docker containers startup, they fail and don’t start. I want to put a command of some type in the startup for the docker system that will send a turn on message to the smart outlets controlling the printer when the docker system restarts. The desire is that this will result in the printers being turned on when the docker container finally gets around to starting the octoprint instances allowing them to start successfully. Then they can be turned off if they haven’t printed anything in 30 minutes or whatever time frame I want through a HA automation.
I think the easiest way to do this would be through some type of MQTT message. Does anyone have anything like this working now that I could see to get me started down the correct direction?

Hi, can’t you detect with HA both online presence from your printers and containers?

I’d think webhooks is what you are looking for.
Automation Trigger (webhook) - Home Assistant

2 Likes