[ https://jira.fiware.org/browse/HELP-17379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez reassigned HELP-17379: ------------------------------------- Assignee: Fernando Lopez > [fiware-stackoverflow] adding nested OPC-UA Variable results in "String cannot be coerced to a nodeId" > ---------------------------------------------------------------------------------------------------------------- > > Key: HELP-17379 > URL: https://jira.fiware.org/browse/HELP-17379 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Fernando Lopez > Labels: fiware, fiware-orion, opc-ua > > Created question in FIWARE Q/A platform on 16-02-2021 at 10:02 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/66221917/adding-nested-opc-ua-variable-results-in-string-cannot-be-coerced-to-a-nodeid > +Question:+ > adding nested OPC-UA Variable results in "String cannot be coerced to a nodeId" > +Description:+ > Error: String cannot be coerced to a nodeId > Hi, > I was busy setting up a connection between the Orion Broker and an PLC with OPC-UA Server using the opcua iotagent agent. > I managed to setup all parts and I am able to receive (test) data, but I am unable to follow the tutorial with regards to adding an entity to the Orion-Broker using a json file: > curl http://localhost:4001/iot/devices -H "fiware-service: plcservice" -H "fiware-servicepath: /demo" -H "Content-Type: application/json" -d @add_device.json > The expected result would be an added entity to the OrionBroker with the supplied data, but this only results in a error message: > {"name":"Error","message":"String cannot be coerced to a nodeId : ns*4:s*MAIN.mainVar"} > suspected Error > Is it possible that the iotagent does not work nicely with nested Variables? > steps taken > doublechecked availability of OPC Data: > OPC data changes every second, can be seen in Broker log > reduced complexity of setup to only include Broker and IOT-agent > additional information: > add_device.json file: > { > "devices": [ > { > "device_id": "plc1", > "entity_name": "PLC1", > "entity_type": "plc", > "attributes": [ > > { > "object_id": "ns*4:s*MAIN.mainVar", > "name": "main", > "type": "Number" > } > ], > "lazy": [ > ], > "commands" : [] > } > ] > } > config of IOT-agent (from localhost:4081/config): > { > "config": { > "logLevel": "DEBUG", > "contextBroker": { > "host": "orion", > "port": 1026 > }, > "server": { > "port": 4001, > "baseRoot": "/" > }, > "deviceRegistry": { > "type": "memory" > }, > "mongodb": { > "host": "iotmongo", > "port": "27017", > "db": "iotagent", > "retries": 5, > "retryTime": 5 > }, > "types": { > "plc": { > "service": "plcservice", > "subservice": "/demo", > "active": [ > { > "name": "main", > "type": "Int16" > }, > { > "name": "test1", > "type": "Int16" > }, > { > "name": "test2", > "type": "Int16" > } > ], > "lazy": [], > "commands": [] > } > }, > "browseServerOptions": null, > "service": "plc", > "subservice": "/demo", > "providerUrl": "http://iotage:4001", > "pollingExpiration": "200000", > "pollingDaemonFrequency": "20000", > "deviceRegistrationDuration": "P1M", > "defaultType": null, > "contexts": [ > { > "id": "plc_1", > "type": "plc", > "service": "plcservice", > "subservice": "/demo", > "polling": false, > "mappings": [ > { > "ocb_id": "test1", > "opcua_id": "ns=4;s=test.TestVar.test1", > "object_id": null, > "inputArguments": [] > }, > { > "ocb_id": "test2", > "opcua_id": "ns=4;s=test.TestVar.test2", > "object_id": null, > "inputArguments": [] > }, > { > "ocb_id": "main", > "opcua_id": "ns=4;s=MAIN.mainVar", > "object_id": null, > "inputArguments": [] > } > ] > } > ] > } > } -- This message was sent by Atlassian JIRA (v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy