Closed onlyindreams closed 8 years ago
Hi Naoya,
the issue is coming from an incompatibility of the NGSI queryContextResponse JSON message of the Orion Context Broker.
As you can see the Orion Context Broker is issuing the following message:
{
"contextResponses" : [
{
"contextElement" : {
"type" : "thermometer",
"isPattern" : "false",
"id" : "thermo1",
"attributes" : [
{
"name" : "temperature",
"type" : "float",
"value" : "300.00"
}
]
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
When the IoT Broker is expecting a pure NGSI JSON message, where the EntityId is encapsulated in a EntityId Json Object, similar to the following:
{
"contextResponses" : [
{
"contextElement" : {
"entityId":{
"type" : "thermometer",
"isPattern" : "false",
"id" : "thermo1"
},
"attributes" : [
{
"name" : "temperature",
"type" : "float",
"value" : "300.00"
}
]
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
The IoT Broker is coping with the Orion slight different JSON binding of NGSI and adapting to it, mainly in the case when the Orion Context Broker is used as an IoT Consumer, like depicted in the FIWARE IoT Architecture (https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Internet_of_Things_(IoT)_Services_Enablement_Architecture). Nevertheless, since the FIWARE GEs are conceived to be modular and different architecture can be achieved with the same components, we have now implemented an adaptation also in the case the Orion is used as a IoT Provider. This adaptation has been committed in the actual developing version of the Aeron IoT Broker. So please make a new git clone (or git pull) from the github and repeat your test.
Thank you very much for trying it out Best Regards Flavio
Thank you for your response.
I have used the master and it works fine now.
Best Regards Naoya
I'm using IoT Broker(github master) but a problem has occured..
I'm trying to use a fiware orion as a NGSI device and an IoT Broker is set above orion which is a data provider. I issued following query to IoT Broker, but no context response has returned..
curl http://localhost:8060/ngsi10/contextEntities/thermo1
response from IoT Broker is..
I have already registered following context entity to IoT Discovery.
When I had issued that query, IoT Broker printed out following logs.
Please tell me why a context response was not built though orion(NGSI device) has returned the context response.
Best Regards,
Naoya