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/+ to receive messages with commands for all the actuators wired to the board named inteledison01.
The commands will be sent as strings in plain English. We will have just two valid commands:
TURN ON: Turn on the actuatorTURN OFF: Turn off the...