To satiate the growing hunger for energy, there have been efforts to improve generation, storage and distribution of power on the supply side, and management of energy on the demand side. This paper focuses on energy management at the edge of the ecosystem; specifically the consumers of energy in the residential sector. This paper documents the technology and analytics involved in autonomously controlling the heating, ventilation, and air conditioning (HVAC) units in residences, locally, through a home energy management system (HEMS).