Abstract: With the development of smart grid, energy consumption on residence will play an important role in the electricity market, while the Home Energy Management System (HEMS) has huge potential to help energy conservation. In this study, a practical HEMS model with renewable energy, storage devices and plug-in electric vehicles, considering the battery sustainability and the full utilisation of the renewable energy, is first established. Then, according to the combinations of the genetic algorithm (GA) and the multi-constrained integer programming method, an improved GA is proposed, which goal is to minimise the electricity purchase and maximise the renewable energy utilisation. Finally, it is demonstrated by an example that the proposed method is significant in cost saving and reducing energy wastes. To verify the performances of the proposed algorithm, the numerical results indicate that the proposed algorithm has high computational efficiency and good robustness. In addition, it can avoid the disadvantages easy to trap at a local optimal point, and are insensitive to initial solutions. The effect of the storage device on system property and the sensitivity of cost savings versus demand response, size of the battery, and the electricity price sell to the grid are also analysed.