curl -X POST -vv -H" Fiware-Service:myHome" -H" Fiware-ServicePath:/ environment" -H" Content-Type:application / json" -H"缓存控制:无缓存" -d' { "设备":[ { " device_id":" 0000000000000000", " entity_name":" BedRoomSensor", " entity_type":" multiSensor", "属性":[ {" object_id":" t"," name":" Temperature"," type":"摄氏" }, {" object_id":" h"," name":" Humidity"," type":"度" } ] } ] }' http://localhost:4041/iot/devices'
答案 0 :(得分:1)
我已按照本指南的前两个步骤解决了问题:http://fiwaretourguide.readthedocs.io/en/latest/connection-to-the-internet-of-things/how-to-read-measures-captured-from-iot-devices/ 在逐步指南中,没有描述这些步骤。 在第二步中,我将协议fielde更改为“MQTT”。 现在每当我从我的设备请求测量时,我都会采用正确的值。