This study investigates a novel control algorithm for the home energy management system (HEMS) to monitor and schedule the electrical appliances to apply in any conventional houses. This is to reduce the electricity consumption and consequently electricity cost in places with time-of-use (TOU) pricing model. A hardware implementation is executed in a testbed house premise using in-house built control system, smart plugs as well as PV system as the supplementary source. In this system architecture, the overall consumption of the electrical appliances that run on the grid is limited by the algorithm and kept under the certain value that is fixed depending on the total consumption of the building and the capacity of the battery. If the predefined limit is crossed, the new appliances are shifted to run on battery instead of shifting to other time, and thereby human comfort is less violated. In the worst case scenario, where the electrical appliances are assumed to consume the maximum amount of electricity, a prototype implementation of the proposed algorithm achieves up to 15% of electricity cost reduction and ensures the minimum sacrifice in dweller's comfort.