## 5 Main Problems and Proposed Solutions Using FOG or IEC in Smart Buildings  
Following the comprehensive literature review in the Section 4, this section addresses key challenges and issues related to the three-layer architecture: Cloud, Fog/IEC and  
Figure 5: Three layered model: Smart Buildings, Fog and central cloud, based on the model of [39]. the user layer with edge IoT devices. The discussion focuses on QoE for users, solution availability, some security challenges and associated problems. The methodology described in Figure 6 follows a structured approach, beginning with the identification and prioritization of key problems in SBs. Initially, a controlled set of problems is selected from real-world cases in the metropolitan region, covering one commercial and three residential buildings (I). To refine the problem selection process, six key factors (I) are applied: service availability and uptime (SLA), quality of service delivered, user safety, cost to residents, available technology and operational stability of service providers. This leads to the classification of main problems (II). Among specific problems or the key challenges identified in (II), four main specific problems were selected for deeper investigation: jitter, background noise, Wi-Fi and its interference signals; latency and packet loss between SB and Fog or between Edge and Cloud; security challenges, data privacy, data governance [43]; and QoE regarding video streaming and VoIP communication (inside SB and external with Cloud). A qualitative analysis of twenty-four potential applications is performed, converging into eight selected Application Categories, as outlined in Table 1. Each selection is based on four criteria: recent technological advances, security and reliability, ease of deployment and maintenance and usability for different SB actors. Once the primary challenges and application categories are defined, two key research dimensions are investigated for each cell in Table 1 (III) and (IV):  
(A) What category of IoT devices (low, medium or high-end) should be adopted? (B) Which Cloud architectures (Fog or IEC) provide the most optimized design, with or without SDN and NFV integration? These evaluations guide the selection of the most suitable technology and architecture for each specific SB scenario. A validation procedure, (*) in Figure 6, is integrated into the methodology, ensuring the robustness of all proposed solutions. This validation involves rigorous field research and a comparative analysis of similar solutions presented in the cited literature. This final step ensures that the recommendations align with real-world constraints and operational demands. The adopted term Application Category can be expanded to category of Hardware plus Software or platform. Figure 6: Methodology flowchart for Smart Building use case. Considering that, the cells in Table 1 indicate two simultaneous proposed solutions for each application category described in the rows of the table. These main four challenges and issues are detailed as follows:  
* Network-relevant noise and jitter: significant jitter, noise and interference from the SB's Wi-Fi network and other unforeseen sources may negatively impact communication with the Fog or IEC [44]. * Cloud Communication Latency: Latency in communication between the central database, dashboard and applications within the Cloud-based Operational Control Center (CCO or OCC)--integrated with the Fog/IEC and interconnected to one SB or more federated, independent SBs--presents a challenge [44; 45]. * QoS and QoE Optimization: Optimizing QoS and QoE, particularly for VoIP, VIoT and short-form video streaming (video over IoT), and ensuring reliable video recording for emergency situations, requires attention [41; 46]. Later, in Section 6 of this study, these metrics of QoS and QoE are detailed.