ThingsBoard is an open-source IoT platform for data collection, processing, visualization, and device management.
This project is a MicroPython library that provides convenient client SDK for Device MQTT API.
💡 Make the notion that it is the early beta of MicroPython Client SDK. So we appreciate any help in improving this project and getting it growing.
- Features
- Installation
- Getting Started
- Documentation
- Examples
- Guides
- Contributing
- Support & Community
- Licenses
- Provided all supported feature of
umqttlibrary - Unencrypted and encrypted (TLS v1.2) connection
- QoS 0 and 1 (MQTT only)
- Automatic reconnect
- Device MQTT API provided by ThingsBoard
- Firmware updates
- Device Claiming
- Device provisioning
To install using mip:
import mip
mip.install('github:thingsboard/thingsboard-micropython-client-sdk')Client initialization and telemetry publishing
from thingsboard_sdk.tb_device_mqtt import TBDeviceMqttClient
telemetry = {"temperature": 41.9, "enabled": False, "currentFirmwareVersion": "v1.2.2"}
client = TBDeviceMqttClient(host="127.0.0.1", access_token="A1_TEST_TOKEN")
# Connect to ThingsBoard
client.connect()
# Sending telemetry without checking the delivery status
client.send_telemetry(telemetry)
# Disconnect from ThingsBoard
client.disconnect()You can find the full official documentation here. It includes detailed information about the SDK's features, API reference, and usage examples.
You can find more examples here. They demonstrate how to use the SDK to connect to ThingsBoard, send telemetry data, subscribe to attribute changes, handle RPC calls, etc.
We welcome contributions to the ThingsBoard MicroPython Client SDK! If you have an idea for a new feature, have found a bug, or want to improve the documentation, please feel free to submit a pull request or open an issue.
Need help or want to share ideas?
🐞 Found a bug? Please open an issue.
This project is released under Apache 2.0 License.
