umati / Dashboard-OPCUA-Client

OPC UA gateway based on open62541 to subscribe to servers implementing umati endorsed companion specification and publish via MQTT to the broker for https://umati.app
Mozilla Public License 2.0
20 stars 9 forks source link

DashboardOpcUaClient - Unable to find namespace #557

Closed RitterDerKokosnuss closed 1 year ago

RitterDerKokosnuss commented 1 year ago

Hi,

i recently started working with OpcUa.

Currently i try to use the umati DashboardOpcUaClient, but get the following errors when running:

- Type not found. Probably because the server does not have the NodeId, specified in the config (nsu=https://opcfoundation.org/UA/MachineTool/;i=13)

2023-07-17 15:47:35,890 [DashboardOpcUaClient] INFO bool __cdecl DashboardOpcUaClient::connect(struct std::atomic<bool> &):45 Waiting for OPC UA connection.
2023-07-17 15:47:35,984 [DashboardOpcUaClient] INFO void __cdecl Umati::OpcUa::stateCallback(struct UA_Client *,UA_SecureChannelState,UA_SessionState,unsigned int):36 A SecureChannel to the server is open
2023-07-17 15:47:35,984 [DashboardOpcUaClient] INFO void __cdecl Umati::OpcUa::stateCallback(struct UA_Client *,UA_SecureChannelState,UA_SessionState,unsigned int):69 A session with the server is activated
2023-07-17 15:47:35,984 [DashboardOpcUaClient] ERROR void __cdecl Umati::OpcUa::OpcUaClient::connectionStatusChanged(int,UA_ServerState):690 Connected.

2023-07-17 15:47:36,000 [DashboardOpcUaClient] INFO void __cdecl Umati::OpcUa::OpcUaClient::fillNamespaceCache(const class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &):630 index: 0, namespaceURI: http://opcfoundation.org/UA/
2023-07-17 15:47:36,000 [DashboardOpcUaClient] INFO void __cdecl Umati::OpcUa::OpcUaClient::fillNamespaceCache(const class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &):630 index: 1, namespaceURI: urn:Siemens.local:SiemensAG:SinumerikServer
2023-07-17 15:47:36,000 [DashboardOpcUaClient] INFO void __cdecl Umati::OpcUa::OpcUaClient::fillNamespaceCache(const class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > &):630 index: 2, namespaceURI: SinumerikVarProvider
2023-07-17 15:47:36,000 [DashboardOpcUaClient] ERROR void __cdecl Umati::OpcUa::Subscription::createSubscription(struct UA_Client *):101 Create subscription succeeded, id 3979097955
2023-07-17 15:47:36,896 [DashboardOpcUaClient] INFO void __cdecl Umati::Dashboard::OpcUaTypeReader::readTypes(void):58 Browsing variable types.
2023-07-17 15:47:38,406 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 50
2023-07-17 15:47:38,704 [DashboardOpcUaClient] INFO void __cdecl Umati::Dashboard::OpcUaTypeReader::readTypes(void):60 Browsing variable types finished, continuing browsing object types
2023-07-17 15:47:39,064 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 100
2023-07-17 15:47:40,225 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 150
2023-07-17 15:47:42,017 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 200
2023-07-17 15:47:43,682 [DashboardOpcUaClient] INFO void __cdecl Umati::Dashboard::OpcUaTypeReader::readTypes(void):63 Browsing object types finished
2023-07-17 15:47:43,698 [DashboardOpcUaClient] WARNING void __cdecl Umati::Dashboard::OpcUaTypeReader::readTypes(void):85 Unable to find namespace http://opcfoundation.org/UA/IA/
2023-07-17 15:47:43,698 [DashboardOpcUaClient] WARNING void __cdecl Umati::Dashboard::OpcUaTypeReader::readTypes(void):85 Unable to find namespace http://opcfoundation.org/UA/DI/
2023-07-17 15:47:43,698 [DashboardOpcUaClient] WARNING void __cdecl Umati::Dashboard::OpcUaTypeReader::readTypes(void):85 Unable to find namespace http://opcfoundation.org/UA/Machinery/
2023-07-17 15:47:43,698 [DashboardOpcUaClient] WARNING void __cdecl Umati::Dashboard::OpcUaTypeReader::readTypes(void):85 Unable to find namespace http://opcfoundation.org/UA/MachineTool/
2023-07-17 15:47:43,698 [DashboardOpcUaClient] ERROR class std::shared_ptr<class ModelOpcUa::StructureNode> __cdecl Umati::Dashboard::OpcUaTypeReader::typeDefinitionToStructureNode(const struct ModelOpcUa::NodeId_t &) const:363 Unable to find nsu=http://opcfoundation.org/UA/MachineTool/;i=13 in typeMap
2023-07-17 15:47:43,698 [DashboardOpcUaClient] WARNING void __cdecl Umati::Dashboard::OpcUaTypeReader::updateObjectTypeNames(void):104 Type not found. Probably because the server does not have the NodeId, specified in the config (nsu=http://opcfoundation.org/UA/MachineTool/;i=13).
2023-07-17 15:47:43,698 [DashboardOpcUaClient] INFO bool __cdecl Umati::MachineObserver::MachineObserver::canBrowseMachineList(class std::list<struct ModelOpcUa::BrowseResult_t,class std::allocator<struct ModelOpcUa::BrowseResult_t> > &):129 Searching for machines
2023-07-17 15:47:43,698 [DashboardOpcUaClient] ERROR unsigned short __cdecl Umati::OpcUa::Converter::ModelToUaConverter::getNsIndexFromUri(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &):29 Could not find uri: http://opcfoundation.org/UA/Machinery/

When i use UAExpert and NodeRED (OPCUA IIot) i have access to all nodes and can read, write and subscribe without any issues. Only with the DashboardOpcUaClient i run into this error.

I tried changing the configuration.json file but without success.

Am i missing a step or some dependency?

Any help will be appreciated

Kantiran91 commented 1 year ago

@RitterDerKokosnuss Which SDK do you use? and what do you mean that your server not listed the cs namespaces? The Dashboard Client need the namespaces.

Can you send us a screenshot of the UAExpert?

RitterDerKokosnuss commented 1 year ago

Im dont use a SDK. I just use the already implemented SINUMERIK OPCUA server on the machine.

image

RitterDerKokosnuss commented 1 year ago

Today the OpcUaClient produced the following output as long as the machine was running. After restarting old error is showing again.

std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &):50 Connect to umati.app
2023-07-19 10:35:14,622 [DashboardOpcUaClient] INFO void __cdecl Umati::MqttPublisher_Paho::MqttPublisher_Paho::MqttCallbacks::connected(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &):125 Mqtt Connected: connect onSuccess called
2023-07-19 10:35:14,622 [DashboardOpcUaClient] INFO void __cdecl Umati::Dashboard::OpcUaTypeReader::readTypes(void):58 Browsing variable types.
2023-07-19 10:35:15,518 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 50
2023-07-19 10:35:16,054 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 50
2023-07-19 10:35:16,116 [DashboardOpcUaClient] INFO void __cdecl Umati::Dashboard::OpcUaTypeReader::readTypes(void):60 Browsing variable types finished, continuing browsing object types
2023-07-19 10:35:16,431 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 100
2023-07-19 10:35:16,839 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 150
2023-07-19 10:35:17,688 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 200
2023-07-19 10:35:19,619 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 250
2023-07-19 10:35:21,593 [DashboardOpcUaClient] INFO class std::shared_ptr<class ModelOpcUa::StructureBiNode> __cdecl Umati::Dashboard::OpcUaTypeReader::handleBrowseTypeResult(class std::shared_ptr<class std::map<struct ModelOpcUa::NodeId_t,class std::shared_ptr<class ModelOpcUa::StructureBiNode>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class std::shared_ptr<class ModelOpcUa::StructureBiNode> > > > > &,const struct ModelOpcUa::BrowseResult_t &,const class std::weak_ptr<class ModelOpcUa::StructureBiNode> &,enum ModelOpcUa::ModellingRule_t,bool):319 Current size BiDirectionalTypeMap: 300
2023-07-19 10:35:22,459 [DashboardOpcUaClient] INFO void __cdecl Umati::Dashboard::OpcUaTypeReader::readTypes(void):63 Browsing object types finished
2023-07-19 10:35:22,474 [DashboardOpcUaClient] INFO bool __cdecl Umati::MachineObserver::MachineObserver::canBrowseMachineList(class std::list<struct ModelOpcUa::BrowseResult_t,class std::allocator<struct ModelOpcUa::BrowseResult_t> > &):129 Searching for machines
2023-07-19 10:35:22,585 [DashboardOpcUaClient] INFO void __cdecl Umati::MachineObserver::MachineObserver::findNewAndOfflineMachines(class std::list<struct ModelOpcUa::BrowseResult_t,class std::allocator<struct ModelOpcUa::BrowseResult_t> > &,class std::set<struct ModelOpcUa::NodeId_t,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct ModelOpcUa::NodeId_t> > &,class std::set<struct ModelOpcUa::NodeId_t,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct ModelOpcUa::NodeId_t> > &,class std::map<struct ModelOpcUa::NodeId_t,class nlohmann::json_abi_v3_11_2::basic_json<class std::map,class std::vector,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,__int64,unsigned __int64,double,class std::allocator,struct nlohmann::json_abi_v3_11_2::adl_serializer,class std::vector<unsigned char,class std::allocator<unsigned char> >,void>,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct std::pair<struct ModelOpcUa::NodeId_t const ,class nlohmann::json_abi_v3_11_2::basic_json<class std::map,class std::vector,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,__int64,unsigned __int64,double,class std::allocator,struct nlohmann::json_abi_v3_11_2::adl_serializer,class std::vector<unsigned char,class std::allocator<unsigned char> >,void> > > > &):235 Checking which machines are online / offline
2023-07-19 10:35:22,585 [DashboardOpcUaClient] INFO void __cdecl Umati::MachineObserver::MachineObserver::logMachinesChanging(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::set<struct ModelOpcUa::NodeId_t,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct ModelOpcUa::NodeId_t> > &):283 To be removed machines: 

2023-07-19 10:35:22,585 [DashboardOpcUaClient] INFO void __cdecl Umati::MachineObserver::MachineObserver::logMachinesChanging(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::set<struct ModelOpcUa::NodeId_t,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct ModelOpcUa::NodeId_t> > &):283 New / Staying machines: 

2023-07-19 10:35:22,585 [DashboardOpcUaClient] INFO void __cdecl Umati::MachineObserver::MachineObserver::logMachinesChanging(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::set<struct ModelOpcUa::NodeId_t,struct std::less<struct ModelOpcUa::NodeId_t>,class std::allocator<struct ModelOpcUa::NodeId_t> > &):283 Removing machines:  
Kantiran91 commented 1 year ago

Hi,

I think you do not implement the cs for machine tools. So the client can not find the correct nodes.

RitterDerKokosnuss commented 1 year ago

Yes and i dont know why. I did everything as described in the siemens documentation. While creating my information model i included /UA-, /IA-, /Machine-, /MachineTools- NodeSet with relevant release versions. Any ideas what i am missing or doing wrong? I use SIOME for information modelling.

GoetzGoerisch commented 1 year ago

Which Control is this the SINUMERIK integrated OPC UA server is not capable of using companion specifications as far as I'm aware. Please reach out to your Siemens Support.

CC: @AthaDer @HolgnneR

GoetzGoerisch commented 1 year ago

Can you please provide a picture of your instance in the UaExpert and the Namespace array to see which namespaces are in the server? If you don't want to share them public here, please reach out to me by mail (see profile)

RitterDerKokosnuss commented 1 year ago

I will reach out to you via mail