eclipse-basyx / basyx-databridge

Eclipse Public License 2.0
11 stars 18 forks source link

Databridge calls API of Basyx V1 #306

Closed mwly closed 2 months ago

mwly commented 6 months ago

Hi, I have been trying to use the opcua configuration found in the opcua example and fit it do the example deployment in the example of the java-sdk.

Sadly the databridge tries to call: http://localhost:8081/submodels/{HASH}/submodelElements/ExampleEntity.ExampleProperty2 This will result in an Error 404 whitelabel error page.

But looking at the API of http://localhost:8081/swagger-ui/index.html it should actually be: http://localhost:8081/submodels/{HASH}/submodel-elements/ExampleEntity.ExampleProperty2

This returns the correct result: {"modelType":"Property","semanticId":{"keys":[{"type":"GlobalReference","value":"http://acplt.org/Properties/ExampleProperty"}],"type":"ExternalReference"},"value":"http://acplt.org/ValueId/ExampleValue2","valueId":{"keys":[{"type":"GlobalReference","value":"http://acplt.org/ValueId/ExampleValue2"}],"type":"ExternalReference"},"valueType":"xs:string","category":"CONSTANT","description":[{"language":"en-us","text":"Example Property object"},{"language":"de","text":"Beispiel Property Element"}],"idShort":"ExampleProperty2"}

The wiki suggests that the databridge is decoupled from V1 and V2 so my question would be: Is this Intended as of now? Or did i miss a feature flag somewhere to switch API from Basyx v1 to Basyx v2 in the configuration?

Thank you for the great work! I can deliver Configurations if needed

mdanish98 commented 6 months ago

Hi @mwly ,

Thanks for raising this concern.

Could you please attach the configurations that you are using?

mwly commented 6 months ago

Hi, you can find my configuration in: https://github.com/mwly/BI-Hackathon-AAS only difference is: The URL of my server instead of localhost in

thank you in advance for the time

mdanish98 commented 6 months ago

Hi,

Thanks a lot for your reply.

I had a quick look and following are the issues in your aasserver.json configuration:

  1. The idShortPath shouldn't contain "submodel-elements" it should only contain the dot-separated idShort path.
  2. If you want to use the API of AAS V3 which is true in this case, then you should specify the "api" attribute also to "DotAAS-V3". By default, it takes the API of AAS V1.

The proper specification is defined here.

Please let us know if it doesn't solve your issue.

mwly commented 5 months ago

Hi, Sorry for getting back so late! This worked well for me and fixed the issue! I introduced the Error by generating the config with opcua2AAS. Quick followup: Is therer a way to define DotAAS-V3 as default or do i have to specify this for every connection?

best regards

aaronzi commented 5 months ago

There will be an update for OPC2AAS in the next weeks that adds support for DotAAS V3. This automatically sets the API version property in the aasserver.json.

Regarding your question: You have to define that for every route.

aaronzi commented 2 months ago

Hi @mwly,

feature wise OPC2AAS for the AAS V3 is now done. You can find the component here: https://github.com/aaronzi/opc2aas

It is still missing some tests before I will merge it to the BaSyx Applications but you can already use it.