The difficult part is opening up all of the plumbing fixtures and taps automatically, I haven’t tried draining water out of a home’s plumbing system without opening all of the taps and am unsure if it works.
If you have a well, you’ll need to drain the expansion tank and turn off the water pump, the latter can be achieved with a relay that breaks power to the pump but I’m unsure of how to handle the former.
You’ll also need to automate filling the traps with antifreeze, unless you’re cool with replacing sink traps and toilets after a freeze event.
Draining the pipes isn't that simple, and even if you did, you still have things like a water heater, toilets, softeners, filters, and expansion tanks. You also wouldn't get the water sitting in drain traps; winterizing a house or RV involves pouring a little RV antifreeze down each drain.