问题描述
我正在研究POC,以使用Fiware平台创建Smart City IoT项目.我正在尝试端到端的流程.我正在运行以下Docker容器.
I am working on a POC to create Smart City IoT project using Fiware platform. I am trying to run end to end flow.I have following Docker containers running.
集装箱ID港口名称
24f036202f78 0.0.0.0:4041->4041/tcp,0.0.0.0:7896->7896/tcp fiware_iotagent_1
24f036202f78 0.0.0.0:4041->4041/tcp, 0.0.0.0:7896->7896/tcp fiware_iotagent_1
81e16c78312e 0.0.0.0:1026->1026/tcp fiware_orion_1
81e16c78312e 0.0.0.0:1026->1026/tcp fiware_orion_1
bf699e1acdd3 0.0.0.0:1883->1883/tcp fiware_mosquitto_1
bf699e1acdd3 0.0.0.0:1883->1883/tcp fiware_mosquitto_1
bfc256deddd0 0.0.0.0:27017->27017/tcp fiware_mongo_1
bfc256deddd0 0.0.0.0:27017->27017/tcp fiware_mongo_1
我正在使用以下教程.
我能够创建服务和设备. (数据在下面给出).
I am able to create Service and devices. (data is given below).
现在,当我发送测量值时,它不起作用.
Now, when I am sending measurement it is not working.
请指导我我在做什么错?并且在可能的情况下提供具有逐步示例的参考,以进行端到端的IoT测试.
Please guide me what am I doing wrong? And if possible provide reference having step by step example to run end to end IoT testing.
请求详细信息(使用POSTMAN)标头
Request Details (Using POSTMAN)Header
Content-Type:text/plain
fiware-service:{{FiwareService}}
fiware-servicepath:{{FiwareServicePath}}
X-Auth-Token:{{AuthToken}}
正文内容:'t | 25'
Body Contents:'t|25'
回复:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /iot/d</pre>
</body>
</html>
带有使用IotAgent URL的标头的服务和设备数据,即 http://130.206.XXX .XXX:4041/iot/ 标题
Service and Device Data with Header using IotAgent URL i.e. http://130.206.XXX.XXX:4041/iot/Header
Content-Type:application/json
fiware-service:tourguide
fiware-servicepath:/
X-Auth-Token:{{AuthToken}}
服务
{
"_id": "5a7063e6b8adcc0001c34723",
"subservice": "/",
"service": "tourguide",
"apikey": "tourguide-devices",
"resource": "/iot/dev-restaurants",
"attributes": [],
"lazy": [],
"commands": [],
"entity_type": "tourguide-devices",
"internal_attributes": [],
"static_attributes": []
}
设备
{
"device_id": "restaurant-sensor-0115206c51f60b48b77e4c937835795c33bb953f",
"service": "tourguide",
"service_path": "/",
"entity_name": "0115206c51f60b48b77e4c937835795c33bb953f",
"entity_type": "Restaurant",
"transport": "HTTP",
"attributes": [
{
"object_id": "t",
"name": "temperature",
"type": "number"
}
],
"lazy": [],
"commands": [],
"static_attributes": [],
"protocol": "UL20"
}
此致
克里山·巴巴尔(Krishan Babbar)
Krishan Babbar
推荐答案
I just followed "Fiware Tour Guide" fromhttp://fiwaretourguide.readthedocs.io/en/latest/fiware-tour-guide-application-a-tutorial-on-how-to-integrate-the-main-fiware-ges/introduction/ and everything seems working fine.
我使用的是端口4041而不是端口7896.下面的请求运行正常.
I was using port 4041 instead of port 7896. Below request is working fine.
数据:
t | 39
关于,克里山
这篇关于Fiware Ultralight 2.0 IoTAgent:如何从设备发送度量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!