Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:IoT
-
HD-Enabler:IDAS
Description
Created question in FIWARE Q/A platform on 14-03-2016 at 15:03
Please, ANSWER this question AT http://stackoverflow.com/questions/35989887/fiware-idas-issue-with-registered-device
Question:
FIWARE - IDAS: Issue with registered device
Description:
I’m having problems with the IDAS Iotagent. Using the MQTT Ultralight agent, depending on how I register a device, when the agent receives a reading the iotagent service crashes and the related entity into the context broker is not updated.
The correct behaviour is the next one. If create a service:
curl -X POST 172.21.0.23:8090/iot/services \
-i \
-H "Content-Type: application/json" \
-H "Fiware-Service: red_entrada _1" \
-H "Fiware-ServicePath: /Prueba" \
-d '{
"services": [
]}'
... and a device, establishing the incoming attributes and a name for each one of them:
curl -X POST 172.21.0.23:8090/iot/devices \
-i \
-H "Content-Type: application/json" \
-H "Fiware-Service: red_entrada _1" \
-H "Fiware-ServicePath: /Prueba" \
-d '{
"devices":[
{
"device_id": "AC_2",
"entity_name":"disp_entrada_1:AC_2",
"protocol":"PDI-IoTA-MQTT-UltraLight",
"entity_type": "disp_entrada_1",
"timezone": "Europe/Madrid",
"attributes": [
,
,
,
,
,
{ "object_id": "BAT", "name": "BAT_1", "type": "string" }]}]}'
As a result, a new entity is created into the context broker, and as the readings arrive to the agent, this entity is updated:
{
"_id" :
,
"attrNames" : [
"TimeInstant",
"LUX_1",
"LUM_1",
"HUMB_1",
"TCB_1",
"IN_TEMP_1",
"BAT_1"
],
"attrs" : {
"TimeInstant" :
,
"LUX_1" : {
"value" : "464.000",
"type" : "string",
"md" : [
],
"creDate" : 1457943103,
"modDate" : 1457943109
},
"LUM_1" : {
"value" : "2.694",
"type" : "string",
"md" : [
],
"creDate" : 1457943103,
"modDate" : 1457943109
},
"HUMB_1" : {
"value" : "38.7",
"type" : "string",
"md" : [
],
"creDate" : 1457943103,
"modDate" : 1457943109
},
"TCB_1" : {
"value" : "21.31",
"type" : "string",
"md" : [
],
"creDate" : 1457943103,
"modDate" : 1457943109
},
"IN_TEMP_1" : {
"value" : "21.00",
"type" : "string",
"md" : [
],
"creDate" : 1457943103,
"modDate" : 1457943109
},
"BAT_1" : {
"value" : "97",
"type" : "string",
"md" : [
],
"creDate" : 1457943103,
"modDate" : 1457943109
}
},
"creDate" : 1457943015,
"modDate" : 1457943109
}
The problem arises when I register a new DEVICE and I use as the name for the attributes the same value of the "object_id" (name of the attribute into the incoming MQTT data. Surely on this scenario it's not necessary to register a DEVICE). For example:
curl -X POST 172.21.0.23:8090/iot/devices \
-i \
-H "Content-Type: application/json" \
-H "Fiware-Service: red_entrada_2" \
-H "Fiware-ServicePath: /Prueba" \
-d '{
"devices":[
{
"device_id": "AC_2",
"entity_name":"disp_entrada_1:AC_2",
"protocol":"PDI-IoTA-MQTT-UltraLight",
"entity_type": "disp_entrada_1",
"timezone": "Europe/Madrid",
"attributes": [
,
,
,
,
,
{ "object_id": "BAT", "name": "BAT", "type": "string" }]}] }'
On that case a new entity is created into the context broker too, but when the readings arrive the entity is not updated and the IoTAgent service crashes. Entity status:
{
"_id" :
,
"attrNames" : [
"TimeInstant"
],
"attrs" : {
"TimeInstant" :
},
"creDate" : 1457948167,
"modDate" : 1457948167
}
I can’t see any logic on this behaviour. If I don't register beforehand the device, the entity will be created automatically and the attributes will have as the name the value of the "object_id" field (that was what I was attempting to do on the second example).
¿Can it be due to an issue on the agent or manager installation?
Activity
Fix Version/s | 2021 [ 12600 ] |
Summary | [fiware-stackoverflow] FIWARE - IDAS: Issue with registered device | FIWARE.Question.Tech.IoT.IDAS.FIWARE - IDAS: Issue with registered device |
HD-Chapter | IoT [ 10839 ] |
Resolution | Done [ 10000 ] | |
Status | Answered [ 10104 ] | Closed [ 6 ] |
Status | In Progress [ 3 ] | Answered [ 10104 ] |
HD-Enabler | IDAS [ 10884 ] | |
Description |
Created question in FIWARE Q/A platform on 14-03-2016 at 15:03 {color: red}Please, ANSWER this question AT{color} http://stackoverflow.com/questions/35989887/fiware-idas-issue-with-registered-device +Question:+ FIWARE - IDAS: Issue with registered device +Description:+ I’m having problems with the IDAS Iotagent. Using the MQTT Ultralight agent, depending on how I register a device, when the agent receives a reading the iotagent service crashes and the related entity into the context broker is not updated. The correct behaviour is the next one. If create a service: curl -X POST 172.21.0.23:8090/iot/services \ -i \ -H "Content-Type: application/json" \ -H "Fiware-Service: red_entrada _1" \ -H "Fiware-ServicePath: /Prueba" \ -d '{ "services": [ { "apikey": "pass_1", "cbroker": "http://172.21.0.23:1026", "entity_type": "disp_entrada_1", "resource": "/iot/mqtt" }]}' ... and a device, establishing the incoming attributes and a name for each one of them: curl -X POST 172.21.0.23:8090/iot/devices \ -i \ -H "Content-Type: application/json" \ -H "Fiware-Service: red_entrada _1" \ -H "Fiware-ServicePath: /Prueba" \ -d '{ "devices":[ { "device_id": "AC_2", "entity_name":"disp_entrada_1:AC_2", "protocol":"PDI-IoTA-MQTT-UltraLight", "entity_type": "disp_entrada_1", "timezone": "Europe/Madrid", "attributes": [ { "object_id": "LUX", "name": "LUX_1", "type": "string" }, { "object_id": "LUM", "name": "LUM_1", "type": "string" }, { "object_id": "HUMB", "name": "HUMB_1", "type": "string" }, { "object_id": "TCB", "name": "TCB_1", "type": "string" }, { "object_id": "IN_TEMP", "name": "IN_TEMP_1", "type": "string" }, { "object_id": "BAT", "name": "BAT_1", "type": "string" } ]}]}' As a result, a new entity is created into the context broker, and as the readings arrive to the agent, this entity is updated: { "_id" : { "id" : "disp_entrada_1:AC_2", "type" : "disp_entrada_1", "servicePath" : "/Prueba" }, "attrNames" : [ "TimeInstant", "LUX_1", "LUM_1", "HUMB_1", "TCB_1", "IN_TEMP_1", "BAT_1" ], "attrs" : { "TimeInstant" : { "value" : "2016-03-14T08:11:49.810465Z", "type" : "ISO8601", "creDate" : 1457943015, "modDate" : 1457943109 }, "LUX_1" : { "value" : "464.000", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.687585Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 }, "LUM_1" : { "value" : "2.694", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.718131Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 }, "HUMB_1" : { "value" : "38.7", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.748719Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 }, "TCB_1" : { "value" : "21.31", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.779327Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 }, "IN_TEMP_1" : { "value" : "21.00", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.810465Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 }, "BAT_1" : { "value" : "97", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.230590Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 } }, "creDate" : 1457943015, "modDate" : 1457943109 } The problem arises when I register a new DEVICE and I use as the name for the attributes the same value of the "object_id" (name of the attribute into the incoming MQTT data. Surely on this scenario it's not necessary to register a DEVICE). For example: curl -X POST 172.21.0.23:8090/iot/devices \ -i \ -H "Content-Type: application/json" \ -H "Fiware-Service: red_entrada_2" \ -H "Fiware-ServicePath: /Prueba" \ -d '{ "devices":[ { "device_id": "AC_2", "entity_name":"disp_entrada_1:AC_2", "protocol":"PDI-IoTA-MQTT-UltraLight", "entity_type": "disp_entrada_1", "timezone": "Europe/Madrid", "attributes": [ { "object_id": "LUX", "name": "LUX", "type": "string" }, { "object_id": "LUM", "name": "LUM", "type": "string" }, { "object_id": "HUMB", "name": "HUMB", "type": "string" }, { "object_id": "TCB", "name": "TCB", "type": "string" }, { "object_id": "IN_TEMP", "name": "IN_TEMP", "type": "string" }, { "object_id": "BAT", "name": "BAT", "type": "string" } ]}] }' On that case a new entity is created into the context broker too, but when the readings arrive the entity is not updated and the IoTAgent service crashes. Entity status: { "_id" : { "id" : " disp_entrada_1:AC_2", "type" : " disp_entrada_1", "servicePath" : "/Prueba" }, "attrNames" : [ "TimeInstant" ], "attrs" : { "TimeInstant" : { "type" : "ISO8601", "creDate" : 1457948167, "modDate" : 1457948167, "value" : "2016-03-14T09:36:07.432814Z" } }, "creDate" : 1457948167, "modDate" : 1457948167 } I can’t see any logic on this behaviour. If I don't register beforehand the device, the entity will be created automatically and the attributes will have as the name the value of the "object_id" field (that was what I was attempting to do on the second example). ¿Can it be due to an issue on the agent or manager installation? |
Created question in FIWARE Q/A platform on 14-03-2016 at 15:03 {color: red}Please, ANSWER this question AT{color} http://stackoverflow.com/questions/35989887/fiware-idas-issue-with-registered-device +Question:+ FIWARE - IDAS: Issue with registered device +Description:+ I’m having problems with the IDAS Iotagent. Using the MQTT Ultralight agent, depending on how I register a device, when the agent receives a reading the iotagent service crashes and the related entity into the context broker is not updated. The correct behaviour is the next one. If create a service: curl -X POST 172.21.0.23:8090/iot/services \ -i \ -H "Content-Type: application/json" \ -H "Fiware-Service: red_entrada _1" \ -H "Fiware-ServicePath: /Prueba" \ -d '{ "services": [ { "apikey": "pass_1", "cbroker": "http://172.21.0.23:1026", "entity_type": "disp_entrada_1", "resource": "/iot/mqtt" }]}' ... and a device, establishing the incoming attributes and a name for each one of them: curl -X POST 172.21.0.23:8090/iot/devices \ -i \ -H "Content-Type: application/json" \ -H "Fiware-Service: red_entrada _1" \ -H "Fiware-ServicePath: /Prueba" \ -d '{ "devices":[ { "device_id": "AC_2", "entity_name":"disp_entrada_1:AC_2", "protocol":"PDI-IoTA-MQTT-UltraLight", "entity_type": "disp_entrada_1", "timezone": "Europe/Madrid", "attributes": [ { "object_id": "LUX", "name": "LUX_1", "type": "string" }, { "object_id": "LUM", "name": "LUM_1", "type": "string" }, { "object_id": "HUMB", "name": "HUMB_1", "type": "string" }, { "object_id": "TCB", "name": "TCB_1", "type": "string" }, { "object_id": "IN_TEMP", "name": "IN_TEMP_1", "type": "string" }, { "object_id": "BAT", "name": "BAT_1", "type": "string" } ]}]}' As a result, a new entity is created into the context broker, and as the readings arrive to the agent, this entity is updated: { "_id" : { "id" : "disp_entrada_1:AC_2", "type" : "disp_entrada_1", "servicePath" : "/Prueba" }, "attrNames" : [ "TimeInstant", "LUX_1", "LUM_1", "HUMB_1", "TCB_1", "IN_TEMP_1", "BAT_1" ], "attrs" : { "TimeInstant" : { "value" : "2016-03-14T08:11:49.810465Z", "type" : "ISO8601", "creDate" : 1457943015, "modDate" : 1457943109 }, "LUX_1" : { "value" : "464.000", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.687585Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 }, "LUM_1" : { "value" : "2.694", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.718131Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 }, "HUMB_1" : { "value" : "38.7", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.748719Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 }, "TCB_1" : { "value" : "21.31", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.779327Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 }, "IN_TEMP_1" : { "value" : "21.00", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.810465Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 }, "BAT_1" : { "value" : "97", "type" : "string", "md" : [ { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2016-03-14T08:11:49.230590Z" } ], "creDate" : 1457943103, "modDate" : 1457943109 } }, "creDate" : 1457943015, "modDate" : 1457943109 } The problem arises when I register a new DEVICE and I use as the name for the attributes the same value of the "object_id" (name of the attribute into the incoming MQTT data. Surely on this scenario it's not necessary to register a DEVICE). For example: curl -X POST 172.21.0.23:8090/iot/devices \ -i \ -H "Content-Type: application/json" \ -H "Fiware-Service: red_entrada_2" \ -H "Fiware-ServicePath: /Prueba" \ -d '{ "devices":[ { "device_id": "AC_2", "entity_name":"disp_entrada_1:AC_2", "protocol":"PDI-IoTA-MQTT-UltraLight", "entity_type": "disp_entrada_1", "timezone": "Europe/Madrid", "attributes": [ { "object_id": "LUX", "name": "LUX", "type": "string" }, { "object_id": "LUM", "name": "LUM", "type": "string" }, { "object_id": "HUMB", "name": "HUMB", "type": "string" }, { "object_id": "TCB", "name": "TCB", "type": "string" }, { "object_id": "IN_TEMP", "name": "IN_TEMP", "type": "string" }, { "object_id": "BAT", "name": "BAT", "type": "string" } ]}] }' On that case a new entity is created into the context broker too, but when the readings arrive the entity is not updated and the IoTAgent service crashes. Entity status: { "_id" : { "id" : " disp_entrada_1:AC_2", "type" : " disp_entrada_1", "servicePath" : "/Prueba" }, "attrNames" : [ "TimeInstant" ], "attrs" : { "TimeInstant" : { "type" : "ISO8601", "creDate" : 1457948167, "modDate" : 1457948167, "value" : "2016-03-14T09:36:07.432814Z" } }, "creDate" : 1457948167, "modDate" : 1457948167 } I can’t see any logic on this behaviour. If I don't register beforehand the device, the entity will be created automatically and the attributes will have as the name the value of the "object_id" field (that was what I was attempting to do on the second example). ¿Can it be due to an issue on the agent or manager installation? |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Carlos Ralli Ucendo [ ralli ] |
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |