230V AC to 5V DC smart plug components
Typically cost and size are a concern when making smart outlets and dimmers so people elect to make 'hot power supply' designs (no transformer).  The two power supply chips I have seen used for this are the MP174 and the LNK306.  They can be connected to the mains and put out around 5W.  Typically they are configured to output 12V since that is a common voltage for controlling relays.  Downstream DC-DC converters are used to make the lower voltages.

(Important Safety Note:  Please be careful when working on hot power supplies.  They are connected directly to the mains so there is nothing between your circuit and the mains.  To be safe, isolate your circuit with an isolation transformer and use a differential probe when poking around -- at least until you know your circuit well and have it sealed up in a box). 

There are a few convenient ways to make the power measurements.  Take a look at the Kill-a-Watt circuit for a way to make power measurements with op-amps (also notice that they use a 'capacitive-dropper' as their power supply.  That is yet another way to make a low-voltage/low-power supply from mains). I have also seen people use the Atmel chips and the Hiliwi chip for power metering.

Everybody wants WiFi enabled outlets and dimmers these days.  Again, cost is an issue and I think the ESP8266 is the cost leader right now.  If you poke around on their site you will find some smart plug reference designs that tie it all together.