The Device Configuration Repository is a storage solution that allows storing and managing various settings or parameters for devices. This feature helps control the behavior of your connected devices by delivering configuration data. In the Kaa IoT platform, this data is represented as a free-form JSON document.
Examples of device configuration usage:
Smart Home Automation System: Remotely adjust the temperature settings of your thermostat or the brightness of your smart lights.
Fleet Management System: Set the reporting interval of your vehicle’s GPS tracker to optimize battery efficiency.
In both cases, this is achieved by sending configuration data to the devices, allowing them to adjust their behavior accordingly.
JSON example of a device configuration:
{
"temperature": 25,
"brightness": 80
}
Receiving the above configuration, your smart device will adjust the indoor temperature to 25°C and brightness to 80%.
In Kaa, there are two main types of device configuration:
Batch management of endpoint-specific configurations is particularly useful when you have a fleet of devices with the same application version but want to group them based on certain criteria, such as device location.
For example:
Imagine you have three thermostats in your house, each in a different room: living room, bedroom, and kitchen.
All thermostats are registered under the same application version, e.g., bs7hbk6an6qhlo5moeo0-v1
.
In this scenario, the default configuration will be as follows:
{
"temperature": 25
}
And the endpoint-specific configuration for the bedroom thermostat will be next:
{
"temperature": 22
}
So whenever the thermostat in the bedroom connects to the platform, it will receive temperature: 22
, while the other thermostats will receive temperature: 25
over MQTT or HTTP device API.
You can manage device configuration from the Kaa UI with the help of three widgets:
To add them, go to the “Solutions” -> choose or create a solution -> choose or create a dashboard -> enter Edit Mode -> click “Add Widget” -> choose the desired widget from the “Configuration management” section.
Let’s configure the “JSON Configuration” widget as an example. Add it to your dashboard. Then click on the edit icon in the top right corner of the widget to configure it. Choose the application version, and enable “Display default device configuration”.
Click “Save” to apply the changes. This way, the widget will manage the default type of device configuration.
Paste the desired JSON configuration into the widget and click “Save”. Now whenever you device connects to the platform, it will receive this configuration.
If you want to set endpoint-specific configurations for multiple devices simultaneously, you can use a batch approach. When configuring the Device Configuration widget, you can select the “Batch update” option to apply the configuration to multiple devices at once. You can specify endpoints using either “Filter” or “Selection”:
Refer to the REST API documentation to manage device configuration using REST API.