Device Model

Description

This entity captures the static properties of a Device.

Data Model

The data model is defined as shown below:

  • id : Unique identifier.

  • type : Entity type. It must be equal to DeviceModel.

  • category : Device's category(ies).

    • Attribute type: List of Text
    • Allowed values, one of the following or any other meaningful to the application:
      • sensor : A device that detects and responds to events or changes in the physical environment such as light, motion, or temperature changes. https://w3id.org/saref#Sensor.
      • actuator : A device responsible for moving or controlling a mechanism or system. https://w3id.org/saref#Actuator.
      • meter : A device built to accurately detect and display a quantity in a form readable by a human being. Partially defined by SAREF.
      • HVAC : Heating, Ventilation and Air Conditioning (HVAC) device that provides indoor environmental comfort. https://w3id.org/saref#HVAC.
      • network : A device used to connect other devices in a network, such as hub, switch or router in a LAN or Sensor network. (https://w3id.org/saref#Network.
      • multimedia : A device designed to display, store, record or play multimedia content such as audio, images, animation, video. https://w3id.org/saref#Multimedia
    • Mandatory
  • deviceClass : Class of constrained device as specified by RFC 7228. If the device is not a constrained device this property can be left as null or undefined. + Attribute type: Text + Normative References: RFC7228 + Allowed values: (C0, C1, C2) + Optional

  • controlledProperty : Anything that can be sensed, measured or controlled by.

    • Attribute type: List of Text
    • Allowed values: (some of this values are defined as instances of the class Property in SAREF)
      • (temperature, humidity, light, motion, fillingLevel, occupancy, power, pressure, smoke, energy, airPollution, noiseLevel, weatherConditions, precipitation, windSpeed, windDirection, atmosphericPressure, solarRadiation, depth, pH, conductivity, conductance, tss, tds, turbidity, salinity, orp, cdom, waterPollution, location, speed, heading, weight, waterConsumption, gasComsumption, electricityConsumption, soilMoisture, trafficFlow)
    • Mandatory
  • function : The functionality necessary to accomplish the task for which a Device is designed. A device can be designed to perform more than one function. Defined by SAREF.

    • Attribute type: List of Text
    • Allowed values: (levelControl, sensing, onOff, openClose, metering, eventNotification), from SAREF.
    • Optional
  • supportedProtocol : Supported protocol(s) or networks.

    • Attribute type: List of Text.
    • Allowed values: (ul20, mqtt, lwm2m, http, websocket, onem2m, sigfox, lora, nb-iot, ec-gsm-iot, lte-m, cat-m, 3g, grps) or any other value meaningful for an application.
    • Optional
  • supportedUnits : Units of measurement supported by the device.

    • Attribute type: List of Text.
    • Allowed values: The unit code (text) of measurement given using the UN/CEFACT Common Code (max. 3 characters).
    • Optional
  • energyLimitationClass : Device's class of energy limitation as per RFC 7228.

    • Attribute type: Text
    • Normative References: RFC7228
    • Allowed values: (E0, E1, E2, E9)
    • Optional
  • brandName : Device's brand name.

  • modelName : Device's model name.

  • manufacturerName : Device's manufacturer name.

  • name : Name given to this device model.

  • description : Device's description

  • documentation : A link to device's documentation.

    • Attribute type: URL
    • Optional
  • image : A link to an image depicting the concerned device.

  • dateModified : Last update timestamp of this entity.

    • Attribute type: DateTime
    • Read-Only. Automatically generated.
  • dateCreated : Entity's creation timestamp.

    • Attribute type: DateTime
    • Read-Only. Automatically generated.

Note: JSON Schemas only capture the NGSI simplified representation, this means that to test the JSON schema examples with a FIWARE NGSI version 2 API implementation, you need to use the keyValues mode (options=keyValues).

Examples

{
  "id": "myDevice-wastecontainer-sensor-345",
  "type": "DeviceModel",
  "name": "myDevice Sensor for Containers 345",
  "brandName": "myDevice",
  "modelName": "S4Container 345",
  "manufacturerName": "myDevice Inc.",
  "category": ["sensor"],
  "function": ["sensing"],
  "controlledProperty": ["fillingLevel", "temperature"]
}

Test it with a real service

Issues