English | Korean | Chinese | Japanese

Chapter 2. Configuration: MQTT

 

Set up MQTT

1. Enable Functions

a. Enable MQTT: Set whether to enable MQTT publishing.

· Published topics and messages:

· vms/vms_02/status {"status":"online"}

· vms/vms_02/status {"status":"offline"}

b. Enable device status publishing: Set whether to enable MQTT publishing for device status changes such as connect/disconnect.

· Published topics and messages:

· The published topic and message:

· vms/vms_02/ch_2-1/status {"status":"connected"}

· vms/vms_02/ch_2-1/status {"status":"disconnected"}

c. Event Notification Publishing: You can configure MQTT event notification publishing in the Notification section.

2. Broker Connection

a. MQTT Broker Address: Network address of the MQTT broker server.

b. MQTT Broker Port: Port number of the MQTT broker server.

c. Keep Alive: A negotiated time interval (in seconds) between the client and the Mosquitto MQTT broker to ensure that the connection remains active.

d. User ID/Password: ID and password used to access the MQTT broker.

3. Client ID / VMS ID

a. Client ID: A unique ID used by the MQTT broker to recognize and manage an individual client connection.

b. VMS ID: A unique ID that becomes part of the topic, such as `vms/[VMS_ID]/status` or `vms/[VMS_ID]/ch_n/status`.

4. Connection Test: Click the button to publish a message with the topic `vms/[VMS_ID]/status` and the message `{"status":"test"}`. - You can verify the connection using `mosquitto_sub -v -h [ADDRESS] -t "vms/#" -u [USER_ID] -P [USER_PW]`.