OPC UA terminal explorer#

Use the explorer to find a node by name, inspect its live values, and copy its qualified browse path or the Python code that finds it.

Install#

Note

To try the explorer without installing it, run uvx instro-opcua-explorer with uv or pipx run instro-opcua-explorer with pipx, then skip to Connect and find a node.

Install the explorer as a command with uv or pipx, which give it an environment of its own, or with pip into your current environment.

uv tool install instro-opcua-explorer
pipx install instro-opcua-explorer
pip install instro-opcua-explorer

To add the explorer to a project that uses instro, install the opcua-explorer extra with uv add "instro[opcua-explorer]" or pip install "instro[opcua-explorer]".

Start the explorer#

instro-opcua-explorer

In a uv project, run uv run instro-opcua-explorer. If your shell can’t find the command after a pip install, run python -m instro.opcua.explorer. From an instro checkout, run uv run --package instro-opcua-explorer instro-opcua-explorer.

Connect and find a node#

  1. Press Enter to edit Discovery URL. Enter the server URL and press Enter again to discover its endpoints.

  2. Use j and k to move between controls. Choose the Mode / policy and User identity advertised by your server. Expand Advanced configuration to set the application certificate, key, or trust store. Select Connect.

  3. In Address space, press l to expand a node or h to collapse it. Press / and type part of a browse name to filter the tree. Enter reveals the highlighted match. Esc returns to your previous selection.

  4. With a node highlighted, press y to copy its qualified browse path or c to copy the Python code that finds it. To also read an attribute in that code, press Tab to focus Attributes, highlight the attribute, and press c again.

The copied code uses client.root for Root and client.get_node() for other nodes. Paste it where client is a connected OpcUaClient, as in Connect and read.