This project aims to control relay modules via MQTT.
For the version with eight relais, I 3D-printed a insulating case: stl-files.
The whole thing is installed on a DIN rail in the fuse box of our garage and used to control the lights:

Only use the relais module for controling mains voltage if you are a trained electrician. Also be aware of the maximum current of 10 A of those relay modules, which is lower than the usual used 16 A fuses in buildings.