Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Industrial Internet of Things

You're reading from   Hands-On Industrial Internet of Things Create a powerful Industrial IoT infrastructure using Industry 4.0

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781789537222
Length 556 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Antonio Capasso Antonio Capasso
Author Profile Icon Antonio Capasso
Antonio Capasso
Giacomo Veneri Giacomo Veneri
Author Profile Icon Giacomo Veneri
Giacomo Veneri
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Introduction to Industrial IoT 2. Understanding the Industrial Process and Devices FREE CHAPTER 3. Industrial Data Flow and Devices 4. Implementing the Industrial IoT Data Flow 5. Applying Cybersecurity 6. Performing an Exercise Based on Industrial Protocols and Standards 7. Developing Industrial IoT and Architecture 8. Implementing a Custom Industrial IoT Platform 9. Understanding Industrial OEM Platforms 10. Implementing a Cloud Industrial IoT Solution with AWS 11. Implementing a Cloud Industrial IoT Solution with Google Cloud 12. Performing a Practical Industrial IoT Solution with Azure 13. Understanding Diagnostics, Maintenance, and Predictive Analytics 14. Implementing a Digital Twin – Advanced Analytics 15. Deploying Analytics on an IoT Platform 16. Assessment 17. Other Books You May Enjoy

Mosquitto as MQTT connector

To install Mosquitto, we can follow the instructions from https://mosquitto.org/download/, or we can use Docker as usual.

  1. From the command console, run the following command:
$ docker run -it -p 1883:1883 -p 9001:9001 eclipse-mosquitto
  1. We are going to deploy the official Mosquito distribution, so we can test our MQTT broker. We need to install an MQTT client. Run the following command with an administrative user:
$ npm install mqtt-cli -g
  1. Subscribe to a topic as follows:
$ mqtt-cli localhost topic/hello payload -w
  1. Publish our first message as follows:
$ mqtt-cli localhost topic/hello "Test hello message"

The outcome should look like this:

$ mqtt-cli localhost topic/hello payload -w
Topic: topic/hello Message: payload
Topic: topic/hello Message: Test hello message
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime