eclipse iot - day 0 of thingmonk 2016

20
Information Models & Ontologies Dr. Boris Adryan @BorisAdryan

Upload: boris-adryan

Post on 08-Jan-2017

228 views

Category:

Technology


1 download

TRANSCRIPT

Information Models & Ontologies

Dr. Boris Adryan @BorisAdryan

• What are data models, info models and ontologies?

• How can they be useful in the IoT context?

• Why and how are these topics relevant to Eclipse IoT?

Questions

Data Model vs. Information ModelThe difference is often very academic. Both model types have in common a language-independent description of physical objects.

My definition

• data model - more “technical”

• info model - more “semantic”

Data Model

A data model helps to formalise how data is organised (stored, etc.)

time sensor temperature

11:23 DHT11 23.4

11:24 BMP85 23.5

11:24 DHT11 23.4

11:25 DHT11 23.6sensor type accuracy …

DHT11temperature+ humidity

+/- 5% …

BMP85temperature + pressure

+/- 2% …

… …

relational model - a type of data model

Information Model

An info model helps to describe capabilities similar to object oriented code

DHT11temperature sensor

property is_sensor sensor_type sensor_subtype

temperature sleep_mode

functions temperature sleep

boolean: true, immutable set (physical, chemical): chemical, immutable set (force, temperature, …): temperature, immutable

float, valid: > -25 && < +75 boolean

get: delivers current temperature set: puts the sensor to sleep

Ontology“structure” - a directed acyclic

graph

“definition”An indoor temperature sensor is located inside a building structure. It is sometimes used to control a ‘boiler’ (ID: xxx) or a ‘radiator’ (ID: xxx).

provides information about the relationship between objects

Ontological reasoning

indoor temperature

sensor

boileractuator

sensors

temperature sensor

is_ais_a

building control solutionpart_ofis_a

positively_regulates

Inference: “some sensors indirectly positively regulate parts of building control solutions”

Ontologies recapMy thingmonk talk (2014) on SlideShare

My O’Reilly Webcast (video)

My blog post about IoT ontologies

http://www.slideshare.net/BorisAdryan/

http://iot.ghost.io/four-branches-for-an-iot-ontology/

http://www.oreilly.com/pub/e/3365

Implementation is a matter of taste (…)

SQL guy’s code:

CREATE TABLE dht11 ( time: datetime, temp: float );

Perl girl’s code:

my %dht11_hash; my $time = $_; $dht11{$time}{‘temp’} = 23.6; $dht{$time}{‘humid’} = 68;

Boris’ MQTT topic:

•ad-hoc solutions •cherry-picked info •incomplete •not convertible

code is the worst source of device information!

Wouldn’t it be nice…

Formalised description of the device in a well-defined information model

Repository of qualified information models for re-use

‘Translate model to’-functionality for common programming languages

beautifully written, well-formatted and documented code

Why Bosch is doing Vorto

Vorto minimises development time. Info models for industrial IoT applications are immediately compatible for both Bosch and PTC clouds, as well as IoT applications.

Vorto is an editor for a domain-specific language

The model repo is still pretty empty…

http://vorto.eclipse.org

Vorto DSL & OPC UAOPC UA - a fetish of German industrial IoT

• not competing standards • should be possible to write

OPC UA compatible code with a Vorto code generator

Other Eclipse projects

Eclipse Smarthome and ontologies

https://github.com/eclipse/smarthome/issues/1093

http://kaikreuzer.blogspot.de

Eclipse Smarthome and ontologies

• to me as an outsider, not clear what’s going to happen in Eclipse Smarthome

• technical and philosophical challenges around ontologies

• time, money, team structure

• but: references to a term in the ontologies could be saved in the information model

Dr. Boris Adryan @BorisAdryan

Disclaimer: I haven’t contributed a single line of code to any of these projects.

Many thanks to the Vorto team, Kai Kreuzer and Michael Koster for discussions!