How to Connect IoT Devices
ThingsBoard supports multiple connectivity scenarios. Choose the one that fits your device and infrastructure — then follow the linked reference for setup instructions.
Direct Connection
Section titled “Direct Connection”Your device runs custom firmware and connects directly to ThingsBoard over IP — no middleware required.
| Protocol | Credentials | Best for | Reference |
|---|---|---|---|
| MQTT | Access Token, MQTT Basic, X.509 | Custom firmware, real-time telemetry, RPC commands | MQTT API |
| MQTT Sparkplug B | Access Token, MQTT Basic, X.509 | SCADA/IIoT with Sparkplug-aware brokers | Sparkplug B API |
| HTTP | Access Token, X.509 | Periodic uploads, devices behind strict firewalls | HTTP API |
| CoAP | Access Token, X.509 | Constrained devices, UDP networks | CoAP API |
| LwM2M | PSK, PRK, X.509, No-Sec | NB-IoT, cellular IoT, standardized object model | LwM2M API |
| SNMP | Community string (v1/v2c), USM (v3) | Network devices, industrial equipment | SNMP API |
Use the built-in Check connectivity tool from the device details page to generate a ready-to-run command for your chosen protocol and OS.
IoT Gateway
Section titled “IoT Gateway”Used in enterprises, factories, and building management systems where devices speak IIoT protocols (Modbus, OPC-UA, BACnet, CAN, BLE…). The ThingsBoard IoT Gateway runs on a local machine and bridges them to ThingsBoard over MQTT.
| Connector | Protocols / Sources | Reference |
|---|---|---|
| MQTT | MQTT brokers, MQTT devices | MQTT Connector |
| OPC-UA | OPC-UA servers | OPC-UA Connector |
| Modbus | Modbus RTU/TCP devices | Modbus Connector |
| BLE | Bluetooth Low Energy devices | BLE Connector |
| CAN | CAN bus devices | CAN Connector |
| BACnet | BACnet/IP, BACnet MS/TP | BACnet Connector |
| SNMP | SNMP-managed devices | SNMP Connector |
| ODBC | Databases via ODBC | ODBC Connector |
| FTP | FTP/FTPS servers, CSV files | FTP Connector |
| HTTP(S) Request | REST APIs, HTTP endpoints | Request Connector |
| REST | REST API sources | REST Connector |
| Custom | Any protocol via Python | Custom Connector |
LoRaWAN & LPWAN
Section titled “LoRaWAN & LPWAN”Your devices transmit over a low-power wide-area network (LoRaWAN, SigFox, NB-IoT). Data flows through a network server first, then into ThingsBoard via a Platform Integration.
| Network Server / Provider | Edition | Reference |
|---|---|---|
| ChirpStack | Community | ChirpStack built-in integration |
| ChirpStack | Professional | ChirpStack Integration |
| The Things Network (TTN / TTS) | Professional | TTN Integration |
| LORIOT | Professional | LORIOT Integration |
| Actility ThingPark | Professional | ThingPark Integration |
| SigFox | Professional | SigFox Integration |
Platform Integrations
Section titled “Platform Integrations”Your devices already send data to a cloud backend (AWS IoT, Azure, IBM Watson, an MQTT broker, or an OPC-UA server). Platform Integrations bridge that backend to ThingsBoard via a server-side data pipeline. Incoming data is decoded with an uplink converter before being stored as device telemetry.
| Integration | Use case | Reference |
|---|---|---|
| HTTP | Devices that push data via webhooks | HTTP Integration |
| MQTT Broker | Bridge from any MQTT broker (Mosquitto, EMQX, HiveMQ…) | MQTT Integration |
| AWS IoT | Devices registered in AWS IoT Core | AWS IoT Integration |
| Azure IoT Hub | Devices registered in Azure IoT Hub | Azure IoT Hub Integration |
| Azure Event Hub | Data streamed via Azure Event Hub | Azure Event Hub Integration |
| OPC-UA | OPC-UA servers without a local gateway | OPC-UA Integration |