数据类别有这 Events,Readings, ValueDescriptors, DeviceReports, Devices, DeviceProfiles, Addressables, DeviceServices, ProvisionWatchers, Commands, Notifications, Subscriptions, Transmissions
15类,都是以key-value
的方式存储,以这些类别名作为key时,其value为zset类型,仅存储ID,每个ID也都是一个key,其值为string类型,存储了具体的信息。
除了以类别名为key,还有如:device:label:rest, device:name
等类型的key(对应API),其存储的值也都是ID。
数据样例
event
{
"ID": "a6d31203-753e-4604-855b-7230df4323f5",
"Checksum": "",
"Pushed": 1612160665882,
"Device": "Temp_and_Humidity_sensor_cluster_01",
"Created": 1612160661239,
"Modified": 1612160665885,
"Origin": 1612160661187926100
}
reading
{
"id": "67303094-0676-4924-89f2-46c1db5ca904",
"created": 1612160661239,
"origin": 1612160661168127200,
"device": "Temp_and_Humidity_sensor_cluster_01",
"name": "temperature",
"value": "25",
"valueType": "Int64"
}
valueDescriptor
{
"id": "1ef97447-f87e-4390-805b-2de57d83091e",
"created": 1612159912889,
"description": "Ambient temperature in Celcius",
"name": "temperature",
"min": "-50",
"max": "100",
"defaultValue": "0",
"type": "Int64",
"uomLabel": "count",
"formatting": "%s",
"labels": [
"environment",
"temperature"
]
}
deviceReport
device
{
"created": 1612159912911,
"modified": 1612159912911,
"description": "Raspberry Pi sensor cluster",
"Id": "5d87d5d9-b3d7-4597-9064-7be7c734d8ae",
"Name": "Temp_and_Humidity_sensor_cluster_01",
"AdminState": "UNLOCKED",
"OperatingState": "ENABLED",
"Protocols": {
"example": {
"host": "dummy",
"port": "1234",
"unitID": "1"
}
},
"AutoEvents": null,
"LastConnected": 0,
"LastReported": 0,
"Labels": [
"Humidity sensor",
"Temperature sensor",
"DHT11"
],
"Location": "Tokyo",
"Service": "7e366bba-eabc-432d-83ac-7d91253578fb",
"Profile": "00c44396-7e7a-4459-b308-0698f0eda119",
"ProfileName": "SensorCluster"
}
deviceProfile
{
"created": 1612159912898,
"modified": 1612159912898,
"description": "Sensor cluster providing metrics for temperature and humidity",
"Id": "00c44396-7e7a-4459-b308-0698f0eda119",
"Name": "SensorCluster",
"Manufacturer": "Raspberry Pi Foundation",
"Model": "Raspberry Pi 3b+",
"Labels": [
"rpi"
],
"DeviceResources": [
{
"description": "Sensor cluster temperature values",
"name": "temperature",
"properties": {
"value": {
"type": "Int64",
"readWrite": "RW",
"minimum": "-50",
"maximum": "100",
"defaultValue": "9",
"size": "4"
}
}
},
{
"description": "Sensor cluster humidity values",
"name": "humidity",
"properties": {
"value": {
"type": "Int64",
"readWrite": "RW",
"minimum": "0",
"maximum": "100",
"defaultValue": "9",
"size": "4"
}
}
}
],
"DeviceCommands": null,
"CoreCommands": null
}
addressable
{
"created": 1611548272223,
"modified": 1611548272223,
"origin": 1611548272222,
"id": "b5432dff-12ca-4258-9109-77cc3df9e478",
"name": "edgex-device-rest",
"protocol": "HTTP",
"method": "POST",
"address": "edgex-device-rest",
"port": 49986,
"path": "/api/v1/callback",
"baseURL": "http://edgex-device-rest:49986",
"url": "http://edgex-device-rest:49986/api/v1/callback"
}
deviceService
{
"created": 1611548272228,
"modified": 1611548272228,
"origin": 1611548272225,
"Id": "7e366bba-eabc-432d-83ac-7d91253578fb",
"Name": "edgex-device-rest",
"LastConnected": 0,
"LastReported": 0,
"OperatingState": "ENABLED",
"Addressable": "b5432dff-12ca-4258-9109-77cc3df9e478",
"Labels": null,
"AdminState": "UNLOCKED"
}
provisionWatcher
command
notification
{
"created": 1612159912928,
"modified": 1612159912930,
"id": "07728901-30bb-403b-b814-01d742c826fc",
"slug": "device-change-1612159912912",
"sender": "edgex-core-metadata",
"category": "SW_HEALTH",
"severity": "NORMAL",
"content": "Device update: Temp_and_Humidity_sensor_cluster_01-POST",
"description": "Metadata device notice",
"status": "PROCESSED",
"labels": [
"metadata"
]
}
subscription
transmission
interval
{
"Timestamps": {
"created": 1611548262243,
"modified": 1611548262243
},
"id": "f89f103d-ea3a-4200-8e8e-3cc021266fa4",
"name": "midnight",
"start": "20180101T000000",
"frequency": "24h"
}
intervalAction
{
"id": "0b15943e-f5ec-4995-a15b-2910aa4729ab",
"created": 1611548262245,
"modified": 1611548262245,
"name": "scrub-pushed-events",
"interval": "midnight",
"target": "core-data",
"protocol": "http",
"httpMethod": "DELETE",
"address": "edgex-core-data",
"port": 48080,
"path": "/api/v1/event/scrub"
}