我已遵循 NGSI API 文档,并且我正在使用注册将查询转发到将处理该查询的自定义路径。
我正在研究 APIv2 文档中显示的示例。我有两个在不同端口上运行上下文代理的容器。
在其中一个中,我创建了Room1资产,在另一个中,我创建了该资产的注册。
我正在查询第二个身份,在日志中显示以下消息:
orion2_1 | time=Friday 02 Nov 08:48:19 2018.704Z | lvl=WARN | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=postQueryContext.cpp[168]:queryForward | msg=Other Error (context provider response to QueryContext is empty)
{
"id": "5bdc14dfcbe7f9fb0a95002e",
"description": "Registration for Room1",
"dataProvided": {
"entities": [
{
"id": "Room1",
"type": "Room"
}
],
"attrs": [
"temperature",
"pressure"
]
},
"provider": {
"http": {
"url": "http://192.168.1.100:8000/v2"
},
"supportedForwardingMode": "all",
"legacyForwarding": true
},
"status": "active"
}
{
"id": "Room1",
"type": "Room",
"pressure": {
"type": "Integer",
"value": 720,
"metadata": {}
},
"temperature": {
"type": "Float",
"value": 23,
"metadata": {}
}
}
有人可以帮助我吗?