Installation & CLI Tools#

Package Installation#

The opcua-asyncio package is available PyPi as asyncua package. To install the package execute

pip install asyncua

As the package is still under very active development you might also consider to install the package from the source repository

pip install git+https://github.com/FreeOpcUa/opcua-asyncio.git#egg=asyncua
# or, if git is not available
pip install https://github.com/FreeOpcUa/opcua-asyncio/archive/refs/heads/master.zip#egg=asyncua

Once the installation is completed, the package is ready to be used. To verify the installation, or the report the version if you create a bugreport, the following code can be run in a python interpreter:

import asyncua
print(asyncua.__version__)

Command Line Tools#

Alongside the package some utility command line tools are installed:

uabrowse:

Browse OPC-UA node and print result

uacall:

Call method of a node

uaclient:

Connect to server and start python shell. root and objects nodes are available. Node specified in command line is available as mynode variable.

uadiscover:

Performs OPC UA discovery and prints information on servers and endpoints.

uageneratestructs:

Generate a Python module from the xml structure definition (.bsd), the node argument is typically a children of i=93.

uahistoryread:

Read history of a node.

uals:

Browse OPC-UA node and print result.

uaread / uawrite:

Read / Write attribute of a node, by default reads value of a node.

uaserver:

Run an example OPC-UA server. By importing xml definition and using uawrite command line, it is even possible to expose real data using this server.

uasubscribe:

Subscribe to a node and print results

These command line tools can be used from within the environment in which the package was installed. To get more information run:

<ua-tool> --help
# For example
uaread --help

More Tools for Development#

Todo

Create a list of additional tools which are nice to have during development Possible Tools: