seconding home assistant, once built a system that controlled lights, curtains, locks and heating. we even hosted it on aws (though a local device is best).
you will want to research, though. a lot of smart tech is compatible with home assistant but not all, or you may have to use an intermediary software.