Thingsboard provides ability to assign custom attributes to your devices and manage them. Attributes are treated key-value pairs. Flexibility and simplicity of key-value format allows easy and seamless integration with almost any IoT device on the market.
All attributes may be used in Rule Engine components: filters, processors and actions. This guide provides overview of the features listed above and some useful links to get more details.
Attributes are separated into three main groups:
client-side - attributes are reported and managed by the device application. For example: current software/firmware version, hardware specification, etc.
server-side - attributes are reported and managed by the server-side application. Not visible to the device application. Some secret data that may be used by thingsboard rules but should not be available to the device.
shared - attributes are reported and managed by the server-side application. Visible to the device application. For example: customer subscription plan, target software/firmware version.
Thingsboard provides following API to device applications:
Attributes API is specific for each supported network protocol. You can review API and examples in corresponding reference page:
Thingsboard consist of core services and plug-able modules called plugins. Telemetry plugin is responsible for persisting attributes data to internal data storage; provides server-side api to query and subscribe for attribute updates. Since Telemetry plugin functionality is critical for data visualization purposes in dashboards, it is configured on the system level by system administrator. Advanced users or platform developers can customize telemetry plugin functionality.
Thingsboard uses Cassandra NoSQL database. This database is optimized for storage of timeseries data. Cassandra takes care of data replication and provides scalable, reliable and fault-tolerant storage.
Attributes are stored in attributes_kv_cf column family.
Although you can query database directly, Thingsboard provide set of RESTful and Websocket API that simplify this process and apply certain security policies:
Telemetry plugin provides following API to fetch device attributes:
You can fetch list of all attribute keys for particular device id using GET request to the following URL
You can fetch list of latest values for particular device id using GET request to the following URL
Thingsboard provide ability to configure and customize dashboards for data visualization. This topic is covered in separate guide.
Thingsboard provide ability to configure data processing rules. Device attributes can be used inside rule filters. This allows to apply rules based on certain device properties. You can find more details in a separate guide.