# A Software Framework for Heterogeneous Wireless Sensor Network Towards Environmental Monitoring
## 1 Introduction  
More than 35% of the electricity in the United States is used in heating, ventilation, and air conditioning (HVAC) of buildings [1]. Researchers believe that intelligent control of HVAC operation can significantly reduce building energy consumption. For example, it has been reported that 10%-15% reduction in building energy is achieved using occupancy-driven adaptive HVAC control [2]. So far, intelligent HVAC control needs to analyze real-time environmental information in buildings, such as room temperature, humidity, CO\({}_{2}\) level, and room occupancy levels [3]. Nowadays, various wireless sensor networks have been developed to sense and collect building environmental information. In this decade, many types of wireless sensor networks (WSNs) have been developed for indoor environmental sensing. So far, the main optimization aspects of these WSN systems include sensingaccuracy, power consumption, form factor, and implementation cost. As the global WSN market is expected to exceed $1.8 billion by 2024, the need for a standard WSN development platform is emerging [4]. Nowadays, existing WSN development platforms mainly emphasize the design aspects of power consumption [5; 6], system cost [7; 8; 9; 10], and network latency [11; 12; 13]. Yet, rare research efforts have been made to create and establish user-friendly design paradigms that allow ordinary users to easily deploy and configure heterogeneous WSNs, rather than WSN professionals or researchers. It is attractive to develop a low-power, low-cost, small form-factor WSN development platform that enables rapid system deployment without much knowledge of WSNs. When multiple different types of environmental sensors are utilized in a WSN, it becomes a heterogeneous WSN. Depending on user requirements or preferences, these different types of environmental sensors may come from a sensor supplier or various sensor suppliers. From a system design perspective, heterogeneous wireless sensor networks WSNs need to address several challenges. First, sensor data acquisition, conversion, fusion, and packaging involve a series of software processing. For example, typical outputs of these environmental sensors are analog signals, which need to be converted to digital signals that allow for complex data processing (e.g., fusion, encryption) in microcontrollers. Moreover, as each type of environmental sensor typically has unique processing requirements, it is difficult to develop high-level software frameworks to efficiently conduct data processing for multiple heterogeneous sensors. Second, during normal operation of a heterogeneous wireless sensor network, if users insert or remove some environmental sensors, the entire WSN system should function properly. In this work, to solve the above two system design challenges, we have developed a low-power, low-cost, small form-factor WSN development platform whose software framework performs efficient data acquisition, conversion, fusion, and packaging for multiple heterogeneous sensors (i.e., CO\({}_{2}\), humidity, and light sensors). As this work is targeted for open-source WSN platforms, the source code in our software framework is written using Node.Js, a widely supported open-source JavaScript. Therefore, our proposed software framework will benefit from community-supported applications that leverage the latest coding for each software object. This work makes the following contributions: (1) The proposed software framework facilitates the connection of a flexible number of heterogeneous sensors into a WSN and customizes the network configuration interface. Thus, our proposed software framework supports robust and functional system operation when inserting or removing environmental sensors. (2) Our proposed software framework can collaboratively operate with a set of WSN hardware components, including heterogeneous environmental sensors, microcontrollers, and others. Our proposed high-level software framework does not compromise the overall functionality of each WSN hardware component.