
AT-OCS-900N
30
Device Operation
Using MQTT
The term
Internet of Things (IoT)
is used to describe devices that connect and exchange data with other devices and
systems over the Internet or other local networks. However, in order for each device to be able to communication
with one another, a communication protocol must be used. One such protocol is Message Queuing Telemetry
Transport (MQTT) and is used by the AT-OCS-900N to communicate with other devices. MQTT is a TCP-based
“subscribe and publish” protocol. A detailed explanation of the MQTT protocol is beyond the scope of this manual.
However, the illustration below shows the basic architecture.
The MQTT architecture consists of a
broker
(server) and one or more
clients
. For example. in the Figure 1.2, the
AT-OCS-900N is connected to a LAN, along with two other clients and a broker. Client A and Client B will now
subscribe to a particular
topic
, which is then published to the broker. A topic can be anything, but for this illustration,
Client A and Client B will subscribe to the “temperature” topic.
Ethernet
Topic: t
emper
atur
e
Ethernet
Topic: t
emper
atur
e
LAN
AT-OCS-900N
Client A
MQ Broker (Server)
Client B
Ethernet
Topic: t
emper
atur
e
Ethernet
Topic: t
emper
atur
e
When the AT-OCS-900N updates the topic of “temperature”, it will publish this information to the topic of
“temperature” to the broker. Since both Client A and Client B are subscribing to the topic of “temperature”,
both Client A and Client B will receive the updated temperature information.
Overview
Figure 1.2