Defining topics and commands
We will use commands/boards/boardname/actuators/actuatorname as the topic name to publish the commands for the actuators wired to an IoT board, where boardname must be replaced with a unique name assigned to a board and actuatorname must be replaced with a unique name assigned to an actuator. For example, if we assign inteledison01 as the name for an Intel Edison board and motor01 as the name for a motor controlled with this board, we will have to publish the commands to the commands/boards/inteledison01/actuators/motor01 topic, and the code that runs on this board will subscribe to this topic to receive messages with commands and react to them. In fact, the board can subscribe to commands/boards/inteledison01/actuators/+ ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access