Design and implementation of intelligent environment monitoring system based on OneNET platform

With the development of electronic technology, remote monitoring has become the main development direction of data management. The monitoring of indoor environmental data is our main research content. The OneNET platform provided by China mobile communications corporation is used as the coordination command center of the intelligent monitoring application system for terminal design and development. OneNET platform provides standardized access terminal and the background monitor template type design method of the staff through constructing a set of environmental data acquisition and monitoring system based on OneNET, implementation of indoor environment parameters, such as temperature, temperature and concentration of PM2.5 real-time reporting and management operation, with abnormal data of automatic alarm. The system shows that the design based on the open platform can effectively improve the generation efficiency of new business and promote the development of Internet of things business.


Introduction
In recent years, with the continuous development of China's science and technology and the continuous improvement of people's living standard, people have consciousness and the relationship between economic development and environmental pollution, family living environment quality as the external environment pollution and indoor decoration and deteriorating, so the research on indoor air quality monitoring is particularly important.
Environmental monitoring system is an important part of the intelligent home system, which is highly valued at home and abroad. It can present indoor environmental monitoring data to people to provide decision support. Therefore, in order to continuously monitor and evaluate indoor environment quality in real time and master indoor environment conditions more easily and easily, it is imperative to establish an indoor environment monitoring and evaluation system with high stability. [1] At present, most of the existing environmental quality monitoring devices are single devices that are not connected to the Internet. In addition, there are some networked environmental monitoring devices, most of which are managed by self-deployed servers, which can increase the workload and cost of product development. In this paper, a set of environmental quality monitoring system based on OneNET open platform was designed and developed to monitor indoor temperature, humidity, dust concentration and other environmental parameters. The development scheme made full use of the standardized access and application template design provided by OneNET, which not only greatly reduced the development cost, but also reduced the development time.

Service architecture based on OneNET platform
With the integration and penetration of the Internet of things business and Internet business, the Internet of things business will extend to the client and application end based on the operator pipeline, forming the network connection architecture of "client, pipeline and cloud". The client is the sensing network and terminal, the pipeline is the network connection channel of intelligent fusion, and the cloud is the platform of cloud-based contact management for all tasks. Based on internet of things(IOT) OneNET application system, as shown in  Under this architecture, taking the smart home as an example, the current home terminal has shown diversity, including various application terminals for people and various sensor terminals for objects. Home gateway, as the center of home network, has developed from the early access terminal to the present home gateway, and will develop into a business gateway in the future. [2] In this paper, a B/S architecture system for environmental quality monitoring based on OneNET flat is designed and implemented by applying the Internet of things to a typical three-tier framework: device end, server end and application end. As shown in Fig. 2, the terminal device collects environmental data, interacts with the OneNET platform and uploads the data to the platform. The OneNET platform sends the environmental data camera to the server of the environmental monitoring system, and the final monitoring data is presented to the Web page, namely the user. [3]

Fig.2. system architecture diagram
The main goal of the design is to meet people's increasing living needs, so that people can monitor indoor environmental quality anytime and anywhere, and take a series of environmental intervention measures according to the monitoring results, to provide human health protection of goods and property security.

Terminal design and standardized access
The device end designed in this paper mainly realizes three functions: environment parameter information collection, data uploading to OneNET platform, receiving instructions to make corresponding actions. Arduino development board is adopted to collect environmental data such as temperature and humidity, dust concentration and so on through external sensors. Data is uploaded by the ESP8266 module, and switches of related equipment are controlled by driving breaker, as shown in Fig. 3.   Fig. 3. overall system diagram According to the demand analysis, the intelligent monitoring system of the Internet of things is an embedded system device integrating data processing, collection, storage and transmission, which has the characteristics of low power consumption and high flexibility. [4] Hardware functional circuit design includes temperature and humidity detection circuit design, relay output circuit design, wi-fi communication circuit design, gas detection circuit design, steering gear control circuit design, power circuit design and IO extension design. Functional circuit programming includes temperature and humidity detection programming, relay output programming, wi-fi communication programming, gas detection programming and steering gear control programming. The hardware device diagram is shown in Fig. 4.

Template layout design method based on OneNET
Staff access code on the device end to realize the function such as data acquisition, protocol encapsulation, data upload, in accordance with the standards of OneNET platform to provide access to the process and the design method of equipment access platform, the whole process can be roughly divided into login registration, project construction, new equipment, new data flow, upload and view the data, new applications, etc., equipment access OneNET platform steps, as shown in Fig. 5. Register the user account on OneNET platform to create the exclusive "developer center". Click the "register" button in the upper right corner of the homepage to register the user account. Fill in the user name, user password, valid email address (or valid mobile phone number), click to obtain the verification code, open the email to view the verification code, and complete the registration.
2. Product creation In order to use OneNET's powerful features and services, you need to create your own products on the OneNET platform. Click "developer center", enter the corresponding "product list" management page, create and manage products here.
3. Data flow setting On OneNET's device, add the data flow and name it TEMP, and add the data flow process diagram, as shown in figure 5-12.Add four more data streams and name them HUMI, KEY, alarm, and servo_control, respectively.

Create applications
On the left side of the interface, users select "thirdparty development platform", then click "create application", then set the corresponding information, setting the created application related information graph.

system experiment
In this paper, OneNET cloud platform is taken as the data exchange center to design an intelligent monitoring system based on OneNET cloud platform. The equipment diagram required for the experiment is shown in Fig. 6. It mainly includes the application interface of Internet of things cloud platform, hardware circuit board, MQ-2 smoke sensor, data cable, steering gear and cigarette lighter. [5] Fig.6. equipment diagram for experiment Log in first OneNET platform, and then modify the router name and password, device ID, API_KEY program uploaded to the circuit board, and then for the power circuit board connected, it can be uploaded to the computer lab temperature and humidity, temperature and humidity data refresh rate of 10 s, the maximum temperature of 60 ℃, the minimum value for -10 ℃, the maximum humidity of 100%, the minimum value is 0%, indoor temperature and humidity display, as shown in Fig. 7. In this simulation experiment, the rotation of the steering gear is used to represent the opening and closing of the doors and Windows. The rotation Angle of the doors and Windows is controlled between 0º and 180º.This time, rotate the door and window by 90º. After setting the door and window to a 90º , the OneNET display interface will show that the instruction has been successfully sent, and the window and window rotation instruction has been successfully sent to the interface diagram, as shown in Fig. 8.After the command is sent successfully, the steering gear will rotate 90º according to the command. When there is no harmful gas in the laboratory, the interface surface is displayed, as shown in Fig. 9.When the combustible gas generated from the lighter is pointed at the MQ-2 smoke sensor, correspondingly, the alarm display lamp of MQ-2 emits light and indicates the presence of toxic gas. The display interface diagram for the presence of harmful gas is shown in Fig.9.And send the message to the bound mailbox. [6]  To sum up, we have completed indoor temperature and humidity detection and display, indoor harmful gas detection and alarm, and realized the steering gear control function. It can also be controlled and displayed through the "device cloud" software on our phones.The device cloud software icon on the phone is shown in Fig.10.   Fig.10. "device cloud" software icon

Conclusion
In this paper, the OneNET platform is selected as the data exchange center, whose template-type components can quickly realize monitoring. With Arduino as the core, it USES the DHT11 temperature and humidity sensor and mq-2 smoke sensor to send indoor temperature and humidity data and the detection data of whether there is harmful gas to OneNet cloud platform for analysis and processing, and then realizes remote check of mobile phone terminal and PC terminal. And the window can be opened and closed by simulating the window with the steering gear.
In addition to monitoring indoor environment quality, the application development framework and system can also be used for fire monitoring and prevention, preservation and prevention of cultural relics, smokefree area monitoring and other scenarios, will have a good application prospect.