Sofia2 is a middleware developed by Indra that allows the interoperability of multiple systems and devices, offering a semantic platform to make real world information available to smart applications (Internet of Things).
It is multi-language and multi-protocol, enabling the interconnection of heterogeneous devices. It provides publishing and subscription mechanisms, facilitating the orchestration of sensors and actuators in order to monitor and act on the environment.
The plugin to connect Meshlium to Sofia2 platform is in the Manager System menu:
Cloud Connector -> Basic Cloud Partner -> Sofia2
Registering the Meshlium device in Sofia2 is a previous step required to connect the Meshlium with Sofia2. At the end of the registration process you will obtain the configuration parameters needed to set up the Meshlium plugin properly.
This configuration includes the following information:
To register Meshlium in Sofia2, click on the link Get Configuration From Sofia2.
You will be redirected to the following page:
Where:
Logging in Sofia2 platform will redirect to the following page that suggests a name for your collections of measures and monitoring data, and for your gateway identifier (KP in Sofia2 terms):
Finally, after creating the configuration, you will obtain a JSON file containing all configuration values ready to be pasted on the Manager System, in order to setup the Sofia2 Cloud Connector:
The configuration from Sofia2 can be setup in Meshlium just by clicking Paste configuration received from Sofia2 and pasting the JSON generated in the previous step.
Configuring the plugin this way, the fields for Measures Ontology, Monitoring Ontology, Client Name, Client Identifier and Authentication Token will be completed.
Alternatively, these fields can be filled in manually, with the information received from the configuration page of Sofia2 showed in the first step.
REST is a stateless communication protocol over HTTP. Using this protocol, the Cloud Connector is a client of the Sofia2 platform, that periodically opens a connection with the platform to send an HTTP POST operation containing the sensor measurements.
The parameter of the REST protocol are:
Endpoint: URL of the REST Gateway of Sofia2 platform. It is the REST server that will receive requests from clients.
MQTT is a stateful communication protocol over TCP. Using this protocol, the Cloud Connector is a client of the Sofia2 platform, that initially opens a connection with the platform, maintains it alive during that time, and periodically sends an MQTT packet containing the sensor measurements. In case of disconnection, the connector periodically tries to reconnect.
The parameters of the MQTT protocol are:
It is a stateful communication protocol over HTTP. Using this protocol, the Cloud Connector is a client of Sofia2 platform, that initially open a connection with the platform, maintains it alive during a defined time, and periodically sends a HTTP packet containing the sensor measurements. In case of disconnection, the connector periodically tries to reconnect.
The parameters of the Websocket protocol are:
Once all configuration and connection parameters are setup, they can be stored and the connector can be started to send information to Sofia2.
To save the configuration, click on the "Save" button:
After saving the configuration, the Cloud Connector can be started by clicking on the "Start" button:
You can stop the process at any moment by clicking on the "Stop" button.