Giter VIP home page Giter VIP logo

opcua-client-gui's Introduction

Simple OPC-UA GUI client.

Scrutinizer Code Quality Build Status Build Status

Written using freeopcua python api and pyqt. Most needed functionalities are implemented including subscribing for data changes and events, write variable values listing attributes and references, and call methods. PR are welcome for any whished improvments

It has also a contextual menu with a few usefull function like putting the mode id in clipboard or the entire browse path which can be used directly in you program: client.nodes.root.get_child(['0:Objects', '2:MyNode'])

Screenshot

What works:

  • connecting and disconnecting
  • browsing with icons per node types
  • showing attributes and references
  • subscribing to variable
  • available on pip: sudo pip install opcua-client
  • remember connections and show connection history
  • subscribing to events
  • write variable node values
  • gui for certificates
  • gui for encryption
  • call methods
  • plot method values
  • remember last browsed path and restore state

TODO (listed after priority):

  • detect lost connection and automatically reconnect
  • gui for loging with certificate or user/password (can currently be done by writting them in uri)
  • Maybe read history
  • Something else?

How to Install

Note: PyQT 5 is required.

Linux:

  1. Make sure python and python-pip is installed
  2. pip3 install opcua-client
  3. Run with: opcua-client

Windows:

  1. Install winpython https://winpython.github.io/ , install the version including pyqt5!
  2. Use pip to install opcua-client: pip install opcua-client
  3. Run via the script pip created: YOUR_INSTALL_PATH\Python\Python35\Scripts\opcua-client.exe

To update to the latest release run: pip install opcua-client --upgrade

MacOS

  1. Make sure python, python-pip and homebrew is installed
  2. brew install pyqt@5
  3. pip3 install opcua-client pyqtgraph cryptography numpy
  4. Run with opcua-client

opcua-client-gui's People

Contributors

anderslindho avatar bluhm avatar cjue avatar curiouscrook avatar derme302 avatar fville avatar oroulet avatar puchm avatar rangerjo avatar stephenhoran avatar thenaildev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opcua-client-gui's Issues

Client crash when setting node's DisplayName on server

Hi together,

after instantiating a node on my server and setting a display name, sometimes the client can't connect to the server anymore (before it was working properly), sometimes it can connect to the server, but if I try to open the folder with the node in it, it crashes. In my terminal window I get these messages:
uaclient.uaclient - INFO - Connecting to opc.tcp://localhost:4842 with parameters None_, None, , ') uaclient.mainwindow - WARNING - showing error: %s') Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/uawidgets/tree_widget.py", line 244, in fetchMore self._fetchMore(parent) File "/usr/local/lib/python3.7/site-packages/uawidgets/tree_widget.py", line 249, in _fetchMore descs = node.get_children_descriptions() File "/usr/local/lib/python3.7/site-packages/opcua/common/node.py", line 338, in get_children_descriptions return self.get_references(refs, ua.BrowseDirection.Forward, nodeclassmask, includesubtypes) File "/usr/local/lib/python3.7/site-packages/opcua/common/node.py", line 367, in get_references results = self.server.browse(params) File "/usr/local/lib/python3.7/site-packages/opcua/client/ua_client.py", line 306, in browse data = self._uasocket.send_request(request) File "/usr/local/lib/python3.7/site-packages/opcua/client/ua_client.py", line 78, in send_request data = future.result(self.timeout) File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/_base.py", line 437, in result raise TimeoutError() concurrent.futures._base.TimeoutError Abort trap: 6

Does anyone know how to handle this?

Can't browse server's objects

Hi,

I am connecting the present OPC UA client to the official ANSI C server. Once connected, I try to browse the folders or do anything else but get errors about a non-activated session. The attached log was the comprehensive output of the client.

log.txt

Maybe the server requires more configuration..

Thanks in advance

Error by opcua-client command

Hello,

I'm trying to use opcua-client-gui on my Raspberry pi 3. I installed pyqt5 and opcua-client with pip without a problem but when i run the "opcua-client" command in the terminal i get the error below:

Traceback (most recent call last):
File "/usr/local/bin/opcua-client", line 7, in
from uaclient.mainwindow import main
File "/usr/local/lib/python3.5/dist-packages/uaclient/mainwindow.py", line 23, in
from uawidgets.attrs_widget import AttrsWidget
File "/usr/local/lib/python3.5/dist-packages/uawidgets/attrs_widget.py", line 11, in
from uawidgets.get_node_dialog import GetNodeButton
File "/usr/local/lib/python3.5/dist-packages/uawidgets/get_node_dialog.py", line 7, in
from uawidgets.tree_widget import TreeWidget
File "/usr/local/lib/python3.5/dist-packages/uawidgets/tree_widget.py", line 62
raise ValueError(f"Node {node} not found in tree")
SyntaxError: invalid syntax

I did a quick google search but couldn't understand what the problem is. I would really appreciate your help on this, thanks in advance :)

AttributeError: 'NoneType' object has no attribute 'to_string'

Hi,
I wanted to test opcua-client-gui with OPC Fundation example ServerExample1 in repo: ServerExample1.java

While FreeOpcUa Client and ServerExample1 is running and I press 'Connect' on the client UI, I get error

AttributeError: 'NoneType' object has no attribute 'to_string'

Whole log from client:

uaclient.uaclient - INFO - Connecting to opc.tcp://localhost:8666/UAExample with parameters None, None, None, None')
uawidgets.utils - ERROR - 'NoneType' object has no attribute 'to_string'')
Traceback (most recent call last):
File "d:\python35\lib\site-packages\uawidgets\utils.py", line 21, in wrapper
result = func(self, *args)
File "d:\python35\lib\site-packages\uaclient\mainwindow.py", line 338, in connect
self.tree_ui.set_root_node(self.uaclient.client.get_root_node())
File "d:\python35\lib\site-packages\uawidgets\tree_widget.py", line 43, in set_root_node
self.model.set_root_node(node)
File "d:\python35\lib\site-packages\uawidgets\tree_widget.py", line 164, in set_root_node
self.add_item(desc, node=node)
File "d:\python35\lib\site-packages\uawidgets\tree_widget.py", line 177, in add_item
item = [QStandardItem(desc.DisplayName.to_string()), QStandardItem(desc.BrowseName.to_string()), QStandardItem(desc.NodeId.to_string())]
AttributeError: 'NoneType' object has no attribute 'to_string'
uaclient.mainwindow - WARNING - showing error: %s')

Am I missing some connection options? Or some dependencies?

Thank you in advance for your help.

UserTokenType error

not able to connect one of our opcua server with this client and getting following error .

ValueError.4 is not a valid User

We have set security Policy and Message security Mode to None.

Any suggestion why it is not working?

How to active the opcuaclient in Linux system

I have installed the PYQT5 and opcua client, but when I run the command "uaclient"
it say'Traceback (most recent call last):
File "/usr/local/bin/uaclient", line 11, in
sys.exit(uaclient())
File "/home/sinoma-ld/.local/lib/python3.6/site-packages/opcua/tools.py", line 477, in uaclient
client.connect()
File "/home/sinoma-ld/.local/lib/python3.6/site-packages/opcua/client/client.py", line 272, in connect
self.connect_socket()
File "/home/sinoma-ld/.local/lib/python3.6/site-packages/opcua/client/client.py", line 307, in connect_socket
self.uaclient.connect_socket(self.server_url.hostname, self.server_url.port)
File "/home/sinoma-ld/.local/lib/python3.6/site-packages/opcua/client/ua_client.py", line 266, in connect_socket
return self._uasocket.connect_socket(host, port)
File "/home/sinoma-ld/.local/lib/python3.6/site-packages/opcua/client/ua_client.py", line 155, in connect_socket
sock = socket.create_connection((host, port), timeout=self.timeout)
File "/usr/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/usr/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
'

Run with: opcua-client Problem

Hello, Everyone!

  1. I installed PyQT 5

  2. I installed python3.6.9 with python-pip3

  3. I entered pip3 install opcua-client

  4. I couldn't run this problem

Traceback (most recent call last):

File "/snap/opcua-client/18/bin/opcua-client", line 33, in
sys.exit(load_entry_point('opcua-client==0.8.0', 'console_scripts', 'opcua-client')())

File "/snap/opcua-client/18/lib/python3.6/site-packages/pkg_resources/init.py", line 474, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)

File "/snap/opcua-client/18/lib/python3.6/site-packages/pkg_resources/init.py", line 2846, in load_entry_point
return ep.load()

File "/snap/opcua-client/18/lib/python3.6/site-packages/pkg_resources/init.py", line 2450, in load
return self.resolve()

File "/snap/opcua-client/18/lib/python3.6/site-packages/pkg_resources/init.py", line 2456, in resolve
module = import(self.module_name, fromlist=['name'], level=0)

File "/snap/opcua-client/18/lib/python3.6/site-packages/uaclient/mainwindow.py", line 13, in
from uaclient.theme import breeze_resources
ModuleNotFoundError: No module named 'uaclient.theme'

  1. Could you tell me what is wrong?

Thanks for you kindness help!

Cannot view nodes with [] on Sinumerik Server

Hey,

I have several variables on my 840d sinumerik like :
GD5_CMM_CORR[80,1]
GD5_CMM_CORR[80,2]
GD5_CMM_CORR[80,3]
But the client only shows one : GD5_CMM_CORR , with value 0.0

How can i repair it ?

How to reset all windows

Hi,
first of all, great job!
I use the mac client.
Close the windows on the right: Attributes, Events, References, Subscriptions.
How can i back to the default settings?
I tryed right click in many places but no menu to show.
Thank you in advance.

General Questions

@oroulet Hey I was hoping you could reach out by email, I just have a couple questions about the package and best way to implement some features. I couldn't find your email, feel free to close this issue.

Install GUI on Raspberry Pi

Hello,

I'm trying to install opcua-client-gui on my Raspberry Pi, but I'm having problems. After that I installed PyQT5, I started installing the GUI and I got the following error:

Collecting opcua-client
Downloading https://files.pythonhosted.org/packages/de/99/41aa0eb2b9ff2560e6156e8d0a5ce294f5d2aa7d10232dd23485bbe099ac/opcua-client-0.8.0.tar.gz (204kB)
100% |████████████████████████████████| 215kB 202kB/s
Collecting opcua-widgets>=0.5.4 (from opcua-client)
Downloading https://files.pythonhosted.org/packages/5a/e3/1fe068af0e0ad3edd4baed6aadec04099a0384df5d78fd13b3490f520f63/opcua-widgets-0.5.6.tar.gz (209kB)
100% |████████████████████████████████| 215kB 190kB/s
Collecting opcua>=0.98.1 (from opcua-client)
Downloading https://files.pythonhosted.org/packages/79/fc/dca3c2cc6760562e7c81995ab55ab0d0300db604eb839f549aabd9d816d1/opcua-0.98.6.tar.gz (450kB)
100% |████████████████████████████████| 460kB 151kB/s
Requirement already satisfied: enum34 in /usr/lib/python2.7/dist-packages (from opcua>=0.98.1->opcua-client)
Collecting futures (from opcua>=0.98.1->opcua-client)
Downloading https://files.pythonhosted.org/packages/2d/99/b2c4e9d5a30f6471e410a146232b4118e697fa3ffc06d6a65efde84debd0/futures-3.2.0-py2-none-any.whl
Collecting lxml (from opcua>=0.98.1->opcua-client)
Downloading https://files.pythonhosted.org/packages/0f/bd/bb1464d1f363dbd805862c8a1ea258b9a4f4d2049c376d1c4790b6545691/lxml-4.3.1.tar.gz (4.4MB)
100% |████████████████████████████████| 4.4MB 59kB/s
Collecting python-dateutil (from opcua>=0.98.1->opcua-client)
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting pytz (from opcua>=0.98.1->opcua-client)
Downloading https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl (510kB)
100% |████████████████████████████████| 512kB 179kB/s
Collecting trollius (from opcua>=0.98.1->opcua-client)
Downloading https://files.pythonhosted.org/packages/98/47/000d403a209e5d0c2753feabd3bbbd09a11e32652899abffc1ef5d5c0abb/trollius-2.2.tar.gz (276kB)
100% |████████████████████████████████| 276kB 200kB/s
Requirement already satisfied: six>=1.5 in /usr/lib/python2.7/dist-packages (from python-dateutil->opcua>=0.98.1->opcua-client)
Building wheels for collected packages: opcua-client, opcua-widgets, opcua, lxml, trollius
Running setup.py bdist_wheel for opcua-client ... done
Stored in directory: /root/.cache/pip/wheels/ff/de/69/3870227c085b3ebd1fa71a623dca95be418780c547b47081b4
Running setup.py bdist_wheel for opcua-widgets ... done
Stored in directory: /root/.cache/pip/wheels/1e/1c/86/5867f1b95812bca3d57b37b13845798f75f468376f6d057266
Running setup.py bdist_wheel for opcua ... done
Stored in directory: /root/.cache/pip/wheels/89/1e/0e/ca3ed5e56a4b6d91928133c62956767da8c56dac9873dcdfe3
Running setup.py bdist_wheel for lxml ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-uYeHCA/lxml/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmpGgfN5Bpip-wheel- --python-tag cp27:
Building lxml version 4.3.1.
Building without Cython.
ERROR: /bin/sh: 1: xslt-config: not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/init.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/builder.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/sax.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-armv7l-2.7/lxml
creating build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/init.py -> build/lib.linux-armv7l-2.7/lxml/includes
creating build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/init.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-armv7l-2.7/lxml/html
creating build/lib.linux-armv7l-2.7/lxml/isoschematron
copying src/lxml/isoschematron/init.py -> build/lib.linux-armv7l-2.7/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/etree_api.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/lxml.etree.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/init.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-armv7l-2.7/lxml/includes
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/rng
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/src
creating build/temp.linux-armv7l-2.7/src/lxml
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-Ub3vap/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/etree.c -o build/temp.linux-armv7l-2.7/src/lxml/etree.o -w
In file included from src/lxml/etree.c:687:0:
src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
#include "libxml/xmlversion.h"
^
compilation terminated.
Compile failed: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitHHhhPm.c -o tmp/xmlXPathInitHHhhPm.o
/tmp/xmlXPathInitHHhhPm.c:1:26: fatal error: libxml/xpath.h: No such file or directory
#include "libxml/xpath.h"
^
compilation terminated.


Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?


error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1


Failed building wheel for lxml
Running setup.py clean for lxml
Running setup.py bdist_wheel for trollius ... done
Stored in directory: /root/.cache/pip/wheels/b7/47/81/3e20555dc6ec7979d588038b04650ec44b7869a8fc17a616bf
Successfully built opcua-client opcua-widgets opcua trollius
Failed to build lxml
Installing collected packages: futures, lxml, python-dateutil, pytz, trollius, opcua, opcua-widgets, opcua-client
Running setup.py install for lxml ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-uYeHCA/lxml/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-rnysqr-record/install-record.txt --single-version-externally-managed --compile:
Building lxml version 4.3.1.
Building without Cython.
ERROR: /bin/sh: 1: xslt-config: not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-2.7
creating build/lib.linux-armv7l-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/__init__.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/builder.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/sax.py -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-armv7l-2.7/lxml
creating build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/__init__.py -> build/lib.linux-armv7l-2.7/lxml/includes
creating build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/__init__.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-armv7l-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-armv7l-2.7/lxml/html
creating build/lib.linux-armv7l-2.7/lxml/isoschematron
copying src/lxml/isoschematron/__init__.py -> build/lib.linux-armv7l-2.7/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/etree_api.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/lxml.etree.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-armv7l-2.7/lxml
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/__init__.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-armv7l-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-armv7l-2.7/lxml/includes
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/rng
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl
creating build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-armv7l-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-armv7l-2.7
creating build/temp.linux-armv7l-2.7/src
creating build/temp.linux-armv7l-2.7/src/lxml
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-Ub3vap/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/etree.c -o build/temp.linux-armv7l-2.7/src/lxml/etree.o -w
In file included from src/lxml/etree.c:687:0:
src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
 #include "libxml/xmlversion.h"
                               ^
compilation terminated.
Compile failed: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInittu2CgT.c -o tmp/xmlXPathInittu2CgT.o
/tmp/xmlXPathInittu2CgT.c:1:26: fatal error: libxml/xpath.h: No such file or directory
 #include "libxml/xpath.h"
                          ^
compilation terminated.
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
*********************************************************************************
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-uYeHCA/lxml/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-rnysqr-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-uYeHCA/lxml

Could anyonde tell me what this means ?

Issue that duplicates objects

I am currently using GUI client for testing purposes.

During testing with the GUI client, I found one problem.
When testing with the example server of Unified Automation, there is a problem that objects are duplicated.
This should not happen when testing with PythonOpcUa Server.

I attached the picture of the problem here.
image

From a functional point of view I have verified many things. By the way, how do you call method in GUI client?
Has it not been implemented yet?

The requested operation has no match to return.(BadNoMatch)

I install it.
In GUI it work.
image

I download client-minimal.py.
Change host to client = Client("opc.tcp://192.168.3.100:4840/freeopcua/server/") or client = Client("opc.tcp://192.168.3.100:4840")

And it generate error when run:

root@GP120OH:~/opcua1# python3 client-minimal.py
Objects node is:  Node(TwoByteNodeId(i=84))
Children of root are:  [Node(TwoByteNodeId(i=87)), Node(TwoByteNodeId(i=85)), Node(TwoByteNodeId(i=86))]
Traceback (most recent call last):
  File "client-minimal.py", line 32, in <module>
    myvar = root.get_child(["0:Objects", "2:MyObject", "2:MyVariable"])
  File "/usr/lib/python3/dist-packages/opcua/common/node.py", line 470, in get_child
    result.StatusCode.check()
  File "/usr/lib/python3/dist-packages/opcua/ua/uatypes.py", line 233, in check
    raise UaStatusCodeError(self.value)
opcua.ua.uaerrors._auto.BadNoMatch: The requested operation has no match to return.(BadNoMatch)

How to method call

Hello, All.

I use the freeopcua Gui Client tool for the first time.
How do you call a method in this tool?

I do not know if there is no reference to the method call.

QPixmap::scaled: Pixmap is a null pixmap

despite that i installed all the required dependencies, I still see this message on my terminal, and I don't know it looks for what?! that can't find. (how can I stop it, not to complain anymore?)
~  opcua-client 3.3m  Wed 20 Jun 2018 06:02:55 PM CEST
cryptography is not installed, use of crypto disabled
cryptography is not installed, use of crypto disabled
Using Wayland-EGL
Using the 'xdg-shell-v6' shell integration
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap

What about the client application certificate?

A certificate and a private key are specified in the ConnectionDialog. Since these certificate and key are configured per connection, I assume that this is the user certificate, etc.

When trying to establish a connection to an OPC UA server with the following security profile, I am at a loss where the application certificate has to be placed.
SecurityMode: SignAndEncrypt
SecurityPolicy: Basic256Sha256

Usually the application comes with its own certificate. But I couldn't find any in the repository.
With UaExpert, for example, a certificate is generated during installation. There is also a certificate management dialog in which the client application certificate can be renewed. Setting up a connection from UaExpert to this server was no problem.

Could it be that the security profile I am using is not supported by opcua-client-gui?

Reset graphic windows

Hi,
first of all, great job! I have a issue with the graphic window, I wrongly close thewindows on the right: Attributes, Events, References, Subscriptions. How can i back to the default settings? I tryed to delete and download again the .zip file, but doesn't work. Thank you in advance.

History Read

Hello, All.

I have a question.

There is no mention of history read.
image

Also, there is no function related to history in freeopcua Client Gui.
image

Has not the history read function implemented yet in the Client Gui Tool?

No module named 'uawidgets'

SYS:PATH ['C:\Users\39544\Desktop\opcua-client-gui-master', 'D:\Program Files\Python36\python36.zip', 'D:\Program Files\Python36\DLLs', 'D:\Program Files\Python36\lib', 'D:\Program Files\Python36', 'C:\Users\39544\AppData\Roaming\Python\Python36\site-packages', 'D:\Program Files\Python36\lib\site-packages']
PWD C:\Users\39544\Desktop\opcua-client-gui-master
cryptography is not installed, use of crypto disabled
cryptography is not installed, use of crypto disabled
Traceback (most recent call last):
File "C:\Users\39544\Desktop\opcua-client-gui-master\tests.py", line 17, in
from uaclient.mainwindow import Window
File "C:\Users\39544\Desktop\opcua-client-gui-master\uaclient\mainwindow.py", line 19, in
from uaclient.connection_dialog import ConnectionDialog
File "C:\Users\39544\Desktop\opcua-client-gui-master\uaclient\connection_dialog.py", line 4, in
from uawidgets.utils import trycatchslot
ModuleNotFoundError: No module named 'uawidgets'

Graph at opcua-client

Hello,

I am using simple server code at PI.

`from opcua import Server
from opcua import ua
from random import randint
import datetime
import time

server = Server()

url = "opc.tcp://192.168.1.119:4840"
server.set_endpoint(url)

name = "OPCUA_SIMULATION_SERVER"
addspace = server.register_namespace(name)

node = server.get_objects_node()

Param = node.add_object(addspace, "Parameters")

Temp = Param.add_variable(addspace, "Temperature", 0, ua.VariantType.Byte)
Press = Param.add_variable(addspace, "Pressure", 0)
Time = Param.add_variable(addspace, "Time", 0)

Temp.set_writable()
Press.set_writable()
Time.set_writable()

server.start()
print("Server started at {}".format(url))

while True:
Temperature = randint(10, 50)
Pressure = randint(200,999)
TIME = datetime.datetime.now()

print(Temperature,Pressure,TIME)

Temp.set_value(Temperature)
Press.set_value(Pressure)
Time.set_value(TIME)

time.sleep(2)`

At Linux Mint I am connecting to server via opcua-client. Everything works fine, but I am not able to get any variable to graph. There is always information that this type is not able to put in graph. I was trying also to define another data types. But without any success. Could you please help me where could be a problem?

TNX.

TypeError: QMainWindow.restoreState(QByteArray, int version=0): argument 1 has unexpected type 'unicode'

On Ubuntu 16.04 I ran:

~❯ freeopcua-client
Traceback (most recent call last):
  File "/usr/local/bin/freeopcua-client", line 9, in <module>
    load_entry_point('freeopcua-client==0.4.5', 'console_scripts', 'freeopcua-client')()
  File "/usr/local/lib/python2.7/dist-packages/freeopcuaclient/mainwindow.py", line 462, in main
    client = Window()
  File "/usr/local/lib/python2.7/dist-packages/freeopcuaclient/mainwindow.py", line 326, in __init__
    self.restoreState(self.settings.value("main_window_state", b""))
TypeError: QMainWindow.restoreState(QByteArray, int version=0): argument 1 has unexpected type 'unicode'

Any ideas, what could cause this?

Cannot write to 'Byte' attributes

When using the GUI to write to a Byte attribute (like changing a 1 to a 2), this error is raised:

struct.error: required argument is not an integer

Here is a the logs from an error when changing a 1 to a 2:

uawidgets.attrs_widget - INFO - Writing attribute AttributeIds.Value of node Node(StringNodeId(ns=6;s=::AsGlobalPV:Server.pot[0].setPotState.potState)) with value: DataValue(Value:Variant(val:b'2',type:VariantType.Byte), StatusCode:StatusCode(Good))')
uawidgets.attrs_widget - ERROR - Exception while writing DataValue(Value:Variant(val:b'2',type:VariantType.Byte), StatusCode:StatusCode(Good)) to AttributeIds.Value')
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/uawidgets/attrs_widget.py", line 397, in _write_attr
    self.attrs_widget.current_node.set_attribute(data.attr, dv)
  File "/usr/local/lib/python3.6/site-packages/opcua/common/node.py", line 231, in set_attribute
    result = self.server.write(params)
  File "/usr/local/lib/python3.6/site-packages/opcua/client/ua_client.py", line 313, in write
    data = self._uasocket.send_request(request)
  File "/usr/local/lib/python3.6/site-packages/opcua/client/ua_client.py", line 74, in send_request
    future = self._send_request(request, callback, timeout, message_type)
  File "/usr/local/lib/python3.6/site-packages/opcua/client/ua_client.py", line 53, in _send_request
    binreq = request.to_binary()
  File "/usr/local/lib/python3.6/site-packages/opcua/ua/uaprotocol_auto.py", line 9887, in to_binary
    packet.append(self.Parameters.to_binary())
  File "/usr/local/lib/python3.6/site-packages/opcua/ua/uaprotocol_auto.py", line 9836, in to_binary
    packet.append(fieldname.to_binary())
  File "/usr/local/lib/python3.6/site-packages/opcua/ua/uaprotocol_auto.py", line 9792, in to_binary
    packet.append(self.Value.to_binary())
  File "/usr/local/lib/python3.6/site-packages/opcua/ua/uatypes.py", line 988, in to_binary
    packet.append(self.Value.to_binary())
  File "/usr/local/lib/python3.6/site-packages/opcua/ua/uatypes.py", line 835, in to_binary
    b.append(uabin.pack_uatype(self.VariantType, self.Value))
  File "/usr/local/lib/python3.6/site-packages/opcua/ua/ua_binary.py", line 259, in pack_uatype
    return getattr(Primitives, vtype.name).pack(value)
  File "/usr/local/lib/python3.6/site-packages/opcua/ua/ua_binary.py", line 202, in pack
    return struct.pack(self.format, data)
struct.error: required argument is not an integer
uaclient.mainwindow - WARNING - showing error: %s')

Though its coming from this opcua-widgets function, I wasn't sure what repo to file this issue under.

Browsepath

Hello together

I just used the export browsepath functionality which is quite handy. So I have a question reagarding it.

Is there a reason you use , "commas" instead of / "slashes". As far as I can see commas are not according to the standard and I have to replace them with the /
Here is a link:
http://documentation.unified-automation.com/uasdkdotnet/2.0.0/L3ClientTutExample13.html

Also, there should be a / in the beginning of the browse path for signaling the root of the path, otherwise it would be a relative path.

so this path from the opcua-client:
0:Root,0:Objects,2:DeviceSet,2:X20BC008U,2:ParameterSet,2:ConfigurationStatus

Should look like this:
/0:Root/0:Objects/2:DeviceSet/2:X20BC008U/2:ParameterSet/2:ConfigurationStatus

But I could be wrong, thanks anyway for the great software!

Black theme

Downloaded the client (Mac OSX) and it doesn't look anything like on the screenshot provided here.
Is it possible to somehow activate that black theme?

Otherwise great client, works perfectly :)

Error by OPCUA-Client command after installing all packages

Hi,
I am trying to make raspberry pi 3 as client to visualize my data.
At the final step after installing opcua and opcua-client i cannot run the opc-ua client.

It is showing invalid syntax. I am using Python 3.5.3. Is the syntax different. I am stuck. Could someone please help

pi@raspberrypi:~ $ opcua-client
pyqtgraph or numpy are not installed, use of graph feature disabled
Traceback (most recent call last):
File "/usr/local/bin/opcua-client", line 7, in
from uaclient.mainwindow import main
File "/usr/local/lib/python3.5/dist-packages/uaclient/mainwindow.py", line 23, in
from uawidgets.attrs_widget import AttrsWidget
File "/home/pi/.local/lib/python3.5/site-packages/uawidgets/attrs_widget.py", line 11, in
from uawidgets.get_node_dialog import GetNodeButton
File "/home/pi/.local/lib/python3.5/site-packages/uawidgets/get_node_dialog.py", line 7, in
from uawidgets.tree_widget import TreeWidget
File "/home/pi/.local/lib/python3.5/site-packages/uawidgets/tree_widget.py", line 62
raise ValueError(f"Node {node} not found in tree")
^
SyntaxError: invalid syntax

Segmentation fault

I followed the instruction to install the software. Installed the dependencies like PyQt5. When I try to run it with opcua-client I just get a "segmentation fault".

System is Debian 8, testing. Attached valgrind output

valgrind_log.txt

GUI interface tabs disappeared

Hello,i have closed all tab in main frame(data values,events and messages)I have only main windows where i can browse the items but cannot do anythink.Try to uninstall and install again but tabs still missing.Someone can help?
image

argument 1 has unexpected type 'sip.voidptr'

When trying to run the client I get the following error:argument 1 has unexpected type 'sip.voidptr'.
It seems to come from the following line in the code: self.restoreState(self.settings.value("main_window_state", b"")).
Any ideas on a fix?

Missing dependency on python3-crypto

I got the following error when trying to run v. 0.3.5:

ml@y13:~$ freeopcua-client 
Traceback (most recent call last):
  File "/usr/local/bin/freeopcua-client", line 9, in <module>
    load_entry_point('freeopcua-client==0.3.5', 'console_scripts', 'freeopcua-client')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 565, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2721, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2377, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2383, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.4/dist-packages/freeopcuaclient/mainwindow.py", line 10, in <module>
    from freeopcuaclient.uaclient import UaClient
  File "/usr/local/lib/python3.4/dist-packages/freeopcuaclient/uaclient.py", line 2, in <module>
    from opcua import ua
  File "/usr/local/lib/python3.4/dist-packages/opcua/__init__.py", line 19, in <module>
    from opcua.client import Client
  File "/usr/local/lib/python3.4/dist-packages/opcua/client.py", line 13, in <module>
    from opcua import uacrypto
  File "/usr/local/lib/python3.4/dist-packages/opcua/uacrypto.py", line 1, in <module>
    from Crypto.Util.asn1 import DerSequence
ImportError: No module named 'Crypto'
ml@y13:~$ 

On Debian, installing:

$ aptitude install python3-crypto

fixed this.

There should be a package dependency, or at least a mention in the Readme, about this.

Fails to start

$ pip install --user opcua-client
Collecting opcua-client
  Downloading https://files.pythonhosted.org/packages/de/99/41aa0eb2b9ff2560e6156e8d0a5ce294f5d2aa7d10232dd23485bbe099ac/opcua-client-0.8.0.tar.gz (204kB)
     |████████████████████████████████| 215kB 3.1MB/s 
Collecting opcua>=0.98.1
  Downloading https://files.pythonhosted.org/packages/58/fa/c50e971be6377258b3c7917303893dea204c8f958553dc4dccd75015caf0/opcua-0.98.12.tar.gz (571kB)
     |████████████████████████████████| 573kB 8.5MB/s 
Collecting opcua-widgets>=0.5.4
  Downloading https://files.pythonhosted.org/packages/30/e0/7559420565340ff62a962f9e7417a9036edf4b2918b101147f70af496588/opcua-widgets-0.5.9.tar.gz (211kB)
     |████████████████████████████████| 215kB 11.4MB/s 
Requirement already satisfied: python-dateutil in /usr/lib/python3.8/site-packages (from opcua>=0.98.1->opcua-client) (2.8.0)
Requirement already satisfied: pytz in /usr/lib/python3.8/site-packages (from opcua>=0.98.1->opcua-client) (2020.1)
Requirement already satisfied: lxml in /usr/lib64/python3.8/site-packages (from opcua>=0.98.1->opcua-client) (4.4.1)
Requirement already satisfied: six>=1.5 in /usr/lib/python3.8/site-packages (from python-dateutil->opcua>=0.98.1->opcua-client) (1.14.0)
Installing collected packages: opcua, opcua-widgets, opcua-client
    Running setup.py install for opcua ... done
    Running setup.py install for opcua-widgets ... done
    Running setup.py install for opcua-client ... done
Successfully installed opcua-0.98.12 opcua-client-0.8.0 opcua-widgets-0.5.9
[jreimann@brocken ~]$ opcua-client 
Traceback (most recent call last):
  File "/home/jreimann/.local/bin/opcua-client", line 11, in <module>
    load_entry_point('opcua-client==0.8.0', 'console_scripts', 'opcua-client')()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/jreimann/.local/lib/python3.8/site-packages/uaclient/mainwindow.py", line 10, in <module>
    from PyQt5.QtCore import pyqtSignal, QTimer, Qt, QObject, QSettings, QItemSelection, QMimeData, QCoreApplication
ModuleNotFoundError: No module named 'PyQt5'

user and PW

Hey guys,
thanks for the nice project. In the readme, it's written that user and PW can be entered "by writting them in uri".
How do I do this? What is uri? url?

Thanks and best regards,
Stefan

Python 3.8, Win2016 server

Dear All,
I have a KepServerEx 6.7 on Win2016 Server with python 3.8.
I would like to visualize and present in real-time trend the read value of KepserverEx e.g. in HTML pages.
Is it possible to use this script in this conditions?
Would you give me some instructions or help or maybe script for my project?
Thank you for your time.
Regards,
Gabor

ImportError: No module named uaclient

I have installed gui client with sudo pip install opcua-client and I am getting this error. I have also installed freeopcua with pip.

Is there any way to get this working?

m@grunt » opcua-client
Traceback (most recent call last):
  File "/usr/local/bin/opcua-client", line 7, in <module>
    from uaclient.mainwindow import main
  File "/usr/local/lib/python2.7/dist-packages/uaclient/mainwindow.py", line 16, in <module>
    from uaclient.uaclient import UaClient
ImportError: No module named uaclient

module 'time' has no attribute 'clock' in Python 3.8

can not start opcua-client on windows with python 3.8

error:
...................
from . import ptime
File "c:\users\vlazarev\appdata\local\programs\python\python38-32\lib\site-packages\pyqtgraph\ptime.py", line 24, in
cstart = systime.clock() ### Required to start the clock in windows
AttributeError: module 'time' has no attribute 'clock'

I think that here some info about this error:
https://stackoverflow.com/questions/58569361/attributeerror-module-time-has-no-attribute-clock-in-python-3-8

How to delete and restore settings.

My window settings are in a bugged state, and I only have access to the tree window. How do I reset these settings to default?

I tried uninstalling/reinstalling opcua-client and pyqt5, but it still loads with the same window settings (macOS).

Crash when clicking on Variable (Windows)

When clicking on a Variable-Node I get:

Traceback (most recent call last):
  File "c:\users\mstruebe\appdata\local\programs\python\python35-32\lib\site-packages\freeopcuaclient\mainwindow.py", line 198, in show_attrs
    self._show_attrs(node)
  File "c:\users\mstruebe\appdata\local\programs\python\python35-32\lib\site-packages\freeopcuaclient\mainwindow.py", line 211, in _show_attrs
    v = v.to_string()
  File "c:\users\mstruebe\appdata\local\programs\python\python35-32\lib\site-packages\opcua\ua\uatypes.py", line 739, in to_string
    return self.Text.decode()
AttributeError: 'NoneType' object has no attribute 'decode'

This happens for example when clicking on the ServerStatus, but other variables, too.

Running the GUI ISSUE

I am a beginner to the python, I am looking for an OPC UA Client for an IoT Platform.
I am not able under stand the following command in the ReadME file:

Run with: opcua-client , what does this mean ?

Thanks !!

Error when writing Value in a Variable Node of an Open62541 Server

Hi!

I have Open62541 servers and I cannot write the value of a Variable Node with FreeOpcUa Client.

The error can be replicate with this code (is basically the example server server.cpp but with the extra line
attr.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE; so the node is writable).

/* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
 * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */

#include "open62541.h"

#include <signal.h>
#include <stdlib.h>

/* Build Instructions (Linux)
 * - gcc -std=c99 -c open62541.c
 * - g++ server.cpp open62541.o -o server */

using namespace std;

UA_Boolean running = true;

static void stopHandler(int sign) {
    UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "received ctrl-c");
    running = false;
}

int main() {
    signal(SIGINT, stopHandler);
    signal(SIGTERM, stopHandler);

    UA_Server *server = UA_Server_new();
    UA_ServerConfig_setDefault(UA_Server_getConfig(server));

    // add a variable node to the adresspace
    UA_VariableAttributes attr = UA_VariableAttributes_default;
    UA_Int32 myInteger = 42;
    UA_Variant_setScalarCopy(&attr.value, &myInteger, &UA_TYPES[UA_TYPES_INT32]);
    attr.description = UA_LOCALIZEDTEXT_ALLOC("en-US","the answer");
    attr.displayName = UA_LOCALIZEDTEXT_ALLOC("en-US","the answer");
    attr.accessLevel = UA_ACCESSLEVELMASK_READ | UA_ACCESSLEVELMASK_WRITE;
    UA_NodeId myIntegerNodeId = UA_NODEID_STRING_ALLOC(1, "the.answer");
    UA_QualifiedName myIntegerName = UA_QUALIFIEDNAME_ALLOC(1, "the answer");
    UA_NodeId parentNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER);
    UA_NodeId parentReferenceNodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES);
    UA_Server_addVariableNode(server, myIntegerNodeId, parentNodeId,
                              parentReferenceNodeId, myIntegerName,
                              UA_NODEID_NULL, attr, NULL, NULL);

    /* allocations on the heap need to be freed */
    UA_VariableAttributes_clear(&attr);
    UA_NodeId_clear(&myIntegerNodeId);
    UA_QualifiedName_clear(&myIntegerName);

    UA_StatusCode retval = UA_Server_run(server, &running);

    UA_Server_delete(server);
    return retval == UA_STATUSCODE_GOOD ? EXIT_SUCCESS : EXIT_FAILURE;
}

The error message is:

uawidgets.utils - ERROR - ')
Traceback (most recent call last):
File "/home/jbg/.local/lib/python3.6/site-packages/uawidgets/utils.py", line 21, in wrapper
result = func(self, *args)
File "/home/jbg/.local/lib/python3.6/site-packages/uawidgets/attrs_widget.py", line 322, in setModelData
self._set_attribute_data(data, editor, model, idx)
File "/home/jbg/.local/lib/python3.6/site-packages/uawidgets/attrs_widget.py", line 390, in _set_attribute_data
data.value = string_to_val(text, data.uatype)
File "/usr/local/lib/python3.6/dist-packages/opcua/common/ua_utils.py", line 130, in string_to_val
raise NotImplementedError
NotImplementedError
uaclient.mainwindow - WARNING - showing error: %s')

In the same server that value in the variable node can be written with no problem using other clients (UA Expert, Open62541).

Thanks in advance!!

Best regards

Custom Stucture as Argument in Method is not shown

Hi all!

I have defined a structure as OutputArgument in Method. In UA Expert Client it looks like this:
Screenshot from 2021-01-11 20-28-18
In opcua-client-gui it looks like this:
Screenshot from 2021-01-11 20-33-59

It seems like opcua-client-gui doesn't support custom structure as Arguments in Methods... or I done smth wrong?

Thanks in advance!

Andrii Klimov

AttributeError: module 'asyncua.ua' has no attribute 'Bit'

Hi, when i click on connect it provide me this error, server is running correctly, can someone identify this issue.

@DataClass
class AccessRights:

'''
AccessRights structure autogenerated from xml
'''

Value:ua.ByteString = b''
ValidBits:ua.ByteString = b''

@DataClass
class StructureWithOptionalFields:

'''
StructureWithOptionalFields structure autogenerated from xml
'''

OptionalInt32Specified:ua.Bit = ua.Bit()
OptionalStringArraySpecified:ua.Bit = ua.Bit()
Reserved1:ua.Bit = ua.Bit()
MandatoryInt32:ua.Int32 = 0
OptionalInt32:ua.Int32 = 0
MandatoryStringArray:List[ua.CharArray] = field(default_factory=list)
OptionalStringArray:List[ua.CharArray] = field(default_factory=list)

asyncua.common.structures - ERROR - Failed to execute auto-generated code from UA datatype:

@DataClass
class StructureWithOptionalFields:

'''
StructureWithOptionalFields structure autogenerated from xml
'''

OptionalInt32Specified:ua.Bit = ua.Bit()
OptionalStringArraySpecified:ua.Bit = ua.Bit()
Reserved1:ua.Bit = ua.Bit()
MandatoryInt32:ua.Int32 = 0
OptionalInt32:ua.Int32 = 0
MandatoryStringArray:List[ua.CharArray] = field(default_factory=list)
OptionalStringArray:List[ua.CharArray] = field(default_factory=list)

')
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\asyncua\common\structures.py", line 281, in _generate_python_class
exec(code, env)
File "", line 4, in
File "", line 10, in StructureWithOptionalFields
AttributeError: module 'asyncua.ua' has no attribute 'Bit'
uawidgets.utils - ERROR - module 'asyncua.ua' has no attribute 'Bit'')
Traceback (most recent call last):
File "C:\Users\pierluigi.bandino\AppData\Roaming\Python\Python39\site-packages\uawidgets\utils.py", line 21, in wrapper
result = func(self, *args)
File "C:\Users\pierluigi.bandino\Desktop\opcua-client-gui-master\uaclient\mainwindow.py", line 343, in connect
self.uaclient.connect(uri)
File "C:\Users\pierluigi.bandino\Desktop\opcua-client-gui-master\uaclient\uaclient.py", line 96, in connect
self.client.load_type_definitions()
File "C:\Python39\lib\site-packages\asyncua\sync.py", line 94, in wrapper
result = self.tloop.post(aio_func(*args, **kwargs))
File "C:\Python39\lib\site-packages\asyncua\sync.py", line 52, in post
return futur.result()
File "C:\Python39\lib\concurrent\futures_base.py", line 445, in result
return self.__get_result()
File "C:\Python39\lib\concurrent\futures_base.py", line 390, in __get_result
raise self._exception
File "C:\Python39\lib\site-packages\asyncua\client\client.py", line 662, in load_type_definitions
return await load_type_definitions(self, nodes)
File "C:\Python39\lib\site-packages\asyncua\common\structures.py", line 223, in load_type_definitions
generator.get_python_classes(structs_dict)
File "C:\Python39\lib\site-packages\asyncua\common\structures.py", line 177, in get_python_classes
return _generate_python_class(self.model, env=env)
File "C:\Python39\lib\site-packages\asyncua\common\structures.py", line 281, in _generate_python_class
exec(code, env)

File "", line 4, in
File "", line 10, in StructureWithOptionalFields
AttributeError: module 'asyncua.ua' has no attribute 'Bit'
uawidgets.utils - WARNING - Error class Window has no member show_error or error')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.