Many industrial devices expose data through Modbus RTU over RS-485. The NORVI-GSM, powered by an ESP32 SoC and Quectel EC25 cellular modem, makes it simple to read these registers and push them securely to ThingsBoard using MQTT.
With this setup, you can:
Monitor sensors or meters in remote locations over cellular.
- Monitor sensors or meters in remote locations over cellular.
- Send real-time telemetry without relying on Wi-Fi.
- Build dashboards and alerts in ThingsBoard.
👉 A full working guide with code and diagrams is available here:NORVI Docs — Modbus Data to ThingsBoard with EC25
StepsStep 1: Create Device in ThingsBoardLog in to your ThingsBoard instance.
- Log in to your ThingsBoard instance.
Create a new device.
- Create a new device.
Copy the Access Token – this will be used in your code.
- Copy the Access Token – this will be used in your code.
Connect your Modbus slave device to the RS-485 A/B lines on the NORVI-GSM.
- Connect your Modbus slave device to the RS-485 A/B lines on the NORVI-GSM.
- Ensure proper polarity – if readings are zero, swap A/B lines.
- Ensure proper polarity – if readings are zero, swap A/B lines.
- Insert a SIM card with an active data plan into the EC25 slot.
Install the ESP32 board package in Arduino IDE.
- Install the ESP32 board package in Arduino IDE.
- Install the ModbusMaster library from Library Manager.
- Open the example sketch provided in the NORVI Docs.
Replace YOUR_APN
with your SIM’s APN.
- Replace
YOUR_APN
with your SIM’s APN. - Insert the ThingsBoard Access Token.
- Insert the ThingsBoard Access Token.
- Set the correct Modbus slave ID and register addresses.
- Upload the sketch to the NORVI-GSM via USB.
- Open the serial monitor – check EC25 AT responses for
+QMTOPEN
and+QMTCONN
. - If successful, telemetry will be published to ThingsBoard.
Go to your device’s Latest Telemetry tab to confirm data.
- Go to your device’s Latest Telemetry tab to confirm data.
- Create a dashboard with widgets (gauges, charts, time-series plots).
- Bind widgets to telemetry keys like
ANIN1
,ANIN2
.
- All values zero? → Swap RS-485 A/B lines.
- No MQTT connection? → Check APN, token, and confirm PDP activation (
AT+QIACT?
). - Random disconnects? → Enable MQTT KeepAlive and retry logic.
Full Documentation with Code & Diagrams
- Example Arduino Sketch (in the linked docs)
- ThingsBoard Dashboard screenshots (see docs)
- Hardware wiring images (to be added in Hackster project gallery)
Comments