[英]Fiware IoTAgent and Context Broker
I'm following this example to create a simple scenario where I register a new device into the IoT Agent and it forwards it to the Context Broker.我正在按照这个示例创建一个简单的场景,在该场景中我将新设备注册到 IoT 代理并将其转发到上下文代理。 Then I want to check if the created device exists in the Context Broker, and I can seem to find it.
然后我想检查创建的设备是否存在于上下文代理中,我似乎可以找到它。
These are the steps I'm doing: 1. using Postman I'm sending a post request to the IoT Agent: url: http://eidas5.lab.fi-ware.org:5371/iot/devices这些是我正在做的步骤: 1. 使用邮递员我向物联网代理发送发布请求: 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"
}
]
}
]
}
Then I confirm that the device is registered with a GET request to the url http://eidas5.lab.fi-ware.org:5371/iot/devices/DEV_ID然后我确认设备已通过 GET 请求注册到 url http://eidas5.lab.fi-ware.org:5371/iot/devices/DEV_ID
request headers:请求头:
APIKEY:4jggokgpepnvsb2uv4s40d59ov Fiware-Service:openiot APIKEY:4jggokgpepnvsb2uv4s40d59ov Fiware-Service:openiot
Fiware-ServicePath:/ Content-Type:application/json Accept:application/json Fiware-ServicePath:/ Content-Type:application/json Accept:application/json
everything seems ok so far, now I want to check where this device is in the context broker:到目前为止一切似乎都没问题,现在我想检查这个设备在上下文代理中的位置:
Devices will be represented as NGSI entities in the ContextBroker at 130.206.80.40:1026 (within the FIWARE service-path "OpenIoT").
设备将在 ContextBroker 中的 NGSI 实体表示为 130.206.80.40:1026(在 FIWARE 服务路径“OpenIoT”内)。
So with a GET request I should be able to see the new device,but I can't.因此,通过 GET 请求,我应该能够看到新设备,但我不能。 I even tryed using the fiware-servicepath and fiware-service headers as above, and I can't find it.
我什至尝试使用上面的 fiware-servicepath 和 fiware-service 标头,但我找不到它。 Any advice on this?
对此有何建议?
fiware-service should be open-iot and fiware-servicepath / fiware-service 应该是 open-iot 和 fiware-servicepath /
have a look at看看
http://fiwaretourguide.readthedocs.io/en/latest/connection-to-the-internet-of-things/how-to-read-measures-captured-from-iot-devices/ http://fiwaretourguide.readthedocs.io/en/latest/connection-to-the-internet-of-things/how-to-read-measures-captured-from-iot-devices/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.