Device Groups

DeviceGroups provides a way to logically group a set of devices and perform actions only for the group


Device Groups

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

NameTypeDescriptionRequired
configobjectConfiguration information for the particular type of DeviceGroup used. Described in the documentation for each DeviceGroup type.No
typestringThe 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

Fields

NameTypeDescriptionRequired
absenceMinutesintegerThe number of minutes to tolerate a device being missing before reporting it
Example: 5
No
debugbooleanEnable debug loggingNo
deviceTypesarrayDevice Types to include in this device group.Yes
disableMonitoringbooleanDisable sending monitoring events for this group to Edge DirectNo
maxDevicesintegerMaximum 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
presenceMatchersMatcherConfigNo
rebalanceMinutesintegerThe 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
verbosebooleanEnable verbose loggingNo

Example

{
  "service": {
    "groups": {
      "my-managed-group": {
        "config": {
          "absenceMinutes": 0,
          "rebalanceMinutes": 0
        },
        "type": "managed"
      }
    }
  }
}

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

NameTypeDescriptionRequired
absenceMinutesintegerThe number of minutes to tolerate a device being missing before reporting it
Example: 5
No
debugbooleanEnable debug loggingNo
deviceTypesarrayDevice Types to include in this device group.No
disableMonitoringbooleanDisable sending monitoring events for this group to Edge DirectNo
excludearrayDeprecated: The list of mac addresses to exclude from the device group.No
excludeAllByDefaultbooleanDeprecated: If set, a device is excluded unless it is in the include list.No
includearrayThe list of mac addresses to include in the device group. Overrides the exclude list.No
includeMatchersMatcherConfigNo
match?Keys to match (all keys) for an inline definition (see MatcherDefinition), or a Template to evaluate and match to a true value.No
matchAnybooleanShould we match any of the provided matchers (true)? Or all of the matchers (false)No
matchersarrayThe list of top-level matcher IDs to apply to the input map
Example: [ "is-nearby", "is-my-device-type"]
No
maxDevicesintegerMaximum 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
presenceMatchersMatcherConfigNo
verbosebooleanEnable verbose loggingNo

Example

{
  "service": {
    "groups": {
      "my-eddystones": {
        "config": {
          "absenceMinutes": 0,
          "exclude": [
            "eddymac4",
            "eddymac5",
            "eddymac6"
          ],
          "include": [
            "eddymac1",
            "eddymac2",
            "eddymac3"
          ]
        },
        "type": "persistent"
      }
    }
  }
}

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

NameTypeDescriptionRequired
absenceMinutesintegerThe number of minutes to tolerate a device being missing before reporting it
Example: 5
No
debugbooleanEnable debug loggingNo
deviceTypesarrayDevice Types to include in this device group.No
disableMonitoringbooleanDisable sending monitoring events for this group to Edge DirectNo
excludearrayDeprecated: The list of mac addresses to exclude from the device group.No
excludeAllByDefaultbooleanDeprecated: If set, a device is excluded unless it is in the include list.No
includearrayThe list of mac addresses to include in the device group. Overrides the exclude list.No
includeMatchersMatcherConfigNo
match?Keys to match (all keys) for an inline definition (see MatcherDefinition), or a Template to evaluate and match to a true value.No
matchAnybooleanShould we match any of the provided matchers (true)? Or all of the matchers (false)No
matchersarrayThe list of top-level matcher IDs to apply to the input map
Example: [ "is-nearby", "is-my-device-type"]
No
maxDevicesintegerMaximum 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
presenceMatchersMatcherConfigNo
verbosebooleanEnable verbose loggingNo

Example

{
  "service": {
    "groups": {
      "my-eddystones": {
        "config": {
          "absenceMinutes": 19,
          "exclude": [
            "eddymac4",
            "eddymac5",
            "eddymac6"
          ],
          "include": [
            "eddymac1",
            "eddymac2",
            "eddymac3"
          ]
        },
        "type": "static"
      }
    }
  }
}