Skip to content

franzies/fi-mind-bridge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FI-MIND (FIWARE-MINDSPHERE) Bridge

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. FI-MIND Schema

Contents

Configuration

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}

Deploy

Generate WAR file executing into project root folder:

mvn clean install

Deploy WAR file (generated into target folder), as usual, in your web server.

API

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

Supported Features

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:

FIWARE to MindSphere

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.

FIWARE Data Model Status Comment FI-MIND Documentation
AeroAllergenObserved Out of Domain
AirQualityObserved Out of Domain
Alert 📚 Documentation
ArrivalEstimation Out of Domain
Beach Out of Domain
BikeHireDockingStation Out of Domain
Building 📚 Documentation
BuildingOperation 📚 Documentation
Device 📚 Documentation
DeviceModel 📚 Documentation
EVChargingStation Out of Domain
FlowerBed Out of Domain
Garden Out of Domain
GreenSpaceRecord Out of Domain
GtfsAccessPoint Out of Domain
GtfsAgency Out of Domain
GtfsCalendarDataRule Out of Domain
GtfsCalendarRule Out of Domain
GtfsFrequency Out of Domain
GtfsRoute Out of Domain
GtfsService Out of Domain
GtfsShape Out of Domain
GtfsStation Out of Domain
GtfsStop Out of Domain
GtfsStopTime Out of Domain
GtfsTransferRule Out of Domain
GtfsTrip Out of Domain
KeyPerformanceIndicator Out of Domain
Museum Out of Domain
NoiseLevelObserved Out of Domain
OffStreetParking Out of Domain
OnStreetParking Out of Domain
Open311:ServiceRequest Out of Domain
Open311:ServiceType Out of Domain
ParkingAccess Out of Domain
ParkingGroup Out of Domain
ParkingSpot Out of Domain
PointOfInterest Out of Domain
Road Out of Domain
RoadSegment Out of Domain
SmartPointOfInteraction Out of Domain
SmartSpot Out of Domain
Streetlight Out of Domain
StreetlightModel Out of Domain
StreetlightGroup Out of Domain
StreetlightControlCabinet Out of Domain
ThreePhaseAcMeasurement Out of Domain
TrafficFlowObserved 📚 Documentation
Vehicle 📚 Documentation
VehicleModel 📚 Documentation
WasteContainer Out of Domain
WasteContainerIsle Out of Domain
WasteContainerModel Out of Domain
WaterQualityObserved Out of Domain
WeatherForecast 📚 Documentation
WeatherObserved 📚 Documentation
MindSphere to FIWARE

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.

Example
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"
  }'

Testing

You can test POST REST API by adding the header:

debug-mode : true

to the request.

Example

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.

License

The FI-MIND bridge is licensed under the

GNU Affero General Public License v3.0

About

FIWARE - Siemens MindSphere Bridge

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%