Configuration

This document provides an overview of all available Edge Connect Language options.


EdgeConnectConfig

Top level configuration for the Edge Connect Service. Must be wrapped in the service key.

Fields

NameTypeDescriptionRequired
actionsmap of string to ConnectionActionDefines the ConnectionActions that can be used in ConnectionSequences.

A map of unique identifier to a ConnectionAction definition.

ConnectionActions defined here can be reused in multiple ConnectionSequences.
No
apiRestAPINo
cloudCloudNo
connectionsmap of string to ConnectionSequenceDefines the ConnectionSequences that will handle processing of BLE connections.

A map of unique identifier to a ConnectionSequence definition.

ConnectionSequences are triggered by a connect filter.
No
devicesDevicesNo
eventGeneratorsmap of string to EventGeneratorDefines the EventGenerators to run.

A map of EventGenerator ID's to EventGeneratorConfig
No
filtersmap of string to FilterDefines the Filters available for use in Pipelines.

A map of unique identifier to a definition of a Filter.

Filters defined here can be reused in multiple Pipelines.
No
groupsmap of string to DeviceGroupDefines the DeviceGroups that can be referenced by Pipelines.

A map of unique identifier to DeviceGroup definition.
No
importsImportsNo
keysKeystoreConfigNo
logLogNo
matchersMatchersNo
metadataMetadataNo
minimumVersionstringSet the minimum version of edge-connect required to run this configuration
Example: "2021.01-01"
No
pipelinesmap of string to PipelineDefines the Pipelines of Filters that events will flow through.

A map of unique identifier to a Pipeline definition.
No
scanningScanningNo
systemSystemNo

Example

{
  "service": {
    "api": {
      "devmode": true,
      "port": 62307
    },
    "cloud": {
      "connectors": {
        "my-mqtt": {
          "config": {
            "base": "",
            "host": "iothub.myserver.net",
            "port": 8883,
            "scheme": "tcps"
          },
          "type": "mqtt"
        }
      }
    },
    "filters": {
      "eddyf": {
        "type": "eddystone"
      },
      "ruuvif": {
        "type": "ruuvi"
      }
    },
    "groups": {
      "east-wing-eddystones": {
        "config": {
          "absenceMinutes": 5,
          "exclude": [
            "abcdef7",
            "abcdef8"
          ],
          "include": [
            "abcdef5",
            "abcdef6"
          ]
        },
        "type": "static"
      }
    },
    "health": {
      "reporting": {
        "intervalMinutes": 10
      }
    },
    "log": {
      "disableBytesHex": false,
      "eventHistory": 0,
      "includeUnmatchedHistory": false,
      "jdiff": false,
      "level": "info",
      "memoryProfilingPort": null,
      "memoryProfilingRate": null,
      "printJSONEvents": false,
      "stacktrace": false,
      "truncateBytes": 0
    },
    "metrics": {
      "reporting": {
        "intervalMinutes": 10
      }
    },
    "pipelines": {
      "eddypipe": {
        "eventType": "advertisement",
        "filters": [
          "eddyf",
          "my-mqtt"
        ],
        "groups": [
          "east-wing-eddystones"
        ]
      },
      "ruuvipipe": {
        "eventType": "advertisement",
        "filters": [
          "ruuvif",
          "my-mqtt"
        ]
      }
    }
  }
}

Imports

Specify recipes to import and set configuration for the imported recipes.

Referenced By:
EdgeConnectConfig  

Fields

NameTypeDescriptionRequired
recipesarrayDefines recipes to import
Can accept named recipes ([email protected]) or inline recipe json.
Example: [ "[email protected]", "[email protected]"]
No
variablesobjectDefine recipe variables to set
Configure a recipe variable to a non-default value, the recipe variables are defined in the form recipeName.variableName.
If no values are provided here, the recipe default values will be used.
No

Example

{
  "recipes": [
    "[email protected]"
  ],
  "variables": {
    "myRecipe.connectionTimeout": "20s"
  }
}

Log

Log describes the logging configuration

Referenced By:
EdgeConnectConfig  

Fields

NameTypeDescriptionRequired
bleDebugbooleanIf true, enable debug logging from the BLE layer
Example: true
No
disableBytesHexbooleanDisable automatic conversion of byte arrays to hexNo
eventHistoryintegerNumber of pipeline events to keep in memory in a rolling buffer, for debugging purposes.
Can be accessed via /pipelines/events API endpoint
Set to -1 to disable, which is the default. Maximum value 10000.
No
excludeEventKeysarrayAny event keys provided will have their values replaced with [excluded] when printing the event.
These keys will be ignored in any map at any nesting level and dot-notation is ignored.

To exclude nestedMap.key1, add key1 to excludeEventKeys.
Note that all other instances of key1 will also be excluded (otherNestedMap.key1, etc).

Does not apply if printJSONEvents is true
Example: [ "omitKey1", "omitKey2"]
No
includeUnmatchedHistorybooleanInclude pipeline events in history that don't match any pipelines.No
jdiffbooleanUse jdiff to show only changes in events instead of the whole map when logging pipeline/connection eventsNo
levelstringThe log level. Valid options are: debug, info, error, fatal
Example: "info"
No
memoryProfilingPortintegerSet (and enable) memory profiler api port, set to non-zero to enable.
Enabling the memory profiler does impact performance depending on the memory profiling rate (see below).
No
memoryProfilingRateintegerSet memory profiler rate (if memoryProfilerPort is set)No
printJSONEventsbooleanIf true, events will be printed as indented JSON instead of the native "map:[key:value]" format
note: this will have a significant performance penalty, use for debugging only
Example: true
No
printTimestampsbooleanIf true, log messages will contain timestamps.
Example: true
No
suppressAdvDecodeErrorsbooleanIf true, advertisement decode errors will be suppressed
Example: true
No
truncateBytesintegerTruncate byte arrays at a particular length, if <=0 byte arrays are not truncatedNo

Example

{
  "service": {
    "log": {
      "disableBytesHex": false,
      "eventHistory": 0,
      "includeUnmatchedHistory": false,
      "jdiff": false,
      "level": "info",
      "memoryProfilingPort": null,
      "memoryProfilingRate": null,
      "printJSONEvents": false,
      "stacktrace": false,
      "truncateBytes": 0
    }
  }
}

Matchers

Matchers define a set of named matchers that can be reused in pipelines, filters, and actions.

Referenced By:
EdgeConnectConfig   RecipeDefinition  

Example

{
  "hasTwoWheels": "{{ eq .wheels 2 }}",
  "nearbyRs40": {
    "rssi": "\u003e-40",
    "serviceData.fd95": ""
  }
}

Metadata

Configures the initial map of metadata that is loaded at startup.
Device specific identifiers, api keys, and other application specific items can be defined here for later lookup
in Pipelines or ConnectionSequences.

Referenced By:
EdgeConnectConfig   RecipeDefinition  

Fields

NameTypeDescriptionRequired
devicesobjectDevice metadata to initializeNo
globalobjectGlobal metadata to initializeNo
persistentbooleanStore device and global metadata persistently on the file system. Metadata will be reloaded if
Edge Connect restarts, including if the gateway is rebooted.
No
transientKeysarrayA list of keys that will always be in memory, and never persisted. This will include their sub-items. For example,
if you specify "status" then "status.active" will also be transient.
No

Example

{
  "devices": {
    "someMacAddress": {
      "mySensorID": "sensor1234124"
    }
  },
  "global": {
    "secretAPIKey": "sdfjhsdfjkhsdfjk"
  }
}

RecipeWirepasOptions

These options allow a recipe to request use of the specified Wirepas stack version. If multiple
recipes require Wirepas, all recipes must use the same version of Wirepas.

swagger: model recipe_RecipeWirepasOptions

Referenced By:
RecipeOptions  

Fields

NameTypeDescriptionRequired
versionstringNo

RestAPI

RestAPI describes the configuration for the API server running inside of Edge Connect

Referenced By:
EdgeConnectConfig  

Fields

NameTypeDescriptionRequired
devmodebooleanIf devmode is set to true, the API server is accessible from any IP, not just localhost. If set to false, the API
is only available locally.
Example: false
No
portintegerThe port to host the API server on
Example: 62307
No

Example

{
  "service": {
    "api": {
      "devmode": true,
      "port": 62307
    }
  }
}

System

Describes the system configuration for Edge Connect.

Referenced By:
EdgeConnectConfig  

Fields

NameTypeDescriptionRequired
deviceGroupQueueSizeintegerThe queue size for each device group's event queueNo
filterQueueSizeintegerThe queue size per filter to enqueue before dropping messagesNo
gcPercentageintegerMapping of the GOGC env var. The percentage of heap increase to tolerate before invoking GC.No
keepUnusedItemsbooleanDisable removal of unused/unreachable pipelines, filters, connectionSequences, connectionActions, etcNo