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

[fiware-stackoverflow] FIWARE IoT Agent: how to send the location attribut to the contextBroker Entity?

    Details

      Description

      Created question in FIWARE Q/A platform on 24-11-2015 at 17:11
      Please, ANSWER this question AT https://stackoverflow.com/questions/33899459/fiware-iot-agent-how-to-send-the-location-attribut-to-the-contextbroker-entity

      Question:
      FIWARE IoT Agent: how to send the location attribut to the contextBroker Entity?

      Description:
      I want to add location information to my entity in the contextBroker using the MQTT IoT Agent.
      I followed this link to do so https://github.com/telefonicaid/fiware-IoTAgent-Cplusplus/blob/develop/doc/modules.md

      My problem is that the attribut "location" was sent as String to the contextBroker not as "coords"

      Here is what I sent to the MQTT IoT agent:

      int qos = 1;
      boolean retain = false;

      String topic = "myKey/sensorId/location";
      String payload= "12.5/14.5";

      this.dataService.publish(topic, position.getBytes(), qos, retain, 2);

      I assume that the location attribut in the contextBroker will have the type "coords", something like that:

      {
      "name":"position",
      "type":"coords",
      "value":"33.000,-3.234234",
      "metadatas":[

      { "name":"location", "type":"string", "value":"WGS84" }

      ]
      }

      But what I got in the contextBroker is this:

      "location" : {
      "value" : "12.5/14.5",
      "type" : "string",
      "md" : [

      { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2015-11-24T16:26:09.530507" }

      ],
      "creDate" : 1448382369,
      "modDate" : 1448382369
      }

      What have I missed? Thanks in advance for your help!

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 15:17|CREATED monitor | # answers= 2, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 15:17|CREATED monitor | # answers= 2, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 18:12|UPDATED status: transition Answer| # answers= 2, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 18:12|UPDATED status: transition Answer| # answers= 2, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-22 21:12|UPDATED status: transition Finish| # answers= 2, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-22 21:12|UPDATED status: transition Finish| # answers= 2, accepted answer= True

          People

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

            Dates

            • Created:
              Updated:
              Resolved: