I had working Energy meter circuit with ATM90E26 and firmware with SPI interface. You need to calibrate yourself energy meter with proper load. It will measure voltage, current, active power, reactive power, apparent power, energy and power factor.
Looking forward for your discussion on this project.