This config is to have an Exclusive OR effect on different ports of the device
Required Attribute:
arbitraryRadioGroupDevices
arbitraryRadioGroupDevices{
"name": "arbitraryRadioGroupDevices",
"value": ["1", "2", "3", "4"]
}Device Model Example
{
"1": {
"type": "SWITCH",
"traits": ["OnOff"],
"disabled": false,
"attrs": [
{ "name": "intermittent" , "value": true },
{ "name": "timeStepRange", "value": {"max": 86400, "min": 0.1, "step": 0.1} }
]
},
"2": {
"type": "SWITCH",
"traits": ["OnOff", "CircuitDetector"],
"disabled": false,
"attrs": [
{ "name": "intermittent" , "value": true },
{ "name": "detectDirection", "value": ["OpenToClose", "CloseToOpen"] },
{ "name": "timeStepRange" , "value": {"max": 86400, "min": 0.1, "step": 0.1} }
]
},
"3": {
"type": "SWITCH",
"traits": ["OnOff", "CircuitDetector"],
"disabled": false,
"attrs": [
{ "name": "intermittent" , "value": true },
{ "name": "detectDirection", "value": ["OpenToClose", "CloseToOpen"] },
{ "name": "timeStepRange" , "value": {"max": 86400, "min": 0.1, "step": 0.1} }
]
},
"4": {
"type": "SWITCH",
"traits": ["OnOff", "CircuitDetector"],
"disabled": false,
"attrs": [
{ "name": "intermittent" , "value": true },
{ "name": "detectDirection", "value": ["OpenToClose", "CloseToOpen"] },
{ "name": "timeStepRange" , "value": {"max": 86400, "min": 0.1, "step": 0.1} }
]
},
"Ultron Device": {
"type": "ULTRON",
"traits": ["UltronCommand", "ReportState", "UltronConfig", "RadioGroups"],
"disabled": false,
"attrs": [
{"name": "rebootTime", "value": 20},
{"name": "fwUpgradeTime", "value": 60},
{"name": "iotConfigurableIntervals", "value": true},
{
"name": "schedulable",
"value": { "4": ["OnOff"], "1": ["OnOff"], "2": ["OnOff"], "3": ["OnOff"] }
},
{"name": "schedulableVersion", "value": 1},
{"name": "periodicity", "value": true},
{"value": true, "name": "aperiodicity"},
{ "name": "arbitraryRadioGroupDevices", "value": ["1", "2", "3", "4"] },
{
"name": "supportDefaultActions",
"value": {
"1": { "cmdNames": ["OnOff"], "situations": ["power", "network"] },
"2": { "cmdNames": ["OnOff"], "situations": ["power", "network"] },
"3": { "cmdNames": ["OnOff"], "situations": ["power", "network"] },
"4": { "cmdNames": ["OnOff"], "situations": ["power", "network"] }
}
}
]
}
}
For example, there are 4 ports (iotDevs) named "1", "2", "3", "4"
And all 4 ports support ArbitraryRadioGroups defined in Ultron Device.attrs[7].name = arbitraryRadioGroupDevices, value = ["1", "2", "3", "4"]
Config Item Attributes
Key of the Object as GroupingName; values are following
| Field Name | Type | Note |
|---|---|---|
iotDevs | Array | Indicates which ports are grouped. |
enabled | bool | Indicates whether this Radio group configuration is active. Corresponds to the enabled JSON field. |
Example
{
"config": "ArbitraryRadioGroups",
"items": {
"Group1": { "iotDevs": ["1", "2"], "enabled": true },
"Group2": { "iotDevs": ["3", "4"], "enabled": false }
}
}In Group1Only 1 device( "1", or "2") can be turned on at one time.
same for Group2
API Example: /usr/v5/SetDeviceConfigs
{
"sn": "UT3M10-ESXXXXX",
"configs": [
{
"config": "ArbitraryRadioGroups",
"items": {
"Group1": { "iotDevs": ["1", "2"], "enabled": true },
"Group2": { "iotDevs": ["3", "4"], "enabled": false }
}
}
]
}