Getting started with the prototyping
Thingsboard is an IoT platform that has gained more traction recently, boasting customers such as T-Mobile and Bosch. It offers a wide range of features and functionalities while still showing signs of being a product in development. They offer services from real-time data visualization, provisioning, device management, rule chains, and a feature-packed MQTT broker, among other components. One of the more appealing features of ThingsBoard is the support for rapid development and the ease of use for those desiring to set up a simple IoT platform for their projects. This article will briefly examine ThingsBoard and share a few experiences and applications.
Architecture
ThingsBoard provides MQTT, HTTP, CoAP and LwM2M-based APIs. Where a separate server component provides each respective API as part of their transport layer. The ThingsBoard core handles REST API calls and WebSocket subscriptions. It is furthermore responsible for storing up-to-date information about active device sessions and device connectivity state monitoring. The Rule engine is responsible for processing incoming messages, and the web UI provides a lightweight component to host static web UI content (express.js).
A single external data source (e.g. a microcontroller) may post data to multiple ThingsBoard devices. However, publishing data from numerous external sources simultaneously to a single ThingsBoard device has been observed to result in bugs and unintended behaviour and should, in most cases, be avoided
Publishing data
Congratulations, you have added your first device to ThingsBoard. As a celebration, let us verify that ThingsBoard has been configured correctly.
Curl is open-source and is used in command lines or scripts to transfer data. It is already built into Windows and can easily be installed for Linux/Mac.
To send data, the user must have access to a device configured in Thingsboard. The user must have both the token ($ACCESS_TOKEN
) and the thingsboard hostname ($THINGSBOARD_HOST_NAME
). They may be combined into the following format in order to access the Thingsboard. $THINGSBOARD_HOST_NAME/api/v1/$ACCESS_TOKEN/telemetry
An HTTP POST may be carried out as following:
curl -v -X POST -d "{"temperature": 25}" $THINGSBOARD_HOST_NAME/api/v1/$ACCESS_TOKEN/telemetry --header "Content-Type:application/json"
For instance the EmLogic demo board may be accessed by (as per 8.6.2023)
curl -v -X POST -d "{"temperature": 25}" demo.thingsboard.io/api/v1/EmLogicTutorial/telemetry
At the time of writing, the only HTTP Methods available are POST and OPTIONS. This information may be verified by executing:
curl -v -X OPTIONS demo.thingsboard.io/api/v1/EmLogicTutorial/telemetry
Conclusion
ThingsBoard is a versatile platform providing capabilities essential for IoT projects. While it might not have the same level of community and extensive documentation as more established providers like Amazon Web Services (AWS), ThingsBoard presents a well-rounded solution ready for deployment. This balance between user-friendly design and offering comprehensive features has helped ThingsBoard carve out a unique niche in the IoT landscape.
The platform’s focus on a user-friendly approach not only simplifies the deployment process but also promotes efficient design-to-deployment timelines. This can potentially shorten the time-to-market for developers, making it a promising tool for rapid IoT development. Moreover, the intuitive design of ThingsBoard’s features, like data visualization, device management, and MQTT broker, means that users can spend less time navigating complexities and more time innovating.
Ultimately, while ThingsBoard has limitations, it is an evolving platform with great potential. As it continues to develop and refine its feature set, it will undoubtedly be an essential tool in the IoT space.