1-Blynk platform integration via TTI
TABLE OF CONTENTS
- 1-Blynk platform integration via TTI
- Description
- Requirement
- Configuration
- Step 1: Register a Blynk Platform Account
- Step 2: Connect the Gateway to TTN
- Step 3: Create an Application on TTN
- Step 4: Add Device on TTN
- Step 5: Create MQTT Integration on TTN
- Step 6: Create a Template on Blynk
- Step 7: Configure TTN Parameters on Blynk
- Step 8: Device Auto-Creation
- Step 9: Configure Device Template Parameters
- Step 10: Adjust Device Parameters
1-Blynk platform integration via TTI
Description
Blynk is a powerful Internet of Things (IoT) platform that supports remote control and monitoring of various smart hardware via mobile devices. Users can create interactive interfaces in the mobile app by dragging and dropping widgets to achieve real-time operation and data visualization of their devices. Blynk offers both cloud and private server deployment options, making it adaptable for different application scenarios. It is widely used in smart home systems, industrial monitoring, environmental sensing, and more. The platform supports a variety of mainstream embedded systems and communication modules, making it suitable for both beginners and professional developers to quickly build IoT prototypes.
This document mainly introduces how to integrate the UG65 gateway with the Blynk platform (via a third-party LNS, i.e., the TTN platform), and demonstrates the complete configuration process on the Blynk platform, using the AM308 device as an example to display real-time uplink data.
In addition, you can also refer to Blynk's example documentation.
Requirement
- Gateway Model: UG65 (UG56, UG67 also supported)
Sensor Model: AM308
Frequency Band: US915 (used in this demonstration)
Gateway: Must already be connected to the Internet.
Configuration
Step 1: Register a Blynk Platform Account
Visit https://blynk.cloud/dashboard/register and fill in the required information as shown below:
After setting a password, the platform will guide you to create your first Profile. Follow the steps and fill in the necessary details.
At this point, the platform account has been registered and the initial configuration is complete.
Step 2: Connect the Gateway to TTN
Since Blynk does not have built-in LNS functionality but supports TTN integration, we will use the TTN platform for connection and sensor addition.
Refer to the documentation:
<The Things Stack-Milesight Gateway Integration via Semtech Packet Forwarder>
Once configured, it should look like the screenshot below:
Step 3: Create an Application on TTN
Follow the steps shown in the image below:
Now that the Application is created, we can proceed to add our sensor device ,the AM308 used in this demo.
Step 4: Add Device on TTN
Follow the instructions as shown below:
Step by step, fill in the parameters of the AM308.
Once added, you will see the basic information of the device on TTN:
This concludes the device addition step on TTN.
Step 5: Create MQTT Integration on TTN
Follow the steps below:
After completing the setup, you will see an automatically generated Key, which is very important. Copy and save it for later use.
Example of a typical key:
NNSXS.RFW3YBYDVZQSWI62PDXFXIZETZXUHYORLRCPNLI.YY5OGALDDWUHSSNBJGHKCJPZCIESB2O5CHA7QUQY42SBPQUDPAKQ
Other important information to copy:
● Public address: nam1.cloud.thethings.network:1883
● Username: demotestonly@ttn
Now you have all necessary MQTT integration details for TTN.
Note: The key does not require additional permission configuration and can be used directly.
Step 6: Create a Template on Blynk
Create a template on the Blynk platform by following the steps shown below:
Step 7: Configure TTN Parameters on Blynk
Now you can configure the TTN parameters in Blynk.
Follow the steps shown below:
In the popup interface, fill in the parameters acquired in Step 5, in order:
After saving, a green Connected status should appear, along with the data panel as shown below:
Now your TTN parameters are successfully configured in Blynk.
Step 8: Device Auto-Creation
Go back to the TTN platform and observe the uplink data from the AM308 device. Once AM308 reports data again, Blynk will automatically create a device, as shown below:
Step 9: Configure Device Template Parameters
First, define Datastreams, as shown below:
Using humidity as an example , make sure the field names match exactly with the data structure used by AM308 in TTN.
After all fields are configured, it should look like this:
Next, continue configuring the Web Dashboard Template, following the steps below:
Continue as shown:
It should be noted that the parameter for the 1-minute Wait period should be adjusted according to the specific reporting interval of the sensor to avoid triggering false offline alerts due to device status changes.
Now the device parameters are fully configured.
Step 10: Adjust Device Parameters
To properly display the data from AM308, perform the following parameter configuration:
As shown, fill in the TheThingsStack Device ID. Wait for 3~5 minutes, then refresh the page, and you should see the real-time data from AM308:
Please note that:
● In the Devices tab, users will see either real data or the default value set in the datastream. This will only change once the datastream is updated. Simulated data is visible only in the template, not in the real device data.
● If the device is automatically onboarded via TTN integration (once data is received by TTN, the device is automatically created on the Blynk side), there is no need to fill in the TheThingsStack Device field under the Info & Metadata tab.
● However, for manual onboarding, users should create the device from a template and manually enter the TheThingsStack Device field, as described at steps 10.
● Users must decide whether to use automatic or manual onboarding and follow the respective instructions.
That’s the complete process.
-END-