## 4 Results and Discussion  
In this study, the performance of different AI models was scrutinized to identify the most adept approach for real-time IoT applications in energy management and environmental monitoring. By evaluating LSTM, GRU, and hybrid LSTM-GRU models, the goal was to discern which model offers the highest accuracy and resilience in forecasting. This comparative analysis is crucial to ensure the SEMP system can consistently predict energy consumption and environmental conditions, thereby optimizing office equipment efficiency and enhancing overall system performance. The performance of three AI models, LSTM, GRU, and our hybrid model, applied to different office appliances and weather data for power forecasting are illustrated in Figures 6-8. Figure 6a,b depict the actual and predicted power values for the air conditioner and water dispenser, respectively. The LSTM-GRU model, represented by the green line, consistently demonstrates superior performance, closely aligning with the true values. This trend is also observed in Figure 7 for the refrigerator, where the hybrid model again outperforms the LSTM and GRU models, displaying lower prediction error and better tracking of the actual power usage patterns. Similarly, in Figure 8, which compares predictions for temperature and humidity, the hybrid model's predictions are the closest to the true values, highlighting its accuracy across different types of data. These results underscore the hybrid model's efficacy in real-time power forecasting, making it highly suitable for IoT applications in an office environment. This study integrates edge and cloud AI into a sensor node monitoring system for power forecasting in an office environment, enabling IoT implementation through an energy and environmental data acquisition and monitoring system with day-ahead predictions using different RNN-based models, and supports real-time monitoring via centralized cloud and local dashboards. The performance metrics of different AI models applied to office appliances and weather data are summarized in Table 2. In evaluating various AI  
Figure 6: Comparison of actual and predicted value for (**a**) air conditioner and (**b**) water dispenser. models on the dataset, the hybrid model consistently outperformed LSTM and GRU models across different metrics like Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and \(R^{2}\) values, indicating its superior accuracy for real-time applications. For instance, in refrigerator forecasting, the hybrid model achieved an MAE of 2.12%, RMSE of 7.77%, and \(R^{2}\) of 93.69% compared to LSTM and GRU. Figure 9 illustrates the error distribution for the prediction of actual values across five scenarios, AC, refrigerator, water dispenser, temperature, and humidity, using three models: LSTM, GRU, and the proposed model. The proposed model demonstrates a narrower and more concentrated error distribution around zero, indicating higher prediction accuracy and lower variability. On the other hand, the LSTM and GRU models exhibit wider error  
Figure 8: Comparison of actual and predicted value for (**a**) temperature and (**b**) humidity. Figure 7: Comparison of actual and predicted value for refrigerator. distributions, with some instances showing significant deviations from zero, particularly for the refrigerator and humidity predictions. This suggests that the proposed model effectively minimizes prediction errors, providing more reliable outputs compared to the LSTM and GRU models across all evaluated scenarios. Table 3 illustrates the computational time per step, where the hybrid model is the fastest at 5 ms/step, compared to LSTM's 7 ms/step and GRU's 9 ms/step. These results highlight the hybrid model's reliability, making it particularly suitable for real-time AIoT applications in energy management and environmental monitoring.