## 1 Introduction  
During recent decades, concerns over managing energy consumption are rising significantly. Among all the energy consuming economic sectors, namely industrial, transportation, residential and commercial, the residential sector is the third highest energy consumer [1]. The residential sector is responsible for approximately 21% and 17% of total energy consumption in U.S.A., and Canada, respectively [2]. As the total population of the world is increasing swiftly, electricity demand is also estimated to increase by 24% by 2035 [3]. Among all the residential appliances, Heating, Ventilation and Air Conditioning (HVAC) is the main component for user comfort and target for energy consumption minimization as these appliances constitute the major part of residential energy consumption [4]. HVAC appliances are the main electrical loads observed during peak hours [5]. In order to manage the energy consumption, smart home with its Home Energy Management System (HEMS) plays an important role by improving the efficiency, reliability and the conservation of energy usage. A set of incentives and initiatives such as Demand Response (DR), Energy Efficiency (EE), Time of Use (ToU) rates, and Real Time Pricing (RTP), etc. have been introduced by the utilities and smart grid to encourage the energy consumer for participating in load management techniques [6; 7]. However, it is often observed that success of these initiatives highly depends on the user acceptance and participation [8]. Demand response and user participation can be facilitated by the use of a thermostat, electric water heater, etc., so that users can program and schedule their devices accordingly [9; 10]. HEMS respond to these varying prices by either scheduling or curtailing the load. With the advancement of embedded devices, intelligent sensors and availability of the Internet, Internet of Things (IoT) has proved its usefulness in the energy conservation domain. Sensors are being used to monitor different environmental condition variations and help to manage the growing number of appliances in an automatic way and maintain the comfortable environment. IoT has found its way to different devices in homes like air conditioning, lighting, etc., and these appliances are connected to the Internet so that these devices can be controlled remotely using smart phones. With the increase in the number of home appliances and sensors, cost and complexity of processing is increasing day by day. The operating system provides a link between software and hardware. When IoT is considered, it brings its own set of constraints for the operating system in terms of memory, size, power and processing capacity. Because of the variation in appliances and connection in IoT, there are various operating systems available in the market, e.g., Real Time Operating System (RTOS), TinyOS, Real-time Internet of Things (RIOT), Android Things, etc. IoT enhances the smart control of HEMS by using sensors, actuators and controllers. However, energy consumption minimization, user comfort enhancement, cost reduction and Peak-to-Average Ratio (PAR) remain major challenges of the HEMS. Different novel appliance scheduling schemes [11] based on linear programming [12], particle swarm optimization [13], linear sequential multiloop algorithm [14], game theory [15], dynamic programming [16] and fuzzy logic system [17] have been proposed for residential energy optimization and management. Hierarchical control of Alternating Current (AC) and Direct Current (DC) micro-grid has been discussed in [18], whereas decentralized autonomous management techniques [19; 20] for independent control and agent-based modelling in order to optimize the individual stakeholder objectives [21] have been proposed in previous research. In order to get the benefit of the demand-side management techniques, a fully neuron connected network of micro-grid [22], particle swarm optimization [23] and linear programming in combination with fuzzy logic [24] have been proposed.