View on GitHub

SHOP4CF Data Models

Documentation of FIWARE data models used in SHOP4CF

Device

This model is based on FIWARE Device.

An apparatus (hardware + software + firmware) intended to accomplish a particular task (sensing the environment, actuating, etc.). A Device is a tangible object which contains some logic and is producer and/or consumer of data. A Device is always assumed to be capable of communicating electronically via a network.

The required attributes are: id, type, controlledProperty.

Two examples are given below: a sensor and an AGV.

Sensor

An example sensor with serial number “9845A”, measuring electrical current on a busbar (kind of an electical conductor) no. 789, with the current value of 11.54 A:

{
    "id": "urn:ngsi-ld:Device:company-xyz:sensor-12345",
    "type": "Device",
    "source": {
        "type": "Relationship",
        "object": "urn:ngsi-ld:Device:company-xyz:busbar-789"
    },
    "category": {
        "type": "Property",
        "value": ["sensor"]
    },
    "serialNumber": {
        "type": "Property",
        "value": "9845A"
    },
    "controlledProperty": {
        "type": "Property",
        "value": ["electricCurrent"]
    },
    "value": {
        "type": "Property",
        "value": 11.54,
        "observedAt": "2020-12-01T11:23:19Z"
    },
    "deviceState": {
        "type": "Property",
        "value": "ok"
    },
    "isSpecifiedBy": {
        "type": "Property",
        "value": [
            {
                "type": "Relationship",
                "object": "urn:ngsi-ld:ResourceSpecification:company-xyz:sensor"
            }
        ]
    },
    "@context": [
        "https://smartdatamodels.org/context.jsonld",
        "https://raw.githubusercontent.com/shop4cf/data-models/master/docs/shop4cfcontext.jsonld"
    ]
}

Notes:

AGV

An example entity reporting the position of AGV agv-713 within the shop floor:

{
    "id": "urn:ngsi-ld:Device:company-xyz:agv-713",
    "type": "Device",
    "category": {
        "type": "Property",
        "value": ["sensor"]
    },
    "batteryLevel": {
        "type": "Property",
        "value": 1.0
    },
    "controlledProperty": {
        "type": "Property",
        "value": ["location"]
    },
    "relativePosition": {
        "type": "Property",
        "value": [5.5, 21],
        "observedAt": "2020-12-01T11:23:19Z"
    },
    "deviceState": {
        "type": "Property",
        "value": "ok"
    },
    "isSpecifiedBy": {
        "type": "Property",
        "value": [
            {
                "type": "Relationship",
                "object": "urn:ngsi-ld:ResourceSpecification:company-xyz:robot"
            },
            {
                "type": "Relationship",
                "object": "urn:ngsi-ld:ResourceSpecification:company-xyz:agv"
            }
        ]
    },
    "@context": [
        "https://smartdatamodels.org/context.jsonld",
        "https://raw.githubusercontent.com/shop4cf/data-models/master/docs/shop4cfcontext.jsonld"
    ]
}

Notes: