Skip to content

ics-unisg/nassy

Repository files navigation

Installation of the tool

Requirement

  • docker-compose
  • pipenv
  • python 3.9
  • npm
  • vscode

Installation on Ubuntu

sudo apt install curl python3.9 pip pipenv -y
curl https://get.docker.com | sh && sudo systemctl --now enable docker
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Installation on Mac

Make sure to increase the resource limit of docker to at least 4GB Ram.

Run the infrastructure

docker-compose up --build

DCAP is now running and can be used. In nifi/processors/dcapclient/ is a filter notebook that shows how filtering works.

Setup NIFI

Navigate to (http://localhost:1111/nifi)[http://localhost:1111/nifi] and add the infrastructure from the nifi template.

image

Press anywhere outside the NIFI stages

image

Press the Configuration icon of NIFI Flow

Go to Controller Services Panel

Pasted Graphic 1

Press the Configration icon of JettyWebSocketServer

Copy the Id

Controller Service Details

Go to UpdateAttribute phase

image

Press the Configuration icon

Go to the Properties Panel

Configure Processor

Paste the id in the field websocker.controller.service.id

Close the Panel

Press anywhere outside the NIFI stages

Press the Configuration icon of NIFI Flow

Go to Controller Services Panel

Enable all services by pressing the enable icons of the different services

Run NIFI

Start ET-Indicator

cd nifi/et-indicator/
npm install
npm run serve

Navigate to (http://localhost:8080)[http://localhost:8080]

iTrace / iMotions

Make sure to follow the steps here: https://github.com/ics-unisg/dcap/tree/main/imotions

Usage

Recorded data

You can "replay" recorded data in realistic speed. ET-Simulator can do that.

cd nifi/et-simulator
pipenv install
pipenv run python read_file.py

This will play all data in sample.csv.

Live data

Start the reader. Do not forget to point iMotions to your IP. You have to be in the same network.

cd nifi/et-reader/
pipenv install
pipenv run python3 reader.py

Reset database

cd nifi/et-simulator
pipenv install
pipenv run python reset.py

Ideas

Matlab in nifi can be done with matlab in the nifi docker container https://github.com/mathworks-ref-arch/matlab-dockerfile