Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Hello dev i am setting up an industrial IoT gateway using an UP Squared board with Embedded Linux. The gateway should read data from an OPC UA temperature sensor, I have confirmed the OPC UA server IP address and endpoint, checked the node ID and namespace index, made sure the OPC UA client library is correctly installed and configured.
But i am getting the error `Error reading temperature: BadNodeIdUnknown`
from opcua import Client
client = Client("opc.tcp://192.168.1.10:4840")
client.connect()
try:
temperature_node = client.get_node("ns=2;i=2")
temperature = temperature_node.get_value()
print(f"Temperature: {temperature}")
except Exception as e:
print(f"Error reading temperature: {e}")
finally:
client.disconnect()
@Middleware & OS
CONTRIBUTE TO THIS THREAD