## 4 Discussion
### The Integration Process to Capture, Store, and Visualize Data  
As previously discussed, each of the COTS sensor devices communicates directly with a manufacturer or technology specific IoT cloud platform that handles basic connectivity management and data storage. While many such platforms store and visualize the data from associated devices, they generally provide APIs that allow external applications to interact with and extract the raw data. Through the use of these APIs, together with the standardized and well-documented interfaces, we then built a unified data management service (database). This service managed the periodic ingest and storage of sensor data so that the unified database could reflect the near-real time state of measurements taken by the deployed sensors.  
In the proposed monitoring system, the data management service is a cloud-based software component that acts as a unified control and data storage hub for all the sensors and devices utilized in the monitoring system. Due to the heterogenous nature of a system where existing products are integrated into a single platform, this service is required to make use of a range of APIs and communication protocols to gather data and control information about each sensor and network device from various external cloud platforms.  
The choice of software platforms in the Data Management Services block is based on the simple yet important requirements for a system that has a low barrier-to-entry and does not require deep technical experience in programming and design. These platforms are Node-RED and InfluxbDB.  
Node-RED is a well-known low-code flow-based programming tool that allows a system integrator to create data flows that ingest, manipulate, and export data from a range of sources and a range of formats. The low-code aspect of Node-RED means that the implementation of most data integration actions can be realized with only a high-level understanding of the operations required to interact with other Web APIs and transform data to push it into a database. The low-code methodology consequently also reduces the time required to implement data flow operations through the visual drag and drop-based flow construction method. Moreover, a developer is not limited to only graphically configured operations available as \"blocks\" but can write custom function blocks using standard JavaScript and the NodeJS libraries.  
The storage and ease of access of sensor data in the implemented system by other users are a key design aspect of the entire sensing and data collection system. For this, we chose to use the InfluxbDB time-series database platform. While the traditional databases allow flexible index types, the sensor data being collected in an IoT-based IAQ monitoring system is inherently associated with particular timestamps among other parameters. Previous studies [31; 32] have raised concern that as IAQ monitoring applications largely deal with continuous real time-series data, the use of a database, which was optimized for time-series data, is crucial for efficient and easily accessible data to conduct post-processing and analysis. In this study, the InfluxbDB has been optimized for the querying of data via its \"tagging\" mechanism that indexes tags for each record alongside timestamps. Such a mechanism means that heavily repeated parameters found in a database such as Device ID, sensor type, and other constants can be used to quickly filter and sort data during query operations.