Don't know when issue appear, but the script below was working well before and now got issue. We haven't use it since some months, but really need this work again.
The script read an array of object by using system.opc.readValue, ofter that I loop into the readed array to get values.
opc_info = _Functions.getOPCinfo(value["provider"] + "cell/state_cell")
opc_server = opc_info["server"]
opc_path = opc_info["opc_path"] + ".check_event_log_array"
check_event_log_array = system.opc.readValue(opc_server, opc_path).getValue()
for i in range(value["first"], value["first"] + value["count"]):
index = i % value["capacity"]
entity = system.util.jsonDecode(str(check_event_log_array[index]))
alert_level = entity["severity"]
check_code = entity["code"]
entity_id = entity["entity_id"]
caused_by_user = entity["caused_by_user"]
created_on = entity["created_on"]
Posting any details about the issue would be helpful.
In particular, what error(s) are being thrown, the stacktrace, line numbers being indicated as the problem, etc. Check your gateway logs if you're not sure where to start looking. Also, where are you executing this script?
Navigate to this Node using something like UaExpert and see what its NodeClass and other properties are. Provide a screenshot of the attributes pane while viewing this Node.
In this case it looks like it's being used to organize references to each of the individual elements. If those are VariableNodes you can read the value of each of them.