M4 Mac mini auto power on
I have just got an M4 Mac mini. It's often used intensively, but at other times left for many days on end without being used at all. It also has a number of peripherals connected to the USB. Sleep mode keeps the USB powered, which means that the peripherals are drawing more current than the Mac during sleep. What I want to do it to automatically power it up and down because the Mac mini is in a location where operating the mains switch is difficult.
I thought that a Matter smart switch feeding the Mac and mains powered peripherals might be the solution. I wrote a Shortcut to trigger a Home automation to switch off the smart switch in five minutes time and to trigger the Mac to shut down after 60 seconds. This shuts it down cleanly and leaves power on the connected mains power accessories for about four minutes further in case the shutdown takes a while. This part works well.
The problem is getting the Mac to power up when power is turned back on. I assumed that "Settings > Energy > Start up automatically after power failure" would do the trick, but it only allows automatic restart after a dirty power down when power is lost abruptly. If you issue a command to shut it down in an orderly fashion, it won't automatically restart.
Does anybody have any good ideas, preferably simple ones, to make this happen? It's probably something which is affecting a number of M4 Mac mini users because of the location of the power button. It looks as though I could get it to work by simply shutting off the power and then auto-restarting, but I don't think it's a good idea to frequently shut down messily.
Plan B would be to find a way to shut down the USB sockets in Sleep mode. The current drawn by the Mac itself in Sleep mode is minimal, but the peripherals add quite a significant current consumption.
My other reason for wanting to use a Smart Switch is that I could get Home to schedule nighttime operation from time to time so that the Mac could perform the routine housekeeping operations which it does overnight.
Mac mini, macOS 15.1