Notes for CloudStudio
Table of Contents:
- 1. Introduction
- 2. Prerequisites
- 3. Register the Device in The Things Network (TTN)
- 4. Create the integration between TTN and Cloud Studio IoT
- 5. Configure Payload Decoding
- 6. Create a Dashboard
- 7. Send downlink messages
- 8. Verification
- 9. Troubleshooting
1. Introduction
This guide provides step-by-step instructions for integrating Dragino LoRaWAN devices with the Cloud Studio IoT platform using The Things Network (TTN) as the network server.Cloud Studio IoT supports other LoRaWAN network servers like ChirpStack, Loriot, AWS IoT, Actility, Helium, and Orbiwise as well.
2. Prerequisites
Before starting, ensure you have:
- A Dragino LoRaWAN device (e.g., LHT65N, S31-LB, PS-LB, etc.).
- An account on The Things Network (TTN).
- An account on Cloud Studio IoT.
3. Register the Device in The Things Network (TTN)
3.1 Create an Application in TTN
You must first have an account in The Things Network (TTN). Once logged in, the first step is to create an application in TTN. This creates a space where your devices will be grouped.
Step 1:
Log in to your TTN Console.
Navigate to Applications in the left menu and click Add application.
Step 2:
Fill in the required fields and click Create Application.
3.2 Register your Dragino device
This is a virtual representation in TTN of the physical device you want to integrate.
Step 1:
In your TTN application, go to End devices and click Register end device.
You can add your device in two ways:
- Selecting it from the repository (brand, model, hardware version, firmware version, and profile region)
- Adding it manually (If your device is not listed, enter the details manually (requires correct frequency plan and LoRaWAN version).
For this example, we will select it from the repository.
Step 2:
Each Dragino device is shipped with a sticker, and all required credentials are printed on it.
Further down, you'll need to enter the JoinEUI — a unique identifier provided by the manufacturer, used for OTAA (over-the-air activation), the process by which the device joins the LoRaWAN network.
Step 3:
When you click Confirm, you will see additional fields to complete:
JoinEUI: AppEUI on the sticker.
AppKey: Used for OTAA activation.
End device ID: Created by you to identify the device in the application.
Label: Optional; for grouping devices by tags.
Click Register end device.
Step 4: Power on the device and verify that it sends data by checking Live Data in TTN.
Once created, you can power on the device and check if it's sending LoRaWAN data. TTN should display the received packets under Live Data.
4. Create the integration between TTN and Cloud Studio IoT
This step allows TTN to forward the received data to Cloud Studio IoT.
4.1 Set Up a Webhook in TTN
Step 1: In your TTN application, go to Webhooks and click "Add webhook".
Select Cloud Studio IoT from the list of available webhooks.
Step 2: Enter the Access Token (generated in Cloud Studio IoT) to authorize data forwarding.
You will then need to enter the Access token — provided by Cloud Studio IoT — which authorizes TTN to send data to your Cloud Studio account.
After generating the token in Cloud Studio IoT, paste it into the corresponding field in TTN when creating the webhook.
Click Create Cloud Studio webhook.
4.2 Add the Device in Cloud Studio IoT
Step 1: Navigate to Manager and add the device.
In the Cloud Studio IoT application (Gear), under Manager, add the device:
- Enter the DevEUI you registered in TTN.
- Fill in Latitude and Longitude to visualize the device on the Cloud Studio IoT map.
Step 2:
You can now verify that:
- The LoRaWAN device is sending uplink data to TTN (uplink_message events under Live Data).
- TTN is forwarding data to Cloud Studio IoT via the webhook.
In Cloud Studio IoT, go to Devices → Real-time log to see messages received from TTN.
Another situation
If your device model is not already registered in Cloud Studio IoT, you can add it by:
- Clicking Add, entering the brand, model, and optionally attaching an image.
- Choosing an icon and clicking Save.
5. Configure Payload Decoding
Next, configure the configuration script and payload converter script:
- Edit the device
- Go to Scripts
- Under each script type, click View more to enter the corresponding JavaScript code.
6. Create a Dashboard
Cloud Studio IoT offers many widget styles for data visualization.
To create a dashboard:
- Go to Dashboards → Add dashboard
- Fill in the required fields
- Add widgets of your choice from the catalog
Example: A basic visualization of a Dragino LHT65.
7. Send downlink messages
To send manual downlinks from Cloud Studio IoT to your Dragino:
Go to Devices, select your Dragino, click the three vertical dots, then Edit.
In the Commands tab:
Command ID: Logical port where your device listens (usually in the datasheet or payload decoder, as f_port).
Note: Dragino devices support receiving downlinks on any port, but in principle should avoid using the same ports reserved for uplink data transmission - check device manual for uplink port assignments.
CommandData: Payload to send (typically in hexadecimal format; refer to the Dragino device manual for supported downlink commands).
8. Verification
Ensure successful integration by checking:
- TTN Live Data: Confirm uplink messages from the Dragino device.
- Cloud Studio IoT Real-time Log: Verify received data under Devices → Real-time log.
- Dashboard: Confirm widgets display correct sensor readings.
9. Troubleshooting