Connections
Sequence of ConnectionActions
to run upon BLE Connection. Triggered by the connect
filter
ConnectionAction
ConnectionAction
Action to take once BLE Connection is established. Chained together in a ConnectionSequence
.
Referenced By:
EdgeConnectConfig RecipeDefinition
Fields
Name | Type | Description | Required |
---|---|---|---|
config | object | Configuration information for the particular type of Action used. Described in the documentation for each Action type. In addition to the config parameters specific to each Action type, you may also specify these debug options in the config map:
| No |
type | string | The unique type of the Action, must match the type of one of the available ConnectionActions . Example: "read" | Yes |
Example
{
"service": {
"actions": {
"read-custom-char": {
"config": {
"characteristic": "2a26",
"longRead": false,
"mode": "append",
"outputKey": "logs",
"service": "375aee4c-6dea-5105-9074-14d5ba44f766"
},
"type": "read"
}
}
}
}
ConnectionSequence
ConnectionSequence
Sequence of ConnectionActions
to run upon BLE Connection. Triggered by the connect
filter.
Referenced By:
EdgeConnectConfig RecipeDefinition
Fields
Name | Type | Description | Required |
---|---|---|---|
actions | array | List of ConnectionAction identifiers.References the actions defined on Config . | Yes |
allowEarlyExit | boolean | Allow for the connection to exit, but proceed with the rest of the pipeline. Default behavior (false) will end the pipeline if the connection ends prematurely. This does not allow errors to proceed, only actions that return nil. | No |
attempts | integer | When set to a value greater than 0, the set of actions for the connection will be attempted the number of specified times. Note that this only applies to when a connection is successfully made to a device. If a device is not present and the connection request times out, no further attempts to connect will occur until an advertisement from the device is seen again. This minimum number of attempts is 1. The maximum is 10. | No |
debug | boolean | Enable debug logging | No |
verbose | boolean | Enable verbose logging | No |
Example
{
"service": {
"connections": {
"readBatteryConn": {
"actions": [
"read-custom-battery",
"update-custom-metadata"
]
}
}
}
}
Updated over 1 year ago