Using a smart plug with energy monitoring