---
# System prepended metadata

title: Sifis Ontology
tags: [' wp2', ' brainstorming', Ideas]

---

---
tags: Ideas, brainstorming, wp2
title: Sifis Ontology
---

# TODO

1) Define which information is shown to the third party app developer when implementing functionalities with critical APIs. Are the possible available devices already known to the developer?

2) Define what the user sees on the market before deploying the application in the smart home (the application setting lights to moderate will only "consume energy", the application setting lights to "max" receives also "cause fires".)

3) Show how the risks are computed once the application is deployed in a specific smart home (information on devices are now available). **Assigned to Luigi the policy checker and CNR the enforcement**

4) Discuss how the risks are matched with the policies and if the policy match is performed only after deployment or also before. **Assigned to Luigi the policy checker and CNR the enforcement**


## Useful links on ontologies
Saref Ontology example: https://ontology.tno.nl/saref/
W3C Ontology: https://github.com/w3c/wot-thing-description/tree/main/ontology


## Demo Thing Description:

```json
{
  "@context": [
    "https://webthings.io/schemas",
    {
      "sifis": "https://www.sifis-home.eu/schemas"
    }
  ],
  "@type": [
    "OnOffSwitch",
    "Light"
  ],
  "actions": {
    "fade": {
      "description": "Fade the lamp to a given level",
      "input": {
        "properties": {
          "brightness": {
            "maximum": 100,
            "minimum": 0,
            "sifis:hazard": {
              "@type": "sifis:fire",
              "const": {
                "minimum": 70
              },
              "type": "integer"
            },
            "type": "integer",
            "unit": "percent"
          },
          "duration": {
            "minimum": 1,
            "type": "integer",
            "unit": "milliseconds"
          }
        },
        "required": [
          "brightness",
          "duration"
        ],
        "type": "object"
      },
      "links": [
        {
          "href": "/actions/fade",
          "rel": "action"
        }
      ],
      "title": "Fade"
    }
  },
  "base": "http://localhost:8888/",
  "description": "A web connected lamp",
  "events": {
    "overheated": {
      "description": "The lamp has exceeded its safe operating temperature",
      "links": [
        {
          "href": "/events/overheated",
          "rel": "event"
        }
      ],
      "type": "number",
      "unit": "degree celsius"
    }
  },
  "id": "urn:dev:ops:my-lamp-1234",
  "links": [
    {
      "href": "/properties",
      "rel": "properties"
    },
    {
      "href": "/actions",
      "rel": "actions"
    },
    {
      "href": "/events",
      "rel": "events"
    },
    {
      "href": "ws://localhost:8888/",
      "rel": "alternate"
    }
  ],
  "properties": {
    "brightness": {
      "@type": "BrightnessProperty",
      "description": "The level of light from 0-100",
      "links": [
        {
          "href": "/properties/brightness",
          "rel": "property"
        }
      ],
      "maximum": 100,
      "minimum": 0,
      "sifis:hazard": [{
        "@type": "sifis:fire",  
        "description": "The lamp might burn something",
        "const": {
          "minimum": 70
        },
        "type": "integer"
      }, {
        "@type": "sifis:consumption",
        "description": "Energy usage",
        "sifis:score": "40",
      }],
      "title": "Brightness",
      "type": "integer",
      "unit": "percent"
    },
    "on": {
      "@type": "OnOffProperty",
      "description": "Whether the lamp is turned on",
      "links": [
        {
          "href": "/properties/on",
          "rel": "property"
        }
      ],
      "sifis:hazard": {
        "@type": "sifis:consumption",
        "const": true,
        "type": "boolean"
      },
      "title": "On/Off",
      "type": "boolean"
    }
  },
  "security": "nosec_sc",
  "securityDefinitions": {
    "nosec_sc": {
      "scheme": "nosec"
    }
  },
  "title": "My Lamp"
}
```

## Ontology



## Mapping


| sifis-generic | WoT Description |
|-|-|
|  safety | 




```{
  "api_name": "turnOnOven",
  "description": "Activates the oven at the last selected temperature.",
  "security_label": {
"safety": [ {
        "name": "FIRE_HAZARD",
"description": "The execution may cause fire." },
{
"name": "POWER_OUTAGE",
"description": "High instantaneous power. The execution may cause power o
utage.",
        "risk_score": 0.8
} ],
    "privacy": [
      {
        "name": "LOG_ENERGY_CONSUMPTION",
"description": "The execution allows the app to register information abou t energy consumption."
} ],
    "financial": [
      {
        "name": "ELECTRIC_ENERGY_CONSUMPTION",
"description": "The execution enables the device to consume further elect ricity.",
        "risk_score": 0.8
      }
] }
}
```