Device Groups
DeviceGroups provides a way to logically group a set of devices and perform actions only for the group
Device Groups
DeviceGroup
DeviceGroup
Describes the configuration for a group of devices. Groups can be used to restrict a Pipeline
to only see events from certain devices.
They can also be used to define a group of devices that are expected to be present.
Only types static
or persistent
are currently supported.
Referenced By:
EdgeConnectConfig RecipeDefinition
Fields
Name | Type | Description | Required |
---|---|---|---|
config | object | Configuration information for the particular type of DeviceGroup used. Described in the documentation for each DeviceGroup type. | No |
type | string | The unique type of the DeviceGroup, must match the type of one of the available DeviceGroups Example: "static" | Yes |
Example
{
"service": {
"groups": {
"my-eddystones": {
"config": {
"absenceMinutes": 19,
"exclude": [
"eddymac4",
"eddymac5",
"eddymac6"
],
"include": [
"eddymac1",
"eddymac2",
"eddymac3"
]
},
"type": "static"
}
}
}
}
Device Group Types
managed
managed
Fields
Name | Type | Description | Required |
---|---|---|---|
absenceMinutes | integer | The number of minutes to tolerate a device being missing before reporting it Example: 5 | No |
debug | boolean | Enable debug logging | No |
deviceTypes | array | Device Types to include in this device group. | Yes |
disableMonitoring | boolean | Disable sending monitoring events for this group to Edge Direct | No |
maxDevices | integer | Maximum devices this device group can hold. Once this limit is reached, new devices are simply ignored. Note: make sure to also set devices.maxDevices at least as high as this, as the devices registry can LRU devices and remove them from device groups as well. Maximum value 50000. | No |
presenceMatchers | MatcherConfig | No | |
rebalanceMinutes | integer | The number of minutes to wait before Edge Direct will rebalance devices between all Edge Connect instances in this site. Set to -1 to disable automatic rebalancing. Example: 5 | No |
verbose | boolean | Enable verbose logging | No |
Example
{
"service": {
"groups": {
"my-managed-group": {
"config": {
"absenceMinutes": 0,
"rebalanceMinutes": 0
},
"type": "managed"
}
}
}
}
persistent
persistent
Persistent device groups operate the same as static
device groups, with the exception that dynamically added
devices persist across reboots. This makes persistent
groups better suited for dynamic provisioning, while
static
groups are better suited for pre-configured device lists.
Fields
Name | Type | Description | Required |
---|---|---|---|
absenceMinutes | integer | The number of minutes to tolerate a device being missing before reporting it Example: 5 | No |
debug | boolean | Enable debug logging | No |
deviceTypes | array | Device Types to include in this device group. | No |
disableMonitoring | boolean | Disable sending monitoring events for this group to Edge Direct | No |
exclude | array | Deprecated: The list of mac addresses to exclude from the device group. | No |
excludeAllByDefault | boolean | Deprecated: If set, a device is excluded unless it is in the include list. | No |
include | array | The list of mac addresses to include in the device group. Overrides the exclude list. | No |
includeMatchers | MatcherConfig | No | |
match | ? | Keys to match (all keys) for an inline definition (see MatcherDefinition ), or a Template to evaluate and match to a true value. | No |
matchAny | boolean | Should we match any of the provided matchers (true)? Or all of the matchers (false) | No |
matchers | array | The list of top-level matcher IDs to apply to the input map Example: [ "is-nearby", "is-my-device-type"] | No |
maxDevices | integer | Maximum devices this device group can hold. Once this limit is reached, new devices are simply ignored. Note: make sure to also set devices.maxDevices at least as high as this, as the devices registry can LRU devices and remove them from device groups as well. Maximum value 50000. | No |
presenceMatchers | MatcherConfig | No | |
verbose | boolean | Enable verbose logging | No |
Example
{
"service": {
"groups": {
"my-eddystones": {
"config": {
"absenceMinutes": 0,
"exclude": [
"eddymac4",
"eddymac5",
"eddymac6"
],
"include": [
"eddymac1",
"eddymac2",
"eddymac3"
]
},
"type": "persistent"
}
}
}
}
static
static
A static Device Group tracks devices based on an include
list.
If an includeList is provided, devices must match the include list.
If both are omitted, all devices are matched to this group.
Any device in the group is considered present if it has been seen within absenceMinutes
.
Any device in the group that goes missing for absenceMinutes
will be considered not present.
Any time a new device is discovered, or the presence changes from true to false or vice versa, a Device Status event
will be fired. See Pipeline
for information on how to subscribe to Device Status events.
Devices in the include list that are not seen after absenceMinutes
from startup are considered not present, and
a device status event will be fired with present=false
.
Fields
Name | Type | Description | Required |
---|---|---|---|
absenceMinutes | integer | The number of minutes to tolerate a device being missing before reporting it Example: 5 | No |
debug | boolean | Enable debug logging | No |
deviceTypes | array | Device Types to include in this device group. | No |
disableMonitoring | boolean | Disable sending monitoring events for this group to Edge Direct | No |
exclude | array | Deprecated: The list of mac addresses to exclude from the device group. | No |
excludeAllByDefault | boolean | Deprecated: If set, a device is excluded unless it is in the include list. | No |
include | array | The list of mac addresses to include in the device group. Overrides the exclude list. | No |
includeMatchers | MatcherConfig | No | |
match | ? | Keys to match (all keys) for an inline definition (see MatcherDefinition ), or a Template to evaluate and match to a true value. | No |
matchAny | boolean | Should we match any of the provided matchers (true)? Or all of the matchers (false) | No |
matchers | array | The list of top-level matcher IDs to apply to the input map Example: [ "is-nearby", "is-my-device-type"] | No |
maxDevices | integer | Maximum devices this device group can hold. Once this limit is reached, new devices are simply ignored. Note: make sure to also set devices.maxDevices at least as high as this, as the devices registry can LRU devices and remove them from device groups as well. Maximum value 50000. | No |
presenceMatchers | MatcherConfig | No | |
verbose | boolean | Enable verbose logging | No |
Example
{
"service": {
"groups": {
"my-eddystones": {
"config": {
"absenceMinutes": 19,
"exclude": [
"eddymac4",
"eddymac5",
"eddymac6"
],
"include": [
"eddymac1",
"eddymac2",
"eddymac3"
]
},
"type": "static"
}
}
}
}
Updated over 1 year ago