https://github.com/thingsboard/thingsboard-gateway
Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols.
https://github.com/thingsboard/thingsboard-gateway
aws aws-iot bacnet ble can can-bus ftp gateway iot iot-gateway mqtt mqtt-broker odbc opc-ua sigfox snmp thingsboard
Last synced: 9 days ago
JSON representation
Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols.
- Host: GitHub
- URL: https://github.com/thingsboard/thingsboard-gateway
- Owner: thingsboard
- License: apache-2.0
- Created: 2017-01-05T05:41:03.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2026-10-13T07:45:22.000Z (15 days ago)
- Last Synced: 2026-10-13T09:54:52.034Z (15 days ago)
- Topics: aws, aws-iot, bacnet, ble, can, can-bus, ftp, gateway, iot, iot-gateway, mqtt, mqtt-broker, odbc, opc-ua, sigfox, snmp, thingsboard
- Language: Python
- Homepage: https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/
- Size: 13.1 MB
- Stars: 2,196
- Watchers: 88
- Forks: 1,005
- Open Issues: 71
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-iot - Thingsboard IoT Gateway - Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with Thingsboard IoT Platform using OPC-UA and MQTT protocols. (Table of Contents / Software)
- awesome-iot - Thingsboard IoT Gateway β 463 β§ 246 - open-source IoT Gateway - integrates devices connected to legacy and third-party systems with Thingsboard IoT Platform using OPC-UA and MQTT protocols. (Framework)
- awesome-iot - Thingsboard IoT Gateway - Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with Thingsboard IoT Platform using OPC-UA and MQTT protocols. (Table of Contents / Software)
- awesome-iot - Thingsboard IoT Gateway - Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with Thingsboard IoT Platform using OPC-UA and MQTT protocols. (Table of Contents / Software)
- awesome_iot - Thingsboard IoT Gateway β 65 β§ 5 - open-source IoT Gateway - integrates devices connected to legacy and third-party systems with Thingsboard IoT Platform using OPC-UA and MQTT protocols. (Framework)
README
[](https://discord.gg/mJxDjAM3PF)
# ThingsBoard IoT Gateway
The **ThingsBoard IoT Gateway** is an open-source, Python-based application that enables seamless integration of legacy and third-party devices with the [ThingsBoard IoT platform](https://thingsboard.io/). It serves as a protocol adapter that collects data from external sources and publishes it to ThingsBoard via a unified format.
π [**What is ThingsBoard IoT Gateway?**](https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/)
> π‘ New to ThingsBoard? [**Learn what ThingsBoard is**](https://thingsboard.io/docs/getting-started-guides/what-is-thingsboard/)
---
## π Getting Started
Curious how the ThingsBoard IoT Gateway works in action?
β‘οΈ **Follow our [Getting Started Guide](https://thingsboard.io/docs/iot-gateway/getting-started/)** to:
- π Run the gateway in minutes using pre-configured **demo servers**
- π Simulate device data collection and processing workflows
- π§ͺ Explore telemetry, attributes, and RPCs without real devices
- π₯οΈ Test integration with ThingsBoard Community or Professional Edition
> π‘ Ideal for evaluation, proof-of-concept, and learning how the gateway processes and routes data.
---
[](https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/)
## π Gateway Features
ThingsBoard IoT Gateway supports a wide range of industrial and IoT protocols out of the box. Each connector enables collecting data from external systems, transforming it into a unified format, and forwarding it to ThingsBoard.
### π Industrial & SCADA Protocols
- [**Modbus**](https://thingsboard.io/docs/iot-gateway/config/modbus/) β Integrate with Modbus TCP/RTU devices like PLCs and energy meters.
- [**OPC-UA**](https://thingsboard.io/docs/iot-gateway/config/opc-ua/) β Connect to industrial automation systems using the OPC-UA protocol.
- [**S7**](https://thingsboard.io/docs/iot-gateway/config/s7/) - Connect to Siemens S7 PLCs and collect data from them.
- [**CAN**](https://thingsboard.io/docs/iot-gateway/config/can/) β Communicate with devices over the Controller Area Network (e.g., automotive, industrial equipment).
- [**ODBC**](https://thingsboard.io/docs/iot-gateway/config/odbc/) β Retrieve telemetry from SQL-compliant databases.
### π IoT & Networking Protocols
- [**MQTT**](https://thingsboard.io/docs/iot-gateway/config/mqtt/) β Subscribe to external MQTT brokers and ingest messages.
- [**REST API**](https://thingsboard.io/docs/iot-gateway/config/rest/) β Push data to REST endpoints created by gateway.
- [**Request Connector**](https://thingsboard.io/docs/iot-gateway/config/request/) β Periodically pull data from HTTP(S) APIs and ingest response payloads.
- [**FTP**](https://thingsboard.io/docs/iot-gateway/config/ftp/) β Read files from FTP/SFTP servers for batch data ingestion.
- [**Socket**](https://thingsboard.io/docs/iot-gateway/config/socket/) β Request data via raw TCP/UDP socket connections.
- [**SNMP**](https://thingsboard.io/docs/iot-gateway/config/snmp/) β Poll SNMP devices to collect MIB data from routers, switches, sensors.
- [**XMPP**](https://thingsboard.io/docs/iot-gateway/config/xmpp/) β Receive telemetry from XMPP-based chat/device networks.
### π‘ Smart Energy & Charging
- [**OCPP**](https://thingsboard.io/docs/iot-gateway/config/ocpp/) β Integrate EV charging stations using Open Charge Point Protocol.
### π Smart Building & Home Automation
- [**BACnet**](https://thingsboard.io/docs/iot-gateway/config/bacnet/) β Gather building automation data (HVAC, lighting, fire systems).
- [**KNX**](https://thingsboard.io/docs/iot-gateway/config/knx/) β Interface with KNX-based building automation systems.
- [**BLE**](https://thingsboard.io/docs/iot-gateway/config/ble/) β Scan and connect to BLE-enabled devices (e.g., beacons, wearables).
### π§© Extensibility
- [**Custom Connectors**](https://thingsboard.io/docs/iot-gateway/custom/) β Build your own protocol handlers using Python to support any proprietary system or emerging protocol.
> β¨ All connectors support flexible configuration, data transformation, and integration with the ThingsBoard platform's device model.
## π§° Core Gateway Capabilities
In addition to multi-protocol support, the ThingsBoard IoT Gateway includes robust features for reliability, remote management, and automation:
### π Reliability & Resilience
- **Data persistence** β Buffers telemetry locally to prevent data loss during network or system outages.
- **Automatic reconnection** β Automatically restores connection to the ThingsBoard cluster after temporary failures.
### π Unified Data Processing
- **Data mapping engine** β Transforms raw input from devices into ThingsBoardβs unified data format using customizable converters.
### π οΈ Remote Management & Control
- [**Remote configuration**](https://thingsboard.io/docs/iot-gateway/guides/how-to-enable-remote-configuration/) β Update and manage gateway configuration directly from the ThingsBoard web UI.
- [**Remote logging**](https://thingsboard.io/docs/iot-gateway/guides/how-to-enable-remote-logging/) β View and stream logs remotely for troubleshooting and monitoring.
- [**Gateway service RPC methods**](https://thingsboard.io/docs/iot-gateway/guides/how-to-use-gateway-rpc-methods/) β Interact with the gateway using platform-initiated RPC commands.
- [**Remote shell access**](https://thingsboard.io/docs/iot-gateway/guides/how-to-enable-remote-shell/) β Run shell commands on the gateway host via the ThingsBoard platform.
### π Device Lifecycle Handling
- [**Device rename/removal detection**](https://thingsboard.io/docs/iot-gateway/how-device-removing-renaming-works/) β Automatically synchronizes device renames and deletions to keep the platform device list up to date.
## ποΈ Architecture Overview
The IoT Gateway is implemented in **Python**, allowing powerful extension and customization. It follows a modular architecture resembling microservices.
- **Custom connectors** let you interface with new devices or services.
- **Custom converters** allow transformation of incoming messages to a ThingsBoard-compatible format.
- The Gateway provides simple integration APIs, and encapsulates common ThingsBoard related tasks: device provisioning, local data persistence and delivery, message converters and other.
> Ideal for edge use cases where flexibility and protocol diversity are key.
---
## π¬ Support & Community
Need help or want to share ideas?
- [](https://discord.gg/mJxDjAM3PF)
- π¬ [**GitHub Discussions**](https://github.com/thingsboard/thingsboard-gateway/discussions) β Ask questions, propose features, or share use cases.
- β [**StackOverflow**](http://stackoverflow.com/questions/tagged/thingsboard-gateway) β Use the `thingsboard-gateway` tag.
> π Found a bug? Please open an [issue](https://github.com/thingsboard/thingsboard-gateway/issues).
---
## β Contributing
We welcome contributions! Feel free to fork the repo, open PRs, or help triage issues.
---
## βοΈ License
This project is licensed under the [Apache 2.0 License](./LICENSE).
---
π **Don't forget to star the repository to show your β€οΈ and support!**