Securing smart home energy management systems