2017-02-14 6 views
1

HTTP protcol과 함께 iotagent-ul을 사용하여 Orion Context Broker에 명령을 보내려고합니다. Context Broker와 IoT Agent가 서로 다른 서버에 있습니다 (실제로 IoTA가 랩톱에서 실행 중입니다). config.js 파일에 필요한 매개 변수를 구성했습니다. "컬 iotagent-ul을 사용하여 Context Broker에 명령을 보냅니다.

time=2017-02-14T15:06:14.832Z | lvl=ERROR | corr=88ed3729-6682-44ce-9b0a-28098e54c94e | trans=88ed3729-6682-44ce-9b0a-28098e54c94e | op=IoTAgentNGSI.DomainControl | srv=myHome | subsrv=/environment | msg=TypeError: Cannot read property 'findOne' of undefined | comp=IoTAgent

  • :

    • IOTA 단말기에서 :

      curl -L POST -H "Fiware-Service: myHome" -H "Fiware-ServicePath: /environment" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ 
      "devices": [ 
          { 
           "device_id": "sensor01", 
           "entity_name": "LivingRoomSensor", 
           "entity_type": "multiSensor", 
           "attributes": [ 
             { "object_id": "t", "name": "Temperature", "type": "celsius" }, 
             { "object_id": "l", "name": "Luminosity", "type": "lumens" }     
           ] 
          } 
      ] 
      } 
      ' 'http://localhost:4061/iot/devices' 
      

      그것은 다음하는 오류를 나타낸다 : 다음

      내 요청은 터미널 ":

    curl: (52) Empty reply from server

답변

0

사용중인 여잔 에이전트 UL 버전은 무엇을 우리에게 말해 줄 수주십시오? 한편

, 당신의 대답 호세 마누엘에 대한

http://fiwaretourguide.readthedocs.io/en/latest/connection-to-the-internet-of-things/how-to-read-measures-captured-from-iot-devices/

최고의

+0

감사를 확인하시기 바랍니다 당신이 페이로드의 '프로토콜'필드가 누락되어 보인다. 장치를 올바르게 만들었지 만 IoT Agent Ultra Light를 사용하여 Orion에 조치를 보낼 수는 없습니다. 도와 주시겠습니까? – gobaldia

+0

정확히 무엇이 일어나고 있는지 설명해 주시겠습니까? –

+0

안녕하세요 호세 마누엘, 해결했습니다. 나는 정확히 내가 무엇을했는지 모른다. 이제 또 다른 문제가 생겼습니다. [here] (http://stackoverflow.com/questions/42281731/device-group-not-found-in-iotagent-ul). – gobaldia