MQTT Essentials - A Lightweight IoT Protocol
eBook - ePub

MQTT Essentials - A Lightweight IoT Protocol

Gaston C. Hillar

Share book
  1. 280 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

MQTT Essentials - A Lightweight IoT Protocol

Gaston C. Hillar

Book details
Book preview
Table of contents
Citations

About This Book

Send and receive messages with the MQTT protocol for your IoT solutions.About This Book• Make your connected devices less prone to attackers by understanding practical security mechanisms• Dive deep into one of IoT's extremely lightweight machines to enable connectivity protocol with some real-world examples• Learn to take advantage of the features included in MQTT for IoT and Machine-to-Machine communications with complete real-life examplesWho This Book Is ForThis book is a great resource for developers who want to learn more about the MQTT protocol to apply it to their individual IoT projects. Prior knowledge of working with IoT devices is essential.What You Will Learn• Understand how MQTTv3.1 and v3.1.1 works in detail• Install and secure a Mosquitto MQTT broker by following best practices• Design and develop IoT solutions combined with mobile and web apps that use MQTT messages to communicate• Explore the features included in MQTT for IoT and Machine-to-Machine communications• Publish and receive MQTT messages with Python, Java, Swift, JavaScript, and Node.js• Implement the security best practices while setting up the MQTT Mosquitto brokerIn DetailThis step-by-step guide will help you gain a deep understanding of the lightweight MQTT protocol. We'll begin with the specific vocabulary of MQTT and its working modes, followed by installing a Mosquitto MQTT broker. Then, you will use best practices to secure the MQTT Mosquitto broker to ensure that only authorized clients are able to publish and receive messages. Once you have secured the broker with the appropriate configuration, you will develop a solution that controls a drone with Python.Further on, you will use Python on a Raspberry Pi 3 board to process commands and Python on Intel Boards (Joule, Edison and Galileo). You will then connect to the MQTT broker, subscribe to topics, send messages, and receive messages in Python. You will also develop a solution that interacts with sensors in Java by working with MQTT messages.Moving forward, you will work with an asynchronous API with callbacks to make the sensors interact with MQTT messages. Following the same process, you will develop an iOS app with Swift 3, build a website that uses WebSockets to connect to the MQTT broker, and control home automation devices with HTML5, JavaScript code, Node.js and MQTT messagesStyle and approachThis step-by-step guide describes the MQTT protocol for your IoT projects

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is MQTT Essentials - A Lightweight IoT Protocol an online PDF/ePUB?
Yes, you can access MQTT Essentials - A Lightweight IoT Protocol by Gaston C. Hillar in PDF and/or ePUB format, as well as other popular books in Informatique & Réseaux informatiques. We have over one million books available in our catalogue for you to explore.

Information

Year
2017
ISBN
9781787285149

MQTT Essentials - A Lightweight IoT Protocol


MQTT Essentials - A Lightweight IoT Protocol

Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2017
Production reference: 1050417
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78728-781-5
www.packtpub.com

Credits

Author
Gastón C. Hillar
Copy Editor
Muktikant Garimella
Reviewer
Ben Howes
Project Coordinator
Ulhas Kambali
Commissioning Editor
Smeet Thakkar
Proofreader
Safis Editing
Acquisition Editor
Reshma Raman
Indexer
Aishwarya Gangawane
Content Development Editor
Vikas Tiwari
Graphics
Abhinash Sahu
Technical Editor
Jijo Maliyekal
Production Coordinator
Arvindkumar Gupta

About the Author

Gastón C. Hillar is Italian and has been working with computers since he was eight. He began programming with the legendary Texas TI-99/4A and Commodore 64 home computers in the early 80s. He has a bachelor's degree in computer science (graduated with honors), and an MBA (graduated with an outstanding thesis). At present, Gastón is an independent IT consultant and freelance author who is always looking for new adventures around the world.
He has been a senior contributing editor at Dr. Dobb’s and has written more than a hundred articles on software development topics. Gastón was also a former Microsoft MVP in technical computing. He has received the prestigious Intel® Black Belt Software Developer award eight times.
He is a guest blogger at Intel® Software Network (http://software.intel.com). You can reach him at [email protected] and follow him on Twitter at http://twitter.com/gastonhillar. Gastón’s blog is http://csharpmulticore.blogspot.com.
He lives with his wife, Vanesa, and his two sons, Kevin and Brandon.

Acknowledgment

At the time of writing this book, I was fortunate to work with an excellent team at Packt Publishing, whose contributions vastly improved the presentation of this book. Reshma Raman allowed me to provide her ideas for a book dedicated to MQTT, and I jumped into the exciting project of teaching the features of one of the most important protocols for IoT projects with examples in many different programming languages. Vikas Tiwari helped me realize my vision for this book and provided many sensible suggestions regarding the text, the format, and the flow. The reader will notice his great work. It’s been great working with Reshma and Vikas in another project and I can’t wait to work with them again. I would like to thank my technical reviewers and proofreaders for their thorough reviews and insightful comments. I was able to incorporate some of the knowledge and wisdom they have gained in their many years in the software development industry. This book was possible because they gave valuable feedback.
The entire process of writing a book requires a huge number of lonely hours. I wouldn’t be able to write an entire book without dedicating some time to play soccer against my sons, Kevin and Brandon, and my nephew, Nicolas. Of course, I never won a match. However, I did score a few goals.

About the Reviewer

Ben Howes is the founder and lead consultant at Zoetrope Ltd, a specialist IoT consultancy and product development firm in the UK. Ben has been creating connected hardware for over 10 years and has worked across projects spanning from start-ups to multinational deployments.
I’d like to thank Richard Webb, my co-founder, for starting Zoetrope with me.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
www.PacktPub.com
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

  • Fully searchable across every book published by Packt
  • Copy and paste, print, and bookmark content
  • On demand and accessible via a web browser

Customer Feedback

Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1787287815.
If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!

Dedication

To my sons, Kevin and Brandon, and my wife, Vanesa

Preface

MQTT is the preferred IoT publish-subscribe lightweight messaging protocol. If you develop IoT, web applications, mobile apps, or a combination of these solutions, you must learn how MQTT and its lightweight messaging system work. Of course, it is extremely important to take security into account when working with this protocol.
Most of the times, when you work with IoT solutions, you won’t be using a single programming language. Instead, you will use a combination of different programming languages and code running on different IoT boards that might use diverse operating systems. MQTT has its own specific vocabulary and different working modes. Learning MQTT is challenging because it includes too many abstract concepts that require real-life examples to be easy to understand.
This book will allow you to dive deep into the latest version of the MQTT protocol: 3.1.1. You will learn to work with Mosquitto MQTT server, command-line tools, and GUI tools to allow you to understand how everything works with MQTT and the possibilities that this protocol provides for your projects. You will learn security best practices and you will use them for a Mosquitto MQTT server.
This book will provide you with examples in the following programming languages, which are extremely popular in IoT, web applications, and mobile apps: Python, Java, HTML 5, JavaScript, Node.js, and Swift 3. You will control a drone, interact with sensors, control home automation, and interact with actuators by exchanging MQTT messages with the different programming languages and client libraries....

Table of contents