Quay lại Trending
RepositoryPython
thingsboard

thingsboard/thingsboard-python-client-sdk

ThingsBoard client Python SDK

130sao
84fork
5issue
1lượt xem

🚀 Kết nối thiết bị và Gateway với ThingsBoard qua Python

Một SDK Python duy nhất cho telemetry, attributes, RPC và quản lý thiết bị trên ThingsBoard.

thingsboard-python-client-sdk cung cấp thư viện Python để giao tiếp với ThingsBoard qua MQTT và HTTP. Dự án hỗ trợ cả Device API lẫn Gateway API, phù hợp với ứng dụng IoT cần thu thập dữ liệu, điều khiển thiết bị hoặc xử lý gateway.

✨ Điểm nổi bật

  • Device và Gateway API: Cung cấp toàn bộ Device MQTT API và Gateway MQTT API của ThingsBoard.
  • MQTT và HTTP: Hỗ trợ gần như toàn bộ Device HTTP API qua giao diện riêng.
  • TLS v1.2: Kết nối MQTT không mã hóa hoặc bảo mật bằng TLS, client certificate và CA certificate.
  • QoS 0 và 1: Chọn mức bảo đảm giao tin cho luồng MQTT; send_telemetry() có thể trả kết quả kiểm tra trạng thái giao.
  • Tự động reconnect: Client MQTT tự kết nối lại khi kết nối bị gián đoạn.
  • Quản lý thiết bị: Hỗ trợ Device Claiming và cập nhật firmware.
  • Tương tác hai chiều: Gửi telemetry, cập nhật attributes, đăng ký thay đổi attributes và nhận RPC command.
  • Gửi telemetry hàng loạt: MQTT hỗ trợ nhiều message cùng lúc và tùy chỉnh số message đang chờ gửi.

💡 Vì sao đáng chú ý

SDK che phủ phần lớn luồng làm việc phổ biến với ThingsBoard: kết nối, xuất telemetry, quản lý attributes, điều khiển qua RPC và làm việc với Gateway. Phần MQTT dựa trên Paho MQTT, còn HTTP dựa trên Requests, giúp tích hợp với hệ thống Python hiện có ít ma sát.

Với cùng một bộ client, lập trình viên có thể chọn MQTT cho giao tiếp realtime, hai chiều hoặc Gateway; chọn HTTP cho luồng Device API không cần MQTT. Cách cài đặt qua pip3 install tb-mqtt-client cũng thuận tiện cho dự án Python.


#Python #MQTT #ThingsBoard #IoT #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryPython
home-assistant/core

:house_with_garden: Open source home automation that puts local control and privacy first.

92.4k
Nov 19, 2026
RepositoryPython
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

209.9k
Nov 22, 2026
RepositoryPython
521xueweihan/HelloGitHub

:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.

190.6k
Oct 31, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

473.8k
Nov 22, 2026
RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

378.7k
Sep 15, 2026
RepositoryPython
vinta/awesome-python

The definitive list that answers "I want to do X in Python, which tool should I use?"

336.4k
Nov 17, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.3k
Nov 16, 2026
RepositoryPython
TheAlgorithms/Python

All Algorithms implemented in Python

226.3k
Nov 13, 2026
RepositoryPython
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

188.1k
Nov 21, 2026