2017-02-16 5 views
1

IoT Agent UL2.0을 사용하여 측정을 보내려고합니다.DEVICE_GROUP_NOT_FOUND in iotagent-ul

다음
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" } 
     ] 
    } 
] 
} 

내가 다음과 같이 측정을 보내려고 해요 : :

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 

하지만 다음과 같은 오류 받고 있어요 :

을 다음과 같이

첫째, 장치를 생성

{ 
    "name": "DEVICE_GROUP_NOT_FOUND", 
    "message": "Couldn\t find device group" 
} 

device group은 무엇입니까?

감사합니다.

답변

1

어떻게 해결했는지 알아 냈습니다.

방금 ​​config.defaultTransportHTTP으로 변경하고 config.js에서 TEF을 apikey로 변경했습니다.

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 

내가이 사람을 도움이되기를 바랍니다 : 효과적으로 오리온에 조치를 보내

요청은 다음이었다.

1

하는 것은 조심, 당신은 당신이 당신의 자신의 API 키를 사용할 수 있도록 서비스를 구성해야하고, 그이

 

    POST http://130.206.80.40:5371/iot/services 

    Headers: 

    { 
     'Content-Type':  'application/json', 
     'X-Auth-Token' :  '[TOKEN]', 
     'Fiware-Service':  'openiot', 
     'Fiware-ServicePath': '/' 
    } 

    Payload: 

    { 
     "services": [ 
     { 
      "apikey":  "4jggokgpepnvsb2uv4s40d59ov", 
      "cbroker":  "http://0.0.0.0:1026", 
      "entity_type": "thing", 
      "resource": "/iot/d" 
     } 
     ] 
    } 
같은 HTTP 요청을 발행하여 수행 할 수 있습니다