Skip to content

OfferZen-Community/iot_robots-pub_sub_via_aws_dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

Make: IoT Robots

PubSub via AWS Dashboard

AWS IoT logo

Outcome

In performing this activity, you'll subscribe and publish to a topic on the AWS IoT Cloud dashboard, with a formatted JSON message. This message will be delivered to a message queue, and then appear in your Slack team channel.

Introduction

A message broker is a pub/sub service used to send and receive messages between devices and apps.

Each message is published to a topic, and the message broker then delivers those messages to all of the topic's subscribers. A useful analogy is a Slack channel: Each Slack channel is like a topic, and members can send (publish) messages to other members of the channel (subscribers).

PubSub flow

The messaging protocol we will be using is MQTT, specifically version 3.1.1. In more detailed activities, you will use websockets to send and receive MQTT messages, but for now you'll use the AWS IoT dashboard to communicate with the makersPrep topic we've set up.

Activity

Step 1: Sign into AWS IoT Cloud with your maker account.

Sign in page: https://offerzen-make.signin.aws.amazon.com/console Credentials: These have been mailed to you.

After logging in, ensure that you are in the Ohio region. There's a region-select dropdown next to your name in the top right of the page.

Step 2: Navigate to IoT Cloud's dashboard page.

IoT Cloud dashboard landing

Step 3: In the sidebar menu, select Test.

Step 4: Subscribe to the makersPrep topic.

Step 5: Publish a message to the makersPrep topic.

Message format: a JSON object with attributes "maker" as your AWS username, "completed_prep" as true, and an optional "message" string containing text of your choice. This will publish an MQTT message to the makersPrep topic.

If you're not sure why your message isn't working, test it with JSON lint

images/aws_iot_publish.png

Step 6: Check Slack!

If your message publishes sucessfully and contains the required data, Maker Bot on Slack will post to your team channel! 🤖🌈 If you don't see anything within a few minutes, try again or get in touch on Slack for help.

Stuck?

If you need help, contact @Dan on Make Slack.

Extra resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •