Git Product home page Git Product logo

opc-ua-data-logger's Introduction

OPC-UA-Data-Logger

Integration tool, which performs 2 tasks:

  1. Collects data from OPC UA Servers and stores it in PostgreSQL database (which might have TimescaleDB extension installed).
  2. Acts as a back-end for Grafana SimpleJson data source plugin.

Context Diagram

OPC UA Data Logger - Context Diagram

Getting Started.

Prerequisites

Installation and initial configuration.

Running of the OPC UA Data Logger.

Open Windows comman line console, navigate to the folder where OPC UA Data Logger files are unzipped, and start application OpcUaLogger.exe. Please note that at the very first start it might take some time to generate OPC UA Application Instance Certificate. At the first start, it will also create tables in the PostgreSQL database. The application has built-in web server to support web based GUI to configure it, so it will listen to http port. Windows operating system will pop-up dialog window to asking for permission to listen on the port, you will need allow it.

Configuration of connections to OPC UA Servers and selection of OPC UA variables to monitor (log into the database).

Open web browser (Google Chrome is only tested browser currently), and navigate to address http://localhost:8989

In the left side panel, click on Add button and add new connection. Note that currently web page needs to be refreshed in order to refresh the Address Space tree.

Browse OPC UA Server's address space and select one or more OPC UA Variable nodes which has numeric data type (those, for which value can be converted into float data type, for example, Byte, Int16, Int32, float, double).

Once one or more OPC UA Variables are selected, the button Log will be enabled. If you click on it, selected nodes will be used to create new records in the right side grid table. If a record has field Active checked and the field Historize unchecked, then its value will be monitored by OPC UA Data Logger, and written (logged) into the PostgreSQL database. If a record has option Historize set to true, then OPC UA Data Logger will not log it. When historical data is requested via REST API for those variables, historical values for it will be read from OPC UA Server.

The following below screenshot illustrates typical GUI: Configuration GUI Screenshot

Configuring Grafana

Grafana Screenshot

Using PostgreSQL data source.

It is possible also to get logged data values from PostgreSQL database directly, using PostgreSQL data source plugin for Grafana (installation is not required, included into Grafana by default). Example of the SQL quesry can be found below:

SELECT $__time(time), value FROM values WHERE $__timeFilter(time) and sourceid='1'

Here time, value and sourceid are column names in the values table. You can figure out corresponding to the OPC UA variable sourceid from Logged Variables data grid on the configuration GUI.

Soon the video with more detailed instructions will be posted on youtube.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.