4.2. Example Configurations¶
Edge Connect examples demonstrating some simple use cases.
4.2.1. Badge Tracking¶
In this example, we are watching for particular badges moving around a job site. We want to know on a 10s interval when they have been discovered or lost from view from each gateway. To achieve this, we run this pipeline on a few gateways throughout the job site.
In the pipeline, we are looking for a few particular MAC addresses using a device
group (groups
) named static
. When any of the devices are found, we
select
the rssi
and mac
. Every 10 seconds this information is
aggregated
and wrapped
in the json
key employeesSeen
and
then posted to our http
endpoint.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | {
"settings": {
"rigado-edge-connect": {
"service": {
"api": {
"devmode": true
},
"cloud": {
"connectors": {
"http": {
"config": {
"headers": {
"Content-Type": "application/json"
},
"method": "POST",
"url": "https://ourserver.com/api/gateway"
},
"type": "http"
}
}
},
"filters": {
"aggregate": {
"config": {
"interval": "10s",
"key": "mac",
"mode": "map"
},
"type": "aggregate"
},
"organize": {
"config": {
"key": "employeesSeen"
},
"type": "wrap"
},
"publish": {
"config": {
"connector": "http"
},
"type": "publish"
},
"select": {
"config": {
"keys": [
"rssi",
"mac"
]
},
"type": "select"
},
"timestamp": {
"config": {
"keyPairs": {
"serial": "",
"timestamp": ""
}
},
"type": "inject"
}
},
"groups": {
"badges": {
"config": {
"include": [
"fcded3dfd1d6",
"e8951d391b6d",
"f1fa21993d14",
"ac243f252710",
"d27ce4857fa2",
"cfd61932c8d4"
]
},
"type": "static"
}
},
"log": {
"level": "info"
},
"pipelines": {
"testPipe": {
"filters": [
"select",
"aggregate",
"organize",
"timestamp",
"publish"
],
"groups": [
"badges"
]
}
}
}
}
},
"type": "APP_SET"
}
|
4.2.2. Heat and Device Traffic Monitoring¶
This example monitors temperature data using Ruuvi tags. It also listens for unique devices near each gateway to get a general sense of traffic.
In the ruuvi-pipe
pipeline we first detect the ruuvi
tag, then inject
the serial
and timestamp
into the data, then aggregate
every 10s by
mac
, convert to json
and send to azure
.
In the all-pipe
pipeline, we do everything the same except we don’t filter
on ruuvi
device type, so we can see all data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | {
"settings": {
"rigado-edge-connect": {
"service": {
"cloud": {
"connectors": {
"azure": {
"config": {
"connectionString": "HostName=RigadoExamples.azure-devices.net;DeviceId=C123431826-12345;SharedAccessKey=aGVsbG8K"
},
"type": "azureiot"
}
}
},
"filters": {
"agg": {
"config": {
"interval": "10s",
"key": "mac",
"mapMax": 50,
"mode": "mapArray"
},
"type": "aggregate"
},
"inject": {
"config": {
"keyPairs": {
"serial": "",
"timestamp": ""
}
},
"type": "inject"
},
"publish": {
"config": {
"connector": "azure"
},
"type": "publish"
},
"ruuvi": {
"type": "ruuvi"
}
},
"pipelines": {
"all-pipe": {
"filters": [
"inject",
"agg",
"publish"
]
},
"ruuvi-pipe": {
"filters": [
"ruuvi",
"inject",
"agg",
"publish"
]
}
}
}
}
},
"type": "APP_SET"
}
|