使用iotagent-ul

时间:2017-02-14 17:00:12

标签: fiware fiware-orion

我尝试使用带有HTTP协议的iotagent-ul向Orion Context Broker发送命令。 Context Broker和IoT Agent位于不同的服务器中(实际上IoTA正在我的笔记本电脑中运行)。 我在config.js文件中配置了必要的参数。

我的要求如下:

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'

它显示以下错误:

  • 在IoTA终端:

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

  • 在" cURL终端":

curl: (52) Empty reply from server

1 个答案:

答案 0 :(得分:0)

请告诉我们您使用的物联网代理UL版本是什么?

另一方面,您似乎错过了'协议'有效载荷中的字段,请检查

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

最好的