The solution is home assistant [0] it lets you manage and control all kinds of smart devices with a lot of customizable, hackable things. And it runs locally, so if you buy the right types of devices that don’t phone home to the cloud (or you shitcan their internet access) you can fully manage your own system.
[0] https://www.home-assistant.io/