There will be a dearth of electrical energy in the world in the future due to exponential increase in electrical energy demand of rapidly growing world population. With the development of Internet of Things (IoT), more smart appliances will be integrated into homes in smart cities that actively participate in the electricity market by demand response programs to efficiently manage energy in order to meet this increasing energy demand. Thus, with this incitement, the energy management strategy using a price-based demand response program is developed for IoT-enabled residential buildings. We propose a new EMS for smart homes for IoT-enabled residential building smart devices by scheduling to minimize cost of electricity, alleviate peak-to-average ratio, correct power factor, automatic protective appliances, and maximize user comfort. In this method, every home appliance is interfaced with an IoT entity (a data acquisition module) with a specific IP address, which results in a wide wireless system of devices. There are two components of the proposed system: software and hardware. The hardware is composed of a base station unit (BSU) and many terminal units (TUs). The software comprises Wi-Fi network programming as well as system protocol. In this study, a message queue telemetry transportation (MQTT) broker was installed on the boards of BSU and TU. In this paper, we present a low-cost platform for the monitoring and helping decision making about different areas in a neighboring community for efficient management and maintenance, using information and communication technologies. The findings of the experiments demonstrated the feasibility and viability of the proposed method for energy management in various modes. The proposed method increases effective energy utilization, which in turn increases the sustainability of IoT-enabled homes in smart cities. The proposed strategy automatically responds to power factor correction, to protective home appliances, and to price-based demand response programs to combat the major problem of the demand response programs, which is the limitation of consumer’s knowledge to respond upon receiving demand response signals. The schedule controller proposed in this paper achieved an energy saving of 6.347 kWh real power per day, this paper achieved saving 7.282 kWh apparent power per day, and the proposed algorithm in our paper saved $2.3228388 per day.