HMI Installation

HMI (Human Machine Interface) is a software layer module of the OPIL architecture. This module’s name was changed to MOD.SW.HMI from AHMI when the requirements changed for the OPIL version 2.0. HMI is a web application server with its own local database for storing data needed in this module. HMI serves a web browser user interface for the human agents to monitor and control OPIL data entities.

Usage of the docker image with docker-compose

1. Start middleware

- Run Orion Context Broker  using the -corsOrigin switch
    - add "-corsOrigin __ALL"  to the orion startup command
- ngsiproxy must be started as well, preferably with middleware
    - add ngsiproxy service definition to your middleware docker-compose.yml

An example of middleware docker-compose.yml:

version: "3"
   image: mongo:3.4
   command: --nojournal
   image: fiware/orion
     - mongo
     - "1026:1026"
   command: -dbhost mongo -corsOrigin __ALL
   image: fiware/ngsiproxy
     - "3000:3000"

2. Start HMI web application

- HMI docker-compose service could be run in the same machine as OCB
    - if so, combine services from YML below to the upper one
    - make necessary changes to environment variables
    - uncomment optional variables if needed
- HMI web app uses its own instance of Mongo DB
    - use different service name than with OCB, i.e. like below "mongodb"
    - db data is backed up in folder ./mongo/data
    - application backs up folder ./public/uploads
- App is started with initial user configured in environment variables
    - although id or password changed here, user's name and role is always 'admin'
    - password could be changed from UI as well, and should be changed

HMI web app docker-compose.yml:

version: "3"
    image: mongo:3.6
    restart: always
      - ./mongo/data:/data/db
    image: l4ms/opil.sw.hmi:latest
     - inituser=admin
     - initpw=admin
     - ocb_host={IP address or hostname of OCB}
     - ocb_port=1026
     - ngsi_proxy_host={IP address or hostname of NGSI Proxy}
     - ngsi_proxy_port=3000
     #- link_btn_txt={Text to be shown on the button}
     #- link_btn_url={URL to be opened}
     #- task_mgmnt=BPO
    restart: always
      - ./public/uploads:/usr/src/app/public/uploads
      - "80:8081"
      - mongodb
    command: bash -c './wait-for mongodb:27017 -- node server.js'

3. Open http://hostnameorIP with your web browser

- use remote IP address when client web browser is running in different physical machine than HMI
  (not localhost/
- login using admin/admin

HMI Deinstall

HMI can be deinstalled by removing the Docker container.


HMI can be upgraded by first shutting down OPIL and the downloading latest Docker image.

Good idea could be to remove the old Docker container and image before.

In HMI docker-compose.yml is defined the file locations of backed up folders for Mongo DB and uploaded files. If not removed, they will be in use of upgraded HMI app.

Deprecated Features

Currently there are no deprecated features.