FIWARE Platform for Smart Cities


FIWARE is born as the result of a public-private collaboration between the European Commission and the private sector.  This open platform, which provides a set of tools for different functionalities, is an innovation ecosystem for the creation of new applications and Internet services. It is especially useful in terms of Smart Cities, as it ensures the interoperability and the creation of standard data models.

In this context, being "Smart" requires first being "Aware", that is, implementing a Smart City requires gathering and managing context information describing the current and historic state of the cities. This context information refers to the values of attributes charterizing relevant entities of city services, governance, and third party apps. In this regard, Smart applications and services for cities do need information about everything happening at every moment, and thus have access to this context information. FIWARE provides a mechanism to generate, collect, publish or query massive context information and use it for applications to react to their context. This is a complex process, as this information may come from different sources: systems, mobile apps’ users, sensor networks, etc. It is our Context Broker, through a REST implementation of API OMA NGSI, which allows to shape and access it, whatever the source is.

The use and management from data coming from “Things” (i.e. sensors, actuators and other devices) is also a complex process, as there are many different protocols in the IoT sphere, but FIWARE provides a set of GEs allowing to access the relevant information through only one API (NGSI). It not only allows to read this sensor information, but also to act on some elements. Therefore, Context Broker is an essential part of the architecture to collect data, analyse them on real time, consult archives and their analysis, as well as to publish them as open data from a city. On the other hand, other functionalities such as business intelligence, web interfaces and advanced interfaces allow the creation of very powerful applications and solutions.

FIWARE IoT Stack

The FIWARE IoT Stack Documentation describes how to connect devices and receive data, integrating all device protocols and connectivity methods, understanding and interpreting relevant information. It isolates data processing and application service layers from the device and network complexity, in terms of access, security and network protocols.

FIWARE « ORION » Context Broker

Orion Context Broker allows you to manage all the whole lifecycle of NGSI context information including updates, queries, registrations and subscriptions. Using the Orion Context Broker, you are able to register context elements and manage them through updates and queries. In addition, you can subscribe to context information so when some condition occurs (e.g. an interval of time has passed or the context elements have changed) you receive a notification.

The Orion Context Broker Documentation describes in detail how to interact with the Context Broker, and thus, how to use the NGSI API for managing context information. On the other hand, this documentation describes how to deploy a dedicated instance of the Orion Context broker.

You can find the source code of Orion in the FIWARE Context Broker Github repository

FIWARE Device Backend Gateway (IDAS)

The FIWARE Device Backend Gateway supports several IoT protocols with a modular architecture where modules are called “IoT Agents”. This compontents allow to simplify the management and integration of devices. It collects data from devices using heterogeneous protocols and translates them into standard platform language: NGSI entities.

The Device Backend Gateway Documentation describes what are the different IoT Agents available and how to develop new agents for non-supported protocols

FIWARE Application Mashup (WireCloud)

WireCloud builds on cutting-edge end-user (software) development, RIA and semantic technologies to offer a next-generation end-user centred web application mashup platform aimed at allowing end users without programming skills to easily create web applications and dashboards/cockpits (e.g. to visualize their data of interest or to control their domotized home or environment). Web application mashups integrate heterogeneous data, application logic, and UI components (widgets) sourced from the Web to create new coherent and value-adding composite applications.

The WireCloud Documentation describes in detail how to interact with the Wirecloud platform, how to develop WireCloud components, and hoy to deploy a dedicated instance.

You can find a running instance in the Mashup portal of the FIWARE Lab

You can find the source code in the WireCloud Github repository

Available Smart City Real Time Data Endpoints

FIWARE offers a huge amount of Open Data that is available for you for free at https://data.lab.fiware.org. This section covers the most important real-time information that you will be able to find in all the cities that participates in the FIWARE initiative. 

Santander (Spain)

The city of Santander in Spain, relies on FIWARE for publishing its smart city real time data. For this purpose, the city has different NGSI endpoints.

There is one NGSI v1 service is deployed on http://mu.tlmat.unican.es:8099/ and can be queried sending NGSI queries to the queyContext service using HTTP POST requests. This service responses with a contextResponses node containing a list of contextElement, each  representing a entitity or sensor. For these entities, it is included the type, the id, and a list of attributes, which is different depending on the type of the entities.

In this endpoint it is published the following information:

  • Indoor parkings: Real time information of existing indoor parkings and the number of available spots. In the following screenshot you can find an example of the information returned for an indoor parking:


    • As can be seen in the screeshot, ParkingLot entities contain the following attributes:
      • created: The creation date in ISO8601 format
      • extraSpotNumber: An integer with the number of available spots for parking
      • location: Coordinates of the parking in WGS84 format
      • name: Name of the parking
      • parkingDisposition: Disposition of the cars in the parking, e.g parallel
      • totalSpotNumber: An integer with the total number of parking spots

  • Ambient data: Real time information of ambient data, retrieved from sensors deployed in city buses. The following screenshot shows the information available for these sensors:


    • As can be seen in the screenshot, AmbientObserved entities contain the following attributes:
      • created: The creation date in ISO8601 format
      • direction:heading: Direction of the bus (in degrees) where the sensor is deployed
      • location: Coordinates of the sensor in WGS84 format
      • mileage:total: Total distance covered by the bus where the sensor is deployed
      • pollutants: Current values of CO, NO2 and O3
      • position:altitude: Current altitude (meters) of the bus where the sensor is deployed
      • sensorType: Type of the sensor
      • speed:instantaneous: Current speed (km/h) of the bus where the sensor is deployed

    • Additionally, some of the sensors include two extra attributes:

      • relativeHumidity: % of relative humidity
      • temperature: Temperature in ºC

  • Ambient Areas: It includes a Geopolygon describing the different ambient areas, as can be seen in the following screenshot:
    • As can be seen in the screenshot, AmbientArea entities contain the following attributes:
      • created: The creation date in ISO8601 format
      • centroid: Coordinates of the geo poligon centroid in WGS84 format
      • location: Coordinates of the different points that build up the geo poligon in in WGS84

 

There is also another NGSI v1 deployed on http://130.206.85.12:1026 that offers information about the different buses on service in Santander:

  • Buses: Real time information about the different buses on service in the city of Santander. The following screenshot shows the data returned from these sensors:

    • As can be seen, the following attributes are returned:
      • position: The current position of the bus
      • line: The bus line covered by the given bus
      • TimeInstant: Relates to the time when the information was extracted
      • vehicle:  The number that identifies the bus
      • speed: The current speed of the bus

Additionally, the NGSI v1 Global Instance deployed on the FIWARE Lab (http://orion.lab.fiware.org:1026) offers some real time information of Santander. Please, take note that to access these data, you have to have a FIWARE Lab account. You can create a new one at: https://account.lab.fiware.org/sign_up/. The information provided by this endpoint covers:

  • Mobile SensorsReal time information of ambient data, retrieved from sensors deployed in mobile vehicles (public transport, taxis, police cars,...) in Santander. The following screenshot shows the data returned from these sensors:



    • The attributes returned for each entity are:
      • COConcentration: Concentration of CO registered by the sensor
      • Latitud: The latitude where the measure were taken
      • Longitud: The longitude where the measure were taken
      • NO2Concentration: Concentration of NO2 registered by the sensor
      • O3Concentration: Concentration of O3 registered by the sensor
      • TimeInstant: Relates to the time when the information was extracted
      • airParticles: The number of particles in the air registered by the sensor
      • altitude: The altitude where the measure were taken
      • odometer: The number of kms that the sensor has covered until now
      • relativeHumidity: % of relative humidity
      • temperature: Temperature in ºC

  • Sound SensorsSound monitoring entities that show information about the sound level, time instant, battery charge and geolocation. The sound level measured is provided by the sound field. The following screenshot shows the data returned from these sensors:

    • The attributes returned for each entity are:
      • Latitud: The latitude where the measure were taken
      • Longitud: The longitude where the measure were taken
      • TimeInstant: Relates to the time when the information was extracted
      • batteryCharge: The level of battery of the given sensor
      • altitude: The altitude where the measure were taken.
      • sound: The current level of sound (given in dB) registered by the sensor
         

Last but not least, there is a NGSI v2 endpoint deployed on http://130.206.83.68:1026 and can be queried with simple HTTP GET requests. This service responses with a list of entities containing an id, a type and a set of attributes. This endpoint contains the following information:

  • Street Parking Lots: Real time information of street parking lots retrieved from some sensors deployed on the street. The following screenshot shows the data returned from these sensors:

    • As can be seen in the screenshot, StreetParking entities contain the following attributes:
      • allowedVehicles: Type of vehicles that can park in the available spots
      • availableSpotNumber: Number of available spots for parking
      • location: Coordinates of the different points that build up the geo poligon which demarcate the parking area in WGS84 format
      • centroid: Coordinates of the geo poligon centroid in WGS84 format
      • totalSpotNumber: Total number of spots for parking
      • updated: The last update date in ISO8601 format

You can find the endpoints and examples on how to query Santander Sensors in the Santander Sensors Postman

Porto (Portugal)

The city of Portugal makes use of FIWARE technology to provide citizens real time information. This information is provided through three different NGSI instances.

There is one NGSI v2 instance deployed on http://130.206.83.68:1026 that provides information of the different Ambient Areas in which the city of Porto is divided:

  • Ambient Zones: The different ambient zones in which the city of Porto is divided. The following screenshot shows the data returned:
    • Each entity contains one of the different ambient zones of Porto. For each entity, the following attributes are returned:
      • centroid: The center of the polygon
      • location: Coordinates of the different points that build up the geo poligon in in WGS84

There is NGSI v1 instance deployed on http://fiware-porto.citibrain.com:1026 that provides the following entities:

  • Environmental Events: Environmental measures across the city of Porto. The following screenshot shows the data returned from those sensors:

    • Each entity contains the information provided by one sensor deployed on the city of Porto. The following attributes are returned: 
      • carbon_monoxide: The amount of CO registered by the sensor
      • coordinates: The position of the sensor
      • humidity% of relative humidity
      • nitrogen_dioxide: The amount of NO2 registered by the sensor
      • noise_level: The amount of noise registered by the sensor
      • ozone: The amount of O3 registered by the sensor
      • processed_nitrogen_dioxide: The amount of processed NO2 registered by the sensor
      • processed_ozone: The amount of processed O3 registered by the sensor
      • temperature: The temperature in ºC registered by the sensor
      • timestamp: The time when the measures were taken 
         
  • Traffic Events: Traffic information about the city of Porto extracted from mobile sensors. The following screenshot shows the data returned by these sensors:

    • Each entity contains information about one traffic sensor that contains the following attributes:
      • coordinates: The current position of the sensor
      • date: The date when the information of the sensor was updated
      • distance: The distance covered by the sensor
      • hdop: The precision of the geographical information returned by the sensor GPS
      • latitude: The current latitude where the sensor is located
      • longitude: The current longitude where the sensor is located
      • movement: 1 if the sensor is in movement
      • speed: The current speed of the sensor
      • vehicle: The ID of the vehicle

Finally, there is another NGSI v1 endpoint deployed on https://api.ost.pt/ngsi10/contextEntityTypes that provides information about garages (category 9), gas stations (category 417) and parking lots (category 418). The following screenshot shows the data returned from these sensors:




As can be seen in the screenshot, POIs entities contain the following attributes:

  • name: The name of the POI
  • geom_feature: The coordinates where the POI is located
  • last_modified: The last time when the information of the POI was updated
  • start_time: The first time when the system retrieved information from that POI
  • end_time: The expected time when the POI is not going to be updated any more
  • parent_poi: The ID of the parent POI
  • location: Textual information about the POI position
  • street: The name of the street where the POI is located
  • parish: The name of the parish where the POI is located
  • municipality: The name of the city where the POI is located
  • district: The name of the district where the POI is located
  • country: The name of the country where the POI is located
  • metadata: Extra information about the POI
  • categories: The categories the POI belongs to
  • tags: A set of tags to categorize the POI

You can find the endpoints and examples on how to query Oporto Sensors in the Oporto Sensors Postman

Valencia (Spain)

The city of Valencia does not provide its data in NGSI format yet. However, it relies on FIWARE technology to offer real time information in other formats such as GeoJSON. Concretely, you can access to the following real-time information about:

  • ValenBisi: The system of bike renting provided by the city. The following screenshot shows the data returned from these sensors:

    • As can be seen in the screenshot, each feature relates to one bike rental station and the following properties are attached:
      • name: The name of the station
      • number: The number of the street where the station is located
      • address: The name of the street where the station is located
      • open: "T" if the station is open, "F" otherwise
      • available: The number of bikes available
      • free: The number of free bike terminals
      • total: The total number of bike terminals
      • ticket: "T" if payment with credit card is allowed, "F" otherwise
      • updated_at: the time when the information was updated

  • Traffic: Traffic information if real time in segments. The following screenshot shows the data returned from these sensors:

    • As can be seen, each segment contains a "estado" field that represents the state of the segment:
      • 0: Fluid
      • 1: Heavy
      • 2: Congested
      • 3:  Closed

You can find the endpoints and examples on how to query Valencia Sensors in the Valencia Sensors Postman

Slides used in the OpenHack

FIWARE Training Sesion

  • No labels