This entity contains a harmonised description of a generic device. This entity provides an essentially static description of a generic device and is therefore applicable to all IoT segments and related IoT applications.
Attribute Name | Attribute Type | Description | Constraint |
---|---|---|---|
id | @id | Provides a unique identifier for an instance of the entity either in the form of a URI (i.e. either a publicly accessible URL or a URN). | Mandatory |
type | @type | Defines the type of the entity. | Mandatory |
createdAt | TemporalProperty | Indicates the date/ time that the instance of the entity was created in ISO 8601 format. The value of this will be set by the server when the entity was created. | Mandatory |
modifiedAt | TemporalProperty | Indicates the date/ time when the entity was last modified in ISO 8601 format. The value of this will be set by the server when the entity was modified, if the entity has not been modified it may have a null value. | Optional |
source | Property | Specifies the URL to the source of this data (either organisation or where relevant more specific source) | Recommended |
dataProvider | Property | Specifies the URL to information about the provider of this information | Recommended |
entityVersion | Property | The entity specification version as a number. A version number of 2.0 or later denotes the entity is represented using NGSI-LD | Recommended |
deviceModel | Relationship | A reference to the associated Device Model for this device. | Mandatory |
serialNumber | Property | The serial number assigned by the manufacturer. | Recommended |
supplierName | Property | The name of the supplier of this device. | Recommended |
countryOfManufacture | Property | The country where this device was manufactured. | Recommended |
factory | Property | The factory name/code manufacturing this device. | Recommended |
firstUsedAt | DateTime | Indicates the date/time at which date and time the device was first used (nominally in UTC). | Recommended |
lastCalibrationAt | DateTime | Indicates the date/time at which date and time the device was last calibrated (nominally in UTC). | Recommended |
installedAt | DateTime | Indicates the date/time at which date and time the device was installed (nominally in UTC). | Recommended |
manufacturedAt | DateTime | Indicates the date/time at which date and time the device was manufactured (nominally in UTC). | Recommended |
description | Property | An optional description of this device. | Recommended |
owner | Relationship | Reference to the owner or owners of the device as either a Schema.org person or organization. https://schema.org/Person https://schema.org/Organization |
Optional |
hardwareVersion | Property | The (manufacturer specific) hardware version of this device. | Recommended |
firmwareVersion | Property | The (manufacturer specific) firmware version of this device. | Recommended |
softwareVersion | Property | The (manufacturer specific) software version of this device. | Recommended |
osVersion | Property | The (manufacturer specific) operating system version of this device. | Recommended |
supportedProtocols | Property | A list of communications protocols supported by the device. | Optional |
location | GeoProperty | The installed / last known geo location (point/ polygon) of the device. | Optional |
online | Property | The communication status of this device. A logical representation of Offline (false) or Online (true). | Optional |
status | Property | Text formatted (current) device status code or description. Expected to be the manufacturer or device specific status code generated by the device. | Recommended |
batteryLevel | Property | Battery level. It must be equal to: 1.0 When the battery charge is full. 0.0 When the battery charge empty. Null when it cannot be determined. |
Optional |
value | Property | The observed or reported value of the device. For control applications the value can be updated to change the device/ actuator setting. Complex values are supported through making the 'value' field a JSON object. | Recommended |
dateFirstUsed | DateTime | Indicates the date/time at which date and time the machine was first used (nominally in UTC). Note this field was defined for use with NGSIv2 and is now deprecated. For new entities and applications replace with firstUsedAt |
Deprecated |
dateInstalled | DateTime | Indicates the date/time at which date and time the machine was installed (nominally in UTC). Note this field was defined for use with NGSIv2 and is now deprecated. For new entities and applications replace with installedAt |
Deprecated |
dateLastCalibration | DateTime | Indicates the date/time at which date and time the machine was last calibrated (nominally in UTC). Note this field was defined for use with NGSIv2 and is now deprecated. For new entities and applications replace with lastCalibratedAt |
Deprecated |
dateManufactured | DateTime | Indicates the date/time at which date and time the machine was manufactured (nominally in UTC). Note this field was defined for use with NGSIv2 and is now deprecated. For new entities and applications replace with manufacturedAt |
Deprecated |
The following NGSI-LD context definition applies to the Device entity
{
"@context": {
"source": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/source",
"dataProvider": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/dataprovider",
"entityVersion": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/entityversion",
"deviceModel": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/devicemodel",
"serialNumber": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/serialnumber",
"supplierName": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/suppliername",
"countryOfManufacture": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/countryofmanufacture",
"factory": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/factory",
"firstUsedAt": {
"@type": "DateTime",
"@id": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/firstusedat"
},
"lastCalibrationAt": {
"@type": "DateTime",
"@id": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/lastcalibrationat"
},
"installedAt": {
"@type": "DateTime",
"@id": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/installedat"
},
"manufacturedAt": {
"@type": "DateTime",
"@id": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/manufacturedat"
},
"description": "https://schema.org/description",
"owner": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/owner",
"hardwareVersion": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/hardwareversion",
"firmwareVersion": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/firmwareversion",
"softwareVersion": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/softwareversion",
"osVersion": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/osversion",
"supportedProtocols": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/supportedprotocols",
"location": "http://uri.etsi.org/ngsi-ld/location",
"online": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/online",
"status": "http://uri.etsi.org/ngsi-ld/status",
"batteryLevel": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/batterylevel",
"value": "http://uri.etsi.org/ngsi-ld/hasValue",
"dateFirstUsed": {
"@type": "DateTime",
"@id": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/datefirstused"
},
"dateInstalled": {
"@type": "DateTime",
"@id": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/dateinstalled"
},
"dateLastCalibration": {
"@type": "DateTime",
"@id": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/datelastcalibration"
},
"dateManufactured": {
"@type": "DateTime",
"@id": "https://www.gsma.com/iot/iot-big-data/ngsi-ld/datemanufactured"
}
}
}
The following is an example instance of the Device entity
Download example entity definition.
{
"@context": [
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/coreContext/ngsi-ld-core-context.json",
"https://raw.githubusercontent.com/GSMADeveloper/NGSI-LD-Entities/master/examples/Device-context.jsonld"
],
"id": "urn:ngsi-ld:Device:ba2d4fd9-f57f-4610-a589-2d52670d14f3",
"type": "Device",
"createdAt": "2017-01-01T01:20:00Z",
"modifiedAt": "2017-05-04T12:30:00Z",
"source": "https://source.example.com",
"dataProvider": "https://provider.example.com",
"entityVersion": 2.0,
"deviceModel": {
"type": "Relationship",
"object": "urn:ngsi-ld:DeviceModel:d1be2e61-d9e7-43cd-9c68-51e0861b3a49"
},
"serialNumber": {
"type": "Property",
"value": "X123456789C"
},
"supplierName": {
"type": "Property",
"value": "ACME Direct, Inc."
},
"countryOfManufacture": {
"type": "Property",
"value": "UK"
},
"factory": {
"type": "Property",
"value": "56A8"
},
"firstUsedAt": {
"type": "Property",
"value": "2017-05-04T11:18:16Z"
},
"lastCalibrationAt": {
"type": "Property",
"value": "2017-05-04T10:18:16Z"
},
"installedAt": {
"type": "Property",
"value": "2017-05-04T10:18:16Z"
},
"manufacturedAt": {
"type": "Property",
"value": "2017-05-04T10:18:16Z"
},
"description": {
"type": "Property",
"value": "Thermocouple"
},
"owner": {
"type": "Relationship",
"object": [
"urn:ngsi-ld:Person:6babd63c-46e6-11e8-aaf6-abd6d570d4ec",
"urn:ngsi-ld:Organization:76f72898-46e6-11e8-8340-53a92642d82a"
]
},
"hardwareVersion": {
"type": "Property",
"value": "1.2"
},
"firmwareVersion": {
"type": "Property",
"value": "2.8.56"
},
"softwareVersion": {
"type": "Property",
"value": "2.5.11"
},
"osVersion": {
"type": "Property",
"value": "8.1"
},
"supportedProtocols": {
"type": "Property",
"value": [
"HTTP",
"HTTPS",
"FTP"
],
"observedAt": "2017-05-04T12:30:00Z"
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [
-104.99404,
39.75621
]
}
},
"online": {
"type": "Property",
"value": true,
"observedAt": "2017-05-04T12:30:00Z"
},
"status": {
"type": "Property",
"value": "SC1001",
"observedAt": "2017-05-04T12:30:00Z"
},
"batteryLevel": {
"type": "Property",
"value": 0.7,
"observedAt": "2017-05-04T12:30:00Z"
},
"value": {
"type": "Property",
"value": 0.885,
"observedAt": "2017-05-04T12:30:00Z"
}
}