heat index monitoring with rak wisblock and blues notecard

Rising global temperatures driven by climate change are intensifying summer heat waves and increasing health risks worldwide. Many regions are already experiencing dangerous spikes in heat, underscoring the need for reliable monitoring and timely alerts. Tracking temperature and related environmental data is critical to safeguarding public health and supporting effective responses.

This guide introduces a monitoring system that uses a sensor capable of measuring temperature, humidity, and barometric pressure. The collected data is transmitted to the cloud using two of the most widely adopted IoT communication protocols: LoRaWAN and NB-IoT/LTE Cat-1. 

The result is a system that enables continuous monitoring and provides a foundation for developing real-time alerts when environmental conditions reach hazardous levels.

Heat Index Monitor Solution
Figure 1: Heat Index Monitor Solution

Use Case

This project demonstrates a real-world scenario for environmental monitoring. It replicates a solution originally developed in the Blues Wireless Accelerator, designed to transmit heat index measurements from outdoor conditions to the cloud and trigger alerts when values fall outside acceptable ranges.

Originally implemented with Zephyr, the project showcased an advanced approach to embedded development. For this guide, the implementation is simplified by using Arduino and PlatformIO tools, which make the solution faster and easier to program.

Implementation steps follow the structure outlined in the official repository, beginning with the hardware configuration shown in Figure 4.

Requirements

Necessary Hardware

Necessary Hardware
Figure 2: Necessary Hardware 


Gateway

Back-End Services 

Hardware Connection

The hardware adopts a modular approach provided by WisBlock. The complete firmware is developed and available in the official GitHub repository, and the IoT data visualization platforms are cloud-ready. Additionally, we will replicate the project developed by Blues Wireless by using JSON data to access the information.

Connecting the WisBlock elements is straightforward:

  1. Plug the core module into the core slot and the RAK1906 sensor into Sensor Slot A. In this guide, we use the RAK19007 baseboard, but you may also select another WisBlock baseboard if preferred.

  2. The Blues Notecard can be connected via the WisBlock Blues Carrier Module to the baseboard's IO slots.

  3. Finally, connect the antennas to the Notecard and the LoRa antenna to the RAK4631. To prepare your product for deployment, you can use the WisBlock enclosure designed for this purpose.

Final project installation view
Figure 3: Final project installation view

 

Now that the devices are connected, you can begin programming. 

⚠️
IMPORTANT

The Notecard requires a peak current of 2 A to send data. The VDD pin of the WisBlock cannot provide this current, so it is recommended to use a battery or connect an additional USB cable to the Notecard during your project testing.

Blues Hardware Assembly

After completing the instructions outlined in the hardware configuration and uploading the code provided by Blues on GitHub to the Notecard, the final assembly is shown in the image below:

Final Result Blues Wireless Version
Figure 4: Final Result Blues Wireless Version

Firmware Development

The code can be downloaded from our official GitHub repository. It was developed using Visual Studio Code and PlatformIO, which are two widely used tools for programming firmware. 

In case the libraries are not available on PlatformIO, you can download them from the following sources:

If you need more information about how to configure and code your WisBlock setup with PlatformIO, check the following guide for Setting up WisBlock on PlatformIO

Sending Data to the Cloud

LoRaWAN communication

The process of communicating with end devices via LoRaWAN networks can be accomplished through a public network, such as Helium, or by setting up your own network using a LoRaWAN gateway. In this instance, configure the second option. For this process, you will need:

This process is straightforward and can be completed in just a few minutes. For a step-by-step configuration guide, refer to the RAK7268V2 gateway documentation.

After the successful configuration and connection of the gateway to the TTN LNS, use the given payload decoder.

TTN Payload Decoder
async function formatPayload(args){

    var ubidots_payload = {};
    
    // Log received data for debugging purposes:
    // console.log(JSON.stringify(args));
    // Get RSSI and SNR variables using gateways data:
    var gateways = args['uplink_message']['rx_metadata'];
    for (const i in gateways) {  

      // Get gateway EUI and name

      var gw = gateways[i];
      var gw_eui = gw['gateway_ids']['eui'];
      var gw_id = gw['gateway_ids']['gateway_id'];

      // Build RSSI and SNR variables

      ubidots_payload['rssi-' + gw_id] = {
        "value": gw['rssi'],
        "context": {
          "channel_index": gw['channel_index'],
          "channel_rssi": gw['channel_rssi'],
          "gw_eui": gw_eui,
          "gw_id": gw_id,
          "uplink_token": gw['uplink_token']
        }
      }
      ubidots_payload['snr-' + gw_id] = gw['snr'];
  
    }
   

    // Get Fcnt and Port variables:

    ubidots_payload['f_cnt'] = args['uplink_message']['f_cnt'];
    ubidots_payload['f_port'] = args['uplink_message']['f_port'];

    
    // Get uplink's timestamp

    ubidots_payload['timestamp'] = new Date(args['uplink_message']['received_at']).getTime(); 
  
    // If you're already decoding in TTS using payload formatters, 
    // then uncomment the following line to use "uplink_message.decoded_payload".
    // PROTIP: Make sure the incoming decoded payload is an Ubidots-compatible JSON (See https://ubidots.com/docs/hw/#sending-data)
    // var decoded_payload = args['uplink_message']['decoded_payload'];

    // By default, this plugin uses "uplink_message.frm_payload" and sends it to the decoding function "decodeUplink".
    // For more vendor-specific decoders, check out https://github.com/TheThingsNetwork/lorawan-devices/tree/master/vendor

    let bytes =  Buffer.from(args['uplink_message']['frm_payload'], 'base64');
    var decoded_payload = decodeUplink(bytes)['data'];

    // Merge decoded payload into Ubidots payload
    Object.assign(ubidots_payload, decoded_payload);
    return ubidots_payload
  }
 
  function decodeUplink(bytes) {

    // Decoder for the RAK1906 WisBlock Environmental Sensor (https://store.rakwireless.com/products/rak1906-bme680-environment-sensor)

    var decoded = {};

    if (bytes[0] == 1) {

        // If received data is of Environment Monitoring type
        decoded.air_humidity = (bytes[0] << 8 | (bytes[1])) / 100;
        decoded.air_temperature = (bytes[2] << 8 | (bytes[3])) / 100;
        decoded.air_pressure = (bytes[6] |(bytes[5] << 8) | (bytes[4] << 16)) / 100;
        decoded.heat_index = (bytes[7] << 8 | (bytes[8])) / 100;
    } 
    return {"data": decoded};
  }
 
  module.exports = { formatPayload };

 

Blues Communication

Just create an account on the Notehub page and then create a new project. For a detailed guide, you can review the Blues documentation for a detailed step-by-step guide.

Ubidots Notehub JSON

🗒️
NOTE

This JSON file is used when the transmitted data is sent via the Blues Wireless hardware.

 

{

    "air_temperature": {"value": body.air_temperature},
    "air_humidity": {"value": body.air_humidity},
    "air_pressure": {"value": body.air_pressure},
    "heat_index": {"value": body.heat_index}

}

 

Ubidots Connection

  1. In the Blues accelerator, business logic is executed solely using Notehub and Notecard, making it challenging to scale the project to other networks. This limitation can complicate access for non-expert users who require information in a graphical format.

  2. We utilize Ubidots to create alarms and signals for managing the maximum and minimum data ranges. This enables users to easily adjust the data and monitor for any errors or out-of-range values. Ubidots also supports sending SMS, email, Telegram messages, and other alerts to notify users of any incident.

  3. After a simple configuration process outlined in the Ubidots guide on creating events, we set up two events: one to alert the user when environmental humidity drops below an acceptable threshold, and another for when the ambient temperature dips below a set level. In either case, the app will send an email notification to inform the user of the event.

Ubidots Events
Figure 5: Ubidots Events

 

Upon completing the Notehub and TTN integration using the Ubidots's official guides, your dashboard will look similar to Figure 6:

Ubidots Dashboard Result
Figure 6: Ubidots Dashboard Result

 

You can now send data to Ubidots using LoRaWAN or NB-IoT/BLE/Cat-1. 

Some Strengths of Working with WisBlock

Comparison Between RAKwireless and Blues Wireless
Figure 7: Comparison Between RAKwireless and Blues Wireless
  • Production-Ready: Not just a prototype, this is a finished product ready for real-world use.

  • Modular Design: Easy and fast to set up thanks to WisBlock's plug-and-play modular architecture.

  • Clean & Professional: Results in a polished and compact final product with minimal assembly.

  • Developer-Friendly Firmware: Compatible with Arduino and PlatformIO, without requiring complex IDEs.

  • Multi-Network Communication: Supports LoRaWAN and cellular (NB-IoT, LTE-M, CAT-1) connectivity.

  • Quick Integration with Dashboards: Easily connected to IoT platforms, no advanced front-end/backend coding required.

  • Space-Efficient: Small form factor ideal for installations with limited space.

  • Stock Notice: Some components in Blues' reference solution may no longer be available.

Summary

As presented in this tutorial, WisBlock is a modular hardware solution developed by RAKwireless that simplifies the development of industrial-grade IoT applications. When paired with Blues Wireless components, it enables rapid deployment without the need for a custom PCB design and offers some good features like:

  • Plug-and-Play Hardware: There's no need to design your PCBs. Simply stack the modules and go.

  • Industrial Application Ready: Designed for reliable use in professional and commercial environments.

  • Prebuilt Firmware: Core functionality is already developed and ready for deployment, saving time and effort.

  • Developer-Friendly: Works seamlessly with platforms like Arduino and PlatformIO.

 


harold-duarte.png

Harold Duarte

Harold is an electronics engineer and senior technical content writer at RAKwireless. He is passionate about learning and developing new solutions for IoT, making it #IoTMadeEasy.


Changelog

  • Version 1 - Heat Index Monitoring with RAK WisBlock and Blues Notecard
    • Author: Harold Duarte
    • Reviewer: Karla Jimenez
    • Date Published: 10/02/2025

 

Updated