I am bringing forward plans for automation due to a desire to add additional security sensors. My plans will require controlling mains power (lighting initially) via GPIO on a Raspberry Pi. The Pi will also be used as inputs for sensors, while providing a connection via wired Ethernet, and MQTT.
What do I need to do to connect this all together in a compliant way? Obviously the mains voltage stuff needs to be completed by a qualified person and I will consult them ahead of time so they know exactly what I'm planning.
My initial thought was to put everything on a DIN rail in the ceiling. I found this blog post showing a similar setup in Australia. I note that everything is in an enclosure and they are using 24V signalling (not GPIO) and is connected via a second set of terminals so they don't need to touch the relays if they change the input later. I'm hoping this isn't a requirement as it is likely I would also need to add a power supply to boost the signal from 3.3V to (likely) 24V for the relays (I have not found any DIN relays that will operate directly from GPIO).
I'm open to suggestions, but not to use Z-Wave or Sonoff etc.