iotagent-ul中的DEVICE_GROUP_NOT_FOUND [英] DEVICE_GROUP_NOT_FOUND in iotagent-ul
本文介绍了iotagent-ul中的DEVICE_GROUP_NOT_FOUND的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用IoT Agent UL2.0发送测量结果.
I'm trying to send measurements using IoT Agent UL2.0.
首先,我创建了如下设备:
First, I created a device as follows:
POST /iot/devices HTTP/1.1
Host: localhost:4061
Fiware-Service: Empresa1
Fiware-ServicePath: /empresa1
Content-Type: application/json
Cache-Control: no-cache
{
"devices": [
{
"device_id": "A6",
"entity_name": "A6",
"entity_type": "E6",
"attributes": [
{ "object_id": "a", "name": "aaa", "type": "text" },
{ "object_id": "b", "name": "bbb", "type": "text" },
{ "object_id": "c", "name": "ccc", "type": "text" }
]
}
]
}
然后,我尝试按以下方式发送测量值:
Then I'm trying to send measurements as follows:
POST /iot/d?i=A6&k=A6&d=a|7|b|7|c|7 HTTP/1.1
Host: localhost:7896
Fiware-Service: Empresa1
Fiware-ServicePath: /empresa1
Content-Type: text/plain
Cache-Control: no-cache
但是我遇到了以下错误:
But I'm getting the following error:
{
"name": "DEVICE_GROUP_NOT_FOUND",
"message": "Couldn\t find device group"
}
device group
是什么?
谢谢!
推荐答案
我想出了解决方法.
我只是将config.js
中的config.defaultTransport
更改为HTTP
,并使用TEF
作为apikey.
I just changed config.defaultTransport
to HTTP
in config.js
and used TEF
as apikey.
向Orion有效发送措施的请求如下:
The request that effectively sent measures to Orion was the following:
POST /iot/d?i=A6&k=TEF&d=a|7|b|7|c|7 HTTP/1.1
Host: localhost:7896
Fiware-Service: Empresa1
Fiware-ServicePath: /empresa1
Content-Type: text/plain
Cache-Control: no-cache
我希望这对某人有帮助.
I hope this helps somebody.
这篇关于iotagent-ul中的DEVICE_GROUP_NOT_FOUND的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文