read the tutorial
Blueprint is a pre-configured template on the Blynk IoT platform, that will help you create a fully functional project in a few minutes. It already includes mobile and web dashboard UI, working firmware, and a tutorial to help you connect your device to the Blynk IoT platform and control it from the app!

On this page you can review the blueprint to have an idea of the ready project you are going to get. Sign up for a free account on the Blynk IoT platform to try it out.

SenseCAP S2120 8-in-1 Weather Sensor Blueprint Guide

The SenseCAP S2120 8-in-1 LoRaWAN Weather Sensor is a powerful device designed to measure and transmit key environmental data, including air temperature, humidity, barometric pressure, wind speed, wind direction, precipitation, solar radiation, and UV index. This guide walks you through the setup, registration on The Things Network (TTN), and integration with Blynk IoT for real-time monitoring and control.

Step 1: Unpacking and Initial Setup

1.1 Required Components

  • SenseCAP S2120 Weather Sensor
  • LoRaWAN Gateway (e.g., SenseCAP Gateway)

1.2 Initial Setup

  1. Check Package Contents: Ensure all parts are present and undamaged.
  2. Install Batteries or Power Supply: Follow the manual to correctly power up the sensor.
  3. Activate the Sensor: The LED should blink or display a status indicator showing it is ready to join the network.

Step 2: Registering the Gateway on The Things Network (TTN)

2.1 Setting Up the LoRaWAN Gateway

  1. Log in to the TTN Console.
  2. Navigate to Gateways > Add Gateway and complete the following fields:
    • Gateway EUI (from the device label)
    • Gateway ID
    • Frequency Plan matching your region (EU868, US915, etc.)
    • Click Register Gateway
  3. Follow the manufacturer’s instructions to bring the gateway online.
Gateway

2.2 Creating a New Application

  1. Log in to the TTN Console.
  2. Create an Application:
    • Navigate to Applications > Add Application.
    • Enter:
      • Application ID
      • Description
      • Handler
    • Click Create Application.
Create Application

Note: For smooth operation, it is recommended that all devices within a TTN application are of the same sensor type (e.g., SenseCAP-S2120). If you plan to use different types of sensors, consider creating a separate application for each sensor type. This helps maintain better compatibility and performance.

2.3 Setting Up the Payload Formatter in the TTN Application

  1. Open the created application and, from the left-hand menu, select Payload Formatters.
Formater
  1. Select the Uplink tab and choose Custom JavaScript Formatter.
  2. Paste the formatter code (see in the Blynk.Console) and click Save Change.
  3. Then, switch to the Downlink tab and choose Custom JavaScript Formatter.
  4. Paste the downlink formatter code (see in the Blynk.Console, and click Save Changes

2.4 Pairing the Sensor with the SenseCAP Mate App

  1. Download and install the SenseCAP Mate App.
  2. Connect the Sensor to the App:
    • After installing the battery, the red LED will remain steady. Activate Bluetooth by pressing and holding the button for 3 seconds; the LED will flash at a 1-second interval.
    • Tap Setup to enable Bluetooth, then tap Scan to search for the sensor.
    • Enter the pairing password
    • Select the sensor by its BT ID (found on the bottom label). The sensor’s basic info will appear once connected.
Setup dev via app
  1. Configure Parameters:
    • SenseCAP S2120 weather stations support 7 frequency plans in a single SKU (863–928 MHz).
    • Set the correct frequency band based on your gateway’s region.
    • Tap Settings and choose The Things Network as the platform.
    • Select the corresponding frequency plan
    • Configure OTAA parameters:
      • DevEUI: Use the default (from the sensor label).
      • AppEUI: 16 hex characters.
      • AppKey: 32 hex characters.
    • Tap Send to apply settings.
    • Tap Home to disconnect Bluetooth. The sensor will reboot; its LED will flash like a breathing light.
Finish setup

2.5 Configuring MQTT Integration in TTN

  1. Open your application in the TTN Console.
  2. Navigate to Integrations and select MQTT.
  3. Collect the required data for Blynk:
    • Server Address
    • Port
    • Username
    • Password: Click Generate new API key and save the key securely.
TTN integration

Step 3: Integrating TTN with Blynk

3.1 Configuring Blynk Integration via MQTT

  1. Click Use Blueprint at the top of the blueprint page.
  2. Set up MQTT in Blynk:
    • Go to Developer ZoneIntegrationsThe Things StackAdd
    • Choose the template: SenseCAP-S2120
Add
  • Fill in:
    • Hostname
    • Username
    • Password: Use the generated API key.
  • Click Connect
Connect

Step 4: Adding the Sensor as an End Device in TTN console

  1. Open the TTN console, select your application (created in step 2.2) and click Register End Device.
  2. From the LoRaWAN Device Repository:
    • Brand: SenseCAP
    • Model: S2120 8-in-1 LoRaWAN® Weather Sensor
    • Hardware/Firmware Version: Use the latest version if unsure
    • Profile/Region: Based on SenseCAP Mate or the Frequency Plan table above
End dev
  1. Enter:
    • DevEUI, JoinEUI (AppEUI), and AppKey from Step 2.3
    • A unique End Device ID
  2. Click Register Device
End dev

Step 5: Onboarding the Sensor to Blynk

You can onboard the sensor in two ways:

  1. Automatic Device Creation – Recommended As soon as the sensor sends data to TTN, it will automatically appear on the Blynk Cloud.
  2. Manual Device Creation – If Something Goes Wrong
    • Navigate to DevicesCreate Device, and select the SenseCAP-S2120 template.
    • In the Info & Metadata tab, enter the TheThingsNetwork Device field using the device name from TTN.
TTN-dev

TTN-dev

TTN-dev

Step 6: Monitoring and Analyzing Data

6.1 Dashboard Overview

The preconfigured dashboard supports both web and mobile apps.

Dashboard

WidgetVirtual PinUnitAir TemperatureV1°CAir HumidityV0%Barometric PressureV2PaWind SpeedV13m/sWind DirectionV12°PrecipitationV9mm/hUV IndexV11IndexLight IntensityV7luxBattery LevelV3%

6.2 Device Details Tab

Dashboard

WidgetVirtual PinDescriptionBattery LevelV3Remaining battery percentageGPS IntervalV5Reporting interval (if applicable)Measurement IntervalV8Current interval in secondsSet IntervalV8Dropdown to update intervalFirmware VersionV4Version stringHardware VersionV6Version stringReboot DeviceV10Remote reboot toggle

Step 7: Alerts & Automations

  1. In the Blynk Console, open Automations.
  2. Create triggers based on Device State or Sensor Value.
    • Example:UV Index > 6 → Send notification
    • Example: Wind Speed > 10 m/s → Update dashboard label

Step 8: Adding Location in Blynk

  1. Navigate to the Location section in Blynk.
  2. Enter the address or drag the map pin to the correct location.
Location
  1. Click Save.
  2. In the device's Info & Metadata, assign the saved location.
Location

Step 9: Error Handling and Troubleshooting

9.1 Common Issues

  • Sensor Not Responding: Check battery orientation and charge. Try a reset.
  • No Connectivity: Recheck gateway setup and frequency plan.
  • Missing Data: Update your Payload Formatter in TTN’s Uplink/Downlink settings.

Next Steps

More pre-built IoT projects

Need an IoT solution for your business?

Contact us for a free consultation with our engineers and IoT business experts