You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IoT Agent Node Lib version the issue has been seen with
4.6.0
Bound or port used (API interaction)
Southbound (Devices data API)
NGSI version
NGSIv2
Are you running a container?
Yes, I am using a contaner (Docker, Kubernetes...)
Image type
normal
Expected behaviour you didn't see
When upgrading iot-agent-node-lib from 3.3.4 to 4.6.0
It should correctly updating a device attribute when using iotAgentLib.update(device.name, device.type, "", [ { name: 'value', type: 'number', value: '10' }], device)
iot-agent-node-lib 3.3.4 is still working perfectly
Unexpected behaviour you saw
The payload request made to Orion is perfectly sent but does not contain de requested change on the device attribute
In 4.6.0 the payload is exactly the same but the "value" attribute in the request has disappeared, so the request is sent to Orion but without the updated value on the device. End to end, this leads to having the exact same device in orion as the upsert request did not sent the attribute to update.
I believe this comes from sendUpdateValueNgsi2() in entities-NGSI-v2.js as this function changed a lot between 3.3.4 and 4.6.0.
After some debugging and analysis, it's coming from the line measures = measures.filter((item) => item.name !== currentAttr.object_id && item.name !== currentAttr.name); that removes the measures value. The second part of the filter item.name !== currentAttr.name is going to filter all attributes names that are present in preprocessedAttr but it contains typeInformation.active from originTypeInformation which contains the value attribute...
IoT Agent Node Lib version the issue has been seen with
4.6.0
Bound or port used (API interaction)
Southbound (Devices data API)
NGSI version
NGSIv2
Are you running a container?
Yes, I am using a contaner (Docker, Kubernetes...)
Image type
normal
Expected behaviour you didn't see
When upgrading iot-agent-node-lib from 3.3.4 to 4.6.0
It should correctly updating a device attribute when using
iotAgentLib.update(device.name, device.type, "", [ { name: 'value', type: 'number', value: '10' }], device)
iot-agent-node-lib 3.3.4 is still working perfectly
Unexpected behaviour you saw
The payload request made to Orion is perfectly sent but does not contain de requested change on the device attribute
Here's what is sent to Orion in 3.3.4 :
In 4.6.0 the payload is exactly the same but the "value" attribute in the request has disappeared, so the request is sent to Orion but without the updated value on the device. End to end, this leads to having the exact same device in orion as the upsert request did not sent the attribute to update.
I believe this comes from
sendUpdateValueNgsi2()
inentities-NGSI-v2.js
as this function changed a lot between 3.3.4 and 4.6.0.After some debugging and analysis, it's coming from the line
measures = measures.filter((item) => item.name !== currentAttr.object_id && item.name !== currentAttr.name);
that removes the measuresvalue
. The second part of the filteritem.name !== currentAttr.name
is going to filter all attributes names that are present inpreprocessedAttr
but it containstypeInformation.active
fromoriginTypeInformation
which contains thevalue
attribute...Steps to reproduce the problem
No response
Configs
iot-agent-node-lib config
Log output
No response
The text was updated successfully, but these errors were encountered: