Keywords
Internet of Things (IoT), Message Queuing Telemetry Transport (MQTT), JSON/XML, Raspberry Pi 4 Devices, Energy Management System
This article is included in the Fallujah Multidisciplinary Science and Innovation gateway.
Smart home-enabled smart cities require low-latency data processing, precise energy forecasting, and strong risk prediction to guarantee efficient energy use and secure system functionality. Traditional cloud-centric IoT architectures face issues such as high latency, excessive energy consumption, and limited real-time threat detection. To tackle these problems, this research presents a fog-cloud-IoT-based framework aimed at improving energy efficiency, security, and operational reliability within smart home settings.
This study introduces a Cost-Effective Risk Prediction and Energy Management in Fog-Cloud-IoT (CREFCI) model. The architecture employs a Raspberry Pi 4 fog node for local data processing and communication, tracks user preferences and device statuses locally, ensures network security through Suricata IDS/IPS, and keeps a synchronized duplicate database in the IoT cloud for analytics and user interaction via Android and Web APIs. Interoperability among Zig bee, Z-Wave, and Wi-Fi protocols is facilitated through JSON/XML data transformation, energy demand is predicted using ANN-based learning, and risk scores are calculated through likelihood-impact analysis.
Experimental assessments reveal that the CREFCI model achieves 75% accuracy in energy prediction, surpassing existing models by 13% for the highest predictions and doubling accuracy for the third-highest probability estimates. The model decreases mean absolute error (MAE) by 50% and enhances accuracy in lower-ranked predictions by 40–44%. Energy consumption is significantly lowered by 50–80%, using only 0.3–0.5 kWh compared to 1.0–1.7 kWh in competing methods. Furthermore, average latency is reduced by 40–60%, underscoring the effectiveness of fog-based processing.
The CREFCI model successfully integrates fog computing, cloud analytics, ensemble learning, and risk assessment to improve energy efficiency, prediction accuracy, and security in smart home IoT systems. By reducing latency reducing energy consumption, and providing real-time risk prediction, CREFCI offers a scalable and cost-effective solution for next-generation fog–cloud–IoT smart city infrastructures.
Internet of Things (IoT), Message Queuing Telemetry Transport (MQTT), JSON/XML, Raspberry Pi 4 Devices, Energy Management System
The Internet of Things (IoT) has greatly changed modern life by allowing easy connection of devices, sensors, and smart systems for real-time monitoring and control in various industries, especially in smart homes, transportation, energy, and healthcare.1 The Smart Home (SH) sector is notable for blending user convenience, energy savings, and security through specialized automation. Major tech companies like Google, Apple, Samsung, and LG are investing heavily in smart home research, moving from basic device management to advanced services like proactive security and predictive energy optimization.2 Smart homes face several challenges, including limited offline capabilities, delays in data processing, and compatibility issues between devices. There are also concerns about energy inefficiency and cybersecurity threats. Current smart home designs either rely on centralized cloud computing or localized edge processing, each with drawbacks, such as high latency and privacy issues.3 Most frameworks treat energy management and security separately, lacking a unified approach for better efficiency and resilience. This research introduces the CREFCI model, which uses IoT fog computing for quick data processing.4 It combines local and cloud computing for energy demand forecasting and security monitoring. The model includes intrusion detection and threat intelligence using protocols like MQTT and SSL, ensuring smart homes function safely even with connection issues. The ensemble learning approach, using ARMA, ARIMA, and SARIMA models, improves forecasting accuracy. Risk quantification algorithms help prevent security threats.5 The CREFCI framework addresses current smart home challenges and offers a scalable, secure solution for future smart living environments. The paper's major contribution is discussed below. An integrated IoT Fog-Cloud architecture that lowers latency, maintains local control during network downtime, and improves security via real-time threat intelligence sharing with platforms like Suricata and MISP. A multi-layer energy management system utilizing ensemble forecasting methods (ARMA, ARIMA, SARIMA) and ANN to accurately predict energy needs and optimize distribution.6 The risk prediction framework with likelihood-impact analysis and risk scoring to prioritize threats and strengthen cybersecurity resilience in smart homes.7 The major gaps in creating a fully integrated, secure, and energy-efficient smart home architecture, despite advancements in IoT technology. Energy optimization and cybersecurity are often treated separately, leading to systems that don't fully utilize real-time data. Many IoT systems rely heavily on centralized cloud infrastructure, which creates delays, requires constant internet connectivity, and raises privacy concerns, especially for time-sensitive applications. Edge-only solutions reduce latency but lack the computing power required for advanced analysis.8 Most studies focus on single-model prediction methods that struggle with complex energy demand patterns, resulting in inefficient energy distribution in smart grids.9 The current intrusion detection systems often merge outdated, static rules, rendering smart homes vulnerable to emerging cybersecurity threats. The lack of interoperability among IoT devices complicates seamless data exchange and decision-making. These issues underscore the urgent need for a unified framework that can provide real-time risk prediction, data transformation, enhanced forecasting, and integration between fog and cloud computing. The major contribution of this research is risk prediction and effective energy management in a cost-effective manner in terms of computation and operation with reduced delay. Hence it is a smart city application it is very important to reduce the network congestion and energy consumption as well.
The presentation of a centralized data collection system for Smart homes that monitors user behavior to reduce redundancy and enhance device management, ultimately improving comfort and quality of life.10–12 The cost-effective IoT-based home security system is presented that employs an Arduino Uno alongside PIR and ultrasonic sensors for intrusion detection and automatic door locking. The system has limitations in its detection range and accuracy compared to advanced CCTV systems and may not be as effective in handling complex security issues due to its use of basic components.13,14 The introduce of a Smart home security system utilizing Raspberry Pi, integrated with MISP threat intelligence and Suricata IDS/IPS, which shows a high detection accuracy of 99.9% for emerging cyber threats. The system offers adaptive, real-time protection that exceeds traditional static approaches.15 A twelve-step framework for analyzing firmware and assessing the security of IoT-enabled smart cameras, focusing on often-overlooked vulnerabilities. The aim is to improve defenses against extensive firmware-level attacks.16,17 The highlights vulnerabilities in IoT-enabled Smart homes, including weak authentication, outdated firmware, and malware, which threaten financial transactions and user identities. It calls for the implementation of standardized security protocols and collaborative regulation.18,19 The Smart home automation within the IoT as a method for promoting sustainable urban development, focusing on data management, efficiency improvements, and advanced technology integration. It provides insights intended for policymakers and technology specialists to enhance urban sustainability.20,21 A Smart home system utilizing ATMEGA2560 and IoT technology, offering features such as voice control, fall detection, GPS tracking, hazard sensing, and remote monitoring, is designed for users of all age demographics. The system aims to improve safety, usability, and reliability while reducing processor and hardware costs.22,23
In,24 the behavioral factors impacting the adoption of IoT in Smart homes are highlighted, highlighting three main motivators: performance expectancy, trust, and HM. Conversely, security and privacy concerns deter potential users. In,25 the author focuses on reverse engineering Smart homes (IoT) firmware to identify critical vulnerabilities with high CVSS scores and unsafe coding practices, highlighting significant security risks. It provides insights and recommended techniques for enhancing firmware security while employing a static firmware analysis approach.26 A chatbot-based framework for Smart homes that includes Automation Bot, Sensor Bot, and Actuator Bot to autonomously monitor and manage devices while minimizing user interaction. This framework enhances energy management and supports real-time decision-making through a no-code platform.27 The model utilizing Markov chains to predict user activity trends, coupled with the PF-PEC algorithm, is designed to optimize energy conservation in smart homes while prioritizing occupant comfort.28,29 It employs a fog-based IoT architecture, achieving energy savings of up to 36%. The IoT framework enhanced by Edge AI, incorporating a Raspberry Pi and motion detection software aimed at Smart home surveillance. The system achieves high alert accuracy rates of 91% indoors and 85% outdoors, while significantly reducing bandwidth and storage costs.30,31 The introduce for CRASHED, a cyber-risk assessment framework tailored for smart homes that combines elements from both the MITRE ATT&CK and CAPEC models.32,33 It provides an in-depth, device-specific evaluation of vulnerabilities and assesses threat impacts, thereby enhancing threat detection, response capabilities, and overall cybersecurity for Smart homes.32–35 Table 1 shows the advantages and disadvantages.
| Ref | Method name | Purpose | Advantages | Limitations |
|---|---|---|---|---|
| 10 | Centralized Data Collection System | To monitor user behavior, reduce redundancy, and improve device management | Enhances comfort, quality of life, and efficient device control | A centralized approach may face scalability issues and single-point-of-failure risks |
| 13 | IoT-Based Home Security (Arduino) | Intrusion detection and automatic door locking using PIR & ultrasonic sensors | Cost-effective, simple, low-power system | Limited detection range, low accuracy compared to advanced CCTV systems |
| 15 | Raspberry Pi + MISP + Suricata IDS/IPS | Real-time cybersecurity threat detection in smart homes | 99.9% detection accuracy, adaptive and real-time protection | Higher cost and hardware requirements compared to basic IoT setups |
| 16 | Firmware Security Analysis Framework | Twelve-step framework to analyse IoT camera firmware vulnerabilities | Improves firmware security, identifies hidden vulnerabilities | Time-consuming and requires expertise in firmware analysis |
| 18 | IoT Security Vulnerability Analysis | Identifying weak authentication, outdated firmware, and malware threats in IoT smart homes | Calls for standardized protocols enhance awareness among developers & regulators | Lacks direct mitigation implementation strategies |
| 20 | Smart Home Automation for Sustainability | Promotes sustainable urban development with IoT data management and efficiency techniques | Provides insights for policymakers, enhances sustainability initiatives | Focuses on policy and technology integration, lacks real-world deployment examples |
| 22 | ATMEGA2560 IoT System | Voice control, fall detection, GPS tracking, hazard sensing, and remote monitoring | Low cost, supports safety features for all age groups, and reduces hardware costs | Limited processing power compared to modern IoT processors |
| 24 | IoT Adoption Behavioral Factors | Analyzing motivators and deterrents for IoT adoption in smart homes | Identifies performance expectancy, trust, and HM as key motivators | Security and privacy concerns remain unresolved |
| 26 | Firmware Reverse Engineering Analysis | Detecting critical IoT firmware vulnerabilities using static analysis techniques | Highlights unsafe coding practices, improves firmware security awareness | Requires high technical expertise and access to firmware code |
| 28 | Chatbot-Based Smart Home Framework | AutomationBot, SensorBot, and ActuatorBot for real-time energy management & device control | No-code platform, autonomous control, reduces user interaction | Limited customization for complex automation scenarios |
| 30 | PF-PEC + Markov Chain Energy Model | Predicting user activities and energy conservation using fog-based IoT architecture | Energy savings up to 36%, prioritizes user comfort | Performance may degrade with inaccurate user activity predictions |
| 32 | Edge AI Surveillance Framework | IoT + Edge AI for motion detection and smart home surveillance | High accuracy (91% indoors, 85% outdoors), reduces bandwidth & storage costs | Outdoor detection accuracy is lower than indoor performance |
| 34 | CRASHED Cyber-Risk Assessment Framework | Device-specific vulnerability & threat impact assessment integrating MITRE ATT&CK & CAPEC | In-depth risk evaluation, improved threat detection & response | Complex implementation requiring extensive system data and threat intelligence integration |
From the above survey the major research gap which are identified in the earlier researches are lack of prediction capability at the risky situations, lack of security and customization, higher cost and high time consumption. In order to overcome all these drawbacks in this proposed CREFCI model the main concentrated is about proper energy management and risk prediction in a cost-effective manner.
The CREFCI model integrates IoT fog and cloud networks, focusing on advanced data transformation, energy forecasting, and risk assessment in smart homes. It collects data from smart device sensors and actuators at a fog node to ensure low latency and secure, offline communication. The fog node processes this data and synchronizes it with the IoT cloud through various protocols, enabling real-time control. Figure 1 explains the CREFCI process in detail.
The implementation of numerous sensing and actuation modules in smart homes necessitates maintaining connectivity with the IoT cloud, which can be resource-intensive. An IoT fog node addresses this by acting as an edge device that connects to both the local server and the cloud, ensuring data is logged locally and then reported. This setup offers benefits such as reduced latency, better scalability, and support for a range of devices. The fog node operates in online and offline modes: offline mode allows local network appliances to use without internet, synchronizing appliance states with the cloud upon reconnection. User preferences are stored on both the fog node and the cloud for direct appliance control. The node uses the MQTT protocol for communication with devices, hosts a local intelligence module for user-defined functions, and has the described service that facilitates data forwarding between different application programming interfaces (APIs) and includes features for device identification and user authentication. It utilizes Transmission Control Protocol (TCP) and Secure Socket Layer (SSL) for secure connections to cloud services. The architecture combines functionalities such as Secure Shell (SSH), Secure File Transfer Protocol (SFTP), alongside Web and Android APIs for configuring fog nodes. It features multiple security layers, including a traffic management firewall, Suricata IDS/IPS, and MISP, a platform for real-time threat intelligence exchange. MISP, integrated with Raspberry Pi, serves as the central hub for collecting Indicators of Compromise (IoCs) from various open-source sources. The proposed fog node, designed for smart home environments, utilizes a Raspberry Pi 4 featuring a quad-core processor and 8 GB of RAM.
This node utilizes services like SSH and SFTP for configuring smart homes while facing limitations in Wi-Fi range and request concurrency. To mitigate Wi-Fi issues, aesthetic reflectors and multithreading are introduced, but too much threading can harm performance. The architecture includes various security tools such as a firewall, Suricata IDS/IPS, and the MISP open-source threat intelligence platform for enhanced cybersecurity measures specific to smart homes. A custom Python script coordinates Suricata's interactions with MISP for real-time updating of threat intelligence. In case of significant alerts, Suricata sends notifications to MISP for widespread intelligence sharing and routes them for further analysis through Cohere’s AI API. Users are promptly informed via email alerts. The system functions on a Raspberry Pi as an IoT device in the smart home, while MISP connects to open-source threat feeds on a virtual machine, optimizing performance under hardware constraints.
The intelligent home architecture utilizes integrated IoT cloud technology designed for enhanced interactions among fog nodes, users, and developers. It incorporates a TCP/IP stack for connection-oriented services secured by SSL, along with a data dissemination layer for organizing appliance and sensor data before storage in the database. A copy of the database is maintained on a separate VM in the cloud, allowing for machine learning and data analytics while maintaining data integrity. Service-side requests for device access are managed by a relaying service, and customized Android and Web APIs facilitate user control over smart home appliances. A monitoring module for alert generation is also included, and additional protocols like FTP, SFTP, and SSH are utilized for secure communication.
The integration of various wireless protocols in a multi-layer WSN requires effective data exchange among devices using differing communication standards. Each protocol, such as Z-Wave, Zigbee, or Wi-Fi, uses distinct data formats, necessitating data conversions to ensure uniformity and functionality across the system. Methods for data transformation are crucial to accommodate these varying formats, which may include adjusting data fields or modifying packet structures to pertinent protocols. Approaches such as using JSON or XML can facilitate the data conversion process while maintaining data integrity across network layers, minimizing the need for specialized algorithms. Ensuring compatibility also requires structural alignment between the differing protocols. Aligned data formatting is crucial during data transformation to ensure compatibility with the receiving device. Minimizing processing time is a critical aspect, as delays can cause discrepancies and risk information loss. Thus, the development of effective transformation algorithms and efficient protocols is vital.
Forecast-Based Energy Prediction leverages predictive models and historical data to project future energy consumption or generation using various forecasting techniques like time-series analysis and machine learning. Accurate energy estimates allow for improved organization of energy generation, optimized supply chain management, cost reductions, and enhanced grid stability while diminishing issues such as power outages and low voltage outages in a smarter energy system. A proposed multi-hop forecast-based energy distribution model is described, aimed at predicting energy needs on multiple levels, both for individual households over different time frames and for groups of sub-grid level at smart homes. It manages overall energy demand, reduces waste, schedules energy usage, detects losses, and ultimately contributes to efficient energy supply management within smart areas. The proposed energy forecasting model employs an ensemble learning approach consisting of two stages: individual predictions and ensemble synthesis. Initially, three distinct models predict hourly energy demands, with outputs further processed by an ANN to enhance accuracy. The model focuses on devising mathematical formulations and algorithms for optimizing energy use in Home Energy Management Systems (HEMS), aiming to minimize total energy consumption and costs in smart urban settings. Key factors influencing energy optimization include power balance, the diversity of devices, energy sources, and temporal consumption patterns. Appliance sets within smart homes are represented as where the total energy consumed can be represented as and specific consumption by the appliance as
These methodologies are applicable in diverse areas such as business, finance, supply chain management, meteorology, and energy. Time-series analysis, featuring ARMA and ARIMA models, is particularly important in evaluating energy consumption in smart cities, with ARMA models integrating Auto Regressive (AR) and Moving Average (MA) components for future value projections by referencing prior observations in relation to their current counterparts.
The MA part of the ARMA model analyzes the relationship between current observations and past residual errors from a moving average to forecast future results. Here, c signifies a constant, represent coefficients, and denotes the error term.2
ARIMA models enhance ARMA by integrating an “I” component to manage non-stationary time series data through differencing. They are characterized by three parameters: p (autoregressive order), d (necessity of differencing for stationarity), and q (moving average order). SARIMA expands upon this framework by incorporating seasonal elements into the ARIMA structure, making it applicable for forecasting seasonal patterns and various forecasting scenarios. Where c represents a constant and denote the coefficients.2
The ensemble model integrates three forecasting methods: ARMA, ARIMA, and SARIMA, to produce weekly forecasts. The generated weekly forecast data is then used as input for a simple ANN. Furthermore, a demand-based distribution phase is developed to allocate energy from the substation to smart homes, considering each home's specific needs and the energy supply from the grid substation. In general ANN structure consists of input layer, hidden layers and output layer. It performs certain actions such as forward propagation, loss function analysis, backward propagation and optimization is required. ANN structure is mainly used here to handle the data collected from the sensors like temperature, humidity and energy meter and so on.
Risk prediction is the final stage of the proposed methodology. This phase focuses on quantitative measurement and risk analysis after identifying assets, threats, and vulnerabilities. It quantifies the risk from a specific threat to an asset, denoted as , by assessing both the likelihood of the threat and its potential impact on the asset, following a specific calculation method.
reflects the risk to asset i from threat j, assesses the probability of the occurrence of that threat, and evaluates the potential impact on the asset if the threat occurs. The total risk of an asset, , is obtained by aggregating the individual risks from all identified threats related to that asset. An equation is provided for determining this risk.
The risk associated with asset i is represented as , while signifies the total number of threats to that asset. The risk contribution of each specific threat j to asset i is denoted as . To standardize the risk evaluation for an asset, the maximum potential risk as influenced by all threats operating at their maximal impact has been evaluated with a mathematical expression.18
The asset risk indicates that is the utmost potential risk, with N representing the maximum number of threats and threat denoting the greatest risk assigned to any individual threat. It introduces a standardization equation that scales asset risk to a range of 0 to 100.
A smart home, denoted as . Lower normalized risk values indicate reduced risk, whereas values near 100 signify high risk. The overall risk of the smart home, represented as , is obtained by combining the normalized risks of all assets. An equation is referenced for determining this total risk.
represents the overall risk associated with a smart home, while N indicates the total number of assets present in the home. The term Rnormalized asseti signifies the overall risk of each asset within the smart home context, and Rnormalized asseti denotes the normalized risk associated with asset i. Normalization involves calculating the identified maximum potential risk that arises when all assets are exposed to their peak risk levels, determined through a defined equation.
In smart homes, the total number of assets is represented as N, while denotes the maximum potential risk for any individual asset. Overall risk is assessed by standardizing these measurements on a scale from 0 to 100 using specific equations.18
(normalized risk), (risk level), and (maximum potential risk). The normalized risk is expressed as a percentage scale where values between 0-25 are designated as low risk, 26-50 as medium, 51-75 as high, and 76-100 as critical. Additionally, it introduces a systematic algorithm designed for assessing risks associated with individual assets. This Algorithm 1 classifies assets, identifies associated threats, calculates their likelihood and impact using established methodologies, and ultimately assesses the total risk for each threat by multiplying the two reported scores.
1: procedure Risk Assessment (assets, CAPEC)
2: for each asset in assets do
3:
4:
5: for each
6:
7:
8: Risk
9: end for
10: end for
11: end procedure
The CREFCI methodology supports cybersecurity experts by providing specific steps to evaluate a smart home's vulnerability to risks. Cumulative risk assessments enable experts to identify and categorize risk levels associated with various assets as critical, high, medium, or low, allowing for the prioritization of mitigation strategies tailored to individual asset risks. If high or critical risks are identified, the expert can reassess the individual asset risks to effectively address the most significant threats. The CREFCI model creates an advanced smart home infrastructure by combining IoT fog and cloud networks with effective forecasting and risk management techniques. It enables low-latency communication, secure data handling, and compatibility between various devices. The system optimizes energy consumption, reduces waste, and enhances grid reliability through a multi-hop forecasting approach. Proactive security measures are implemented through risk prediction, while intrusion detection and prevention are strengthened by integrating Suricata IDS/IPS and MISP. Seamless data communication across wireless standards, along with offline functionality, ensures continuity during connectivity issues.
By implementing energy prediction, mean absolute error, consumed energy, average latency, and energy conservation of the CREFCI model with some existing models, EMSHF,16 EAIISS,17 and CRASH.18 Table 2 discusses the simulation parameters. Here a multi-source real time data is used with various sub-systems in smart city application is utilized which is sensor (temperature and humidity), traffic sensors, pedestrians’ safety sensors. Candidate features are selected fog nodes, imbalance load and peak load with energy consumption.
An energy prediction, scoring 75% for the highest probability predictions, a 13% enhancement over current models, which performed at 62%. For second-highest predictions, CREFCI achieved 45% compared to 32% from existing models, and for third-highest probabilities, it doubled the performance from 6% to 12%. It integrates IoT fog-cloud architecture, energy forecasting methods like ARMA and ANN, and multi-hop distribution techniques, enhancing prediction accuracy and reducing data latency in Figure 2.
It is to measure the average magnitude of error among the given data and with the prediction. It clarifies the true observation about the considered information and its absolute differences. A MAE of 0.004, corresponding to a 50% enhancement from an existing MAE of 0.008. Similar improvements were observed in the second-highest probability event, where the MAE decreased from 0.0125 to 0.007 (a 44% increase in precision), and in the third event, with a reduction from 0.020 to 0.012 (a 40% enhancement) in Figure 3. These improvements are attributable to a multi-hop forecasting mechanism combined with ensemble learning models and an ANN. The data transformation protocols ensure better compatibility among IoT devices, assisting in consistent data collection while effectively managing energy demand fluctuations.
The energy consumption for EMSHF and EAIISS was 1.0 kWh, while CRASH registered 1.7 kWh. CREFCI utilizes only 0.5 kWh (50%-70% lower). In Smart mode, EMSHF and EAIISS consumed 0.9 kWh and CRASH consumed 1.6 kWh, whereas CREFCI required 0.4 kWh, promoting a 55%-75% in Figure 4. Under the optimally functional Smart + PF-PEC mode, CREFCI's consumption fell to 0.3 kWh, marking up to an 80% gain compared to others. This underscores the effectiveness of CREFCI's multi-hop energy prediction prototype, as enabled by its IoT fog-cloud architecture to lower data processing times and enhance power distribution. CREFCI uniquely integrates anomaly detection to avoid overconsumption linkage that spatial static methodology, including EMSHF and EAIISS, typically misses.
It is the total time taken to perform a proper communication in response and return manner. It is defined as that of the elapsed duration of the transmitted required and the response delivered. In latency from 0.7 seconds (in EMSHF) to 0.3 seconds, achieving a 40-60% enhancement over baseline models due to its integration of IoT fog-cloud technology in Figure 5. This technology processes data closer to the source with edge and fog computing, expediting real-time decision-making and minimizing cloud-associated delays. A multi-hop energy prediction mechanism that helps distribute computational tasks effectively, adaptive scheduling for energy-efficient handling of time-sensitive events, and predictive analytics through ARIMA-ANN models for proactive data processing.
An energy efficiency of 38%, surpassing the EMSHF (35%), EAIISS (34%), and CRASH (36%) models by 5–10%. The multi-hop energy forecasting and real-time optimization algorithms, which adapt energy resource allocation to fluctuations in demand. CREFCI enhanced thermal comfort, raising the PMV index from 1.0 (EMSHF) and 1.2 (EAIISS) to 1.8 in Figure 6. This IoT fog-cloud integration is used to dynamically regulate environmental parameters. The competing models relied on more static energy allocation tactics, resulting in limited energy savings and comfort.
The CREFCI model shows a 75% prediction accuracy for likely events, with baseline models by 13%. Its multi-hop forecasting and ANN-based ensemble learning enhance the second and third most likely predictions to 45% and 12%, By using seasonal analysis and combining ARMA, ARIMA, and SARIMA models, the method reduced absolute error by 50% to 0.004. The ANN refinement layer further minimized residual errors, cutting them down by 44% and 40% for the second and third highest events. Energy usage has dropped by 50–70% to 0.5 kWh, with further reductions in Smart mode (0.3 kWh) and PF-PEC mode (up to 80%). This is due to demand-aware energy distribution and anomaly detection that optimize power use. Local processing through fog computing has lowered latency from 0.7 to 0.3 seconds. Secure data handling is achieved through SSL/TCP and Suricata IDS/IPS, while SARIMA manages seasonal demand fluctuations and maintains system functionality during outages. The real-time optimization and advanced forecasting have led to a 38% increase in energy efficiency and better thermal comfort compared to older models. Table 3 discusses the comparative results.
For the smart city environment, risk prediction and energy management are the most important requirements in the fog-cloud-IoT network model. In this research, these requirements are properly addressed in a cost-effective manner. From the performance and the comparative analysis, it is understood that the results obtained by CREFCI is better than the earlier research in terms of energy prediction probability, MAE, consumed energy and latency and as well in whole it improves the overall performance of the smart city environment.
By integrating IoT fog computing with cloud services, the network design ensures low latency, scalability, and enhanced device interaction. A fog node implemented on a Raspberry Pi 4 reduces dependence on continuous cloud connectivity, providing local intelligence for real-time decisions and automation of smart devices. The system combines secure communication protocols (SSL, SSH, SFTP) alongside advanced threat detection, enhancing overall security. It also includes a data transformation framework that ensures compatibility among various wireless protocols like Zigbee, Z-Wave, and Wi-Fi, fostering a unified smart home network. Forecast-Based Energy Prediction model techniques, such as ARMA, ARIMA, and SARIMA, are used to accurately predict energy demands at both household and sub-grid scales. A risk prediction framework is established to assess potential threats and devise proactive responses by categorizing risks based on amplitude and severity. The CREFCI model has a 75% accuracy in energy predictions, with existing models by 13% in the highest predictions and achieving ado double accuracy for the third-highest probabilities. It also reduced MAE by 50% and improved lower-ranked prediction accuracy by 40-44%. The model utilized 50-80% less energy, 0.3-0.5 kWh compared to 1.0–1.7 kWh in rival models, and minimized latency by 40-60%, improving from 0.7 seconds to 0.3 seconds, fog-cloud computing, and edge data processing. The use of a multi-hop energy prediction approach allowed better distribution of computational tasks and adaptive scheduling. In future studies, advanced AI-driven predictive analytics will enhance energy forecasting accuracy and anomaly detection. The integration of blockchain technology ensures decentralized security and transparent energy trading among smart homes.
The data supporting the findings of this study are openly available at code was obtained the DOI by using Zenodo, and its can be accessed at: https://doi.org/10.5281/zenodo.18321846.36 The dataset was generated from Python source code based on the mathematical models described in Equations (1)–(11) and Algorithm 1 (CRASHED risk assessment). The repository includes the datasets used for analysis, the values underlying the reported results and figures, and all extended data required to replicate the findings. The data are shared under an open license (CC-BY) and are accessible without restriction.
Source code available from: https://zenodo.org/records/1835317337
Archived software available from: https://doi.org/10.5281/zenodo.1832184636
License: MIT License
The University of Anbar/Biomedical Engineering Research Center in University of Anbar provided help for the authors to finish their work, for which they are grateful.
| Views | Downloads | |
|---|---|---|
| F1000Research | - | - |
|
PubMed Central
Data from PMC are received and updated monthly.
|
- | - |
Is the work clearly and accurately presented and does it cite the current literature?
Yes
Is the study design appropriate and is the work technically sound?
Yes
Are sufficient details of methods and analysis provided to allow replication by others?
Yes
If applicable, is the statistical analysis and its interpretation appropriate?
Yes
Are all the source data underlying the results available to ensure full reproducibility?
Yes
Are the conclusions drawn adequately supported by the results?
Yes
Competing Interests: No competing interests were disclosed.
Reviewer Expertise: Use of smart energy cities for urban energy saving and improved urban sustainability.
Alongside their report, reviewers assign a status to the article:
| Invited Reviewers | |
|---|---|
| 1 | |
|
Version 1 18 Feb 26 |
read |
Provide sufficient details of any financial or non-financial competing interests to enable users to assess whether your comments might lead a reasonable person to question your impartiality. Consider the following examples, but note that this is not an exhaustive list:
Sign up for content alerts and receive a weekly or monthly email with all newly published articles
Already registered? Sign in
The email address should be the one you originally registered with F1000.
You registered with F1000 via Google, so we cannot reset your password.
To sign in, please click here.
If you still need help with your Google account password, please click here.
You registered with F1000 via Facebook, so we cannot reset your password.
To sign in, please click here.
If you still need help with your Facebook account password, please click here.
If your email address is registered with us, we will email you instructions to reset your password.
If you think you should have received this email but it has not arrived, please check your spam filters and/or contact for further assistance.
Comments on this article Comments (0)