Utrecht HowToUseWireCloud

From Fiware NL Wiki
Jump to: navigation, search

This How To will describe the setup of a wirecloud environment with CKAN as source on the FIWARE Lab NL.
The result will be displaying playgrounds of Utrecht being displayed on a map using widgets and wiring.

To start this guide, you will need to have setup a wirecloud instance on the lab. Default username and password is 'admin'/'admin'.
Please change this, since the server is public accessible!
We added an user called WireCloud5412 in our setup, since admin is no user to be used

After login, your (empty) workspace is displayed on the screen:
Utrecht howtousewirecloudemptyworkspace.png

First thing you have to do, is upload the correct widgets to your environment. THere are multiple versions of these widgets, not all working.
We sorted out a base set of working widgets which can be used directly on the FIWARE Lab NL:
CoNWeT_Package_CKAN-NGSI.zip

In the near future, we will provide a marketplace with working widgets for the FIWARE Lab NL.

To upload a widget to the wirecloud, you need to upload a widget file from your local computer.
First goto 'My Resources'
Utrecht howtousewirecloudmyresources.png

Press the 'Upload button'
Utrecht howtousewireclouduploadbutton.png

Now simply drag the widget from a explorer/finder to the window and press upload
The following screen is shown. Do not upload too many at once, it will cost you a bit more time, but exceptions are much easiers to track
Utrecht howtousewireclouduploadcomponent.png

After uploading the desired widgets, your resource screen might look like this:
Utrecht howtousewirecloudmyresourcesoverview.png

Now it is time to create your workspace. Goto the main screen and press 'Add widget'
Utrecht howtousewirecloudaddwidget.png


Look up the Map Viewer, and press the '+' to add this to the workspace
Utrecht howtousewirecloudaddtoworkspace.png

Now the widget is placed on the workspace. But we want it to focus on Utrecht and zoom to a more detailed zoomlevel
On the top right there is a 'hidden' menu:
Utrecht howtousewirecloudaddwidgetmenu.png

Now select 'Settings' from the menu and change the popup screen:
Utrecht howtousewirecloudaddwidgetsettings.png

Accept the changes and your result will be an empty map Utrecht
Utrecht howtousewirecloudaddwidgetempty.png

Now it is time to wire up with external data:
Utrecht howtousewirecloudwiring.png

Press the 'Find components' button
Utrecht howtousewirecloudfindcomponents.png

On the widget tab, drag the Map Viewer (orange) to the main screen
Utrecht howtousewirecloudaddmapviewer.png

Utrecht howtousewirecloudmapviewerdetail.png

Select the Operators tab, and look for CKAN Source
Utrecht howtousewirecloudaddcomponent.png
Now drag the ckan source (green) to the main screen
Repeat this for the 'CKAN to Pois' component
Utrecht howtousewirecloudaddcomponentpoi.png

We can now simply connect the lines:
CKAN Source - Resource -> CKAN to Pois - Entity
CKAN to Pois - Poi -> Map Viewer - Insert/Update Poi

Now we need to configure the components with the correct resources and settings.
First we need to tell the 'CKAN to Pois' to use the correct location fields. You can look up these fields in the CKAN site.
In this case, the location is 'latitude, longitude' (comma seperated fields!) Press the triple horizontal lines on the 'CKAN to Pois' component and press settings:
Utrecht howtousewirecloudconfigpois.png

Now we need to configure the source for the CKAN component
Goto the settings of the CKAN Source component, and goto settings
Enter the desired fields (ckan resource 01f778aa-2ec7-4244-8547-afc1bf30b21a)

Utrecht howtousewirecloudckansourcesettings.png

Just one step away of showing the right field for coordinates. Just goto the settings of the CKAN to POIs and set the coordinate attributes for Latitude, Longitude:
Utrecht howtousewirecloudpoisettings.png

Now you are done, just refresh your browser in the main screen!


NGSI

If you are using NGSI (IoT) devices, you just need to change the CKAN source and CKAN to POIs to these components:
Utrecht howtousewirecloudngsioverview.png

Use the NGSI Source and NGSI Entity to POI. The settings for the current Orion contextbroker are: "37.153.218.247:1026"
Utrecht howtousewirecloudngsisourcesettings.png
Device ID's which can be used are: c168ac00020304f1, c168ac00020304f2, c168ac00020304f3, c168ac00020304f4, c168ac00020304f5
If you leave the Id Pattern empty, all devices will be used.