I've built a few raspberry pi based home automation systems, from relays switching my garden lights and irrigation, to 3D printed brackets and pulleys to convert my manual curtain tracks to motorised ones, WiFi controlled power sockets to switch lamps, and even a full aquarium control system managing the lighting (colour temperature and brightness), filter and aeration, and heater. I'm currently using NodeRED to build the logic and provide a web interface.