This article will take the AM107 indoor ambiance sensor as an example to guide you on how to integrate Milesight IoT sensors to Ubidots via The Things Network (TTN). The following steps can be applied to all Milesight IoT LoRaWAN sensors.

Abbreviations:

  • TTN: The Things Network

Requirements

Table of Contents

  1. TTN Device Registration
  2. Add Decoder to TTN
  3. TTN-Ubidots Integration Setup
  4. Data Visualization

1. TTN Device Registration

Step 1: Go to the TTN console and enter the Gateway section to add a new LoRaWAN gateway.

IMPORTANT NOTE: Refer to How to Connect Milesight LoRaWAN gateway to TTN if you use Milesight IoT LoRaWAN gateways.

Step 2: Enter the Application section to add a new application. To create the application, just press Add application.

Step 3: Add the EUI under the Settings tab if necessary.

Step 4: Register the device, go to the Device tab. Then press Register Device to register the AM107 sensor. Device ID and device EUI are the unique identifiers for the device. App Key and App EUI are automatically assigned by TTN or can be changed as your requirements.

After registration, you can check the real-time data in the Data tab.


Step 1: Go to Application->Payload Format section to add an AM10x decoder for this application.

IMPORTANT NOTE: For more devices, please check out the decoders provided by Milesight IoT.

Step 2: Fill in the example Payload and click Test to show the JSON output.

Example:
0367EC0004685A06657C02B5095001056A2000077D1302087D02000973C627

Step 3: Click Save payload functions to save the decoder.
Step 4: Go to the Data tab, then decoded data will show in TTN.


3. TTN-Ubidots Integration Setup

Step 1: Go to the Integration tab to add a new integration. Then select the Ubidots as integration:

Step 2: Fill in the information on Integration:

  • Process ID: The unique identifier desired for the integration process.
  • Access Key: The app access key.
  • Token: Your Ubidots account token. (How to find Ubidots account token)

Step 3: Click Add Integration to save and integration will show as below:

Once a new value is received to TTN from the device, a new device will be automatically created into your Ubidots account.

4. Data Visualization

Step 1: Select the device created to verify all the variables received:

The Device name can be modified as per your requirements.

Step 2: Go to Data -> Dashboard section of your Ubidots account to create a dashboard.
Step 3: Select the plus (+) icon located a the upper right side of the page to add widgets to display your data. Learn more about Ubidots’ Dashboards

Other users also found helpful:


Did this answer your question?