The Internet of Things on AWS – Official Blog

Early Fire Detection Design Model for Smart Cities: Using AWS IoT and ML Technologies

Introduction

The National Fire Protection Association records over one million fires each year. These fires rank as one of the top threats to urban safety in the United States. Currently, fire departments largely rely on traditional fire detection systems composed of in-home smoke detectors, fire call boxes, and public notification (calls) to receive their alerts. These systems may lack additional information, such as scope, scale, and location of the fire. The Internet of Things (IoT) is a key technology that can help cities streamline their infrastructure to proactively detect fires and improve public safety.

To reduce fire-related incidents and respond to fires quickly and effectively, you can integrate IoT sensors with advanced data analytics (such as Machine Learning, or ML). IoT devices monitoring environmental conditions and smoke levels can send near real-time data to the cloud where it is further processed to identify potential fire hazards, allowing for practical measures to be taken before incidents escalate.

In this blog post, you learn how to use the AWS suite of services to connect, collect, and act on data that can build an early warning system for emergency responders. The blog discusses the overall system architecture. It also includes a walkthrough of sensors and devices that collect data, the data processing and analysis using AWS IoT services, and low-code ML models using Amazon SageMaker to predict fires.

Architecture overview

This solution uses AWS IoT Core to securely ingest sensor data from a diverse range of sensors including temperature, pressure, gas, humidity, wind speed, and soil moisture into the cloud at scale. Based on the type of IoT device you use, AWS IoT SDK provides the necessary libraries and APIs to securely connect and authenticate your devices with AWS IoT Core.

However, some of these devices may be deployed where Wi-Fi and cellular connectivity is intermittent. This is where AWS IoT Core for Amazon Sidewalk can provide an advantage. Amazon Sidewalk is a secure community network that uses Amazon Sidewalk Gateways, such as compatible Amazon Echo and Ring devices, to provide cloud connectivity for IoT endpoint devices. Amazon Sidewalk facilitates low-bandwidth, long-range connectivity within homes and beyond, utilizing Bluetooth Low Energy for short-distance communication. Additionally, it employs LoRa and FSK radio protocols at 900MHz frequencies to cover more extensive distances. IoT devices can securely interact with AWS IoT Core by connecting through the Sidewalk Gateway, enabling the publication of data and receipt of control messages. This integration enhances the overall connectivity and functionality of IoT devices in various settings. By bridging gaps in connectivity, Amazon Sidewalk allows smart city implementations to expand the reach of AWS IoT Core and enable a truly city-wide network, even in remote metro areas. This range boost helps IoT and edge computing to become more effective and reliable within the smart city infrastructure.

AWS IoT Rules Engine analyzes and processes the streaming data, enabling you to route the messages arriving in AWS IoT Core to downstream AWS services. You can create rules that specify conditions based on the incoming data. When a message from an IoT device matches a rule’s conditions, the rules engine triggers an action. In this solution, this action forwards the message to Amazon Simple Notification Service (Amazon SNS) to notify the response teams through the designated communication channels.

The incoming data is also routed to Amazon Timestream, where it’s stored for near real-time monitoring. Amazon Timestream is a fast, scalable, fully managed, purpose-built time series database that makes it easy to store and analyze time series data. Timestream’s purpose-built query engine lets you access and analyze recent and historical data together, without having to specify its location. The rules defined in AWS IoT inserts data from incoming messages directly into Timestream where AWS IoT Core parses the resulting action using SQL reference.

Gain immediate insights through dynamic dashboards to monitor and analyze millions of real-time events using Amazon Managed Grafana. It is a fully managed and secure data visualization service that integrates with Amazon Timestream. With Amazon Managed Grafana, you can use to instantly query, correlate, and visualize telemetry data from multiple sources. Using Grafana with Timestream enables you to build operational dashboards to derive near real-time insights from dashboards, monitor, and alert by analyzing millions of events. These dashboards provide stakeholders and response teams with immediate visibility into sensor metrics and anomalies detection. They also aid in the early detection of potential threats that could lead to fires within a smart city.

For long-term analysis and historical reference, all raw sensor data is delivered to an Amazon Simple Storage Service (Amazon S3) data lake. This is passed through Amazon Kinesis Firehose to capture, transform, and load the streaming data. Storing this historical data in Amazon S3 plays a pivotal role in enhancing the system’s capabilities. It serves as a foundational resource for machine learning model development, which is facilitated by Amazon SageMaker. By leveraging SageMaker, you can efficiently train machine learning models using this historical dataset. These models, enriched by the insights from historical data, gain predictive capabilities. They can forecast environmental conditions, including fire risks, with precision.

Use Amazon Athena to analyze and visualize these insights intuitively and facilitate data-driven decision-making. Athena is a serverless and interactive query service that can analyze the data stored in Amazon S3 and visualize the results in Amazon QuickSight. Amazon QuickSight then leverages this enriched data and generates interactive and informative dashboards.

The combination of near real-time monitoring, predictive analytics, and advanced visualization empowers you to proactively respond to changing environmental conditions. By proactively responding, you ensure rapid potential threat detection and timely emergency responses.

Additional use cases

The above architecture serves as a flexible foundation for gathering, analyzing, and displaying sensor data related to fires in smart cities. It can be applied to address environmental challenges like wildfires, which often start in remote forests and reach suburban and urban areas. By using IoT sensors in wooded areas, parks, greenbelts, and urban-wildland interfaces, cities can detect and contain fires early.

This architecture has applications beyond fire detection. It can optimize smart city operations by monitoring traffic, waste management, energy use, flood risks, and air quality. Its core capability is converting sensor data into useful information for city officials, emergency responders, and the public to make cities safer, more livable, and sustainable.

Conclusion

In this blog, we covered a reference architecture to design a scalable early fire detection system for smart cities. By leveraging AWS IoT, this solution supports ingesting data from thousands of sensors across the city for near real-time detection and alerts. Ingesting data in this manner enables fast response times, proactive mitigation, and optimized resource allocation. The versatility of this architecture makes it adaptable for other IoT use cases like traffic management, pollution monitoring, and flood prediction. By combining cutting-edge technology with thoughtful city design, cities can take a crucial step toward being resilient and safer for its citizens.

About the Authors

Ahmed Alkhazraji is a Senior Solutions Architect at AWS focusing on AI/ML and Generative AI. He is passionate about building innovative solutions and work with customers who are in the early stages of adopting AWS. Outside of work, he enjoys hiking, playing soccer and traveling.

Ankur Dang is a Solutions Architect at Amazon Web Services (AWS). He is passionate about technology and enjoys helping customers solve problems and modernize applications. He has keen interest in Internet of Things (IoT) solutions, especially designing systems leveraging AWS IoT services. Outside of work, he pursues hobbies like studying advancements in aerospace and practicing drone photography to capture unique aerial views and perspective.

Marouane Hail is a Solutions Architect specializes in Cloud Operations. He is passionate about building secure and scalable solutions for his customers. Beyond his professional life, Marouane enjoys playing soccer and learning about technology.

Ready to get started? Check out these AWS resources:
[1] Tutorial: Connecting a device to AWS IoT Core by using the AWS IoT Device SDK
[2] Tutorial: Connecting Sidewalk devices to AWS IoT Core for Amazon Sidewalk
[3] Tutorial: AWS IoT Rule to Send an Amazon SNS notification
[4] Tutorial: AWS IoT Rule to send incoming data to Amazon Timestream
[5] Tutorial: Visualize your time series data and create alerts using Grafana
[6] Blog: Ingesting enriched IoT data into Amazon S3 using Amazon Kinesis Data Firehose
[7] Blog: Analyze and visualize nested JSON data with Amazon Athena and Amazon QuickSight