Skip to content
The Things Stack documentation home
Getting Started Concepts Cloud Enterprise Integrations API Hardware
Getting Started Concepts
Cloud Enterprise
Integrations API Hardware
Get The Things Stack

    Recent searches

      Popular pages

      • Getting Started
      • Adding Gateways
      • Adding Devices
      • Payload Formatters
      • Webhooks
      • Authentication

      No results for “”.

      • Check the spelling, or try fewer or more general words.
      • Ask the community on The Things Network Forum
      • Contact support
      ↑↓ to navigate ↵ to open Esc to close

      Integrations

      • Overview
      • Adding Applications
      • Data Formats
      • Payload Formatters
      • Webhooks
      • Storage Integration
      • Integrate with popular IoT platforms
        • akenza
        • AllThingsTalk Maker
        • AnyViz
        • AWS IoT
        • Azure IoT Central
        • Azure IoT Hub
        • Blockbax
        • Blynk
          • Gettings started
          • Automated Device Onboarding
          • Device Grouping
        • Cayenne
        • Cloud Studio
        • Daizy
        • Datacake
        • Delmation Products
        • deZem
        • evrlast
        • Homey
        • InfluxDB Cloud 2.0
        • IoT in a Box
        • IoT Wonderland
        • Kaa
        • Losant IoT Platform
        • MClimate
        • my IoT open Tech
        • Qubitro
        • TagoIO
        • Telemetry2U
        • Tellsens
        • thethings.iO
        • Thinger.io
        • ThingsBoard
        • ThingSpeak
        • TTN Mapper
        • Ubidots
        • UIB
        • UnaConnect
        • Widgelix
        • Withthegrid
        • Zoho IoT
      • Other integrations
      • Application Packages
      • Examples

      Gettings started

      Updated 8 September 2025 Edit on GitHub
      Copy page
      • View as MarkdownThis page as plain text
      • Open in ChatGPTAsk questions about this page
      • Open in ClaudeAsk questions about this page

      The easiest way to set up a device on Blynk is to use one already connected to The Things Stack.

      Prerequirements

      1. An application on The Things Stack server
      2. A Blynk account
      3. A connected LoRaWAN device to The Things Stack server

      Connecting your The Things Stack application to Blynk

      Start by creating a Blynk template for your device. Navigate to Blynk Console -> Developer Zone -> My Template -> + New Template. Provide a meaningful name, optionally select your hardware, and add a description. Click Done to complete the setup.

      Create the Template on Blynk

      Now that you have a template, proceed with connecting it to The Things Stack application. In the Blynk Console, go to Developer Zone -> Integrations -> The Things Stack. Click the + Add button and select the template you created earlier.

      Create the Integration on Blynk

      Next, navigate to your The Things Stack Application -> Integrations -> MQTT. Copy the Public TLS Address and paste it into the MQTT Server field on Blynk. Then, copy the Username from your The Things Stack Application and paste it into the Username field on Blynk. Finally, click Generate API Key on The Things Stack, copy the generated key, and paste it into the Password field in Blynk.

      MQTT Integration Page on The Things Stack

      Click the Connect button at the bottom of the application card on Blynk. You will see the integration status change to Connected.

      Connected Application on Blynk

      Once this is done, Blynk will automatically create the device connected to The Things Stack as soon as it sends any data. This device will then be available on the Devices page.

      Sending uplink and downlink messages

      Once your first device is connected to Blynk, it’s time to transfer some data! Start by configuring the Payload formatter on The Things Stack.

      Uplink

      For uplinks, Blynk requires the data to be in key-value pair format, where the key is either the datastream name or pin (such as v1 or a10) and the value is the datastream value. The value type must match the datastream value type! Also, prefer using only Virtual Pin, Enum and Location datastream types. Here is an example of the decoded uplink:

      {
        "temperature": 24.1,
        "humidity": 54,
        "location": [-73.935242, 40.730610]
      }
      

      In this example, Blynk will set the datastream with the name temperature to the value 24.1 and the datastream with the name humidity to the value 54 and datastream with name location to the longitude -73.935242 and latitude 40.730610 (longitude goes first).

      Note:

      Since Blynk does not support a boolean datastream value type, you must use either the Integer or Double datastream value type. The value true will be represented as 1, and false as 0.

      To create or edit datastreams, go to Blynk Console -> Developer Zone -> My Templates -> select your template -> Datastreams. Click the Edit button in the top right corner to make changes. The datastreams configuration for this example may look like this:

      Template Datastream Settings on Blynk

      Note:

      Each time Blynk receives an update from the device, it will trigger the Online lifecycle event. Therefore, it is recommended to configure a meaningful wait time to prevent your device from being stuck in the offline state.

      Downlink

      For each datastream update via the web dashboard, mobile application, automation, etc., Blynk will send a separate downlink to the device. This will trigger the encodeDownlink function of your Downlink Payload formatter. Here is an example of the downlink that Blynk will send to the device, indicating that the datastream with the name speed (pin v2) has been updated to the value 3:

      {
        "name": "speed",
        "pin": "v2",
        "ts": 1721202415068,
        "value": 3
      }
      

      The ts field represents the timestamp in Unix milliseconds format when the value was actually updated.

      Visualizing data and sending commands to the device

      After configuring the Payload Formatter on The Things Stack and setting up Datastreams in your Blynk template, you can proceed to visualize data and send commands to your device. You can do this either from the device dashboard on the Blynk Console or through the Blynk IoT Smartphone App.

      For guidance on configuring widgets for the Device Dashboard and Mobile App, refer to the Blynk documentation:

      • Web Dashboard
      • Mobile Dashboard

      Additionally, take advantage of other powerful Blynk features, such as Automations, WebHooks, and the Device HTTPS API, to build more advanced workflows.

      Also, check the System DataStreams section to grab more info from your device.

      ← Blynk Automated Device Onboarding →

      On this page

      • Prerequirements
      • Connecting your The Things Stack application to Blynk
      • Sending uplink and downlink messages
      • Visualizing data and sending commands to the device

      Sections

      Getting Started

      Concepts

      Cloud

      Enterprise

      Integrations

      API

      Hardware

      Sitemap

      View our Sitemap

      Contributing

      GitHub

      About Us

      The Things Industries

      Privacy Policy

      Cookie settings

      Cookie Settings

      We use cookies to enhance your experience, analyze site traffic and deliver personalized content. Read our Privacy Policy.

      Cookie categories