Skip to main content

ThingsBoard Integration

How to connect Industrial Raspberry Pi EG500 to ThingsBoard

Introduction

Elastel EG500 is an Industrial Edge Computing Gateway powered by Raspberry Pi CM4. Designed for IIoT applications, it features:

  • Industrial Interfaces: 2× GbE, 2× USB, 1× RS485, 1× RS232, 6× DI, 6× DO, and 3× ADC
  • Connectivity Options: 4G, LoRa, Wi-Fi/BLE, WiFi HaLow (802.11ah WiFi)
  • Enclosure: Truly IPC-grade stability and ruggedness

Perfect for use as an IoT Gateway, data acquisition device, Industrial Controller, or for Edge Computing applications.

In this tutorial we will use Elastel EG500 as edge gateway to collect data from RS485 Modbus temperature & humidity sensor, also collect the DI status value and control the DO on/off which wiring a LED light. EG500 will connect to ThingsBoard for data visualizing and controlling the LED.


Prerequisites

To continue with this guide, we will require the following items:

  • An Elastel EG500 device
  • An RS485 Modbus Temperature & Humidity sensor
  • A LED light
  • A ThingsBoard Demo account or your own ThingsBoard CE instance

Wiring Scheme

wiring1 wiring2


Create Device on ThingsBoard

1. Login at ThingsBoard Cloud

thingsboard_login

Note

you can also use your self-managed ThingsBoard CE platform. Check the https://data.elastel.com for reference.

2. Create a device on ThingsBoard

Navigate to Entities → Devices and click the "+" button to add a new device. add_new_device

3. Enter a device name (e.g., Elastel_EG500) and click Add

add_device_name

4. Copy the Access token and record it

It will be needed in further device configuration for connecting to ThingsBoard cloud. access token


Elastel Device Configuration

Configure the EG500 to collect RS485 Modbus sensor data and DI/DO status values. Elastel devices come with ElastPro, a web-based software for easy IIoT gateway configuration and and data collect setup.

Data Collect Configuration

In this step, we will configure Elastel EG500 to collect data from RS485 Modbus sensor and DI DO status value. Elastel devices has prebuilt IIoT Gateway software ElastPro which provide web-based programs for easy configuration and data collect setup.

1. Enable Data Collect

Login to the EG500 webUI, click Data Collect >> Basic, enable the data collect function, and configure the collect period, Report period, then click the Apply settings button. enable data collect

2. Configure the RS485 Serial port for Modbus sensor data collect

Go to the Data Collect >> Interfaces to enable the COM1 RS485 for connecting the RS485 Temperature&Humidity sensor, configure the related parameters, then Apply settings. rs485 interface setting

Go to Data Collect >> South Devices >> Modbus Rules to configure the collect Modbus data from Temperature & Humidity sensor, then Apply settings. Modbus rule settings

3. Configure the IO port for collect DI status and control DO status

Go to Data Collect >> South Devices >> IO, add DI and DO Setting rules, configure the relevant parameters and click the Apply settings. IO settings

Connect Device to ThingsBoard

Go to the Data Collect >> North Apps >> Reporting Center to configure the connection to ThingsBoard platform via MQTT. Connect mqtt to ThingsBoard

Note:
  1. If using custom MQTT credentials on ThingsBoard, set them under Next: Credentials → MQTT Basic during device creation, and use those here.

  2. Refer to the ElastPro User Manual for more Elastel gateway detailed configuration.


Check Data on ThingsBoard

Once connected, data will appear under the device’s telemetry section in ThingsBoard. You can also view the data on EG500’s local dashboard. check data on thingsboard data on device local

Create Dashboard

Go to the Dashboards page and click the " + " icon to Create new dashboard. Enter the Title of the dashboard, then click Add. add dashboard

On Dashboard edit page, Click the “+ Add new widget” button to add widget for our telemetry data. add widget

Select the suitable widget template and configure the Datasource relevantly. For example, we select a Value card for displaying “Temperature” data, and bundle the datasource from EG500 device we created, select the “Temperature” data key which EG500 reported. add temperature widget

After finished the widget configuration, click Add button, we got the Temperature widget with real-time value accordingly. temperature widget

Following the similar configuration to add other widgets for other data key “Humidity”, “Door_state”, “Light_do0”. After finished click Save button, we now have a visualizing dashboard for displaying data and controlling the DO (LED light). add other widget

Demonstration show

demo show


Conclusion

By following this guide, you can easily integrate Elastel IIoT gateways with ThingsBoard. Elastel’s easy-to-use web UI and ThingsBoard’s powerful visualization tools make the edge-to-cloud connection seamless.