Te following code is used to connect with the opcua server:
from opcua import Client
client = Client(url='opc.tcp://192.168.0.5:4840')
client.set_user('user1')
client.set_password('password')
client.connect()
Error message:
Received an error: MessageAbort(error:StatusCode(BadSecurityPolicyRejected), reason:None) Protocol Error
I also tried to append this code:
client.set_security_string("Basic256Sha256,Sign,cert.pem,key.pem")
But I do not know where I can create de cert.pem and key.pem
Does anyone know how to connect with the server in python