iotagent-node-lib
Version:
IoT Agent library to interface with NGSI Context Broker
216 lines (215 loc) • 6.57 kB
JSON
{
"title": "Device",
"description": "Payload to update a provisioned device",
"additionalProperties": false,
"type": "object",
"properties": {
"device_id": {
"description": "Device ID of the physical device",
"type": "string"
},
"entity_name": {
"description": "Name of the target entity",
"type": "string"
},
"entity_type": {
"description": "Type of the target entity",
"type": "string"
},
"apikey": {
"description": "apikey",
"type": "string",
"required": false
},
"timezone": {
"description": "Time zone where the device is located",
"type": "string"
},
"protocol": {
"description": "Protocol the device is using to communicate with the platform",
"type": "string"
},
"endpoint": {
"description": "Endpoint for the commands targeting this device",
"type": "string"
},
"transport": {
"description": "Transport protocol used by the platform to communicate with the device",
"type": "string"
},
"lazy": {
"description": "list of lazy attributes of the devices",
"type": "array",
"id": "lazy",
"required": false,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"object_id": {
"description": "ID of the attribute in the device",
"type": "string",
"pattern": "^([^<>();'=\"]+)+$"
},
"name": {
"description": "Name of the attribute in the target entity",
"type": "string",
"pattern": "^([^<>();'=\"]+)+$"
},
"type": {
"description": "Type of the attribute in the target entity",
"type": "string",
"pattern": "^([^<>();'=\"]+)+$"
}
}
}
},
"attributes": {
"description": "list of active attributes of the devices",
"type": "array",
"id": "attributes",
"required": false,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"object_id": {
"description": "ID of the attribute in the device",
"type": "string",
"pattern": "^([^<>();'=\"]+)+$"
},
"name": {
"description": "Name of the attribute in the target entity",
"type": "string",
"pattern": "^([^<>();'=\"]+)+$"
},
"type": {
"description": "Type of the attribute in the target entity",
"type": "string",
"pattern": "^([^<>();'=\"]+)+$"
},
"expression": {
"description": "Optional expression for measurement transformation",
"type": "string"
},
"skipValue": {
"description": "Attribute is skipped when result of apply expression is this value",
"type": "any"
},
"entity_name": {
"description": "Optional entity name for multientity updates",
"type": "string"
},
"entity_type": {
"description": "Optional entity type for multientity updatess",
"type": "string",
"pattern": "^([^<>;'=\"]+)+$"
},
"metadata": {
"description": "Attribute Metadata",
"type": "object"
}
}
}
},
"commands": {
"description": "list of commands of the devices",
"type": "array",
"id": "lazy",
"required": false,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"object_id": {
"description": "ID of the attribute in the device",
"type": "string",
"pattern": "^([^<>();'=\"]+)+$"
},
"name": {
"description": "Name of the attribute in the target entity",
"type": "string",
"pattern": "^([^<>();'=\"]+)+$"
},
"type": {
"description": "Type of the attribute in the target entity",
"type": "string",
"pattern": "^([^<>();'=\"]+)+$"
},
"value": {
"description": "Value of the command (currently ignored)",
"type": "string",
"pattern": "^([^<>();'=\"]+)*$"
},
"expression": {
"description": "Optional expression for command transformation",
"type": "string"
},
"headers": {
"description": "Optional headers to include with command",
"type": "object"
},
"payloadType": {
"description": "Payload type",
"type": "string"
},
"useCBflowControl": {
"description": "use CB flowControl option",
"type": "boolean"
},
"contentType": {
"description": "Content type",
"type": "string"
},
"mqtt": {
"description": "Mqtt properties",
"type": "object",
"additionalProperties": false,
"properties": {
"retain": {
"description": "MQTT Retain message",
"type": "boolean"
},
"qos": {
"description": "MQTT QoS level",
"type": "string",
"pattern": "^([0-2])$"
}
}
}
}
}
},
"internal_attributes": {
"description": "Free form array of internal attributes for particular IOTAgents",
"type": "any"
},
"static_attributes": {
"description": "Free form array of data to be appended to the target entity",
"type": "array"
},
"timestamp": {
"description": "Timestamp",
"type": "boolean"
},
"explicitAttrs": {
"description": "Flag to decide update of active attributes only"
},
"ngsiVersion": {
"description": "NGSI Interface for this device",
"type": "string"
},
"payloadType": {
"description": "Payload type allowed for measures for this device",
"type": "string"
},
"storeLastMeasure": {
"description": "Store last measure",
"type": "boolean"
},
"lastMeasure": {
"description": "last measure",
"type": "object"
}
}
}