IoT Devices on Sofia2. Integration and Management (II. User and Ontology creation)

This is the second post of the series “IoT Devices on Sofia2. Integration and Management”. This post will cover the actions required to start building the demo scenario presented on the first part:


Part I. Overview



Essentially, you will be creating a new user on the platform and you will upgrade it to the appropriate level to take full advantage of Sofia2 features highlighted in this tutorial. Besides, we will propose you a model for the ontology that will store the data obtained from SensorTag (


This scenario will run on the public Sofia2 instance at First, you will register a new user on the platform.




After user registration, the new user will have ROL_USUARIO level which stands for the lowest one. An upgrade to ROL_COLABORADOR is required in order to get access to all the capabilities we will be demonstrating throughout the tutorial. Just navigate to your user page (top of the screen) and there you will find the button that changes your role to Collaborator.




Once you become Collaborator, you will gain access to a wider set of developer tool. The first tool we are going to use is the Ontologies creator. In Sofia2, an Ontology states the data model and it is defined using a JSON Schema. Any entity interacting with an Ontology shall respect this Schema in all operations. The one we are creating for this scenario will be at the receiving end of our architecture since it will store the measures obtained from the sensors.

Sofia2 offers several ways of defining Ontologies (new ontology from JSON Schema, automatic ontology generation from an Excel sheet, Wizard …). For this tutorial we will use the guided ontology creation. All the interactions with Ontologies are located under the second command from the left-side command bar.




In the guided creation section, you may configure several parameters:




First of all you need to give the Ontology a name. Then you may fill the Description field with some context information. Just below the Name field you will find a checkbox to activate the Ontology.

There is also a set of fields devoted to data exportation from the Real-Time Database (RTDB) to the Historic Database (BDH). For this tutorial we will always keep the data stored in the RTDB. We will not pay attention to the dependencies’ section either.

Under the New Ontology Property tag you may start creating new properties for the Ontology. You must define the property name, its datatype and decide whether it is a required property or not. For the SensorTag scenario we created these fields:




When finished with the process, you will have a fully operative Ontology. For the tutorial we have chosen demoDispositivos_RTFrame as our Ontology name. This is an example of an instance with some dummy values.




Once the Ontology is activated, there is only one more thing to do on the platform’s side to establish the connection. That is the ThinKP definition, since ThinKP is the entity used to interact with the data.

Next post (“Connecting the device”) will address the definition of a ThinKP in Sofia2 and it will also address the configuration on the Android side to properly bridge real world sensor data with Sofia2.


Stay tuned!

IoT Devices on Sofia2. Integration and Management (II. User and Ontology creation)

2 comentarios en “IoT Devices on Sofia2. Integration and Management (II. User and Ontology creation)


Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de

Estás comentando usando tu cuenta de Cerrar sesión /  Cambiar )

Google photo

Estás comentando usando tu cuenta de Google. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s