Difference between revisions of "IoT Semantics"

From AMTech WikiDocs
Jump to: navigation, search
(Things and Observations semantic)
(Things and Observations semantic)
Line 63: Line 63:
 
[[File:semantic1.png|850px|thumbnail|center|Select property type]]
 
[[File:semantic1.png|850px|thumbnail|center|Select property type]]
  
As shown, there are 4 options
+
As shown, there are 4 options
 
* [[File:semanticPrimitiveType.png]] the value type must be one of the proposed primitive types  
 
* [[File:semanticPrimitiveType.png]] the value type must be one of the proposed primitive types  
 
[[File:semanticPrimitiveTypeList.png|850px|thumbnail|center|Select primitive type]]
 
[[File:semanticPrimitiveTypeList.png|850px|thumbnail|center|Select primitive type]]
Line 71: Line 71:
 
The choice will then appear on the right of the button
 
The choice will then appear on the right of the button
  
The three last options allow also to define the property as a collection
+
The three last options allow also to define the property as a collection: [[File:semanticCollection.png|check to create collections]]
[[File:semanticCollection.png|thumbnail|center|check to create collections]]
+
  
 
== Thing and Observation instances ==
 
== Thing and Observation instances ==

Revision as of 16:28, 17 June 2016

Linked data

http://linkeddata.org/

Linked Data STRUCTURED DATA ON THE WEB

Resource Description Framework (RDF)

https://www.w3.org/RDF/

Json-ld

Json for linked data http://json-ld.org/

Example of an observation @type eddystoneBrodcast, @id eddystoneBroadcast

{
    "proximityarea": "",
    "eddystoneTlmAdvCnt": 0,
    "guestusers": [],
    "targetthings": "[]",
    "location": "",
    "eddystoneTlmVbatt": 0,
    "eddystoneTlmSecCnt": 0,
    "lastSeenByBLEHub": "2016-02-21T18:39:21.000Z",
    "eddystoneType": "uid",
    "eddystoneNamespace": "0123456789",
    "eddystoneInstance": "123456",
    "eddystoneTlmVersion": "0",
    "smoothingResult": "new",
    "description": "",
    "topic": "m2mBridgeTest/bleScanner/eddystone/new",
    "beaconRssi": 1,
    "@type": "/amtech/linkeddata/types/composite/observation/eddystoneBrodcast",
    "beaconTxPower": 1,
    "beaconDistance": 0,
    "creationDate": "2016-03-24T20:53:47.369Z",
    "guesttenants": [],
    "eddystoneUrl": "",
    "eddystoneTlmTemperature": 0,
    "producer": "eddystone",
    "detectiontime": "2016-03-04T18:37:31.000Z",
    "occurrencetime": "2016-03-04T18:37:31.000Z",
    "@id": "/amtech/things/observations/eddystoneBroadcast"
}

Things and Observations semantic

Semantic for things and the observations they produce can be defined using the Thing Types and Observation Types This configurable semantic is composed by :

  • Type general info (name, description, geometric representation)
  • Type specific properties known as supported properties
  • In the case of the thing types, the set of observation types that the given thing type can produce

Each specific property contains its own semantic to define. The main common information are:

  • Value type or range: type of the values this property can hold
  • property informations: name, caption, description, default values,etc
  • Validation parameters and message (see below).
  • Translation of the caption, description, validation message to the supported languages

Also, the thing types allow

  • Maximum number and recording frequency of historic values (snapshots) to keep for the property

The first thing to do is to select the value type. For this, click on Create.png under the supportedProperties collection of the chosen type. The opened dialog allows to define the name of the property and the value type:

Select property type

As shown, there are 4 options

  • SemanticPrimitiveType.png the value type must be one of the proposed primitive types
Select primitive type
  • SemanticAnyThing.png the value must be an instance of any of the already defined thing types
  • SemanticThingType.png the property will hold thing types
  • SemanticThingOfType.png the property will hold instances of the thing type selected in the dialog

The choice will then appear on the right of the button

The three last options allow also to define the property as a collection: check to create collections

Thing and Observation instances

Instances are resources of a specific semantic type, that have values for each property defined in the semantic.

  • Support instances enrichment, allowing insert new properties and values after semantic been extended.

Publishing semantic

Semantic for thing and observation types can be defined without letting others see the changes. The action of publishing a type is what makes it visible to other creators, thus available for use by others in their activities. Once published, a type can only be extended by its creator.

When a type is published:

  • it becomes visible to other creators that will be able to use it in their activities
  • its supported properties become visible to other creators
  • supported properties can only be added as long as their are not required
  • existing supported properties cannot be deleted.
  • the type can be deleted only if it is not used by anyone
  • values for the validation of the supported properties that are published cannot be changed : min value, max value, min date, max date and validation regex
public
*public types show this icon in the Tree editor

Resources status

When a thing instance does not meet the requirements imposed by the semantic of the type the status of the resource is invalid.

resource with invalid status do not returned as result of observers execution therefore are not taken into account by reasoners execution