The idea is to have a HomeKit-enabled smart plug power on the backup drive at a specific time of the day and power off the smart plug once the Time Machine backup is completed.
This is where I’m at right now:
every day at 17:00 a HomeKit automation turns on the smart plug to power the external hard drive,
On mount LaunchControl runs a script that automatically backs up the drive with TimeMachine and ejects it upon completion (I can‘t code and the developer of this app actually helped me out immensely, he was extremely friendly and patient, so I can totally recommend going down this route),
A curl command at the end of the script triggers the automation server running on a dedicated always-on iOS device (I use an old iPhone 5s on do not disturb mode and guided access) using Pushcut,
Pushcut triggers a scene that turns off the smart plug.
This works like a charm and I can recommend replicating it, if you are interested and happy with the current iteration.
I do however have a couple of questions I‘d like to ask the community:
Setting up the automation server on an always-on iOS device requires a subscription to Pushcut pro, this is great and definitely does the trick; I’m happy to support this developer, but I was hoping to do this without having to depend on an external service. Any ideas?
Any thoughts/suggestions/improvement ideas regarding this project? Is there something I haven‘t considered?
If you can find the developer documentation for the smart plug you could issue the command to it directly from the command line.
If you ran HomeBridge, I’m pretty sure you could set that up to be triggered from.a script and relay it to the switch via the scene.
You have not indicated what the smart plug is delivering the power to. Is it the drive hosting Time Machine?
If that is the case, is the drive not entering sleep/standby after unmounting? That should drop the power consumption down to a very small level. The question in power saving terms would then be is the overall power consumption of the drive plus the plug (yes, smart plugs do consume a small amount of power, they are usually Linux-based computers wired into the hardware) less than the drive alone if left to go into standby?
I am actually running HomeBridge on the Mac, so if I understand it correctly this seems to be a great solution. Admittedly, I am quite clueless on how to accomplish that - I am however interested to learn if somebody could point me in the right direction. What kind of documentation am I looking for? Will I stand a chance when it comes to writing a HomeBridge plugin?
The smart plug delivers power to the external drive, that‘s correct - I apologise for not specifying that and maybe i can come up with a better subject for this thread.
That‘s a good point and great first principals thinking right there, but the main reason why I‘m doing this is noise, rather than just power consumption.
I‘m a student and my desk is located in my bedroom - the two hard drives I use for this can be noisy (both at night or whilst studying) even on standby mode.
I could transition to SSDs or maybe a more modern enclosure, but that would be expensive and besides I do enjoy the tinkering process.
Thank you for your suggestion!
I had a brief look at the app and article you sent, and must admit that I’m yet to fully understand how to create a custom automation URL.
After a bit of tinkering however I was able to get it working somehow.
I’ll probably still look for some further reading material later today in order to better understand how this works.
This is a great solution and I am so very grateful.
I couldn’t be happier to have found this forum, you seem to be a cool bunch.