我跟随this example创建了一个简单的场景,我将新设备注册到IoT Agent,并将其转发给Context Broker。然后我想检查创建的设备是否存在于Context Broker中,我似乎可以找到它 这些是我正在做的步骤: 1.使用Postman我向IoT代理发送一个帖子请求: 网址: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"
}
]
}
]
}
然后我确认设备已注册了对网址http://eidas5.lab.fi-ware.org:5371/iot/devices/DEV_ID
的GET请求请求标题:
APIKEY:4jggokgpepnvsb2uv4s40d59ov
Fiware-服务:openiot
Fiware-ServicePath:/
内容类型:应用程序/ JSON
接受:应用/ JSON
设备将在ContextBroker中以130.206.80.40:1026(在FIWARE服务路径" OpenIoT"内)表示为NGSI实体。
因此,通过GET请求,我应该可以看到新设备,但我无法做到。我甚至尝试使用如上所述的fiware-servicepath和fiware-service标头,但我无法找到它。 对此有何建议?
答案 0 :(得分:2)
fiware-service应该是open-iot和fiware-servicepath /
看看