Skip to content
Snippets Groups Projects

Demonstrator2 implementation

In demonstrator 2, entitled "Decentralized Data Exchange", the scenario focuses on data exchange between IIoT devices and IoT services using data mapping based on service requirements. This achieved via TSMatch component and TSMatch Application.

Installation, Building, and Running The TSMatch Components

Use the package manager npm for the installation of modules and packages

database

Database uses latest Neo4j image. Run the container automatically with the provided script:

cd graphdb
chmod +x start_graphdb.sh
./start_graphdb.sh

broker

Broker uses Alpine image version 3.8: Run the container automatically with the provided script:

cd broker
chmod +x start_broker.sh
./start_broker.sh

sensor

Run with NPM:

cd thing
npm install
npm run build
npm start 

Run with provided docker container runner script:

cd thing
chmod +x start_sensor.sh
./start_sensor.sh

TSMatch Engine

Run with NPM:

cd tsmatch_engine
npm install 
npm run build
npm run service

Run with provided docker container runner script:

cd tsmatch_engine
chmod +x start_tsmatch_engine.sh
./start_tsmatch_engine.sh

TSMatch Mobile App

The APK file is located under TSMatchMobileApp/android/app/build/outputs/apk/release folder. Requirements:

  • Minimum SDK version of the app is 16. This means it supports Android 4.1 and above.
  • In case there is no file manager in the smart phone, install one from Play Store. Some popular ones: EZ File Explorer, File Manager.
  • Installing unknown apps must be allowed on the smart phone, since the app is not in Play Store. The way to allow unknown apps on a smart phone changes according to android version. How to do it is explained here.

Installation:

  • Connect your phone to a computer with a USB cable and move the APK file into your smart phone. Or download the APK file directly to your smart phone.
  • With using a file manager, move into the folder where APK file is located.
  • Click on APK file and follow the instructions of the APK installer on your smart phone.

EFPF Connector

Run with NPM:

cd efpf_connector
npm install 
npm run build
npm run service

Run with provided docker container runner script:

cd efpf_connector
chmod +x start_efpf_connector.sh
./start_efpf_connector.sh

Runtime

  • Upon start, the sensors are registred and advertised. The TSMatch component observe the registred sensors and store the sensor data(include sensor, thing, feature of interest description in the DB)
  • Then, TSMatch App will ask you to fill in some basic service request through thecommand line, then the service request is advertised
  • The TSMatch componenent then:
  1. received the service request and store the data in the DB.
  2. Sensors are first selected based on the feature of interest specified by the user (i.e. temperature)
  3. Sensors are grouped absed on the grouping defined by the user (i.e per-room)
  4. Average value per group is then created and advertised
  • The TSMatch app observes advertised events about sensor selection results and shows it in the command line