售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
MQTT Essentials - A Lightweight IoT Protocol
MQTT Essentials - A Lightweight IoT Protocol
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Dedication
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Lightweight Messaging with MQTT 3.1.1 and Mosquitto
Understanding convenient scenarios for the MQTT protocol
Working with the publish-subscribe pattern
Working with message filtering
Understanding the MQTT puzzle -- clients, servers, and connections
Installing a Mosquitto broker on Ubuntu Linux
Installing a Mosquitto broker on macOS
Installing a Mosquitto broker on Windows
Subscribing to topics
Publishing messages
Unsubscribing from topics
Working with best practices when creating topics
Understanding wildcards
Learning about the different Quality of Service levels
Working with at least once delivery
Working with exactly once delivery
Test your knowledge
Summary
2. Securing an MQTT Mosquitto Server
Securing a Mosquitto server
Generating a private certificate authority to use TLS with Mosquitto
Creating a certificate for the Mosquitto server
Configuring TLS transport security in Mosquitto
Testing the MQTT TLS configuration with MQTT.fx
Testing the MQTT TLS configuration with MQTT-spy
Creating a certificate for each MQTT client
Configuring TLS client certificate authentication in Mosquitto
Testing the MQTT TLS client authentication with MQTT.fx
Testing the MQTT TLS configuration with MQTT-spy
Forcing the TLS protocol version
Test your knowledge
Summary
3. Controlling a Drone with Python
Understanding the requirements to control a drone with MQTT
Defining the topics and commands
Installing paho-mqtt for Python
Connecting the client to the MQTT server with Python
Understanding callbacks
Subscribing to topics with Python
Creating a class to represent a drone
Receiving messages with Python
Processing commands with Python
Sending messages with Python
Working with the network loop with Python
Test your knowledge
Summary
4. Interacting with Sensors in Java
Understanding the requirements
Defining the topics and commands
Installing the Eclipse Paho Java Client
Creating a security helper class to establish a TLS secured connection
Configuring a TLS secured connection in Java
Working with asynchronous notifications and callbacks in Java
Subscribing to topics and understanding notification events in Java
Processing commands that interact with sensors in Java
Working with last will and testament in Java
Publishing messages with commands to target sensors
Test your knowledge
Summary
5. Controlling Home Automation in JavaScript
Understanding the requirements
Defining the topics and commands to control home automation
Enabling WebSockets for a Mosquitto server
Testing WebSockets with the Eclipse Paho client JavaScript utility
Understanding the Eclipse Paho JavaScript asynchronous client
Creating an HTML 5 web page to control LEDs
Publishing messages to target remote devices in JavaScript
Processing the received messages in JavaScript
Working with WebSockets to connect to the MQTT server
Subscribing to topics in JavaScript
Processing commands that interact with LEDs in Node.js
Running the home automation web application
Debugging asynchronous code with Chrome Developer Tools (CDT) in JavaScript
Securing MQTT over WebSockets with TLS
Test your knowledge
Summary
6. Interacting with Actuators in Swift
Understanding the requirements
Defining topics and commands
Enabling connections without TLS for a Mosquitto server
Installing the CocoaMQTT client library to create a new iOS app
Building the UI for the iOS app that will control an actuator
Understanding the CocoaMQTT client in Swift 3
Connecting to the MQTT server and subscribing to topics in Swift
Publishing messages to target actuators in Swift
Processing commands that interact with actuators in Node.js
Running the iOS app that controls an actuator with MQTT
Debugging events in Swift
Test your knowledge
Summary
A. Exersise Answers
Chapter 1, Lightweight Messaging with MQTT 3.1.1 and Mosquitto
Chapter 2, Securing an MQTT Mosquitto Server
Chapter 3, Controlling a Drone with Python
Chapter 4, Interacting with Sensors in Java
Chapter 5, Controlling Home Automation in JavaScript
Chapter 6, Interacting with Actuators in Swift
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜