• head_banner

The Combination of MQTT Protocol and Terminal Monitoring Equipment

The Combination of MQTT Protocol and Terminal Monitoring Equipment

MQTT Protocol(Message Queuing Telemetry Transport), also known as Message Queuing Telemetry Transport, is a "lightweight" communication protocol based on publish/subscribe mode. It is a communication protocol built on the Tcp/IP protocol and released in 1999. The advantage of MQTT is that it can provide real-time and reliable message service for connecting remote devices with little code and limited bandwidth. As a real-time communication protocol with low energy consumption and low bandwidth occupation, it is widely used in the Internet of Things, small devices, mobile applications, etc.
MQTT server (message proxy). The common mqtt server is not a bunch of cabinets in the macro computer room, but a software developed on the Erlang/OTP platform. Then there are computers and other devices running this software. It is intuitively understood as a server or a server cluster running MQTT message server software.

The main functions are as shown in Figure 1-1.

(1) Accept network connections from clients

(2) Accept the information published by the client

(3) Processing subscription and unsubscribe requests from clients

(4) Forward application messages to subscribed customers.

(1) MQTT will construct the underlying network transmission. It will establish the connection between the client and the server, and provide an orderly, lossless, byte stream based two-way transmission. When sending data, MQTT will associate the related quality of service and topic name.

The MQTT protocol communication process needs to be completed by the client and the server together. There are three identities: Publisher, Broker, and Subscribe. The message publisher and subscriber can both be clients, and the message broker is the mqtt server.
① Implementation of MQTT

Topic: topic, which can be understood as the type of message;

Payload: message content, which can be understood as the specific data content to be used

② MQTT client

An application or device that uses the mqtt protocol. It is a network connection based on the mqtt server. It is often used to publish information, subscribe to publish information, unsubscribe or delete application messages, and disconnect from the server.

① Use the publish/subscribe message mode to provide one to many message publishing and decouple applications.

② Message transmission that shields load content.

③ Use Tcp/IP to provide network connectivity.

④ There are three kinds of message publishing service qualities. Message publishing (Qos: 0 at most once, 1 at least once, 2 only once)

⑤ Small transmission and small traffic demand.

1

Many electricity meters are connected to the gateway, which is the way that the equipment interacts with the mqtt server. Among the ADW series, one of several types of electricity meters, the ADW300 electricity meter, has the Internet access function of 4G and wifi. They enable the equipment to have the networking function through the way of IoT network card or LAN, reducing the trivial process of connecting the equipment to the gateway and then to the server, and realizing the industrial IoT.

(1) ADW300 wireless meter is mainly used to measure three-phase active electric energy of low-voltage network. It has the advantages of small size, high accuracy, rich functions, and many optional communication modes. It can support RS485 communication and Lora, NB, 4G, wifi and other wireless communication modes. It also adds the current sampling mode of external transformer, which is convenient for users to install and use in different occasions. It can be flexibly installed in the power distribution box to meet the needs of sub item electric energy measurement, operation and maintenance supervision or power monitoring in different areas and different loads.

2

①Subscription

Subscriptions include Topic Filters and Quality of Service. A subscription is associated with a session. A session can contain multiple subscriptions. Each subscription in each session has a different topic filter.
②Session

After each client establishes a connection with the server, it is necessary to have a stateful interaction between the session client and the server. The session exists between the session and a network, or it may span multiple continuous network connections between the client and the server.
③Topic name

Connect to the label of an application message. The label matches the subscription of the server. The server will send the message to each client that subscribes to the matching label
④Data upload

The wireless transmission of the meter achieves small transmission and small flow demand. The data upload process of this meter is simple. (See the appendix for details) The redundant data upload steps are optimized to promote customized data upload, which includes commonly used electrical parameter data, signal strength, active power demand, voltage current ratio, temperature, DI state, voltage current harmonic distortion rate, peak and flat valley electric energy, etc.

In summary, under the current environment of Internet of Things technology, MQTT servers have been successively adopted by various businesses and enterprises, because MQTT servers and mqtt protocols can meet their intelligent management needs. The distribution cabinets in some production workshops of many enterprises need to use wireless equipment to monitor the working status of electrical equipment, while most production workshops of enterprises are decentralized and independent electrical equipment. If each equipment is installed with a gateway, the cost of transformation is very large. Therefore, in order to save costs, most enterprises often install a batch of electricity meters for wireless monitoring of electrical equipment - ADW300, collect various equipment parameters of cables and production lines through sensors, mainly including electrical parameter data such as current and voltage, and upload the obtained data to the cloud of MQTT server in real time, and then subscribe to mqtt server topics through the Internet of Things platform and database, To obtain the data of the terminal monitoring equipment, realize the two-way communication between the terminal and the cloud, build a powerful data channel, store the obtained data in the cloud database of the MQTT server, ensure the security of the data, build a power management and display system, and display the obtained data to the foreground through cloud technology, big data, and the Internet. Users can log in to the mobile APP Computer pages and other real-time monitoring equipment and cable power data.


Post time: Oct-31-2022