The first stage of the project is to connect the RAK Wireless Wisblock sensor to the Ubidots IoT platform. The diagram below shows the setup and the data flow through the system.

WisBlock Device
WisBlock devices are the ‘lego’ of the IoT world. This tutorial uses the LPWAN (LoRaWAN) core and a temperature/humidity sensor, but there are lot of options including NB-IOT, GPS tracking and many other sensors.
- Purchase the base, core (processor block), and any sensor or I/O blocks.
- Click them together.
- Power up and start coding using the Arduino IDE.
Purchase device
The Wisblock device was purchased from the AliExpress RAK Wireless module store. It consists of:
- WisBlock Starter Kit (RAKwireless Bundle of RAK5005-O and RAK4631)
- WisBlock Temperature and Humidity Sensor (RAK1901)
Setting up Arduino IDE & programming the device
- Install and configure the Arduino IDE for use with the Wisblock.
- Flash the device with this sketch (code).
Note – I had a few issues connecting to the device and programming over USB, and these are covered in this discussion here. In summary, it is possible you may need to upgrade the bootloader to make the USB connection more reliable, but as it’s only required for programming, it’s not a showstopper if you don’t do this – you just need to be prepared to retry the upload several times.
Setting up the LoRa gateway and connecting to The Things Network (TTN)

To register the gateway on TTN, you will require the Gateway EUI. Note that the official instructions include a convoluted way of deriving the Gateway EUI from a number on the back of the gateway – this is not necessary. Simply connect to WiFi (as per the instructions above) and connect to http://192.168.4.1 from a web browser on the same LAN.
Select “I’m using the legacy packet forwarder” and enter the gateway EUI on the TTN console gateway registration page.

Once it’s connected, the gateways page will show the following next to the gateway. The EU_863_870 is the LoRaWAN region/frequency.

Node Red
If you’re new to Node Red – start here: What is Node Red?
This first tutorial installs and runs Node Red locally (on a Windows PC), following the instructions here. This is not ideal as it will only run while the PC is powered on, so in the next tutorial, we will move it to the AWS cloud.
The Node Red flows are shown graphically here:

For instructions on connecting TTN to Ubidots via Node Red, see ‘Joining the dots..’ below.
Note: For my complete flow (with node config and javascript), select Import from the top right ‘burger’ menu, and paste this flow in. It isn’t necessary to use this, but is there for reference.
If you do import this, you will of course need to set the security keys, etc to connect to your instance of TTN as per the instructions below.

It is possible to connect TTN to Ubidots directly via a TTN-Ubidots integration.
However, this tutorial connects TTN and Ubidots via Node Red. This makes it easier to see the flow of data, and is more flexible as other platforms can then also be connected via Node Red without changing the TTN configuration (as we’ll see in later tutorials).
Joining the dots..
We now need to connect everything together and start sending data to Ubidots.
- Connect Node Red to TTN via MQTT.
- Create a free Ubidots STEM account.
- Modify the format of the payload packets from the WisBlock device in to Ubidots format.
- Note that step 3 of these instructions uses the TTN-Ubidots direct integration rather than going through Node Red, so should not be used for this tutorial.
- Connect Node Red to Ubidots
To get started with the Ubidots dashboard, click the + icon in the top right corner and select the variables table (bottom right widget as shown below).

Select ‘Add Variable as row’

You should see the labels (‘label_ds’ in my case) and temperature variables. These will be created automatically when data is sent successfully from Node Red to Ubidots. Note that the variables will only be created if the format of the payload packets is as per the instructions above.

The click ‘Add column’, and select ‘Value’ as show below:

That’s it! You should now be able to see data from the WisBlock device displayed on your Ubidots dashboard.
You can now add additonal dashboard widgets as shown below:
