# Wireless Sensor Networks for Building Information Modeling
## 5 Sensor Data from the Pilots  
As detailed in Reference [29], the Middleware provides identity and data management services to facilitate a secure and resource-friendly flow of information among Gateways and other BIMERR applications. The offered services can be deployed on the cloud or edge inside buildings or apartments. The Middleware design is a modular subsystem customized to satisfy the BIMERR use cases, and it consists of the following components:  
1. Identity Provider: a central authentication server, a directory of user and application profiles, providing interfaces to authenticate them. 2. Registry: a central repository containing metadata of Gateways and sensors. 3. Data Processor: retrieves device metadata from Registry and automatically configures the available workflows for data routing and transformation. 4. Storage: sensor data archival and retrieval. 5. OTA Software Update and Monitoring: remote configuration and monitoring of the Gateway software. 6. Device Connector: interoperability between Z-Wave sensors and data processor. The Middleware acts as the sensor-data handler and repository, and it provides the Registry that contains metadata to query and access required items. The Middleware's sensor-data storage services are microservices responsible for the storage and orchestration of sensor measurements data across the edge (building location) and BIMERR cloud. As already mentioned, the accuracy of energy performance, as estimated by building energy performance simulation engines, such as EnergyPlus [30], is highly affected by the level of detail of its input data. Methods and models have been developed [19; 31] to reduce the gap between simulated and measured building energy performance by representing occupant behavior in a standardized XML schema (obXML) [17]. The BIMERR PRUBS (Profiling Residents Usage Building Systems) component [28] applies machine-learning algorithms on sensor data streams to generate occupant-behavior profiles that mimic the inhabitants' actions. These profiles are subsequently used to project the building system (e.g., heating/cooling) utilization boundaries to maintain the comfort zone of the residents. A high-level architecture of WSN, Middleware, PRUBS and BIMERR interoperability framework is illustrated in Figure 8. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Sensor Type** & **Sensor Model** & **Mfn** & **Quantity** \\ \hline Raspberry & Pi 4 Model B 2 GB & RASPBERRY & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Greek pilot’s data-processing equipment. Figure 8: BIMERR WSN, Middleware, PRUBS and Interoperability Framework architecture outline [28]. For the occupant-behavior model training, sensing and metering data are acquired by the WSN designed for and installed at each site. Weather data are received from external weather APIs. To receive the sensor data streams, PRUBS communicates with the BIMERR Middleware, which is responsible for the buildings' sensor-data handling. The PRUBS output contains data-driven occupant-behavior models and populates a building level obXML file. That file is sent to the BIMERR Interoperability Framework [32] to be properly enriched and linked with other data, so that it can be used by other BIMERR applications. To conceptually gather the data mapping rules that must be performed to transform sensor data that are available through Middleware, and to input data that are meaningful for PRUBS, a Middleware-to-PRUBS sensor data wrapper was developed [28]. A demonstration of this wrapper is hereafter presented for the Greek pre-validation site and the two validation sites, i.e., the Spanish and Polish pilot. Figure 9 depicts the temperature profile and air-conditioning (AC) units' power-consumption levels, as these were measured in the master bedroom of the pre-validation site and captured by the sensor data mapping. WSN data were retrieved for the period from 15 September to 25 September. As it can be seen, the temperature distribution fluctuates in response to the AC usage.