Egypt is one of Africa's and the Arab world's most populous countries, with overcrowding and one of the world's fastest-growing economies. The rapid growth of the population led to a rapid rise in energy demand, placing pressure on the country's domestic energy resources in the residential sector. The home energy management system design aims to shed light on the current status of traditional home appliances in Egypt and connect them to the internet and control them remotely by using mobiles, tablets, or laptops.This paper will describe an IoT-based home energy management system for controlling and managing energy use. The system prototype is designed and utilized to handle real consumption in order to achieve minimum power consumption and ensure a whole house is under the value of a specific demand limit in order to lower peak load based on customer priority.As shown through various scenarios of home consumption, the system's accuracy reveals that this algorithm can reduce consumption by up to 55%.