Skip to content

Agricolus/AWG.frontend

Repository files navigation

FIWARE Agri Weather Gateway

FIWARE Banner

A first FIWARE Domain Application: Agri Weather Gateway

FIWARE Core Context Management License badge Support badge NGSI-LD badge Documentation

Table of Contents

Introduction

The main purpose of this project is to provide an idea of a FIWARE Domain Specific Enabler related to the FIWARE AgriFood Reference Architecture. This DSE enables a standardized connection to many the agro-weather sensors in the market relying on Orion Context Broker technology and NGSI-LD standard.

This product has some major interests:

  • Providing a standardized interface to several producers that can be used by AG platforms and other AG related products
  • Providing a standalone platform that can be used to visualize data coming from different sensors
  • Providing a product that can be used event by the government (local and central) to connect many different sensors and to provide access to the farmers

In a first market analysis this kind of product is missing and, moreover, is more than welcomed by the public administration and by platform producers to simplify the access to this kind of data.

This idea starts from a common need expressed by two of these platforms, Agricolus and 365FarmNet, that meet in the IOF2020 ecosystem and recognized as a common benefit to run a joint effort to build this GE. Both the companies recognized FIWARE as the natural architecture to choose for this kind of development.

This Gateway is both a standalone application and a data gateway for agroweather data:

  • The standalone application: is provided to deploy a monitoring and data collection system for government, association of farmers and other organizations that needs to collect, visualize and deliver these data to third parties. With this DSE they will be able to setup an environment capable of implement several communication standards for several hardware producers with a single point of access
  • The data gateway: each organization will be able to deliver, upon authorization of each entity, these dynamic data to third parties, such as AG platforms and mobile apps, to enable quickly and with a reduced cost new services and functionalities

Architecture

Architecture

  • Context Providers:
    • Will interact with different producers ecosystems and cloud applications. Each producer may allow the access to a cloud repository or directly to the sensors. The context provider will manage the communication layers, the authentication of the weatherstations, sensors specific configurations and other hardware-related data (such as alarm notifications in case of hardware failure, if provided)
  • APIs Access for External Applications:
    • Upon specific authorizations third parties will be enabled to acces real time data form the DSE with given credentials
  • Web Interface:
    • Sensors management and configuration:
      • CRUD operations on weather stations
      • Weather stations POI management
      • Specific hardware producer configuration of each weather station
    • Weather stations web map:
      • Weather stations are visualized in a web map
    • Weather stations charts and data:
      • Actual and historic data for each weather station can be accessed and visualized in a graphic format
      • Actual and historic data can be downloaded in a CSV format

Functionalities

  • Data harmonization done with NGSI-LD Data Models (updating Observed Data Model)​
  • APIs for data access​
  • IoT Agents to get the weather data
  • Admin frontend with overall sensors dashboard​
  • End user portal that will have access to data​

Installation

Infrastructure

AWG is composed of some backend services, one frontend web application plus a varying number of IoT agents.

Services

  1. Docker
  2. Keyrock Identity Manager
  3. Orion-LD Context Broker
  4. Wilma PEP Proxy
  5. IoT Agent
  6. APIs
  7. Web Frontend

Getting Started

If you want to use Docker, install it following the official guide.

If you want to use PostgreSQL on premises, install it following the official guide.

To install it through Docker, type:

sudo docker run --name <my-postgres-instance-> -e POSTGRES_PASSWORD=<my-password> --restart unless-stopped -p 5432:5432 -d postgres

The default installation of PostgreSQL open the 5432 port.

If you want to use Orion Context Broker on premises, install it following the official guide.

To install it through Docker, type:

sudo docker-compose -f orion-compose.yml up -d

The default installation of Orion Context Broker open the 1026 port.

orion-compose.yml
version: "3.5"
services:
  mongo:
    restart: always
    image: mongo:3.6
    command: --nojournal
    networks:
      default:
      idmnet:

  orion:
    restart: always
    image: fiware/orion-ld
    command: -dbhost mongo
    ports:
      - "1026:1026"
    networks:
      default:
      idmnet:

networks:
  default:
  idmnet:
    name: idmnet
    internal: true

IoT Agents

See SPEC.md.

APIs

See SPEC.md.

Frontend

See SPEC.md.

License

This project is licensed under the AGPL License.