Initial support for servers with historical data access in open62541

An OPC UA server supporting historical access allows clients to access historical data or historical events. Such a server can act as a process or event historian. open62541-based servers were till recently completely missing the ability to support these use cases. basysKom has extended the server API to support access to historical data using the “read raw” functionality specified in OPC UA part 11. This allows to create a simple process historian. This article provides an overview about this API and a short tutorial how to use it.


Most of the new functionality is contained within a plugin called UA_HistoryDatabase. This plugin contains three main API elements.

  • UA_HistoryDatabase (same name as the plugin) which contains the main interface between the server itself and the plugin.
  • UA_HistoryDataBackend which implements the integration with a specific database. A sample implementation based on a simple in-memory database is provided.
  • UA_HistoryDataGathering which encapsulates the gathering and storage of data. 

The following diagram gives an overview how these API elements interact.


The following tutorial will first demonstrate how to create a simple server, hosting a single variable node. We will extend this server to store this value in an in-memory database each time it changes.

Let’s start with a server:

The resulting server can be browsed and the variable can be read. We use UAExpert for this tasks. 

We now extend this example so that the server will be able to handle request for historical values for this node. Each of the following snippets contains enough context so it is clear where to add the code into the initial server code.

Next we configure the node to update the database each time the nodes value is set.

Again we rely on the UAExpert to validate the server. First update the variable a few times (so we actually have some historical values). Next we want to read them.  For that we use the “History Trend View” which is available via Document → Add → Document Type. The resulting view shows either a graph or (in a second tab) a list of your historical values. If no values are plotted or the list is empty make sure that the right time interval is used in the request.

Conclusion & future work

It is now possible to create open62541-based servers which support the gathering and reading of historical data values. A number of plugin interfaces has been defined which can be used to implement functionality such as support for additional databases (e.g. sqlite). There is additional work to be done to support other history read details such as “read event”, “read modified”, “read processed” or “read at a time”. Also the history update service still needs to be implemented.

In addition to being a contributor to the project, basysKom also provides commercial support for the open62541 OPC UA stack. Talk to us if you are interested in project/application support, the implementation of missing features or bugfixing.

A contribution to Qt5.6: Qt NFC support for Android

In Qt 5.4 NFC support is restricted to Blackberry 10. After working on basic desktop support for Qt 5.5 through neard, basysKom decided to kick off NFC support for Android as well.

After two months of work, basysKom has committed Android NFC support to a Qt development branch, based on previous work by Juhana Jauhiainen and colleagues. The patches have passed the review process and we are proud to announce that Qt NFC support for Android will be part of Qt 5.6.

Just so you do not have to take our word for it (or build the dev branches yourself), have a look at the video.

Here you see the NFC corkboard demo from the Qt examples on Nexus 7 running Android 5.0.2 and Qt 5.5 Alpha with our NFC patches. The provided NFC tag has 3 NDEF records – one URI record and two text records. These show up as post-its on the corkboard.