---
title: "Creating an OPC-UA Tag"
description: "Configure a tag to read or write an OPC-UA node"
source_url: https://ai-ops.com/docs/tags/creating-opc-ua
---

# Creating an OPC-UA Tag

After [creating a tag](https://ai-ops.com/docs/tags/creating-getting-started.md) on an OPC-UA device, you need to tell Koios which node in the OPC-UA server this tag represents. You can configure these fields during creation or afterwards on the tag's **Configuration** tab.

> [!TIP] Use the node browser instead of typing manually
> On the Configuration tab, click **Browse** to connect to the OPC-UA server and navigate its node tree. When you select a node, all four fields below are auto-populated — no manual entry needed.

## Protocol Fields

### Namespace

The namespace index that identifies which part of the server's address space the node belongs to.

- Namespace **0** is the standard OPC-UA namespace (built-in server nodes)
- Namespace **1** is typically the server's own application namespace
- Higher namespaces are used by add-ons or companion specifications

The browser fills this in automatically. If entering manually, use the numeric namespace index (e.g. `2`).

### Identifier

The node's identifier within its namespace. This is the specific address of the data point you want to read or write.

- The format depends on the **Identifier Type** — it could be a number, a string path, a GUID, or a byte string
- Example (numeric): `1001`
- Example (string): `Boiler.Temperature.PV`

### Identifier Type

The format of the node's identifier.

| Type | Description | Example |
|------|-------------|---------|
| **Numeric** | An integer node ID — most common for device data points | `1001` |
| **String** | A human-readable string path — common in simulation servers and some PLCs | `Boiler.Temperature.PV` |
| **GUID** | A globally unique identifier | `72962B91-FA75-4AE6-8D28-B404DC7DAF63` |
| **ByteString** | A raw byte string identifier — rare in practice | — |

- **Default:** Numeric

### Data Type

The expected data type of the node's value. Koios uses this to correctly interpret the raw bytes returned by the server.

| Data Type | Description |
|-----------|-------------|
| **Boolean** | True/false |
| **Int16 / UInt16** | 16-bit signed/unsigned integer |
| **Int32 / UInt32** | 32-bit signed/unsigned integer |
| **Int64 / UInt64** | 64-bit signed/unsigned integer |
| **Float** | 32-bit floating point |
| **Double** | 64-bit floating point |
| **String** | Text value |
| **DateTime** | Timestamp |

> [!NOTE] Data type must match the server
> If the data type doesn't match what the OPC-UA server returns, Koios may misinterpret the value or fail to read it. The node browser auto-detects the correct data type — use it when possible.

## Using the Node Browser

The OPC-UA node browser connects to the server in real time and lets you navigate the address space visually.

1. Open the tag's **Configuration** tab and click **Browse**
2. The browser displays the server's node tree as expandable folders
3. Navigate to the node you want and select it
4. The **Namespace**, **Identifier**, **Identifier Type**, and **Data Type** are all populated automatically
5. Click **Apply** to save the selection

> [!NOTE] The device must be reachable to browse
> The browser connects directly to the OPC-UA server. The device must be powered on and reachable on the network, but it does not need to be enabled in Koios.

## After Configuration

1. **Save** the tag configuration
2. **Test the tag** — click `Test` to verify Koios can read a value from this node (see [Testing a Tag](https://ai-ops.com/docs/tags/troubleshooting.md#testing-a-tag))
3. **Enable the tag** — flip the enable switch to start collecting data

> [!TIP] Enable the device first
> Tags only collect data when their parent device is also enabled and running.
