## 2 Materials and Methods
### SmartThings Edge Integration and Data Flow  
The control and communication backbone of the proposed fire response system is built upon the SmartThings Edge platform, which facilitates low-latency device orchestration, real-time monitoring, and seamless integration with building management infrastructure. The SmartThings Edge architecture enables local execution of device logic on a hub-level controller, eliminating the dependency on cloud round-trips for time-critical operations--a crucial advantage for emergency response applications. At the core of this integration is a lightweight publish-subscribe messaging protocol (MQTT), configured with TLS encryption to ensure secure, bidirectional data exchange between field devices and the SmartThings Edge hub. Each subsystem node--including sensors, motorized diffusers, ventilation controllers, and nozzle actuators--is assigned a unique topic address and communicates via predefined payload schemas that include device status, environmental readings, fault indicators, and actuation commands. Upon fire detection, the sensor node publishes a fire_alert message containing zone ID, detection time, and severity classification. This message triggers rule-based automations pre-loadedin the hub's local Lua driver, which sequentially executes ventilation and suppression tasks with sub-second delay. The data flow framework supports three primary communication pathways:  
* Intra-system control loop: Real-time command dissemination between the detection unit, actuator modules, and SmartThings Edge hub to ensure synchronized mechanical response. * User notification layer: Instantaneous push alerts are transmitted to registered mobile devices via the SmartThings app, accompanied by dynamic status dashboards that visualize event progress, device state, and manual override options. * BMS/BAS interoperability: A custom-developed SmartThings-to-BMS bridge exposes key system metrics to legacy BACnet or Modbus systems through RESTful API endpoints and virtual device mirroring. This allows centralized facility managers to receive alarms, trend logs, and maintenance diagnostics in their existing interfaces without additional hardware. Edge-level processing ensures system continuity even under external network disruptions, as device drivers, logic rules, and safety interlocks are stored and executed locally. Furthermore, diagnostic heartbeat signals and anomaly logs are periodically uploaded to the cloud when connectivity is restored, supporting long-term performance analytics and compliance documentation. The modularity of the SmartThings Edge ecosystem also allows for scalable deployment across multiple zones or facilities. Each hub operates independently but can federate events to a centralized monitoring system, enabling hierarchical risk coordination in large-scale buildings or campuses. Through this architecture, the system achieves both operational resilience and data transparency, essential for modern smart building fire safety frameworks. Figure 3 presents the system architecture for SmartThings Edge-based integration, delineating the real-time data flow and control mechanisms among fire detection field devices and the edge-level coordination hub. The proposed configuration facilitates seamless communication between the hybrid sensing unit, ventilation controller, and suppression actuator using a secure MQTT protocol. Each device is assigned a unique topic structure, enabling structured, bidirectional message exchange under encrypted TLS channels. Figure 3: SmartThings Edge-based integration architecture. The diagram illustrates the secure and decentralized interaction among field-level fire detection components—hybrid sensors, ventilation controllers, and suppression units—and the SmartThings Edge hub. Using MQTT with TLS encryption, real-time control logic is locally executed through Lua-based drivers, enabling rapid automation without reliance on cloud communication.