AWS IoT Core
AWS IoT Core is a powerful offering that lets developers build device-based applications and services on the AWS Cloud. And this Integration via Helium Console automates the complexity of securely connecting your devices to AWS IoT Core.
Add an AWS IoT Core Integration
To add an AWS IoT Core Integration, go to Integrations on the left-hand menu. Select the integration to add - in this case, the AWS IoT Core integration:
The next step is to create a new user with limited permissions that this Integration will use.
Open up the AWS Console
Under the Services menu in the upper-left, go to Security, Identity, & Compliance->IAM:
We are now going to create a new User:
Set the user name to "HeliumIntegrationAccess" and select only "Programmatic access"
We now attach a policy to the newly created user that defines what permissions they hold.
Select "Attach existing policies directly" and type "AWSIoTConfigAccess" into the "Filter Policies" box and check the box to the left of the row:
Ensure you record and store these keys securely, as you will not have an opportunity to get access to them again!
Back in the Helium Console, enter the credentials we just created under AWS Connection Details, as well as the AWS region that you would like AWS IoT to run in.
The Topic field is the AWS IoT MQTT topic that this integration will publish uplink messages to, from devices.
Finally, we give our new Integration a name and click Create Integration. Your new Integration is now ready for use.
Connecting Integrations to Devices
Devices or groups of devices (via labels) can be directly connected to integrations on the Flows Worskpace. Labels are identifiers used to group devices for easy management. To connect one or more devices to one or more integrations, simply connect the Device and Integration nodes on the Flows Workspace.
Quick video tutorial connecting devices to an integration here.
Node elements (devices, labels, integrations) need to be created before they're available on the Flows Workspace. More information about Flows here.
AWS IoT MQTT Topic composition:
Device Uplink (Receive Data from Device)
This topic is defined in the Topic field when creating the AWS IoT intgeration.
Device Downlink (Send Data to Device)
AWS IoT MQTT Messages
To send data to a device, use JSON with a
payload_raw field with a base64 encoded string.
Sending Data to Device (Downlink):
When receiving data from a device, the messages will be in JSON and look like the following. The
data from the device is in the
payload field, and is a base64 encoded string.
Receiving data from Device (Uplink):
"name": "Sparkfun Pro RF",
Viewing Integration in AWS IoT Core
Once our devices have been connected on the Flows Worskpace to our new Integration, let's return to the AWS Console, and go to IoT Core under the Services menu:
Here you are able to monitor the connections to AWS:
When data comes in from the Helium Network Integration, Things will be automatically created within AWS IoT Core:
Going to Interact on the left while on a Thing takes us to a list of topics for interacting with the Thing Shadows:
To monitor in real-time what is being sent to AWS from Helium, we can open the MQTT monitor, and subscribe to a topic with "#" wildcard (to catch all messages, or use the topic we set in Helium Console if just wanting to monitor those).
The payload field is the actual data received from the device, encoded in a base64 string.
View the details of your integration by clicking on the Integration name.
Integration Details shows the integration ID that is unique to each integration, the name, the type of integration, and whether it is active or not.
Devices Piped lists all the devices that are currently sending their data to the selected integration.
Update your AWS Connection Details allows you to update your AWS connection details for the currently viewed integration.