SlideShare a Scribd company logo
MQTT protocol
What is MQTT(S) ?
• Very popular in IoT devices for pub/sub data
• Open protocol and Standard ( no fees )
• Very Simple to implement as a socket TCP service
– Small devices and IoT ready sensors uses this protocol (mainly)
– Low overhead, low bandwidth use
• Robustness
– Suitable for mobile devices / unreliable connections ( QoS
selectable ,Retained messages , Last will…)
MQTT: Message Queuing Telemetry Transport
About MQTT…
• MQTT Server ( usually called “Broker”) is a
service that may run in a cloud or in your local
infrastructure.
• The server is responsible for receiving all
messages, filtering them, manage the client
connections and delivering the message to all
subscribed clients.
• The server may handle thousands of
concurrently connected MQTT clients. The
capacity depends of the service / network
capacity you hire .
MQTT Server
MQTT Server
About MQTT…
• MQTT Servers can be bridged each other
in order to exchange and grow easily.
• Devices that are connected to MQTT
server hosted in a Cloud server may
include extra integrated services
• Big Data Storage
• Analytics
• Dashboards, Reports, etc
• Notifications, alarms, events
• Machine learning
• Decisions
• Predictions…
MQTT Server
MQTT Main feature
M2M “unlimited*”
connections
Just one
connection
(to Server)
..is shared to
hundreds or
thousands*
MQTT Server
*Depends of the
Server/ cloud server
clients capacity
Some MQTT brokers
• Mosquitto (popular)
• Apache ActiveMQ
• Apollo MQTT
• JoramMQ
• RabbitMQ
• VerneMQ
• …
Performance & features comparison:
http://www.scalagent.com/IMG/pdf/Benchmark_MQTT_servers-v1-1.pdf
MQTT Basic Concepts
Find a very handful tutorial to learn about MQTT at
https://www.hivemq.com/blog/mqtt-essentials/
How does it share the data?
• All data in MQTT has to be published under a
TOPIC* in order to address to the subscribers
Tank/Pressure/#Tank/Temperature/
Publisher
Tank/Temperature/#
Subscribers
MQTT Server
MQTT pub/sub concept
*MQTT Server
Publish:
Temperature
Humidity
Subscribe:
Temperature
Humidity
Publish:
Air Pressure
Subscribe:
Fan Control
Air Pressure
Subscribe:
Fan Control
Fan Status
Temperature
Humidity
Air Pressure
Publish:
Fan Control
Publish:
Fan Status
*Server can be local
or remote (i.e. cloud
service)
Quality of Service
What is Quality of Service?
• A Sender and Receiver agrees a Quality of Service
level during publish and subscription, that guarantees
delivering / receiving a message.
• MQTT offers 3 QoS levels :
• At most once (QoS0)
• At least once (QoS1)
• Exactly once (QoS2)
MQTT Server
Qualityofservice
Last Will / Testament Message
• When a MQTT client connects to MQTT server, it may
deliver a Last Will message (LWT) that is delivered to
the other clients, when it disconnects from the
server.
• LWT message is set by the client when it connects to
server. It is specified by a <LWT Topic> & <LWT
message>. In order to receive a LWT message , a
client has to be subscribed to the LWT topic
• It may be used to notice to interested subscribers a
MQTT client connection loss.
LWT/Is_gone
MQTT Server
LWT/Is_gone
LWT/Is_gone LWT/Is_gone
Subs.LWT/
Subs.LWT/
Bye!
Retained messages
<retained>Temp/23
MQTT Server
<retained>Temp/23
23
SUSBSCRIBE
Temp/
• A retained message will be stored by the MQTT
server, even without subscribers listening.
• The server will store the last retained message ,
only one retained message per topic. New
retained message will overwrite the last one.
• In this way , the receiver will get the message
immediately after subscribing, without waiting
to publisher to send the last value
Persistent Session ( clean session)
• When a persistent session starts ,the MQTT server
stores* relevant information for the session such:
• Existence of a session , even if there are no subscriptions
• All existing subscriptions
• All messages in QoS1 /2, not confirmed by the client
• All new QoS1/2 messages, while the client missed while it was
offline
• All received QoS2 messages, which are not yet confirmed from
the client
• A MQTTclient may use a Persistent session to agree to
the Server that has to store the undelivered/
unconfirmed messages (in QoS1 and QoS2 only)
MQTT Server
Keep Alive
• A Keep Alive is a of timeout agreed from Client to
Server, when client connects to MQTT server.
• If the Server doesn’t receive any message from a
client within the Keepalive time , server will drop the
connection to the client .
• In this case , Client should connect again in order to
publish data.
• This feature helps to close automatically inactive
connections, releasing resources at the server
MQTT Server
MQTT library
Library structure
• It can be used a regular Internet Connection or a Local network
• 3 FBs ( so far) to Connect, Publish & Subscribe to a MQTT broker
Message queue / buffer
Operation concept
MQTT ServerPublish instances Subscribe Instances
MQTT Client
This method allow to queue several messages from different
datasources ( devices, variables, etc.. ) that are updated at
different timing.
MQTTPublish
Topic/Message
Publish Example
• By using a library to collect NJ data in a string variable , then
calling to a MQTTpublish instance
Message:SlaveData
SlaveData= {
"Temperature": 98.7,
"Pressure": 1568,
"PH": 7,
"Pump": true,
"Heater": false
} MQTT Server
Topic:Variables
• Temperature
• Pressure
• PH
• Pump
• heater
Subscription example
• NJ is subscribed to the topic Meteo/temperature/# from a
sensor at home:
MQTT Server
Subscriber
Publisher
Meteo/temperature/ Meteo/temperature/21.8
JSON data format
The JSON data format
• JSON (JavaScript Object Notation) is a
popular data format at IoT used for data
exchange.
• Compared to XML :
– Lightweight
– Structured for natural reading and easy parsing
The JSON data format
{
"TimeStamp":"2017-11-08T15:37:58.926Z",
"Temperature": 98.7,
"Pressure": 1568,
"Pump": true,
}
• A JSON data structure consist on one or
more pairs of names and values,
separated by comma ; and delimited by
keys {..}.
• It may include several types such
numeric, boolean, text, date,.. as an
structure
• A JSON may include a Object definition
for a key, and it may nest objects and
arrays .
{“Sensors”:
{“location”:”Bathroom”,”Measure”:88.5,”Status”:TRUE};
{“location”:”Livingroom”,”Measure”:44.5,”Status”:FALSE};
{“location”:”Bedroom”,”Measure”:32.8,”Status”:FALSE};
{“location”:”Garage”,”Measure”:66.1,”Status”:TRUE}
}
{“Process”:
{
"TimeStamp":"2017-11-08T15:37:58.926Z",
"Temperature": 98.7,
"Pressure": 1568,
"Pump": true
}
}
{ Machine:
{
Production: 55604,
Rejected: 34,
ProductionSpeed: 134,
Status:
{
OEE: 91,2,
OnProdution: TRUE,
Hours: 1255.3
}
}
}
JSON library : use it with MQTT
• MQTT protocol accept any type of data format
• However , JSON is convenient format and compatible for IoT
devices
• We made a library to convert Sysmac variables to JSON string
{
"TimeStamp":"2017-11-08T15:37:58.926Z",
"Stage":"On Preparation",
"Temperature": 98.7,
"Pressure": 1568,
"PH": 7,
"Pump": true,
"Heater": false
}
Collect data in structured way (JSON)…
…and send it by MQTT !
MQTT + JSON:
Application example
• Machine / process supervision from a
dashboard
The example below shows a conversion from variables to JSON
strings , from different datasources ( at different locations), that
are sent under MQTT Topics , and finally are shown in a
dashboard:
Movie
Other application examples
for MQTT library
Application example (1)
• Single client is connected
to a remote MQTT broker,
by using a 4G
modem/router trough
VPN connection
• Typical application for
monitoring, alarm
triggering, maintenance…
MQTT Server
MQTTPublish
Topic/Message
VPN
MQTTSubscribe
Topic/Message
3G/4G
Application example (2)
• The clients are connected
to a local MQTT broker
• The broker manages the
connections and
published messages, and
delivers to the
subscribers
Application example (3)
• In a Factory, MQTT clients shares
messages between them across the
local MQTT broker
• In addition, the broker bridges to a
external Cloud Service
• The bridged connection can be secured
from the local broker
TLS/SSL
Bridged
connection
• Two or more factories can
be connected from
bridged connections to a
global remote MQTT
broker ( cloud service).
• The global MQTT broker
can deliver a message
from any station to
another, bridging both
networks
• On the Cloud Service, we
can use the received data
for analysis, storage, etc
Questions?
Thank You !

More Related Content

What's hot (20)

PDF
An Introduction to BGP Flow Spec
ShortestPathFirst
 
PDF
OpenStack Telco Architecture: OpenStack Summit Boston 2017
Christian "kiko" Reis
 
PDF
Squid
Franck SIMON
 
PDF
DevConf 2014 Kernel Networking Walkthrough
Thomas Graf
 
PDF
Neutron packet logging framework
Vietnam Open Infrastructure User Group
 
PPTX
Room 1 - 7 - Lê Quốc Đạt - Upgrading network of Openstack to SDN with Tungste...
Vietnam Open Infrastructure User Group
 
PDF
Administration Linux ( PDFDrive ).pdf
ssuser4af92c
 
PDF
Mise en place d’un OpenVPN sous PfSense
Laouali Ibrahim bassirou Been Makao
 
PPT
2+ipt+configuring cisco-cme
Yves Jean Louis
 
PPT
ospf routing protocol
Ameer Agel
 
PPTX
Meetup 23 - 02 - OVN - The future of networking in OpenStack
Vietnam Open Infrastructure User Group
 
PDF
BlueStore, A New Storage Backend for Ceph, One Year In
Sage Weil
 
PDF
Understanding Cisco’ Next Generation SD-WAN Technology
Cisco Canada
 
PDF
[2018] 오픈스택 5년 운영의 경험
NHN FORWARD
 
PDF
DPDK & Layer 4 Packet Processing
Michelle Holley
 
PDF
Introduction to Network Performance Measurement with Cisco IOS IP Service Lev...
Cisco Canada
 
PDF
Arista Networks - Building the Next Generation Workplace and Data Center Usin...
Aruba, a Hewlett Packard Enterprise company
 
PDF
Mqtt – a protocol for the internet of things
Rahul Gupta
 
PDF
Receive side scaling (RSS) with eBPF in QEMU and virtio-net
Yan Vugenfirer
 
An Introduction to BGP Flow Spec
ShortestPathFirst
 
OpenStack Telco Architecture: OpenStack Summit Boston 2017
Christian "kiko" Reis
 
DevConf 2014 Kernel Networking Walkthrough
Thomas Graf
 
Neutron packet logging framework
Vietnam Open Infrastructure User Group
 
Room 1 - 7 - Lê Quốc Đạt - Upgrading network of Openstack to SDN with Tungste...
Vietnam Open Infrastructure User Group
 
Administration Linux ( PDFDrive ).pdf
ssuser4af92c
 
Mise en place d’un OpenVPN sous PfSense
Laouali Ibrahim bassirou Been Makao
 
2+ipt+configuring cisco-cme
Yves Jean Louis
 
ospf routing protocol
Ameer Agel
 
Meetup 23 - 02 - OVN - The future of networking in OpenStack
Vietnam Open Infrastructure User Group
 
BlueStore, A New Storage Backend for Ceph, One Year In
Sage Weil
 
Understanding Cisco’ Next Generation SD-WAN Technology
Cisco Canada
 
[2018] 오픈스택 5년 운영의 경험
NHN FORWARD
 
DPDK & Layer 4 Packet Processing
Michelle Holley
 
Introduction to Network Performance Measurement with Cisco IOS IP Service Lev...
Cisco Canada
 
Arista Networks - Building the Next Generation Workplace and Data Center Usin...
Aruba, a Hewlett Packard Enterprise company
 
Mqtt – a protocol for the internet of things
Rahul Gupta
 
Receive side scaling (RSS) with eBPF in QEMU and virtio-net
Yan Vugenfirer
 

Similar to mqtt intro short (20)

PPTX
Introduction to MQTT
EMQ
 
PPTX
AndroidThing (Internet of things)
Mayur Solanki
 
PPTX
InduSoft Web Studio and MQTT for Internet of Things Applications
AVEVA
 
PDF
1463401 rc214-mqtt-update
Eugenio Lysei
 
ODP
Mqtt
abinaya m
 
PDF
Mqtt 5 meetup dortmund
Florian Raschbichler
 
PDF
MQTT 101 - Getting started with the lightweight IoT Protocol
Christian Götz
 
PPTX
MQTT Introduction
Saipuith Reddy R K
 
PPTX
Introduction to MQ Telemetry Transport (MQTT)
Amarjeetsingh Thakur
 
PDF
MQTT in Reactive Blocks
Bitreactive
 
PPTX
MQTT(Message queuing and telemetry transport)
prashantchopra30
 
PPTX
Message queuing telemetry transport (mqtt) message format
Hamdamboy (함담보이)
 
PPTX
Where next for MQTT?
Ian Craggs
 
PDF
MQTT - Protocol for the Internet of Things
University of Pretoria
 
PPTX
An intro to MQTT
HassanHashemi11
 
PDF
Low Latency Mobile Messaging using MQTT
Henrik Sjöstrand
 
PDF
Introduction MQTT in English
Eric Xiao
 
PDF
MQTT with Java - a protocol for IoT and M2M communication
Christian Götz
 
PDF
Message queue telemetry transport protocol
DarshanGowda522726
 
Introduction to MQTT
EMQ
 
AndroidThing (Internet of things)
Mayur Solanki
 
InduSoft Web Studio and MQTT for Internet of Things Applications
AVEVA
 
1463401 rc214-mqtt-update
Eugenio Lysei
 
Mqtt
abinaya m
 
Mqtt 5 meetup dortmund
Florian Raschbichler
 
MQTT 101 - Getting started with the lightweight IoT Protocol
Christian Götz
 
MQTT Introduction
Saipuith Reddy R K
 
Introduction to MQ Telemetry Transport (MQTT)
Amarjeetsingh Thakur
 
MQTT in Reactive Blocks
Bitreactive
 
MQTT(Message queuing and telemetry transport)
prashantchopra30
 
Message queuing telemetry transport (mqtt) message format
Hamdamboy (함담보이)
 
Where next for MQTT?
Ian Craggs
 
MQTT - Protocol for the Internet of Things
University of Pretoria
 
An intro to MQTT
HassanHashemi11
 
Low Latency Mobile Messaging using MQTT
Henrik Sjöstrand
 
Introduction MQTT in English
Eric Xiao
 
MQTT with Java - a protocol for IoT and M2M communication
Christian Götz
 
Message queue telemetry transport protocol
DarshanGowda522726
 
Ad

Recently uploaded (20)

PDF
Product Management in HealthTech (Case Studies from SnappDoctor)
Hamed Shams
 
PDF
How to Connect Your On-Premises Site to AWS Using Site-to-Site VPN.pdf
Tamanna
 
PPTX
apidays Helsinki & North 2025 - From Chaos to Clarity: Designing (AI-Ready) A...
apidays
 
PDF
WEF_Future_of_Global_Fintech_Second_Edition_2025.pdf
AproximacionAlFuturo
 
PDF
Avatar for apidays apidays PRO June 07, 2025 0 5 apidays Helsinki & North 2...
apidays
 
PDF
Data Chunking Strategies for RAG in 2025.pdf
Tamanna
 
PDF
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays
 
PPTX
ER_Model_with_Diagrams_Presentation.pptx
dharaadhvaryu1992
 
PPTX
Exploring Multilingual Embeddings for Italian Semantic Search: A Pretrained a...
Sease
 
PPTX
Dr djdjjdsjsjsjsjsjsjjsjdjdjdjdjjd1.pptx
Nandy31
 
PPTX
Numbers of a nation: how we estimate population statistics | Accessible slides
Office for National Statistics
 
PPTX
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
PPTX
ER_Model_Relationship_in_DBMS_Presentation.pptx
dharaadhvaryu1992
 
PDF
Merits and Demerits of DBMS over File System & 3-Tier Architecture in DBMS
MD RIZWAN MOLLA
 
PPTX
apidays Singapore 2025 - Designing for Change, Julie Schiller (Google)
apidays
 
PDF
Context Engineering for AI Agents, approaches, memories.pdf
Tamanna
 
PDF
Copia de Strategic Roadmap Infographics by Slidesgo.pptx (1).pdf
ssuserd4c6911
 
PDF
Early_Diabetes_Detection_using_Machine_L.pdf
maria879693
 
PPTX
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
PPTX
apidays Helsinki & North 2025 - Running a Successful API Program: Best Practi...
apidays
 
Product Management in HealthTech (Case Studies from SnappDoctor)
Hamed Shams
 
How to Connect Your On-Premises Site to AWS Using Site-to-Site VPN.pdf
Tamanna
 
apidays Helsinki & North 2025 - From Chaos to Clarity: Designing (AI-Ready) A...
apidays
 
WEF_Future_of_Global_Fintech_Second_Edition_2025.pdf
AproximacionAlFuturo
 
Avatar for apidays apidays PRO June 07, 2025 0 5 apidays Helsinki & North 2...
apidays
 
Data Chunking Strategies for RAG in 2025.pdf
Tamanna
 
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays
 
ER_Model_with_Diagrams_Presentation.pptx
dharaadhvaryu1992
 
Exploring Multilingual Embeddings for Italian Semantic Search: A Pretrained a...
Sease
 
Dr djdjjdsjsjsjsjsjsjjsjdjdjdjdjjd1.pptx
Nandy31
 
Numbers of a nation: how we estimate population statistics | Accessible slides
Office for National Statistics
 
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays
 
ER_Model_Relationship_in_DBMS_Presentation.pptx
dharaadhvaryu1992
 
Merits and Demerits of DBMS over File System & 3-Tier Architecture in DBMS
MD RIZWAN MOLLA
 
apidays Singapore 2025 - Designing for Change, Julie Schiller (Google)
apidays
 
Context Engineering for AI Agents, approaches, memories.pdf
Tamanna
 
Copia de Strategic Roadmap Infographics by Slidesgo.pptx (1).pdf
ssuserd4c6911
 
Early_Diabetes_Detection_using_Machine_L.pdf
maria879693
 
Aict presentation on dpplppp sjdhfh.pptx
vabaso5932
 
apidays Helsinki & North 2025 - Running a Successful API Program: Best Practi...
apidays
 
Ad

mqtt intro short

  • 2. What is MQTT(S) ? • Very popular in IoT devices for pub/sub data • Open protocol and Standard ( no fees ) • Very Simple to implement as a socket TCP service – Small devices and IoT ready sensors uses this protocol (mainly) – Low overhead, low bandwidth use • Robustness – Suitable for mobile devices / unreliable connections ( QoS selectable ,Retained messages , Last will…) MQTT: Message Queuing Telemetry Transport
  • 3. About MQTT… • MQTT Server ( usually called “Broker”) is a service that may run in a cloud or in your local infrastructure. • The server is responsible for receiving all messages, filtering them, manage the client connections and delivering the message to all subscribed clients. • The server may handle thousands of concurrently connected MQTT clients. The capacity depends of the service / network capacity you hire . MQTT Server
  • 4. MQTT Server About MQTT… • MQTT Servers can be bridged each other in order to exchange and grow easily. • Devices that are connected to MQTT server hosted in a Cloud server may include extra integrated services • Big Data Storage • Analytics • Dashboards, Reports, etc • Notifications, alarms, events • Machine learning • Decisions • Predictions… MQTT Server
  • 5. MQTT Main feature M2M “unlimited*” connections Just one connection (to Server) ..is shared to hundreds or thousands* MQTT Server *Depends of the Server/ cloud server clients capacity
  • 6. Some MQTT brokers • Mosquitto (popular) • Apache ActiveMQ • Apollo MQTT • JoramMQ • RabbitMQ • VerneMQ • … Performance & features comparison: http://www.scalagent.com/IMG/pdf/Benchmark_MQTT_servers-v1-1.pdf
  • 7. MQTT Basic Concepts Find a very handful tutorial to learn about MQTT at https://www.hivemq.com/blog/mqtt-essentials/
  • 8. How does it share the data? • All data in MQTT has to be published under a TOPIC* in order to address to the subscribers Tank/Pressure/#Tank/Temperature/ Publisher Tank/Temperature/# Subscribers MQTT Server
  • 9. MQTT pub/sub concept *MQTT Server Publish: Temperature Humidity Subscribe: Temperature Humidity Publish: Air Pressure Subscribe: Fan Control Air Pressure Subscribe: Fan Control Fan Status Temperature Humidity Air Pressure Publish: Fan Control Publish: Fan Status *Server can be local or remote (i.e. cloud service)
  • 10. Quality of Service What is Quality of Service? • A Sender and Receiver agrees a Quality of Service level during publish and subscription, that guarantees delivering / receiving a message. • MQTT offers 3 QoS levels : • At most once (QoS0) • At least once (QoS1) • Exactly once (QoS2) MQTT Server Qualityofservice
  • 11. Last Will / Testament Message • When a MQTT client connects to MQTT server, it may deliver a Last Will message (LWT) that is delivered to the other clients, when it disconnects from the server. • LWT message is set by the client when it connects to server. It is specified by a <LWT Topic> & <LWT message>. In order to receive a LWT message , a client has to be subscribed to the LWT topic • It may be used to notice to interested subscribers a MQTT client connection loss. LWT/Is_gone MQTT Server LWT/Is_gone LWT/Is_gone LWT/Is_gone Subs.LWT/ Subs.LWT/ Bye!
  • 12. Retained messages <retained>Temp/23 MQTT Server <retained>Temp/23 23 SUSBSCRIBE Temp/ • A retained message will be stored by the MQTT server, even without subscribers listening. • The server will store the last retained message , only one retained message per topic. New retained message will overwrite the last one. • In this way , the receiver will get the message immediately after subscribing, without waiting to publisher to send the last value
  • 13. Persistent Session ( clean session) • When a persistent session starts ,the MQTT server stores* relevant information for the session such: • Existence of a session , even if there are no subscriptions • All existing subscriptions • All messages in QoS1 /2, not confirmed by the client • All new QoS1/2 messages, while the client missed while it was offline • All received QoS2 messages, which are not yet confirmed from the client • A MQTTclient may use a Persistent session to agree to the Server that has to store the undelivered/ unconfirmed messages (in QoS1 and QoS2 only) MQTT Server
  • 14. Keep Alive • A Keep Alive is a of timeout agreed from Client to Server, when client connects to MQTT server. • If the Server doesn’t receive any message from a client within the Keepalive time , server will drop the connection to the client . • In this case , Client should connect again in order to publish data. • This feature helps to close automatically inactive connections, releasing resources at the server MQTT Server
  • 16. Library structure • It can be used a regular Internet Connection or a Local network • 3 FBs ( so far) to Connect, Publish & Subscribe to a MQTT broker
  • 17. Message queue / buffer Operation concept MQTT ServerPublish instances Subscribe Instances MQTT Client This method allow to queue several messages from different datasources ( devices, variables, etc.. ) that are updated at different timing.
  • 18. MQTTPublish Topic/Message Publish Example • By using a library to collect NJ data in a string variable , then calling to a MQTTpublish instance Message:SlaveData SlaveData= { "Temperature": 98.7, "Pressure": 1568, "PH": 7, "Pump": true, "Heater": false } MQTT Server Topic:Variables • Temperature • Pressure • PH • Pump • heater
  • 19. Subscription example • NJ is subscribed to the topic Meteo/temperature/# from a sensor at home: MQTT Server Subscriber Publisher Meteo/temperature/ Meteo/temperature/21.8
  • 21. The JSON data format • JSON (JavaScript Object Notation) is a popular data format at IoT used for data exchange. • Compared to XML : – Lightweight – Structured for natural reading and easy parsing
  • 22. The JSON data format { "TimeStamp":"2017-11-08T15:37:58.926Z", "Temperature": 98.7, "Pressure": 1568, "Pump": true, } • A JSON data structure consist on one or more pairs of names and values, separated by comma ; and delimited by keys {..}. • It may include several types such numeric, boolean, text, date,.. as an structure • A JSON may include a Object definition for a key, and it may nest objects and arrays . {“Sensors”: {“location”:”Bathroom”,”Measure”:88.5,”Status”:TRUE}; {“location”:”Livingroom”,”Measure”:44.5,”Status”:FALSE}; {“location”:”Bedroom”,”Measure”:32.8,”Status”:FALSE}; {“location”:”Garage”,”Measure”:66.1,”Status”:TRUE} } {“Process”: { "TimeStamp":"2017-11-08T15:37:58.926Z", "Temperature": 98.7, "Pressure": 1568, "Pump": true } } { Machine: { Production: 55604, Rejected: 34, ProductionSpeed: 134, Status: { OEE: 91,2, OnProdution: TRUE, Hours: 1255.3 } } }
  • 23. JSON library : use it with MQTT • MQTT protocol accept any type of data format • However , JSON is convenient format and compatible for IoT devices • We made a library to convert Sysmac variables to JSON string { "TimeStamp":"2017-11-08T15:37:58.926Z", "Stage":"On Preparation", "Temperature": 98.7, "Pressure": 1568, "PH": 7, "Pump": true, "Heater": false }
  • 24. Collect data in structured way (JSON)… …and send it by MQTT !
  • 25. MQTT + JSON: Application example • Machine / process supervision from a dashboard
  • 26. The example below shows a conversion from variables to JSON strings , from different datasources ( at different locations), that are sent under MQTT Topics , and finally are shown in a dashboard:
  • 27. Movie
  • 29. Application example (1) • Single client is connected to a remote MQTT broker, by using a 4G modem/router trough VPN connection • Typical application for monitoring, alarm triggering, maintenance… MQTT Server MQTTPublish Topic/Message VPN MQTTSubscribe Topic/Message 3G/4G
  • 30. Application example (2) • The clients are connected to a local MQTT broker • The broker manages the connections and published messages, and delivers to the subscribers
  • 31. Application example (3) • In a Factory, MQTT clients shares messages between them across the local MQTT broker • In addition, the broker bridges to a external Cloud Service • The bridged connection can be secured from the local broker
  • 32. TLS/SSL Bridged connection • Two or more factories can be connected from bridged connections to a global remote MQTT broker ( cloud service). • The global MQTT broker can deliver a message from any station to another, bridging both networks • On the Cloud Service, we can use the received data for analysis, storage, etc

Editor's Notes

  • #3: MC + PLC All in one