7. Integrate FogFlow with WireCloud

WireCloud builds on cutting-edge end-user development, RIA and semantic technologies to offer a next-generation end-user centred web application mashup platform aimed at leveraging the long tail of the Internet of Services.

The figure below shows the integration of FogFlow with WIRECLOUD

_images/wc-fogflow-integration.png
  1. WireCloud sends a subscription request to the FogFlow-Broker in NGSIv2.
  2. User will send the update request to the Fogflow-Broker in NGSIv1.
  3. FogFlow Broker will notify WireCloud in NGSIv2.

7.1. Integration steps

Pre-Requisites:

Steps to subscribe fogflow using wirecloud:

Step1: Open Wirecloud Dashboard Home.
_images/wc-home.png

Step2: Add New workspace.

_images/wc-options.png

Step3: Provide name to the new workspace.

_images/wc-create-workspace.png

Step4: Created new workspace WC_fog.

_images/wc-workspace-created.png

Step5: View all the resources cretaed by users and some default resources.

_images/wc-myresources-button.png

Step6: Available resources and wiget in the wirecloud library.

_images/wc-myresources.png

Step7: create wiring for your own workspace.

_images/wc-wiring-button.png

Step8: Click on find Componend in the wiring section.

_images/wc-find-components-button.png

Step9 Add two spy wiring widget for display the data and second to show the entity. user can use their own widget to display the data and see the details of entity according to their requirement.

_images/wc-wiring_add-widget.png

Step10: Add NGSI source Widget to subscribe ContextBroker for specified Data .

_images/wc-wiring_add-operator.png

Step11: Drag and drop the added components to the working space.

_images/wc-wiring_drag-and-drop.png

Step12: Add the dropped component as in the below picture. Spy wiring connected to the entity of NGSI source will show data and other one component to NGSI type will show the entity detail.

_images/wc-wire-components.png

Step13: Go to the setting of NGSI souce to configure it for subscription request to the context broker.

_images/wc-ngsi-source-settings.png

step14: Provide the FogFlow broker url (NGSI serever URL), NGSI proxy URL, NGSI entity type , ID pattern, Attributes, and click accept to hit the subscription request.

_images/wc-operator-settings-form.png

Send update request to Fogflow Broker with an entity of type and attributes defined in the above subscription. An example request is given below:

   curl -iX POST \
   'http://<Fogflow broker>:8070/ngsi10/updateContext' \
    -H 'Content-Type: application/json' \
   -d '
 {
   "contextElements": [{
           "entityId": {
                   "id": "Room1",
                   "type": "Room",
                   "isPattern": false
           },
           "attributes": [{
                   "name": "temperature",
                   "type": "Integer",
                   "value": 155
           }],
           "domainMetadata": [{
                   "name": "location",
                   "type": "point",
                   "value": {
                           "latitude": 49.406393,
                           "longitude": 8.684208
                   }
           }]
   }],
   "updateAction": "UPDATE"
}'

result:

_images/WCresult.png