Skip to content

Commit

Permalink
updated $schema last version
Browse files Browse the repository at this point in the history
  • Loading branch information
albertoabellagarcia committed Sep 16, 2024
1 parent 005ed78 commit 560ee91
Showing 1 changed file with 96 additions and 143 deletions.
239 changes: 96 additions & 143 deletions Device/schema.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "http://json-schema.org/schema#",
"$schemaVersion": "0.0.9",
"modelTags": "",
"$id": "https://smart-data-models.github.io/dataModel.Device/Device/schema.json",
"title": " Smart Data Models - Device schema",
"description": "An apparatus (hardware + software + firmware) intended to accomplish a particular task (sensing the environment, actuating, etc.).",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$schemaVersion": "0.3.4",
"modelTags": "IUDX",
"$id": "https://smart-data-models.github.io/dataModel.Weather/WeatherObserved/schema.json",
"title": "Weather Observed schema - Smart Data Models",
"description": "An observation of weather conditions at a certain place and time. This data model has been developed in cooperation with mobile operators and the GSMA.",
"type": "object",
"allOf": [
{
Expand All @@ -14,179 +14,132 @@
"$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons"
},
{
"$ref": "https://smart-data-models.github.io/dataModel.Device/device-schema.json#/definitions/Device-Commons"
"$ref": "https://smart-data-models.github.io/dataModel.Weather/weather-schema.json#/definitions/Weather-Commons"
},
{
"properties": {
"type": {
"type": "string",
"enum": [
"Device"
"WeatherObserved"
],
"description": "Property. NGSI Entity type. It has to be Device"
"description": "Property. NGSI Entity type. It has to be WeatherObserved"
},
"controlledAsset": {
"type": "array",
"description": "Property. Model:'https://schema.org/Text'. List of the asset(s) (building, object, etc.) controlled by the device",
"items": {
"$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/EntityIdentifierType"
}
},
"mnc": {
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. This property identifies the Mobile Network Code (MNC) of the network the device is attached to. The MNC is used in combination with a Mobile Country Code (MCC) (also known as a 'MCC / MNC tuple') to uniquely identify a mobile phone operator/carrier using the GSM, CDMA, iDEN, TETRA and 3G / 4G public land mobile networks and some satellite mobile networks"
},
"mcc": {
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. This property identifies the Mobile Country Code"
},
"ipAddress": {
"type": "array",
"description": "Property. Model:'https://schema.org/Text'. List of IP address of the device. It can be a comma separated list of values if the device has more than one IP address",
"items": {
"type": "string",
"oneOf": [
{
"format": "ipv4"
},
{
"format": "ipv6"
}
]
}
},
"configuration": {
"type": "array",
"description": "Property. Model:'https://schema.org/StructuredValue'. Device's technical configuration. This attribute is intended to be a array properties and their values which capture parameters which have to do with the configuration of a device (timeouts, reporting periods, etc.) and which are not currently covered by the standard attributes defined by this model",
"items": {
"type": "object",
"properties": {
"parameter": {
"type": "string",
"description": "Property. Name of the parameter in the configuration of the device"
},
"value": {
"type": "string",
"description": "Property. Value of the parameter in the configuration of the device"
}
}
}
},
"dateInstalled": {
"type": "string",
"format": "date-time",
"description": "Property. Model:'https://schema.org/DateTime'. A timestamp which denotes when the device was installed (if it requires installation)"
},
"dateFirstUsed": {
"type": "string",
"format": "date-time",
"description": "Property. Model:'https://schema.org/DateTime'. A timestamp which denotes when the device was first used"
"dateObserved": {
"$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/dateObserved"
},
"dateManufactured": {
"type": "string",
"format": "date-time",
"description": "Property. Model:'https://schema.org/DateTime'. A timestamp which denotes when the device was manufactured"
"precipitation": {
"type": "number",
"minimum": 0,
"description": "Property. Model:'https://schema.org/Number'. Amount of water rain registered. Units:'Liters per square meter'. "
},
"hardwareVersion": {
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. The hardware version of this device"
"solarRadiation": {
"type": "number",
"minimum": 0,
"description": "Property. Model:'https://schema.org/Number'. The solar radiation observed measured in Watts per square. Units:'w/m2'"
},
"softwareVersion": {
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. The software version of this device"
"directIrradiation": {
"type": "number",
"minimum": 0,
"description": "Property. Model:'https://schema.org/Number'. Direct irradiance is the part of the solar irradiance that directly reaches a surface. Units:'w/m2'"
},
"firmwareVersion": {
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. The firmware version of this device"
"diffuseIrradiation": {
"type": "number",
"minimum": 0,
"description": "Property. Model:'https://schema.org/Number'. Diffuse irradiance is the part of the solar irradiance that is scattered by the atmosphere. Units:'w/m2'"
},
"osVersion": {
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. The version of the host operating system device"
"pressureTendency": {
"oneOf": [
{
"type": "string",
"enum": [
"falling",
"raising",
"steady"
]
},
{
"type": "number"
}
],
"description": "Property. Enum:'falling, raising, steady'. Is the pressure rising or falling? It can be expressed in quantitative terms or qualitative terms"
},
"distance": {
"dewPoint": {
"type": "number",
"description": "Property. Model:'https://schema.org/Distance'. Location of this device represented by a distance from a starting point. All units are accepted in [CEFACT](https://www.unece.org/cefact.html) code"
"description": "Property. Model:'https://schema.org/Number'. Units:'Celsius degrees'. The dew point encoded as a number. Observed temperature to which air must be cooled to become saturated with water vapor"
},
"dstAware": {
"type": "boolean",
"description": "Property. Indicates a device which is Daylight Savings Time Aware (True). In case it is then the Timestamp is automatically adjusted by the device to reflect DST changes. If not (False) the time adjustments must be taken care of by the user"
"refDevice": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 256,
"pattern": "^[\\w\\-\\.\\{\\}\\$\\+\\*\\[\\]`|~^@!,:\\\\]+$",
"description": "Property. Identifier format of any NGSI entity"
},
{
"type": "string",
"format": "uri",
"description": "Property. Identifier format of any NGSI entity"
}
],
"description": "Relationship. Model:'https://schema.org/URL'. A reference to the device(s) which captured this observation"
},
"depth": {
"streamGauge": {
"type": "number",
"description": "Property. Model:'https://schema.org/depth'. Location of this device represented by a depth from a starting point. All units are accepted in [CEFACT](https://www.unece.org/cefact.html) code"
"minimum": 0,
"description": "Property. Model:'https://schema.org/Number'. The water level surface elevation observed by Hydrometric measurement sensors, namely a [Stream Gauge](https://en.wikipedia.org/wiki/Stream_gauge) expressed in centimeters. Units:'centimeters'"
},
"relativePosition": {
"type": "string",
"description": "Property. Location of this device in a coordinate system according to its local emplacement"
},
"direction": {
"type": "string",
"enum": [
"Inlet",
"Outlet",
"Entry",
"Exit"
],
"description": "Property. Enum:'Inlet, Outlet, Entry, Exit'. Model:'https://schema.org/DateTime'. A timestamp which denotes when the device was installed (if it requires installation)"
"snowHeight": {
"type": "number",
"minimum": 0,
"description": "Property. Model:'https://schema.org/Number'. The snow height observed by generic snow depth measurement sensors, expressed in centimeters. Units:'centimeters'"
},
"dateLastCalibration": {
"type": "string",
"format": "date-time",
"description": "Property. Model:'https://schema.org/DateTime'. A timestamp which denotes when the last calibration of the device happened"
"uVIndexMax": {
"type": "number",
"minimum": 0,
"description": "Property. Model:'https://schema.org/Number'. The maximum UV index for the period, based on the World Health Organization's UV Index measure. [http://www.who.int/uv/intersunprogramme/activities/uv_index/en/](http://www.who.int/uv/intersunprogramme/activities/uv_index/en/) the values between 1 and 11 are the valid range for the index. The value 0 is for describing that no signal is detected so no value is stored"
},
"serialNumber": {
"aqiMajorPollutant": {
"type": "string",
"description": "Property. Model:'https://schema.org/serialNumber'. The serial number assigned by the manufacturer"
"description": "Property. Model:'https://schema.org/Text'. Major pollutant in the Air Quality Index (AQI)"
},
"provider": {
"aqiMajorPollutantForecast": {
"type": "string",
"description": "Property. Model:'https://schema.org/provider'. The provider of the device"
},
"refDeviceModel": {
"description": "Relationship. Model of the device",
"$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/EntityIdentifierType"
"description": "Property. Model:'https://schema.org/Text'. Forecasted major air pollutant in the Air Quality Index (AQI) over a certain duration in future"
},
"batteryLevel": {
"description": "Property. Model:'https://schema.org/Number'. Device battery level. It must be equal to 1.0 when battery is full. 0.0 when battery is empty. -1 when transiently cannot be determined",
"oneOf": [
{
"type": "number",
"maximum": 1,
"minimum": 0
},
{
"type": "number",
"maximum": -1,
"minimum": -1
}
]
"airTemperatureForecast": {
"type": "number",
"description": "Property. Model:'https://schema.org/Number'. Forecasted value of air temperature over a certain duration in future"
},
"rssi": {
"precipitationForecast": {
"type": "number",
"description": "Property. Model:'https://schema.org/Number'. Received signal strength indicator for a wireless enabled device. It must be expressed in dBm or mW, use unitcode to set it out. "
"description": "Property. Model:'https://schema.org/Number'. Forecasted rainfall over a certain duration in future"
},
"deviceState": {
"type": "string",
"description": "Property. Model:'https://schema.org/Text'. State of this device from an operational point of view. Its value can be vendor dependent"
"airQualityIndex": {
"type": "number",
"description": "Property. Model:'https://schema.org/Number'. Air quality index is a number used to report the quality of the air on any given day"
},
"dateLastValueReported": {
"type": "string",
"format": "date-time",
"description": "Property. Model:'https://schema.org/DateTime'. A timestamp which denotes the last time when the device successfully reported data to the cloud"
"relativeHumidityForecast": {
"type": "number",
"description": "Property. Model:'https://schema.org/Number'. Forecasted relative humidity (water vapour in air) over a certain duration in future"
},
"value": {
"type": "string",
"description": "Property. Model:'https://schema.org/QuantitativeValue'. A observed or reported value. For actuator devices, it is an attribute that allows a controlling application to change the actuation setting. For instance, a switch device which is currently _on_ can report a value 'on' of type 'Text'. Obviously, in order to toggle the referred switch, this attribute value will have to be changed to 'off'"
"airQualityIndexForecast": {
"type": "number",
"description": "Property. Model:'https://schema.org/Number'. Forecasted overall Air Quality Index (AQI) over a certain duration in future"
},
"dateObserved": {
"$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/dateObserved"
"airTemperatureTSA": {
"type": "object",
"description": "Property. Air temperature time series aggregation",
"$ref": "https://smart-data-models.github.io/dataModel.Environment/Environment-schema.json#/definitions/TimeSeriesAggregation"
}
}
}
],
"required": [
"id",
"type",
"controlledProperty"
"dateObserved",
"location"
]
}
}

0 comments on commit 560ee91

Please sign in to comment.