You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I want to use this package for OPCUA Client and Server and I don't know how to use this module for getting value from sensor and publish this in the cloud platform.
could you please help me?
this is my server python code. "X" is the part for MQ2 module and I have to complete this.
from opcua import Server
import time
from gas_detection import GasDetection
X = MQ2
server = Server()
url = "opc.tcp://xxx.xxx.x.xxx:4840"
server.set_endpoint(url)
name = "OPCUA server"
addSpace = server.register_namespace(name)
Hello!
I want to use this package for OPCUA Client and Server and I don't know how to use this module for getting value from sensor and publish this in the cloud platform.
could you please help me?
this is my server python code. "X" is the part for MQ2 module and I have to complete this.
from opcua import Server
import time
from gas_detection import GasDetection
X = MQ2
server = Server()
url = "opc.tcp://xxx.xxx.x.xxx:4840"
server.set_endpoint(url)
name = "OPCUA server"
addSpace = server.register_namespace(name)
node = server.get_objects_node()
param = node.add_object(addSpace, "Parameters")
var = param.add_variable(addSpace, "Variable", X)
var.set_writable()
server.start()
try:
while True:
except KeyboardInterrupt:
print('\nAborted by user!')
The text was updated successfully, but these errors were encountered: