If I want my smart plug design to be a commercial product in the EU it must surely meet some requirements, regulations or directives.
I know about the CE (Conformité Européenne) marking, which is mandatory in the European Economic Area. It means, if I can believe Wikipedia:
Most electrical products must comply with the Low Voltage Directive and the EMC Directive; toys must comply with the Toy Safety Directive
I am mainly concerned about the safety, as smart plugs and sockets have direct connection to mains voltage, live wires, which is always dangerous. Proper sealing is needed.
I have checked The Low Voltage Directive (LVD) and I think it covers the safety requirements for a smart plug based on the below part.
The LVD covers all health and safety risks of electrical equipment operating with a voltage between 50 and 1000 V for alternating current and between 75 and 1500 V for direct current. These voltage ratings refer to the voltage of the electrical input or output, not to voltages that may appear inside the equipment.
Now, there are other directives as well. For example Measuring Instruments Directive. It also mentions "Active electrical energy meters".
There is also a general product safety directive according to this list.
All in all which of the above mentioned and not mentioned directives are mandatory for commercial smart plug designs in the European Union? The main concern is safety.