This configuration sets up intervals of the iot device.
Required Attribute:
iotConfigurableIntervals
iotConfigurableIntervals{
"name": "iotConfigurableIntervals",
"value": true
}Device Model Example
{
"Ultron Device": {
"type": "ULTRON",
"traits": ["UltronCommand", "BluetoothGateway", "ReportState", "UltronConfig"],
"disabled": false,
"attrs": [
{"name": "rebootTime", "value": 20},
{"name": "fwUpgradeTime", "value": 60},
{"name": "iotConfigurableIntervals", "value": true},
{"name": "schedulable", "value": { "Light": ["OnOff"] }},
{"name": "periodicity", "value": true},
{"name": "availableDimmingTypes", "value": ["0-10V", "1-10V"] }
]
},
"Light": {
"type": "LIGHT",
"traits": ["OnOff", "Brightness"],
"disabled": false,
"attrs": [
{
"name": "queryOnlyOnOff",
"value": false
},
{
"name": "commandOnlyBrightness",
"value": false
},
{
"name": "colorProfile",
"value": {"enabled": true, "brightnessStart": 0, "brightnessEnd": 50}
},
{
"name": "fade",
"value": {
"enabled": true,
"duration": 2,
"durationRange": {"min": 1, "max": 10}
}
}
]
}
}Config Item Attributes
| Field Name | Type | Note |
|---|---|---|
reportStates | Integer | Interval of reporting iot states. |
bleTopology | Integer | Interval of updating BLE topology. |
retry | Object | Retry intervals. |
mqttConfig | Object | Interval of mqtt related events. |
sensor | Object | Interval of reporting sensor data. |
Object fields of retry
| Field Name | Type | Note |
|---|---|---|
activate | Object(Backoff) | Retry interval of IoT activation. |
mqttConnect | Object(Backoff) | Retry interval of mqtt connecting. |
asyncApi | Object(Backoff) | Retry interval of Device Async API. |
Object fields of Backoff
| Field Name | Type | Note |
|---|---|---|
value | Integer | Retry interval of IoT activation. |
max | Integer | Retry interval of mqtt connecting. |
backoff | String | Optional. Back-off algorithm. |
Object fields of mqttConfig
| Field Name | Type | Note |
|---|---|---|
keepAlive | Integer | MQTT Keep-alive |
connTimeout | Integer | MQTT connect timeout |
connectAuthFail | Integer | MQTT connect auth fail |
Object format of sensor: map[string]map[attrs.SensorType]SensorIntervals
Object fields of SensorIntervals
| Field Name | Type | Note |
|---|---|---|
tolerance | Number | Tolerance of reading change(delta) |
report | Integer | Reporting interval |
sampling | Integer | Sampling interval |
Example
{
"config": "IotIntervals",
"items": {
"reportStates": 3600,
"bleTopology": 600,
"retry": {
"activate" : {"value": 10, "max": 120, "backoff": null},
"mqttConnect": {"value": 60, "max": 120, "backoff": null},
"asyncApi" : {"value": 5, "max": 60, "backoff": null}
},
"mqttConfig": {"keepAlive": 290, "connTimeout": 30, "connectAuthFail": 40},
"sensor": {
"Ultron Sensor": {
"rh" : {"tolerance": 3 , "report": 290, "sampling": 60},
"temp": {"tolerance": 0.5, "report": 290, "sampling": 60}
}
}
}
}API Example: /usr/v5/SetDeviceConfigs
{
"sn": "UT2Z02-4KXXXXX",
"configs": [
{
"config": "IotIntervals",
"items": {
"reportStates": 3600,
"bleTopology": 600,
"retry": {
"activate" : {"value": 10, "max": 120},
"mqttConnect": {"value": 60, "max": 120},
"asyncApi" : {"value": 5, "max": 60}
},
"mqttConfig": {"keepAlive": 290, "connTimeout": 30, "connectAuthFail": 40},
"sensor": {
"Ultron Sensor": {
"rh" : {"tolerance": 3 , "report": 290, "sampling": 60},
"temp": {"tolerance": 0.5, "report": 290, "sampling": 60}
}
}
}
}
]
}