# A Web of Things-Based Emerging Sensor Network Architecture for Smart Control Systems
## 4 Proposed Framework
### Smart Home Services  
Energy saving has become the utmost goal of current smart home architectures due to the dramatic increase in energy consumption, which has led to a relative increase in the monetary value of energy. Figure 1: Proposed smart home architecture based on WoT-ESN. Thus, the proposed smart home environment aims to improve the energy consumption efficiency. In this context, the residents' routines influence the energy consumption demands of the household. The smart home consists of a Device Control Unit (DCU) and an MS. The DCU is implemented to operate in a semi-automated manner. The user switches on the appliances manually and the DCU is capable of switching them off in response to commands from the MS. The DCU contains non-IP appliances and sensors that create the smart home ESN. It includes a collection of ZigBee sensors, which are deployed in the smart home in order to gather environmental parameters and energy consumption parameters. Each appliance in the smart home is attached to a ZigBee sensor to ensure efficient energy management. Each ZigBee sensor is assigned an identification number to distinguish it uniquely. Energy efficiency of the sensor nodes is another key concern of the proposed architecture. Thus, ZigBee sensors are connected to ZigBee coordinators, which are placed in each room and in the kitchen. Mindful coordinator placement reduces the packet loss due to interference caused by coexistence and distance between the sensors and the MS. In addition to the interference management, coordinator placement helps ensure the energy efficiency of the sensor nodes of WoT-ESN. In fact, data transmission from distant nodes consumes more energy compared to proximal nodes. The coordinator placement reduces unnecessary hops during transmission, while improving the energy efficiency of WoT-ESN. The functioning time of a particular appliance determines its energy consumption. Therefore, the MS records the switch on time of devices, once residents turn them ON manually. Since, the appliances are controlled in accordance with user behaviors the DCU periodically checks the user presence at a particular location in the smart home. Whenever the user is not present, all active appliances in that location are turned off to avoid energy wastage. Consequently, the MS records the switched off time of the corresponding appliances. The MS handles the communication between users and DCU via an event management system. The MS empowers the smart home performance by processing collected data, organizing data, generating events and performing the corresponding actions. The MS collects and processes the energy consumption of each appliance and stores the records for a period of 30 days. These energy consumption records assist the residents to make proactive energy utilization decisions. In addition, the MS is liable for real-time event generation. The smart home event generation is determined by in-house controls and remote user controls. In-house controls are generated by the MS to switch off active appliances in the absence of the user. However, the MS notifies the user and opts to wait for a time \(\alpha_{\text{T}}\) to receive user approval. Hence, it helps the user to adjust different tasks of the smart home, i.e., air conditioner and refrigerator cooling and surveillance systems by approving or rejecting the MS-generated events. Once \(\alpha_{\text{T}}\) expires, the MS generates decisions aligned with the HMI module. HMI incorporates previous smart home user experiences to make judgments corresponding to the future adjustments. Thus, the integration between HMI and MS guarantees that the unavailability of the user does not adversely affect the smart home operations. On the other hand, remote user controls are received by the MS via the smart gateway. The RESTful API translation facilitates the remote users to access the services through the Web. In general, remote controls actions include turning on appliances, turning off appliances, and monitoring real-time energy consumption.