## 5 Case Study: Practical Implementation of DT for HEMS
### Digital Twin for HEMS
#### 5.3.1 Status of Sensors in DT  
One critical aspect of monitoring indoor conditions in an HEMS is ensuring the operational status of all connected sensors. Often, alerts and logs generated by such systems remain unnoticed or unread by end-users, leading to delayed responses to sensor malfunctions. This can undermine the accuracy and reliability of the HEMS, as sensor data are fundamental to maintaining optimal indoor conditions. In this paper, a user-friendly framework is proposed to visualize sensor statuses in real-time within the DT environment. The process begins with each sensor in the IoT network continuously collecting data and transmitting it to the ICON. This transmission includes not only environmental measurement but also the sensor's operational status (i.e., active, non-active). Once the data are received by the ICON, they are processed and stored in the database. The database serves as a reliable repository, where the operational status of each sensor is recorded along with  
Figure 9: Parametric standardized 3D house model. 3D models illustrating the development stages of a standardized parametric house model for DT integration in an HEMS. (**a**,**c**): Bare 3D structural layouts emphasizing spatial relationships, furnished with essential furniture and appliances, shown from different perspectives. (**b**,**d**): Models enriched with applied materials and distinct room-specific color coding to enhance realism, spatial differentiation, and data segmentation, supporting immersive visualization and energy management within the DT framework.  
historical and real-time data. This ensures that the system has a robust record of sensor activity, which can be referenced at any time.  
Using the generated 3D house model as a basis, virtual sensors corresponding to real ones can be overlaid on top of the model to match the real sensors' positions (Figure 10). The Unreal Engine 5 software used in the DT framework communicates with each sensor via API calls [44]. These API interactions allow the Digital Twin to retrieve the real-time operational status of the sensors and visually update their status within the 3D environment. The retrieved data are visualized within the DT using an intuitive and user-friendly interface. Each sensor is represented in the virtual model with a simple color-coded scheme to indicate its status. Green indicates that the sensor is functioning correctly (i.e., active), while red highlights sensors that are malfunctioning or offline (i.e., non-active). This straightforward visualization enables users to quickly identify and address any issues.  
In addition to visualization, the system is also capable of generating alerts for malfunctioning sensors. These alerts can be sent via email, SMS, or app notifications, ensuring that users are promptly informed of any issues, reducing the likelihood of unnoticed malfunctions. The alerts complement the visual status indicators, making the monitoring process both proactive and accessible. This approach enhances the usability and reliability of the HEMS. By providing immediate feedback through the DT, users can address sensor issues in a timely manner. The integration of IoT devices, centralized data storage, API communication, and real-time visualization ensures that the Digital Twin remains an accurate and interactive representation of the physical system. This proactive monitoring framework improves system performance, enhances user engagement, and ensures optimal energy management and environmental comfort.