AbstractTechnically, residential energy management systems are fundamental sectors in the smart grids for implementing demand response programs in the layer of households for managing energy consumption and reducing energy bills. The paper proposes a novel energy management scheme that takes production and usage into account based on a heuristic searching operation. In addition to modelling the grid, renewable energy sources, batteries, and electric vehicles, various kinds of electrical and thermal devices have been examined, including air conditioners, water heaters, vacuum cleaners etc. A method is developed for solving the objective constraint issue in a smart home in order to reduce energy consumption and determine feasible operation states among the various loads. Moreover, this paper proposes a grey wolf optimization method for solving the issue over a longer simulation period. Various cases were examined to evaluate the effectiveness of this suggested robust optimization algorithm. The outcomes show that the suggested model could not only reduce energy costs significantly but has also shown good performance for energy management purposes.