Engineering-Research-and-Development / iotagent-opcua

IoT Agent for OPC UA protocol
https://iotagent-opcua.rtfd.io/
GNU Affero General Public License v3.0
41 stars 21 forks source link

Updating from 2.0.5 brake reading #97

Closed drypatrick closed 1 year ago

drypatrick commented 1 year ago

I'm using IoT-Agent 2.0.5, and with configured device I'm able to read from a PLC, updating to 2.0.6/7/8 broke my lectureand I din't get any value. The first couple of Value = Null seams to be a common issue also with 2.0.5, but I'm strugling to understand why happens.

I attach the container log with 2.0.6

{"op":"IoTAgentNGSI.JEXL","time":"2023-01-30T16:42:51.668Z","lvl":"INFO","msg":"Trasformations can be added to JEXL parser"} {"time":"2023-01-30T16:42:52.394Z","lvl":"INFO","msg":"Setting IOTA_CB_HOST to environment value: orion"} {"time":"2023-01-30T16:42:52.394Z","lvl":"INFO","msg":"Setting IOTA_CB_PORT to environment value: 1026"} {"time":"2023-01-30T16:42:52.394Z","lvl":"INFO","msg":"Setting IOTA_NORTH_PORT to environment value: 4041"} {"time":"2023-01-30T16:42:52.394Z","lvl":"INFO","msg":"Setting IOTA_PROVIDER_URL to environment value: http://iot-agent:4041"} {"time":"2023-01-30T16:42:52.394Z","lvl":"INFO","msg":"Setting IOTA_REGISTRY_TYPE to environment value: mongodb"} {"time":"2023-01-30T16:42:52.394Z","lvl":"INFO","msg":"Setting IOTA_MONGO_HOST to environment value: mongo-db"} {"time":"2023-01-30T16:42:52.394Z","lvl":"INFO","msg":"Setting IOTA_MONGO_PORT to environment value: 27017"} {"time":"2023-01-30T16:42:52.394Z","lvl":"INFO","msg":"Setting IOTA_MONGO_DB to environment value: iotagent_opcua"} {"time":"2023-01-30T16:42:52.395Z","lvl":"WARN","msg":"\nWARNING: authentication for secure connections is not in use,\nIt is recommended to enable authentication\n"} time=2023-01-30T16:42:52.395Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Starting an IoT Agent... | comp=IoTAgent time=2023-01-30T16:42:52.396Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_ENDPOINT to environment value: opc.tcp://10.0.7.236:4840/ | comp=IoTAgent time=2023-01-30T16:42:52.396Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_SECURITY_MODE to environment value: None | comp=IoTAgent time=2023-01-30T16:42:52.396Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_SECURITY_POLICY to environment value: None | comp=IoTAgent time=2023-01-30T16:42:52.397Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_SECURITY_USERNAME to environment value: **** | comp=IoTAgent time=2023-01-30T16:42:52.397Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_SECURITY_PASSWORD to environment value: **** | comp=IoTAgent time=2023-01-30T16:42:52.397Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_UNIQUE_SUBSCRIPTION to environment value: false | comp=IoTAgent time=2023-01-30T16:42:52.397Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_MT_POLLING to environment value: true | comp=IoTAgent time=2023-01-30T16:42:52.397Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_MT_AGENTID to environment value: age01 | comp=IoTAgent time=2023-01-30T16:42:52.397Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_MT_ENTITY_ID to environment value: age01_Car | comp=IoTAgent time=2023-01-30T16:42:52.398Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_MT_ENTITY_TYPE to environment value: Device | comp=IoTAgent time=2023-01-30T16:42:52.398Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_OPCUA_MT_NAMESPACE_IGNORE to environment value: null | comp=IoTAgent time=2023-01-30T16:42:52.399Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_CB_HOST to environment value: orion | comp=IoTAgent time=2023-01-30T16:42:52.399Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_CB_PORT to environment value: 1026 | comp=IoTAgent time=2023-01-30T16:42:52.399Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_NORTH_PORT to environment value: 4041 | comp=IoTAgent time=2023-01-30T16:42:52.399Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_PROVIDER_URL to environment value: http://iot-agent:4041 | comp=IoTAgent time=2023-01-30T16:42:52.399Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_REGISTRY_TYPE to environment value: mongodb | comp=IoTAgent time=2023-01-30T16:42:52.399Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_MONGO_HOST to environment value: mongo-db | comp=IoTAgent time=2023-01-30T16:42:52.400Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_MONGO_PORT to environment value: 27017 | comp=IoTAgent time=2023-01-30T16:42:52.400Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_MONGO_DB to environment value: iotagent_opcua | comp=IoTAgent time=2023-01-30T16:42:52.400Z | lvl=WARN | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg= WARNING: authentication for secure connections is not in use, It is recommended to enable authentication | comp=IoTAgent time=2023-01-30T16:42:52.400Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Default expression language not set, or invalid, using legacy configuration | comp=IoTAgent time=2023-01-30T16:42:52.400Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_CB_HOST to environment value: orion | comp=IoTAgent time=2023-01-30T16:42:52.400Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_CB_PORT to environment value: 1026 | comp=IoTAgent time=2023-01-30T16:42:52.400Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_NORTH_PORT to environment value: 4041 | comp=IoTAgent time=2023-01-30T16:42:52.400Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_PROVIDER_URL to environment value: http://iot-agent:4041 | comp=IoTAgent time=2023-01-30T16:42:52.401Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_REGISTRY_TYPE to environment value: mongodb | comp=IoTAgent time=2023-01-30T16:42:52.401Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_MONGO_HOST to environment value: mongo-db | comp=IoTAgent time=2023-01-30T16:42:52.401Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_MONGO_PORT to environment value: 27017 | comp=IoTAgent time=2023-01-30T16:42:52.401Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Setting IOTA_MONGO_DB to environment value: iotagent_opcua | comp=IoTAgent time=2023-01-30T16:42:52.401Z | lvl=WARN | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg= WARNING: authentication for secure connections is not in use, It is recommended to enable authentication | comp=IoTAgent time=2023-01-30T16:42:52.401Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=Activating IOT Agent NGSI Library. | comp=IoTAgent time=2023-01-30T16:42:52.401Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Global | from=n/a | srv=n/a | subsrv=n/a | msg=MongoDB Device registry selected for NGSI Library | comp=IoTAgent time=2023-01-30T16:42:52.425Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DbConn | from=n/a | srv=n/a | subsrv=n/a | msg=First connection attempt | comp=IoTAgent time=2023-01-30T16:42:52.425Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DbConn | from=n/a | srv=n/a | subsrv=n/a | msg=Attempting to connect to MongoDB instance with url "mongodb://mongo-db:27017/iotagent_opcua" and options {}. Attempt 1 | comp=IoTAgent (node:1) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. (Use node --trace-warnings ... to show where the warning was created) time=2023-01-30T16:42:52.446Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DbConn | from=n/a | srv=n/a | subsrv=n/a | msg=Successfully connected to MongoDB. | comp=IoTAgent time=2023-01-30T16:42:52.457Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.NorthboundServer | from=n/a | srv=n/a | subsrv=n/a | msg=Starting IoT Agent listening on port [4041] | comp=IoTAgent time=2023-01-30T16:42:52.457Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.NorthboundServer | from=n/a | srv=n/a | subsrv=n/a | msg=Using config: { "logLevel": "DEBUG", "timestamp": false, "contextBroker": { "host": "orion", "port": "1026", "ngsiVersion": "v2", "jsonLdContext": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld", "service": "opcua_car", "subservice": "/demo", "url": "http://orion:1026", "fallbackTenant": "opcua_car", "fallbackPath": "/demo" }, "server": { "port": "4041" }, "deviceRegistry": { "type": "mongodb" }, "mongodb": { "host": "mongo-db", "port": "27017", "db": "iotagent_opcua" }, "types": { "PLC": { "active": [ { "name": "processStatus", "type": "Text" } ], "lazy": [], "commands": [] } }, "contexts": [ { "id": "urn:ngsiv2:I40Asset:PLC:001", "type": "PLC", "mappings": [ { "ocb_id": "processStatus", "opcua_id": "ns=4;i=198", "object_id": "ns=4;i=198", "inputArguments": [] } ] } ], "contextSubscriptions": [ { "id": "urn:ngsiv2:I40Asset:PLC:001", "type": "PLC", "mappings": [ { "ocb_id": "processStatus", "opcua_id": "ns=4;i=198", "object_id": "ns=4;i=198", "inputArguments": [] } ] } ], "service": "opcua_car", "subservice": "/demo", "providerUrl": "http://iot-agent:4041", "deviceRegistrationDuration": "P20Y", "defaultType": "Device", "defaultResource": "/iot/opcua", "explicitAttrs": false, "iotaVersion": "2.0.6", "multiCore": false, "relaxTemplateValidation": false, "defaultEntityNameConjunction": ":", "defaultExpressionLanguage": "legacy" } | comp=IoTAgent time=2023-01-30T16:42:52.459Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.ContextServer-v2 | from=n/a | srv=n/a | subsrv=n/a | msg=Loading NGSI-v2 Context server routes | comp=IoTAgent time=2023-01-30T16:42:52.469Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentOPCUA.Agent | from=n/a | srv=n/a | subsrv=n/a | msg=IoT Agent services activated | comp=IoTAgent time=2023-01-30T16:42:52.469Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.JEXL | from=n/a | srv=n/a | subsrv=n/a | msg=Trasformations can be added to JEXL parser | comp=IoTAgent (node:1) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. (Triggered by calling processImmediate on process.) time=2023-01-30T16:42:52.961Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentOPCUA.OPCUABinding | from=n/a | srv=n/a | subsrv=n/a | msg=Connected to the OPCUA Server | comp=IoTAgent time=2023-01-30T16:42:52.979Z | lvl=DEBUG | corr=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | trans=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | op=IoTAgentNGSI.GenericMiddlewares | from=n/a | srv=opcua_car | subsrv=/demo | msg=Request for path [/iot/services] from [iot-agent:4041] | comp=IoTAgent time=2023-01-30T16:42:52.979Z | lvl=DEBUG | corr=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | trans=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | op=IoTAgentNGSI.GenericMiddlewares | from=n/a | srv=opcua_car | subsrv=/demo | msg=Body: { "services": [ { "apikey": "iot", "cbroker": "http://orion:1026", "entity_type": "Device", "resource": "/iot/opcua" } ] } | comp=IoTAgent time=2023-01-30T16:42:52.982Z | lvl=DEBUG | corr=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | trans=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | op=IoTAgentNGSI.DeviceGroupService | from=n/a | srv=opcua_car | subsrv=/demo | msg=Creating new set of 1 services | comp=IoTAgent time=2023-01-30T16:42:52.982Z | lvl=DEBUG | corr=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | trans=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | op=IoTAgentNGSI.DeviceGroupService | from=n/a | srv=opcua_car | subsrv=/demo | msg=validateGroup {"apikey":"iot","cbroker":"http://orion:1026","resource":"/iot/opcua","type":"Device","service":"opcua_car","subservice":"/demo"} | comp=IoTAgent time=2023-01-30T16:42:52.982Z | lvl=DEBUG | corr=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | trans=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/opcua","apikey":"iot"} | comp=IoTAgent time=2023-01-30T16:42:52.993Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"resource":"/iot/opcua","apikey":"iot"}] | comp=IoTAgent time=2023-01-30T16:42:52.993Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceGroupService | from=n/a | srv=n/a | subsrv=n/a | msg=generateDuplicateHander error {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group for fields: [\"resource\",\"apikey\"] and values: {\"resource\":\"/iot/opcua\",\"apikey\":\"iot\"}","code":404} and foundGroup undefined | comp=IoTAgent time=2023-01-30T16:42:52.998Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Storing device group with id [63d7f38c5c7d94af091f4d96], type [Device], apikey [iot] and resource [/iot/opcua] | comp=IoTAgent time=2023-01-30T16:42:53.010Z | lvl=DEBUG | corr=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | trans=c4b2982a-8a1c-4977-a99e-4d59c2b676f2 | op=IoTAgentNGSI.DomainControl | from=n/a | srv=opcua_car | subsrv=/demo | msg=response-time: 42 | comp=IoTAgent time=2023-01-30T16:42:53.017Z | lvl=DEBUG | corr=663b27df-4227-412d-a78b-5678ce19f8c0 | trans=663b27df-4227-412d-a78b-5678ce19f8c0 | op=IoTAgentNGSI.GenericMiddlewares | from=n/a | srv=opcua_car | subsrv=/demo | msg=Request for path [/iot/devices] from [iot-agent:4041] | comp=IoTAgent time=2023-01-30T16:42:53.017Z | lvl=DEBUG | corr=663b27df-4227-412d-a78b-5678ce19f8c0 | trans=663b27df-4227-412d-a78b-5678ce19f8c0 | op=IoTAgentNGSI.GenericMiddlewares | from=n/a | srv=opcua_car | subsrv=/demo | msg=Body: { "devices": [ { "device_id": "urn:ngsiv2:I40Asset:PLC:001", "entity_name": "urn:ngsiv2:I40Asset:PLC:001", "entity_type": "PLC", "apikey": "iot", "service": "opcua_car", "subservice": "/demo", "attributes": [ { "name": "processStatus", "type": "Text" } ], "lazy": [], "commands": [], "endpoint": "opc.tcp://10.0.7.236:4840/" } ] } | comp=IoTAgent time=2023-01-30T16:42:53.018Z | lvl=DEBUG | corr=663b27df-4227-412d-a78b-5678ce19f8c0 | trans=663b27df-4227-412d-a78b-5678ce19f8c0 | op=IoTAgentNGSI.DeviceProvisioning | from=n/a | srv=opcua_car | subsrv=/demo | msg=Handling device provisioning request. | comp=IoTAgent time=2023-01-30T16:42:53.019Z | lvl=DEBUG | corr=663b27df-4227-412d-a78b-5678ce19f8c0 | trans=663b27df-4227-412d-a78b-5678ce19f8c0 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Looking for group params ["service","subservice","type","apikey"] with queryObj {"service":"opcua_car","subservice":"/demo","type":"PLC","apikey":"iot"} | comp=IoTAgent time=2023-01-30T16:42:53.022Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Device group for fields [["service","subservice","type","apikey"]] not found: [{"service":"opcua_car","subservice":"/demo","type":"PLC","apikey":"iot"}] | comp=IoTAgent time=2023-01-30T16:42:53.022Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Looking for group params ["service","subservice","apikey"] with queryObj {"service":"opcua_car","subservice":"/demo","apikey":"iot"} | comp=IoTAgent time=2023-01-30T16:42:53.024Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=opcua_car | subsrv=/demo | msg=Device group data found: {"_id":"63d7f38c5c7d94af091f4d96","resource":"/iot/opcua","apikey":"iot","type":"Device","service":"opcua_car","subservice":"/demo"} | comp=IoTAgent time=2023-01-30T16:42:53.024Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.BidirectionalPlugin | from=n/a | srv=n/a | subsrv=n/a | msg=Extracting attribute list | comp=IoTAgent time=2023-01-30T16:42:53.024Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.BidirectionalPlugin | from=n/a | srv=n/a | subsrv=n/a | msg=Sending bidirectionality subscriptions for device [urn:ngsiv2:I40Asset:PLC:001] | comp=IoTAgent time=2023-01-30T16:42:53.025Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Looking for bindings for the function [deviceProvisioningHandler] and protocol [null] | comp=IoTAgent time=2023-01-30T16:42:53.025Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Creating execution for function [deviceProvisioningHandler] and protocol [null] | comp=IoTAgent time=2023-01-30T16:42:53.025Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Binding found for function [deviceProvisioningHandler] and protocol [null] | comp=IoTAgent time=2023-01-30T16:42:53.025Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBDeviceRegister | from=n/a | srv=opcua_car | subsrv=/demo | msg=Looking for device with id [urn:ngsiv2:I40Asset:PLC:001]. | comp=IoTAgent time=2023-01-30T16:42:53.027Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBDeviceRegister | from=n/a | srv=opcua_car | subsrv=/demo | msg=Device [urn:ngsiv2:I40Asset:PLC:001] not found. | comp=IoTAgent time=2023-01-30T16:42:53.028Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Looking for group params ["service","subservice","type","apikey"] with queryObj {"service":"opcua_car","subservice":"/demo","type":"PLC","apikey":"iot"} | comp=IoTAgent time=2023-01-30T16:42:53.031Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Device group for fields [["service","subservice","type","apikey"]] not found: [{"service":"opcua_car","subservice":"/demo","type":"PLC","apikey":"iot"}] | comp=IoTAgent time=2023-01-30T16:42:53.031Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Looking for group params ["service","subservice","apikey"] with queryObj {"service":"opcua_car","subservice":"/demo","apikey":"iot"} | comp=IoTAgent time=2023-01-30T16:42:53.034Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=opcua_car | subsrv=/demo | msg=Device group data found: {"_id":"63d7f38c5c7d94af091f4d96","resource":"/iot/opcua","apikey":"iot","type":"Device","service":"opcua_car","subservice":"/demo"} | comp=IoTAgent time=2023-01-30T16:42:53.035Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=deviceData before merge with conf: {"id":"urn:ngsiv2:I40Asset:PLC:001","apikey":"iot","type":"PLC","name":"urn:ngsiv2:I40Asset:PLC:001","service":"opcua_car","subservice":"/demo","active":[{"name":"processStatus","type":"Text"}],"lazy":[],"commands":[],"endpoint":"opc.tcp://10.0.7.236:4840/","internalId":null,"explicitAttrs":false,"subscriptions":[]} defaults: [null,null,[],[],[],[],[]] fields: ["lazy","active","staticAttributes","commands","subscriptions"] configuration {"_id":"63d7f38c5c7d94af091f4d96","resource":"/iot/opcua","apikey":"iot","type":"Device","service":"opcua_car","subservice":"/demo"} | comp=IoTAgent time=2023-01-30T16:42:53.036Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=deviceData after merge with conf: {"id":"urn:ngsiv2:I40Asset:PLC:001","apikey":"iot","type":"PLC","name":"urn:ngsiv2:I40Asset:PLC:001","service":"opcua_car","subservice":"/demo","active":[{"name":"processStatus","type":"Text","object_id":"processStatus"}],"staticAttributes":[],"lazy":[],"commands":[],"endpoint":"opc.tcp://10.0.7.236:4840/","internalId":null,"explicitAttrs":false,"subscriptions":[]} | comp=IoTAgent time=2023-01-30T16:42:53.036Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=Registering device into NGSI Service: { "id": "urn:ngsiv2:I40Asset:PLC:001", "apikey": "iot", "type": "PLC", "name": "urn:ngsiv2:I40Asset:PLC:001", "service": "opcua_car", "subservice": "/demo", "active": [ { "name": "processStatus", "type": "Text", "object_id": "processStatus" } ], "staticAttributes": [], "lazy": [], "commands": [], "endpoint": "opc.tcp://10.0.7.236:4840/", "internalId": null, "explicitAttrs": false, "subscriptions": [] } | comp=IoTAgent time=2023-01-30T16:42:53.036Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Registration | from=n/a | srv=n/a | subsrv=n/a | msg=Registration with Context Provider is not needed. Device without lazy atts or commands | comp=IoTAgent time=2023-01-30T16:42:53.037Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Devices-v2 | from=n/a | srv=n/a | subsrv=n/a | msg=deviceData: {"id":"urn:ngsiv2:I40Asset:PLC:001","apikey":"iot","type":"PLC","name":"urn:ngsiv2:I40Asset:PLC:001","service":"opcua_car","subservice":"/demo","active":[{"name":"processStatus","type":"Text","object_id":"processStatus"}],"staticAttributes":[],"lazy":[],"commands":[],"endpoint":"opc.tcp://10.0.7.236:4840/","internalId":null,"explicitAttrs":false,"subscriptions":[]} | comp=IoTAgent time=2023-01-30T16:42:53.037Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Devices-v2 | from=n/a | srv=n/a | subsrv=n/a | msg=Creating initial entity in the Context Broker: { "url": "http://orion:1026/v2/entities?options=upsert", "method": "POST", "json": { "id": "urn:ngsiv2:I40Asset:PLC:001", "type": "PLC", "processStatus": { "type": "Text", "value": null } }, "headers": { "fiware-service": "opcua_car", "fiware-servicepath": "/demo", "fiware-correlator": "f2d374bc-0688-4702-878b-3e67ea4ea077" } } | comp=IoTAgent time=2023-01-30T16:42:53.037Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.RestUtils | from=n/a | srv=n/a | subsrv=n/a | msg=executeWithSecurity | comp=IoTAgent time=2023-01-30T16:42:53.037Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Looking for group params ["type"] with queryObj {"type":"PLC"} | comp=IoTAgent time=2023-01-30T16:42:53.040Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Device group for fields [["type"]] not found: [{"type":"PLC"}] | comp=IoTAgent time=2023-01-30T16:42:53.040Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.RestUtils | from=n/a | srv=opcua_car | subsrv=/demo | msg=error {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group for fields: [\"type\"] and values: {\"type\":\"PLC\"}","code":404} in get group device | comp=IoTAgent time=2023-01-30T16:42:53.041Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Request | from=n/a | srv=opcua_car | subsrv=/demo | msg=Options: { "url": "http://orion:1026/v2/entities?options=upsert", "method": "POST", "json": { "id": "urn:ngsiv2:I40Asset:PLC:001", "type": "PLC", "processStatus": { "type": "Text", "value": null } }, "headers": { "fiware-service": "opcua_car", "fiware-servicepath": "/demo", "fiware-correlator": "f2d374bc-0688-4702-878b-3e67ea4ea077" } } | comp=IoTAgent time=2023-01-30T16:42:58.095Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Request | from=n/a | srv=opcua_car | subsrv=/demo | msg=Response "" | comp=IoTAgent time=2023-01-30T16:42:58.095Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.Devices-v2 | from=n/a | srv=opcua_car | subsrv=/demo | msg=Initial entity created successfully. | comp=IoTAgent time=2023-01-30T16:42:58.097Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.MongoDBDeviceRegister | from=n/a | srv=opcua_car | subsrv=/demo | msg=Storing device with id [urn:ngsiv2:I40Asset:PLC:001] and type [PLC] | comp=IoTAgent time=2023-01-30T16:42:58.127Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DeviceProvisioning | from=n/a | srv=opcua_car | subsrv=/demo | msg=Device provisioning request succeeded | comp=IoTAgent time=2023-01-30T16:42:58.127Z | lvl=DEBUG | corr=663b27df-4227-412d-a78b-5678ce19f8c0 | trans=663b27df-4227-412d-a78b-5678ce19f8c0 | op=IoTAgentNGSI.DomainControl | from=n/a | srv=n/a | subsrv=n/a | msg=response-time: 5111 | comp=IoTAgent time=2023-01-30T16:42:58.654Z | lvl=INFO | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentOPCUA.OPCUABinding | from=n/a | srv=opcua_car | subsrv=/demo | msg=subscription keepalive | comp=IoTAgent time=2023-01-30T16:42:58.742Z | lvl=ERROR | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DomainControl | from=n/a | srv=opcua_car | subsrv=/demo | msg=TypeError: Cannot read properties of undefined (reading 'find') at /opt/iotagent-opcua/lib/bindings/OPCUABinding.js:213:54 at processTicksAndRejections (node:internal/process/task_queues:96:5) | comp=IoTAgent time=2023-01-30T16:42:58.743Z | lvl=DEBUG | corr=f2d374bc-0688-4702-878b-3e67ea4ea077 | trans=f2d374bc-0688-4702-878b-3e67ea4ea077 | op=IoTAgentNGSI.DomainControl | from=n/a | srv=opcua_car | subsrv=/demo | msg=response-time: 7397 | comp=IoTAgent time=2023-01-30T16:43:00.693Z | lvl=INFO | corr=n/a | trans=n/a | op=IoTAgentOPCUA.OPCUABinding | from=n/a | srv=n/a | subsrv=n/a | msg=subscription keepalive | comp=IoTAgent