How to integrate TagoIO with AWS IoT Core

How to integrate TagoIO with AWS IoT Core

Here is a quick tutorial showing how to add any LoRaWAN device through AWS IoT (Network Server). By following this tutorial, your setup will be ready to perform uplink operations (data from your device).
  • Official Downlink operations (data to your device) is not yet supported for this integration.

1.Getting the TagoIO Authorization

First go to your TagoIO account, and if this is your first device connected between AWS IoT and TagoIO, you will need to create an Authorization here . Copy it to use at AWS IoT later.

Note : you need to create only one Authorization for all your devices.

2. Setting up AWS Console 

Go to your AWS console and access the IoT Core service.
Here you will need to go to Acts and create a new Rule:
  • Enter a Name and Description for this new rule. (Copy the name if you are using AWS IoT LoraWAN)
  • In the following section Rule query statement you will need to create a rule for which Things and which topics you want to forward to TagoIO.
    • SELECT * FROM ‘device/+/data’” will forward all your devices that are using the topic device/assetID/data.
    • Refer to AWS Documentation for other filters you can do.
    • If you are using AWS IoT LoraWaN, you can enter any topic here. You will be able to set a topic in later step 3.
  • In Set one or more actions section, press Add Action.
  • Choose Send a message to a downstream HTTPS endpoint and press “configure action”.
  • For HTTPS Endpoint check the comments below.
  • For Confirmation URL, set it to https://awsiot.middleware.tago.io/
  • In the Headers, enter the key authorization with the value is the one you generated at Step 1 of this tutorial.

2.1 If you're using AWS IoT LoRaWAN, you only need to enther the HTTPs endpoint to https://awsiot.middleware.tago.io/uplink


2.2 If you're using AWS IoT Core Broker. When setting up the HTTPS endpoint, you will need to specify how you will be getting the Asset ID for this device. We recommend two ways, you can use your own rule as long the asset ID is sent after uplink/.

Now you can create the rule. After creating the rule, TagoIO will authorize your downstream and you should see “Enabled” in the rule list for your rule at AWS IoT.


3. AWS IoT LoraWAN Additional Steps

With your rule created at Step 2, we are assuming you’re using the endpoint for MQTT ClientID.
  • Access your Wireless Connectivity section and click on the Destinations option.
  • Click to Add a new destination.
  • Enter a Destination name and Destination description of your choice.
  • Select Enter a rule name as an option.
  • Enter the same rule name from the rule you created at step 2.
  • You can skip Rule Configuration as you already did in step 2.
  • Set the permissions or create a new service role. It will grant the permissions needed for your device to send data to TagoIO.
  • Press Add Destination and you’re done.

4. Now, you just need to start adding Device to your TagoIO account.

Go to Devices/AWS IoT, and choose the device connector from the list. Enter your asset ID - you can use the QR code to capture the EUI if needed.
Note: if the device that you are looking for connecting with TagoIO is not in the list, you can always select the Custom AWS IoT option and you can add the Parser for it later.

Done! Just turn your device and gateway on, and you will see data arriving in your account (data bucket of the device). Start building your dashboards, analysis, and actions!
If data doesn’t show up in your TagoIO account (use the Live Inspector tab in your Device to see data arriving), make sure you can see data in your AWS IoT console first, and check the keys and the configuration.