Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Enabler:IoT Broker
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":[
]
}
But what I got in the contextBroker is this:
"location" : {
"value" : "12.5/14.5",
"type" : "string",
"md" : [
],
"creDate" : 1448382369,
"modDate" : 1448382369
}
What have I missed? Thanks in advance for your help!
Activity
- All
- Comments
- History
- Activity
- Transitions