我遵循这个例子来创建一个简单的场景,在这个场景中,我将一个新设备注册到IoT代理中,并将其转发给上下文代理。然后,我想检查所创建的设备是否存在于上下文代理中,并且我似乎可以找到它。
下面是我正在执行的步骤: 1.使用邮递员,我向IoT代理发送一个post请求: url:http://eidas5.lab.fi-ware.org:5371/iot/devices
headers: 
APIKEY:4jggokgpepnvsb2uv4s40d59ov
Fiware-Service:openiot
Fiware-ServicePath:/
Content-Type:application/json
Accept:application/json
body:
{
 "devices": [
    { "device_id": "DEV_ID",
      "entity_name": "ENTITY_ID",
      "entity_type": "thing",
      "protocol": "PDI-IoTA-UltraLight",
      "timezone": "Europe/Madrid",
      "attributes": [
    { "object_id": "t",
      "name": "temperature",
      "type": "int"
    } ],
  "static_attributes": [
    { "name": "att_name",
      "type": "string",
      "value": "value"
    }
   ]
  }
 ]
} 到目前为止,一切看起来都还好,现在我想检查一下这个设备在上下文代理中的位置:
设备将表示为ContextBroker中的NGSI实体,为130.206.80.40:1026 (在FIWARE服务-路径“OpenIoT”内)。
因此,有了GET请求,我应该能够看到新设备,但我看不见。我甚至尝试使用上面提到的fiware-servicepath和fiware服务头,但我找不到它。对此有什么建议吗?
发布于 2016-06-02 20:39:19
fiware-服务应该是开放的,fiware-servicepath /
看一看
http://fiwaretourguide.readthedocs.io/en/latest/connection-to-the-internet-of-things/how-to-read-measures-captured-from-iot-devices/
https://stackoverflow.com/questions/37591168
复制相似问题