Open
Description
IoT Agent Node Lib version the issue has been seen with
4.5.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
The measure should be updated in orion CB.
Unexpected behaviour you saw
The payload is not filled.
The iotagent takes only all static_attributes when I have active attribute with object_id: '.1.3.6.1.4.1.6302.2.1.2.1.0'
in this format.
this fails
{
name: 'psBatteryVoltage',
type: 'Number',
object_id: '.1.0.0.1'
}
this works
{
name: 'psBatteryVoltage',
type: 'Number',
object_id: 'psBattery'
}
Steps to reproduce the problem
curl -iX POST 'http://localhost:5004/iot/json?k=<API_KEY>&i=device001
-d '{
".1.0.0.1": 23.5
}'
in this case the payload is filled by static_attributes only.
Configs
environment:
- "IOTA_CB_HOST=orion"
- "IOTA_CB_PORT=1026"
- "IOTA_NORTH_PORT=4041"
- "IOTA_REGISTRY_TYPE=mongodb"
- "IOTA_MONGO_HOST=mongodb"
- "IOTA_MONGO_PORT=27017"
- "IOTA_MONGO_DB=iotagent-json"
- "IOTA_HTTP_PORT=7896"
- "IOTA_PROVIDER_URL=http://iot-agent:4041"
Log output
time=2024-06-20T09:48:28.428Z | lvl=DEBUG | corr=n/a | trans=n/a | op=IoTAgentNGSI.Request | msg=Options: {
iot-agent | "url": "http://orion:1026/v2/entities?options=upsert",
iot-agent | "method": "POST",
iot-agent | "headers": {
iot-agent | "fiware-service": "service",
iot-agent | "fiware-servicepath": "/"
iot-agent | },
iot-agent | "json": {
iot-agent | "id": "urn:ngsild:device:4242",
iot-agent | "type": "device",
iot-agent | "project": {
iot-agent | "type": "Text",
iot-agent | "value": "1",
iot-agent | "metadata": {
iot-agent | "TimeInstant": {
iot-agent | "type": "DateTime",
iot-agent | "value": "2024-06-20T09:48:28.428Z"
iot-agent | }
iot-agent | }
iot-agent | },
iot-agent | "model": {
iot-agent | "type": "Text",
iot-agent | "value": "device",
iot-agent | "metadata": {
iot-agent | "TimeInstant": {
iot-agent | "type": "DateTime",
iot-agent | "value": "2024-06-20T09:48:28.428Z"
iot-agent | }
iot-agent | }
iot-agent | },
iot-agent |
iot-agent | "isPhysical": {
iot-agent | "type": "Boolean",
iot-agent | "value": true,
iot-agent | "metadata": {
iot-agent | "TimeInstant": {
iot-agent | "type": "DateTime",
iot-agent | "value": "2024-06-20T09:48:28.428Z"
iot-agent | }
iot-agent | }
iot-agent | "TimeInstant": {
iot-agent | "type": "DateTime",
iot-agent | "value": "2024-06-20T09:48:28.428Z"
iot-agent | }
iot-agent | }
iot-agent | }
iot-agent | time=2024-06-20T09:48:28.437Z | lvl=DEBUG | corr=n/a | trans=n/a | op=IoTAgentNGSI.Request | msg=Response ""
iot-agent | time=2024-06-20T09:48:28.437Z | lvl=INFO | corr=n/a | trans=n/a | op=IoTAgentNGSI.Entities-v2 | msg=Received the following response from the CB: Value updated successfully