This repository is now archived and subsequent works will be carried out the in Smart data models repositories. The latest version of this Data Model can be found at https://github.com/smart-data-models/dataModel.Alert
This entity models an alert and could be used to send alerts related to traffic jam, accidents, weather conditions, high level of pollutants and so on. The purpose of the model is to support the generation of notifications for a user or trigger other actions, based on such alerts.
An alert is generated by a specific situation. The main features of an alert is that it is not predictable and it is not a recurrent data. That means that an alert could be an accident or a high level of pollutants measure, additionally it could be the fall down of a patient or a car driving in the opposite direction.
Some examples of context data are: type of alert (traffic, weather, security, and pollution, etc.), severity, location and so on.
A JSON Schema corresponding to this data model can be found here.
id
: Entity’s unique identifier.
type
: Entity type. It must be equal to Alert
.
source
: A sequence of characters giving the source of the entity data.
dataProvider
: Specifies the URL to information about the provider of this
information
category
: Define the category of alert (Traffic jam, accidents, weather
conditions, high level of pollutants)
traffic
, naturalDisaster
, weather
, environment
, health
,
security
, agriculture
)subCategory
: Describe the sub category of alert.
trafficJam
, carAccident
, carWrongDirection
, carStopped
,
pothole
, roadClosed
, roadWorks
, hazardOnRoad
,
injuredBiker
) (for traffic
category)flood
, tsunami
, coastalEvent
, earthquake
) (for
naturalDisaster
category)rainfall
, highTemperature
, lowTemperature
, heatWave
,
coldWave
, ice
, snow
, wind
, fog
, tornado
,
tropicalCyclone
, hurricane
, snow/ice
, thunderstorms
,
fireRisk
, avalancheRisk
, floodRisk
) (for weather
category)airPollution
, waterPollution
, pollenConcentration
) (for
environment
category)asthmaAttack
, bumpedPatient
, fallenPatient
, heartAttack
)
(for health
category)suspiciousAction
, robbery
, assault
, civilDisorder
,
buildingFire
, forestFire
) (for security
category)noxiousWeed
, snail
, insect
, rodent
, bacteria
, microbe
,
fungus
,mite
, virus
, nematodes
, irrigation
,
fertilisation
) (for agriculture
category)location
: Location of alert represented by a GeoJSON geometry.
geo:json
.address
is not presentaddress
: Civic address of Alert
location
is not present.dateIssued
: The date and time the alert was issued by the alert generator
in ISO8601 UTC format.
validFrom
: The start date of validity of the alert in ISO8601 UTC format.
validTo
: The end date of validity of the alert in ISO8601 UTC format.
description
: A description of alert (e.g. Traffic jam in Paseo de la
Reforma. Emergency services at place).
https://uri.etsi.org/ngsi-ld/description
equivalent to descriptionalertSource
: reference to the source of the alert. For example, it could
be a user of an application, a device, or a service.
data
: used to carry additional data for the alert.
severity
: define the level of gravity of a given alert.
informational
, low
, medium
, high
, critical
)Note: JSON Schemas are intended to capture the data type and associated constraints of the different Attributes, regardless their final representation format in NGSI(v2, LD).
Normalized NGSI response
{
"id": "Alert:1",
"type": "Alert",
"category": {
"value": "traffic"
},
"subCategory": {
"value": "trafficJam"
},
"validTo": {
"value": "2017-01-02T10:25:55.00Z"
},
"description": {
"value": "The road is completely blocked for 3kms"
},
"location": {
"type": "geo:json",
"value": {
"type": "Point",
"coordinates": [-3.712247222222222, 40.423852777777775]
}
},
"dateIssued": {
"type": "DateTime",
"value": "2017-01-02T09:25:55.00Z"
},
"alertSource": {
"value": "https://account.lab.fiware.org/users/8"
},
"validFrom": {
"type": "DateTime",
"value": "2017-01-02T09:25:55.00Z"
},
"severity": {
"value": "high"
}
}
Sample uses simplified representation for data consumers ?options=keyValues
{
"id": "VisualEvent123",
"type": "Alert",
"category": "security",
"subCategory": "robbery",
"location": {
"type": "Point",
"coordinates": [-3.712247222222222, 40.423852777777775]
},
"dateIssued": "2017-04-25T09:25:55.00Z",
"description": "Potential robbery in main building",
"alertSource": "Camera1234",
"data": {
"videoURL": "www.smartsecurity.com/video123.mp4",
"initialFrame": "80",
"finalFrame": "120"
},
"severity": "informational"
}
Sample uses the NGSI-LD representation
{
"id": "urn:ngsi-ld:Alert:Alert:1",
"type": "Alert",
"createdAt": "2019-06-06T12:06:06",
"modifiedAt": "2019-06-07T12:07:06",
"category": {
"type": "Property",
"value": "traffic"
},
"subCategory": {
"type": "Property",
"value": "trafficJam"
},
"validTo": {
"type": "Property",
"value": {
"@type": "DateTime",
"@value": "2017-01-02T10:25:55.00Z"
}
},
"description": {
"type": "Property",
"value": "The road is completely blocked for 3kms"
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [-3.712247222222222, 40.423852777777775]
}
},
"dateIssued": {
"type": "Property",
"value": {
"@type": "DateTime",
"@value": "2017-01-02T09:25:55.00Z"
}
},
"alertSource": {
"type": "Property",
"value": "https://account.lab.fiware.org/users/8"
},
"validFrom": {
"type": "Property",
"value": {
"@type": "DateTime",
"@value": "2017-01-02T09:25:55.00Z"
}
},
"severity": {
"type": "Property",
"value": "high"
},
"@context": [
"https://schema.lab.fiware.org/ld/context",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
]
}
The model has been defined to support different scenarios inside SmartSDK project.
T.B.D