Sending data from the cloud to your thing
Before you begin
Ensure your thing can send information to the cloud.
For more information, see
The example below uses AWS. The current AWS interface may differ slightly from the one we used in the example.
To test that the cloud can publish information to your thing:
-
Create two subscribe topics in the module.
-
Use the cloud to publish a message to each topic.
-
Using the AWS IoT MQTT test client, select the Publish to a topic tab.
-
In the Topic name box, type:
SubscribeFromCloud0/<cloudThingName>
-
In the coding window, replace
Hello from AWS IoT console
withTurn heating on
-
Select Publish.
-
In the Publish box, type:
SubscribeFromCloud1/cloudThingName
-
In the coding window, replace
Turn heating on
withHeat for 1 hour
-
Select Publish.
View the AWS messages in the terminal emulator, in the following format:
+EMQ: <indexnumber>,<messagelength>
{
"message": "<messagetext>"
}
-
If you can see the messages in the terminal emulator, then the cloud can successfully publish data to your thing through the module.