> For the complete documentation index, see [llms.txt](https://docs.videc.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.videc.de/june5-3.7/en/datenquellenunterstuetzung-und-einbindung/opc-ua-ha.md).

# OPC UA HA

A JUNE5 OPC UA HA data source endpoint establishes the connection to an OPC UA Historical Access server. Access to the historical data of an OPC UA HA server is via the JUNE5 data source, which is assigned to the JUNE5 OPC UA HA data source endpoint. The assignment is done according to the internal structure of the OPC UA server. With the exception of the node with the identifier ***Server***, all direct child nodes with the identifier ***Objects*** are defined as data sources in JUNE5.

OPC UA servers with OPC UA Historical Access specification are supported.

A JUNE5 license (Professional or Enterprise) with the option Data Source (Order No. JUNE5-OPTN-DS-UAH) is required.

In JUNE5, both process values and aggregated values of the data from OPC UA servers can be retrieved. Access to aggregated values is limited to certain databases and aggregate functions. In order to access aggregated values, the OPC UA server must provide the data in a database and aggregate function compatible with JUNE5.

The following table shows the supported databases for the OPC UA metrics.

| Aggregation Level | Description (Interval) |
| ----------------- | ---------------------- |
| PROCESS           | Raw value              |
| INTERVAL1         | 1 minute               |
| INTERVAL2         | 5 minutes              |
| INTERVAL3         | 15 minutes             |
| INTERVAL4         | 30 minutes             |
| INTERVAL5         | 1 hour                 |
| INTERVAL6         | 2 hours                |
| DAY1              | Day                    |
| WEEK              | Week                   |
| MONTH             | Month                  |
| YEAR              | Year                   |

*Table: Supported Databases for OPC UA Server Metrics*

Since there is no way in the JUNE5 web interface to set the aggregate function for calculating aggregated values, the web interface systematically queries the average. Additional aggregate functions for calculating aggregated values can be set via the API or the Excel add-in. The following table shows the supported aggregate functions for the OPC UA metrics.

| Aggregate Function | Description                       |
| ------------------ | --------------------------------- |
| Average            | Average of values in the interval |
| Minimum            | Smallest value in the interval    |
| Maximum            | Largest value in the interval     |
| Sum                | Sum of all values in the interval |

*Table: Supported Aggregate Functions for OPC UA Server Metrics*

{% hint style="info" %}
In connection with Atvise 3.x, the following restrictions are known. An evaluation can only be done on the basis of process values. For other databases, no measured values are displayed if the Atvise server does not provide the data to a database and aggregate functions compatible with JUNE5. This is a result of the restructuring of the historical functionalities of the Atvise product.
{% endhint %}

### Port Number of the OPC UA Server

{% hint style="info" %}

* The firewall must be configured by IT so that the server is accessible in the network via remote access.
* It can happen that when Internet Protocol Version 6 (IPv6) and Version 4 (IPv4) are both enabled on the computer running the JUNE5 server, a connection to an OPC UA server in the network cannot be established because the hostname of the remote OPC UA server could not be resolved. The JUNE5 server reports this with the error message ***OpcUaBadCommunicationError***. You can remedy this by entering the IP address of the OPC UA server in the ***/etc/host*** file on the computer running the JUNE5 server.
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.videc.de/june5-3.7/en/datenquellenunterstuetzung-und-einbindung/opc-ua-ha.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
