Smart iAIR System with Integration of the Internet of Things and Mobile Applications

Commercially available crowdsourced air boxes have nonuniform distributions and cannot achieve suitable observation densities. As a result, current air quality data are limited to the vicinity of an observation station, rather than providing accurate actual data around a user. In this research, we propose the implementation of iAIR air pollution detection air boxes, which can be installed on air purifiers or air conditioners in large numbers and distributed over a wide area; this provides a real-time air pollution information map according to various air qualities and shows a higher resolution. The provided real-time information enables a user to immediately take appropriate response measures once poor air quality has been detected. When air quality degrades or the user’s heart rate exceeds the normal range, the smart iAIR system installed on a cloud service platform will transmit warning messages to a mobile app and a wearable personal smart wristband, and at the same time, activate the air purifier (or air conditioner) to improve the current air quality and advise the user to move to an environment with better air quality with guidance by an air navigation map.


Introduction
The officially announced local air quality is not the actual air quality around a person's current location. Nevertheless, the actual concentrations of suspended PM 2.5, CO 2 , CO, and O 3 can be detected using sensors. (1) In conjunction with a simple wearable heart rate monitor, such information can be integrated towards a health care application with respect to air pollution, so that when the air quality is poor the user or caretaker can receive real-time notice and take positive action. In this research, we develop the smart iAIR system for public mobile care, especially for people with sensitivities and the elderly, with the aim of providing warnings and advising actions to users before the poor air quality causes any physical discomfort. The proposed system can also be used for target-specific care, for example, in nursing homes and other health care facilities, to prevent environmental air pollution from affecting people's health.
The number of observatories for Taiwan's Environmental Protection Administration and Low Altitude Space Surveillance (LASS) is insufficient. As a result, the observatories can only provide average values, that is, air quality index (AQI) values, suitable for large areas. Occasionally, the public receives information such as temperature, humidity, and the concentration of suspended particulates from a single observatory within a large target region. On the other hand, there are many commercially available portable devices with integrated air pollution sensors. However, the distribution of commercially available crowdsourced air boxes (2) is nonuniform and sparse as shown in Fig. 1; thus, they cannot provide suitable observation densities. The inspection of the distribution of commercially available crowdsourced air box locations showed that the distribution density is higher in the south of Taiwan around the Kaohsiung region and quite low in the Pingtung region. Ironically, the air pollution in Pingtung is relatively serious, requiring high-density observation deployment. Therefore, similarly to the concept of Internet of Things (IoT) (3,4) in the near future, air boxes iAIR for air pollution detection can be batch-installed on air purifiers or air conditioners and distributed, such that the air quality data detected by these appliances at the point of installation can be uploaded to a cloud storage, providing distinguishable air quality levels over smaller regions. The data can be further integrated using visualization toolkits and web maps, such that a real-time, realistic air map with more localized regional air pollution information can be implemented, enabling users to precisely grasp more localized regional data on air quality. People can be informed in real time regarding the surrounding air quality and can take immediate contingency measures.
For example, we can use apps that integrate wireless mobile communication such as Wi-Fi and Bluetooth (5) to enhance the convenience of receiving messages or checking information on a cloud service platform. (6) In such a case, the user can obtain more smart services at any given time. Services that may be useful include sending warnings to inform the user of the dangers when the pollution level is likely to cause harm to the human body, checking recent surrounding air quality and changes, immediately activating an air purifier (or an air conditioner) to improve the current air quality, or navigating the user to another more suitable location.

Related Work
With technological advancement, high levels of industrialization and urbanization have resulted in alleviated concentrations of air pollutants. Although official websites broadcast the air quality for various regions, the official online announcements of each local region's air quality are restricted to the locations of the observatories and cannot provide precisely localized data around a particular user as shown in Fig. 1. At a location away from an observatory, its air quality may differ from that measured by the observatory. The recent development of IoT enables users to be equipped with sensors to obtain the required data, thus solving the problem of being unable to obtain the surrounding air quality in real time and allow the user or caretaker to take immediate action when the air quality deteriorates. Therefore, in this work, we propose a smart iAIR system for outdoor mobile care of the public (in particular, people with sensitive constitutions and the elderly), with the aim of preventing the excessive inhalation of polluted air, which may compromise people's health. Specifically, the system can be applied to health care facilities, such as nursing homes and hospices, to prevent environmental air pollution from adversely affecting people's health. (7) Traditional air quality information is dependent on the observatory's detection and announcement. In this work, we hope to extend the application by using portable air boxes to detect air quality and provide real-time announcements via the smart iAIR system on a cloud service platform. (8) An intelligent iAIR app, Apphealth, is implemented using the concepts of IoT technology and mobile applications in addition to big data analytics on a cloud service platform. The app can effectively prevent air pollution from affecting the user's health by providing warnings and relocation navigation. With respect to its application in IoT, (9) the advantage is that new devices may be added to the system whenever software upgrades are performed. The app is also convenient with respect to mobile applications since the user can receive warnings or check the status of air pollution at any time and place, as well as additional smart responsive services. New functions can also be implemented according to additional requirements.
The virtualization within a smart cloud service provides flexible hardware resource allocation mechanisms, such that resources can be more easily allocated and configured on personal mobile application platforms. In comparison with traditional data management systems without virtualization for resource configuration, iAIR has the unique management advantages provided by virtualization. In addition, the personal mobile application platform supports traditional batch operations, as well as real-time operations, so that users may receive immediate information required for short-term decisions. The system can also collect instantaneous environmental quality and personal biometric data to improve work efficiencies. Furthermore, the accumulated historical data can be used for smart prediction analysis through batch processing to analyze various air components, such as CO 2 , CO, PM 2.5, and O 3 , to determine potential issues around the user or propose possible future development.

Integration of IoT and mobile application
In this work, we utilize IoT technology and mobile application concepts along with big data analytics over a cloud service platform to implement a novel and intelligent iAIR app, Apphealth, to provide warnings (10) and relocation navigation to the user, as shown in Fig. 2. Commercially available air boxes are developed into a smart iAIR framework capable of mobile applications to enhance and improve the convenience, effectiveness, and diversity of the original air boxes and reduce their costs. As shown in Fig. 3, the air boxes at the front end of the iAIR    system use Arduino development boards as data collection devices and collect various pollutant concentrations from the surrounding air via multiple sensors. As shown in Fig. 2, when the air quality deteriorates or the heart rate exceeds the normal range, the smart iAIR system installed on the cloud service platform will transmit a health warning message to the mobile app and a smart wristband, and at the same time, activate an air purifier (or an air conditioner) to improve the current air quality. The user can also take immediate action once the message has been received, and follow the suggestion in the message and navigation map to relocate to an area with better air quality. (11) The configurations of the iAIR system webpages at the back end are shown in Figs. 4 and 5. The implemented iAIR system analyzes the air quality according to the data collected by the sensors. (12) Apart from providing real-time visualizations of different types of air pollutant information, the system simultaneously displays the island of Taiwan and applies machine learning and big data analytics to compute the best route or direction to move from an area with poor air quality to an area with better air quality. Therefore, when the air quality for a specific region is outside of the normal range and may be damaging to human health, (13,14) the developed smart prediction system is targeted at providing health warning messages to the mobile app and smart wristband, as well as activating the air purifier (or air conditioner) to improve the air quality and navigate users towards a location with better air quality.

Smart service mechanism
Traditional air quality information is dependent on the detection and announcement by the observatory at a particular location. In this work, we aim to use air boxes that are suitable for development to detect air quality and provide real-time announcements via the iAIR system on a cloud service platform, as shown in Figs. 6-9. Users can use personal smartphones or tablets to log in to the iAIR system and make real-time inquiries. At the moment, the mobile app is operating on the Android 4.4 version. The data transmission for air boxes requires a good network communication environment; therefore, it is implemented using the ESP8266 module, which possesses good wireless local area network technology, in accordance with the    IEEE 802.11 standard, such that the air boxes may successfully connect to the iAIR system and provide real-time air quality detection for the development towards smart prediction applications.
The recent development approach is to integrate the IoT with a mobile application and replace observatories situated at fixed locations with air boxes that can be easily developed for air quality monitoring and analysis. The smart iAIR system configured at the back end utilizes push technology to transmit health warnings and relocation navigation messages to mobile apps and smart wristbands, and at the same time, activate the air purifier (or air conditioner) to improve the current air quality. The iAIR system proposed in this research uses a cloud service platform to obtain the best information feedback and minimize the Apphealth warning response time on the mobile device. In addition to an increased system efficiency, the system also presents big data analytics of the air pollution status for the regional observatories and over the island of Taiwan. Furthermore, the relocation navigation measures can provide the user with the knowledge of the risks to personal physical health associated with air pollution, as well as suggestions for the user to move to an area with better air quality. The above-mentioned points are the contributions of this research.
With regard to the back-end cloud service platform, in this work, we use the open-source Proxmox Virtual Environment as the back-end iAIR cloud service platform, (15) as shown in Fig. 10. After version 2.0, the user management functions of the platform have been enhanced to allow the assignment of specific permissions and hardware usages to particular accounts or groups. Thus, it can be used to implement multiple user scenarios, wherein the system administrator can create an account and virtual machine for each user. The user may log in and use the associated virtual machine without cross interference with other users. The database server and other service server system administrators can integrate the system into platforms to reduce future management load.

Air map simulation
Python has become a popular programming language in recent years owing to its many advantages such as its extensible and multifaceted design, as well as its simplicity and support for inheritance and derivation. Therefore, in this work, we chose Python as the main programming language for air pollution data processing. The air map simulation technique flowchart for this work is shown in Fig. 11. The map simulation uses the open-source quantum geographic information system (QGIS) for map construction. (16) Map data visualization, editing, and analytic functions are provided. Grid data can also be established over the map for research purposes. After using the QGIS to construct the grid map for the island of Taiwan, Python's Shapefile pack (17) is used to import data from regional observatories and the iAIR system into the map data, and inverse distance weighting (IDW) is used to compute air pollution over the island of Taiwan. Python's Folium pack (18) is used to overlap the map data onto a Leaflet web map and the result is exported as an HTML file and displayed on the iAIR system.

IDW
Since the observatories cannot cover all regions, in this research, we use existing data to simulate air pollution for regions without observatories. The air pollution levels of two points will be more similar if the points are closer. We use the distance between an unknown point and the sample point as the weight and simulate the level of air pollution spread within each grid with IDW. IDW (19) is a deterministic method for multivariate interpolation with a known scattered set of points. The method uses the weighted average of the values available at the known points to calculate values at unknown points. This method assumes that the impact of projected locations decreases with the distance between sample points. For each grid without an observatory or an iAIR system, IDW is used to obtain the grid's air pollution level. (20)  By using the QGIS, we create a rectangular grid map for the island of Taiwan. After eliminating highly mountainous regions with rough terrains and no observatories, all observatories within the island of Taiwan are treated as sample points for the simulation of all grid points using IDW. Python's Folium pack is then used to visualize the results using different colors based on the various pollution levels and overlay the results on top of the Leaflet web map service, as shown in Fig. 12.
The front end of the proposed iAIR system includes a Wi-Fi self-location function, that is, if the level of air pollution at the device user's present location is detrimental to the user's health, the iAIR system will provide the user with nearby locations with relatively low pollution levels so that the user may opt to relocate, as shown in Fig. 13.

Experimental Results and Discussion
Multiple experiments have been performed in this work to verify the effectiveness of the pollutant concentration warnings and relocation tests at different times under various scenarios. The relocation navigation instructions have been verified to be effective at different times under various scenarios. The exemplary cases are presented as evidence in the following.
Case 1: The observation results and mobile application usages have been recorded for one entire morning when the device detects the PM 2.5 concentration reaching 40 μg/m 3 . According to the US AQI color grading, pollution exceeding this level begins to negatively impact the health of people with sensitive constitutions and the elderly. At this point, the iAIR system suggests that the people with high sensitivities or the elderly should avoid outdoor activities and sends a warning to the mobile app. The iAIR system also provides locations with better surrounding air quality, which users may use as reference and navigate to, as shown in Figs. 14 and 15.
Case 2: On the same day and location as Case 1, but a few hours later, the PM 2.5 concentration has been detected to exceed 50 μg/m 3 . According to the US AQI color grading, air pollution exceeding this level is unsuitable for human respiration. At this point, the iAIR system suggests that normal people should avoid outdoor activities and displays a stronger warning on the mobile device, as shown in Figs. 16 and 17. Case 3: After Case 2, we use intensive exercises over a short time to simulate tachyarrhythmic patients with cardiopulmonary diseases. After 15 min of intensive exercise, the heart rate detected by the smart wristband is over 120 beats per min. At this time, the    iAIR system sends out a much stronger physical health warning than the air pollution warning, as shown in Fig. 18. The location for this case is the same as that for Case 2; therefore, the relocation instructions are the same as those in Fig. 17.

Conclusion
The air boxes for iAIR air pollution detection implemented in this work can be massinstalled on air purifiers or air conditioners across the country, such that the different levels of air quality can be used for real-time air pollution web maps with smaller regional divisions, which enables the user to be informed of the air quality in real time and to immediately take response measures. The cloud-based iAIR system can provide operations on multiple, heterogeneous platforms, allowing the user to check the real-time air quality information and the heart rate data through an app at any time or place. The data are integrated for air pollutants associated with health care applications. With regard to the air quality and its possible negative impact on the user's heart rates, the system sends reminder notifications to the mobile phone as well as relocation guidance advice, so that the user may follow and navigate to a location with better air quality. The iAIR system proposed in this research can be an important link for understanding the air quality in smart living and facilitates personal health care applications.