O'Reilly logo

Hands-On MQTT Programming with Python by Gaston C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Defining the topics and payloads

The IoT board uses the following topic names to publish data about a specific surfboard, where surfboardname must be replaced with a unique name assigned to a surfboard:

Variable

Topic name

Status

surfboards/surfboardname/status

Speed (mph)

surfboards/surfboardname/speedmph

Altitude (feet)

surfboards/surfboardname/altitudefeet

Water temperature (degrees Fahrenheit)

surfboards/surfboardname/temperaturef

 

For example, if we assign surfboard01 as the name for the surfboard, the client that wants to receive the actual speed for the surfboard has to subscribe to the surfboards/surfboard01/speedmph topic.

The IoT board and its connected sensors are capable of distinguishing between ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required