A ESP8266 mains energy monitor project by Brian Dorey:
As the new solar logger did not have this functionality we decided to design a new data-logger that would measure not only the mains current usage but also keep track of the electric meter and gas meter so we can easily see how much energy we are using in the house.
The new mains energy monitor was designed to be a standalone box that would be powered from the mains and have sensors for the mains current, electric meter and gas meter. As we didn’t want to run any more wires around the house we also decided to make it wireless connecting to our network over Wi-Fi.
Project info at Brian Dorey’s blog.