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 ...

Get Hands-On MQTT Programming with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.