Ignition with simulated PLC to Influxdb with via OPC-UA

On a new Ubuntu 16.04 vm (tested on Digital Ocean vm with 2GB ram)


  • check that all services start by default at reboot (influx√, ignition√, grafana√, node-data-logger?)
  • configure authentication at all stages
  • move individual services to docker containers for modularity

Log in as root

Create a user:

adduser chris && usermod -aG sudo chris

Switch to the newly created user…

Install java8:

sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update
sudo apt-get install -y oracle-java8-installer

Install Ignition:

wget https://s3.amazonaws.com/files.inductiveautomation.com/release/ia/build7.9.1/20170125-1117/Ignition-7.9.1-linux-x64-installer.run
chmod +x Ignition-7.9.1-linux-x64-installer.run && sudo ./Ignition-7.9.1-linux-x64-installer.run

Install Node.js:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

Install InfluxDB:

wget https://dl.influxdata.com/influxdb/releases/influxdb_1.2.0_amd64.deb
sudo dpkg -i influxdb_1.2.0_amd64.deb

At this point, Influxdb won’t start due to a port conflict with Ignition.  See this Influxdb git issue for more details.

Configure Influxdb ports in /etc/influxdb/influxdb.conf:

Near the beginning of the config file, right after the commented out hostname key add:

# hostname = "localhost"
bind-address = ":8098"

Under [http]: change 8086 ref to 8096 (I shifted all up by 10 for easy remembering)

# Determines whether HTTP endpoint is enabled.
enabled = true

# The bind address used by the HTTP service.
bind-address = ":8096"

Then start the InfluxDB service with:

sudo systemctl start influxdb && sudo systemctl status influxdb

Install OPC-UA to Influxdb connector:

From: https://github.com/coussej/node-opcua-logger

git clone https://github.com/coussej/node-opcua-logger.git
cd node-opcua-logger
npm install

Install Grafana

curl https://packagecloud.io/gpg.key | sudo apt-key add -
echo 'deb https://packagecloud.io/grafana/stable/debian/ jessie main' | sudo tee -a /etc/apt/sources.list
sudo apt-get update && sudo apt-get install -y grafana

Configure grafana at /etc/grafana/grafana.ini

sudo systemctl enable grafana-server.service
sudo systemctl start grafana-server
sudo systemctl status grafana-server

Use influx console to create a database.

Log into grafana and setup influx database created above as data source.

Setup node logger to pull data from simulated PLC on Ignition and post to InfluxDB.



Leave a Reply