With the development of home area network, residents have the opportunity to schedule their power usage at the home by themselves aiming at reducing electricity expenses. Moreover, as renewable energy sources are deployed in home, an energy management system needs to consider both energy consumption and generation simultaneously to minimize the energy cost. In this paper, a smart home energy management model has been presented that considers both energy consumption and generation simultaneously. The proposed model arranges the household electrical and thermal appliances for operation such that the monetary expense of a customer is minimized based on the time-varying pricing model. In this model, the home gateway receives the electricity price information as well as the resident desired options in order to efficiently schedule the appliances and shave the peak as well. The scheduling approach is tested on a typical home including variety of home appliances, a small wind turbine, PV panel and a battery over a 24-h period. (C) 2017 Elsevier Ltd. All rights reserved.