The FI-MIND bridge close the gap between MindSphere and FIWARE environments, easing the process of sharing assets and context data (legacy factory systems, non-production IoT data sources, etc.) between the two worlds.
Configure MINDSPHERE settings in config.properties file:
ocb-url=http://{ocb-host}:{ocb-port}
client-id={mindpshere-client-id}
client-secret={mindpshere-client-secret}
tenant={mindpshere-tenant}
Generate WAR file executing into project root folder:
mvn clean install
Deploy WAR file (generated into target folder), as usual, in your web server.
Service | Description | |
---|---|---|
POST | /ocb-export |
Export an existing MindSphere asset into Orion Context Broker |
POST | /fiware-notification |
Notification service to ingest data coming after subscription to Orion Context Broker |
POST | /alert |
Export an Alert entity into MindSphere |
POST | /alertNormalized |
Export a NGSI compliant Alert entity into MindSphere |
POST | /building |
Export a Building entity into MindSphere |
POST | /buildingNormalized |
Export a NGSI compliant Building entity into MindSphere |
POST | /buildingOperation |
Export a Building Operation entity into MindSphere |
POST | /buildingOperationNormalized |
Export a NGSI compliant Building Operation entity into MindSphere |
POST | /device |
Export a Device entity into MindSphere |
POST | /deviceNormalized |
Export a NGSI compliant Device entity into MindSphere |
POST | /deviceModel |
Export a Device Model entity into MindSphere |
POST | /deviceModelNormalized |
Export a NGSI compliant Device Model entity into MindSphere |
POST | /trafficFlowObserved |
Export a TrafficFlowObserved entity into MindSphere |
POST | /trafficFlowObservedNormalized |
Export a NGSI compliant TrafficFlowObserved entity into MindSphere |
POST | /vehicle |
Export a Vehicle entity into MindSphere |
POST | /vehicleNormalized |
Export a NGSI compliant Vehicle entity into MindSphere |
POST | /vehicleModel |
Export a Vehicle Model entity into MindSphere |
POST | /vehicleModelNormalized |
Export a NGSI compliant Vehicle Model entity into MindSphere |
POST | /weatherForecast |
Export a Weather Forecast entity into MindSphere |
POST | /weatherForecastNormalized |
Export a NGSI compliant WeatherForecast entity into MindSphere |
POST | /weatherObserved |
Export a Weather Observed entity into MindSphere |
POST | /weatherObservedNormalized |
Export a NGSI compliant Weather Observed entity into MindSphere |
FI-MIND helps you setting up a two-way channel to share context data between FIWARE and MindSphere, back and forth. The two different channels are described below:
This channel let you export a subset of FIWARE Data Models into Mindsphere Environment without loss of information. In the table below is reported the documentation for each of the chosen FIWARE Data Models to be shared in MindSphere.
Given an existing asset in MindSphere, FIMIND let you export the resource to FIWARE, simply by passing: assetId, fiwareService and fiwareServicePath as body of a HTTP POST request under the path of /ocb-export.
The export process will extract asset variables and aspect variables of the chosen asset mapping them in the proper format to be ingested by Orion Context Broker.
Exporting is not restricted to FIWARE Data Models only, every MindSphere asset can be exported even though the mapping won't be reversible without extending the current APIs.
curl -X POST \
http://{server-url}:{server-port}/fimind/webapi/ocb-export \
-H 'accept: application/json' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{
"assetId":"mindsphere_asset_id",
"fiwareService":"connector",
"fiwareServicePath":"/demo"
}'
You can test POST REST API by adding the header:
debug-mode : true
to the request.
Request
curl -X POST \
http://{server-url}:{server-port}/fimind/webapi/alert \
-H 'accept: application/json' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'debug-mode: true' \
-d '{
"id":"fimind_alert_test",
"type": "Alert",
"category": "security",
"subCategory": "robbery",
"location": {
"type": "Point",
"coordinates": [-3.712247222222222, 40.423852777777775]
},
"dateIssued": "2017-04-25T09:25:55.00Z",
"description": "Potential robbery in main building",
"alertSource": "Camera1234",
"severity": "informational"
}'
Response
{
"result": "Test gone fine",
"message": null
}
WebServer logs will, then, display the proper mapping of the given entity for MindSphere.
The FI-MIND bridge is licensed under the
GNU Affero General Public License v3.0