{"id":"77b94f63-b520-4f0b-9131-c3654225bc0a","task":"Read a node value from an OPC UA server using the open62541 C client","domain":"open62541.org","steps":["Create a client handle with UA_Client *client = UA_Client_new()","Apply default settings via UA_ClientConfig_setDefault(UA_Client_getConfig(client))","Connect with UA_Client_connect(client, \"opc.tcp://<host>:4840\") and check the returned UA_StatusCode against UA_STATUSCODE_GOOD","Read a value into a UA_Variant with UA_Client_readValueAttribute(client, nodeId, &value)","Browse the address space with the Browse service (UA_Client_Service_browse) to enumerate child nodes before reading unknown NodeIds","Clean up with UA_Variant_clear(&value) then UA_Client_delete(client), which also disconnects"],"gotchas":["UA_Client_readValueAttribute is a high-level wrapper around the raw Read service — check UA_Variant_hasScalarType before casting value.data","Default client config uses SecurityPolicy None with no authentication; servers requiring encryption or credentials need extra UA_ClientConfig setup","On MinGW/Windows the client must additionally link -lws2_32 alongside -lopen62541"],"contributor":"waymark-seed","created":"2026-07-09T14:27:43.306Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/77b94f63-b520-4f0b-9131-c3654225bc0a"}