# Remote Monitoring and Diagnosis for Building Maintenance Units Based on Internet of Things System
## 2 System Design and Application
### Overall System Architecture Design
Based on the maximum a posteriori (MAP) criterion, the most probable root cause \(f_{inferred}^{*}\) is determined by Formula (13):

\[f_{inferred}^{*}(s_{j})=\underset{f_{k}\in F}{\mathrm{argmax}}P(f_{k}|s_{j})= \underset{k\in\{1,\cdots,Z\}}{\mathrm{arg}}\underset{k\in\{1,\cdots,Z\}}{ \mathrm{max}}I_{kj} \tag{13}\]

In practical applications, the system typically outputs a ranked list of candidate root causes, which are ordered by the probability \(I_{kj}\), to assist maintenance personnel in decision-making. This process completes the transition from raw data to the identification of system-level symptoms, enabling effective diagnostic reasoning. #### 2.2.3 Construction of a Data Processing Layer Framework with a Real-Time Fault Diagnosis Model

Based on the established global data relationship network for BMU operation and the correlation matrix of multi-source relationships for operation data-fault phenomenon-fault root cause, a data processing layer framework incorporating a real-time fault diagnosis model was constructed. The basic structure and diagnostic process of the framework are shown in Figure 4a,b. From Figure 4a, it can be seen that the data relationships are stored in the database and embedded in the data processing layer in a system-recognizable manner. Among them, the storage methods of data in the data processing layer include process data classification and fault information storage, which can classify signals and analyze possible causes of faults based on fault diagnosis rules, provide diagnostic recommendations, and then interact with the application layer to ensure the independence of the fault diagnosis knowledge base, facilitating the update and maintenance of diagnostic rules and solutions. Based on the real-time fault diagnosis model established above, the specific calculation process for state analysis and fault diagnosis is shown in Figure 4b. ## 3 The Simulation Test of the System

### Establishment of the Testing System

In order to verify the practical application of the system, we have built a test system for simulation testing. Building the test system includes developing the simulation control

Figure 4: (**a**) Data processing layer architecture. (**b**) Condition analysis and fault diagnosis process of the system. system of the BMU, connecting the remote communication module, building the cloud server, etc. [26; 27]. The key elements of the test system are shown in Table 2.

The BMU control system controls the input and output signals of the PLC to simulate the working state of the BMU. This system includes PLC, HMI, a power supply, a switch, the contactor, an indicator light, and other components, and the communication module is connected to the system via the RS485 interface, as shown in Figure 5. The module configuration involves both serial port and network protocol settings. The serial port parameters (baud rate, data bits, etc.) must match those of the BMU controller. The network protocol adopts TCP/IP, with the communication module configured as a TCP client. The cloud server's public IP address and receiving port are added to establish the connection. Each communication module features a factory-programmed MAC address that serves as its unique identifier. During each power-on sequence, the module uploads this MAC address to the server upon establishing a connection, which serves as the primary device authentication criterion. In the cloud server environment, a TCP server was implemented using Python 3.9, while EMQX 4.0 was deployed as the MQTT broker to receive and process data streams [28; 29]. The client adopts a B/S architecture, utilizing Apache as the web server to process client requests. The Apache server is configured by setting the website's homepage and domain name. After completing the configuration, the Apache server is started, enabling browser access to the client through the domain name. The database uses MySQL 8.0, and the client operates the database by calling API interfaces.