[ https://jira.fiware.org/browse/HELP-13435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jose Manuel Cantera reassigned HELP-13435:
------------------------------------------
Assignee: Jose Gato Luis (was: Jose Manuel Cantera)
> [fiware-stackoverflow] Orion CB saves device with 'entity_name' value in 'id' field
> ---------------------------------------------------------------------------------------------------
>
> Key: HELP-13435
> URL: https://jira.fiware.org/browse/HELP-13435
> Project: Help-Desk
> Issue Type: Monitor
> Components: FIWARE-TECH-HELP
> Reporter: Backlog Manager
> Assignee: Jose Gato Luis
> Labels: fiware, fiware-orion
>
> Created question in FIWARE Q/A platform on 21-01-2018 at 10:01
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/48365467/orion-cb-saves-device-with-entity-name-value-in-id-field
> +Question:+
> Orion CB saves device with 'entity_name' value in 'id' field
> +Description:+
> I'm trying to develop IoTA with lazy attributes. And found that Context Broker saves device 'entity_name' field in 'id', so when CB makes request for lazy attributes, IoTA can't found device with such id.
> With purpose to create device entity I make this request to IoTA:
> 'devices': [{
> 'device_id': 'idSensor14',
> 'entity_name': 'nameSensor14',
> 'entity_type': 'anysensor',
> 'attributes': [
> {
> 'name': 't',
> 'type': 'celsius'
> }
> ],
> 'lazy': [
> {
> 'name': 'b',
> 'type': 'mybits'
> }
> ]
> }]
> Then if we request entitites list in CB ('v2/entities/') we discover:
> { "id":"nameSensor15",
> "type":"anysensor",
> "t":{"type":"celsius","value":"","metadata":{}}}
> It seems that CB saves device with wrong id. This is request for lazy attributes:
> data = {
> "entities": [{
> "isPattern": "false",
> "id": myid,
> "type": entity_type
> },
> "attributes": ["b"]
> ]}
> And this is error in IoA log:
> op=IoTAgentNGSI.ContextServer | srv=myhome | subsrv=/sensors | msg=Query error [DEVICE_NOT_FOUND] handling request: No device was found with id:nameSensor15
> If delete entity_name from registration request, then CB will use device id = 'anysensors:idSensor14'. My Orion version is 1.7.0, and iotagent-node-lib version is 2.5.1.
--
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