Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-13434

[fiware-stackoverflow] Can't find device lazy attributes in Orion Context Broker

    Details

      Description

      Created question in FIWARE Q/A platform on 17-01-2018 at 18:01
      Please, ANSWER this question AT https://stackoverflow.com/questions/48306811/cant-find-device-lazy-attributes-in-orion-context-broker

      Question:
      Can't find device lazy attributes in Orion Context Broker

      Description:
      I develop IoT Agent with node.js library. And register device with this through IoTA:

      'devices': [{
      'device_id': 'ULSensor',
      'entity_name': 'Sensor01',
      'entity_type': 'BasicULSensor',
      'attributes': [

      { 'name': 't', 'type': 'celsius' }

      ,

      { 'name': 'l', 'type': 'meters' }

      ],
      'lazy': [

      { 'name': 'p', 'type': 'pascal' }

      ,

      { 'name': 'c', 'type': 'curiosity' }

      ]
      }]

      Then make request to http://orion:1026/v1/queryContext with this payload:

      data = {
      "entities": [

      { "isPattern": "false", "id": 'Sensor01', "type": entity_type }

      ]
      , "attributes": [
      'c'
      ]
      }

      And got this:

      "errorCode" :

      { "code" : "404", "reasonPhrase" : "No context element found", "details" : "error forwarding query" }

      But when set 't' in attributes - orion sends correct response. I wrote queryContextHandler and updateContextHandler in IoTA, but they were not called. Orion is a docker image, and node-lib from npm.

      IoTA log shows that were two register requests:

      "url": "http://orion:1026/NGSI9/registerContext",
      "method": "POST",
      "json": {
      "contextRegistrations": [
      {
      "entities": [

      { "type": "BasicULSensor", "isPattern": "false", "id": "Sensor01" }

      ],
      "attributes": [

      { "name": "p", "type": "pascal", "isDomain": "false" }

      ,

      { "name": "c", "type": "curiosity", "isDomain": "false" }

      ],
      "providingApplication": "http://myiotagent:4042"
      }
      ],
      "duration": "P1M"
      }

      "url": "http://orion:1026/v1/updateContext",
      "method": "POST",
      "json": {
      "contextElements": [
      {
      "type": "BasicULSensor",
      "isPattern": "false",
      "id": "Sensor01",
      "attributes": [

      { "name": "t", "type": "celsius", "value": " " }

      ,

      { "name": "l", "type": "meters", "value": " " }

      ]
      }
      ],
      "updateAction": "APPEND"
      }

      How to register device correctly or send query to orion to get lazy attributes?

      Thanks!

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        21h 1 Backlog Manager 18/Jan/18 6:05 PM
        In Progress In Progress Answered Answered
        3h 1 Backlog Manager 18/Jan/18 9:05 PM
        Answered Answered Closed Closed
        23h 59m 1 Backlog Manager 19/Jan/18 9:05 PM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-19 21:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-19 21:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fla Fernando Lopez made changes -
        HD-Enabler Orion [ 10875 ]
        HD-Chapter Data [ 10838 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-18 21:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-18 21:05|UPDATED status: transition Answered| # answers= 1, accepted answer= False
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-18 18:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-18 18:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        jmcantera Jose Manuel Cantera made changes -
        Assignee Jose Manuel Cantera [ jmcantera ] Jose Gato Luis [ josegato ]
        veronika Veronika Vlnkova made changes -
        Assignee Jose Manuel Cantera [ jmcantera ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-17 21:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-17 21:05|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            josegato Jose Gato Luis
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: