Automation with PLC and HA

Hello guys,
I’m about to start building my house and I want to do the electrics myself and install home automation from scratch.
For now, I have the following ideas:

  • Use a PLC (Siemens S7-1200) as the “brain” for all the automation.
  • Pulse switches (I don’t know which ones yet) would go individually to each PLC input.
  • Sockets would create circuits (for example, in a bedroom there would be 2 socket circuits and each circuit would be triggered by a PLC output).
  • For lighting, it would be something similar. Each PLC output would act on the lighting in a particular area.

With this base in place, I would have a Raspi 5 working in parallel to communicate with the PLC and where I would be able to create the dashboard and connect all the other devices, such as cameras and Alexa.
My only problem with this will be all the cabling I’ll have to run.
I’ve done a bit more research and I think I could use KNX switches and the wiring would be drastically reduced. But I’d have to buy a gateway to communicate with the PLC and I think I’d have to program the switches in KNX.
If anyone can help me with this or give me any other ideas, I’d be grateful.