[英]How to send LoRaWAN device data to FIWARE LoRaWAN IoT Agent from postman or MQTT Publisher client
I have created an application in Things Network for LoRaWAN.我在物联网中为 LoRaWAN 创建了一个应用程序。 Also registered a device within that application.
还在该应用程序中注册了一个设备。
Uplink payload from Things Network 01 67 00 FF来自物联网的上行有效载荷 01 67 00 FF
Now i want to send uplink message from postman or MQTT publisher client.现在我想从 postman 或 MQTT 发布者客户端发送上行链路消息。
I tried to create a payload for postman ie Url: http://MyMachineIP:4061/iot/json?=MyDeviceId&k=APIKEY我尝试为 postman 即 Url: http://MyMachineIP:4061/iot/json?=MyDeviceId&k=APIKEY创建一个有效负载
JSON PAYLOAD JSON 有效载荷
{
"app_id": "MyApplicationID",
"dev_id": "MyDeviceId",
"hardware_serial": "AAAAAAAAAAAAAAAA",
"payload_raw": "AWcA/w==",
"metadata": {
"gateways": [
{
"gtw_id": "TEST_1",
"rssi": 0,
"snr": 0
}
]
}
}
but got error Cannot POST /iot/json.但出现错误无法发布/iot/json。
I also tried using MQTT Publisher Client:我还尝试使用 MQTT Publisher Client:
Installed Eclipse Mosquitto providers a CLI to subscribe and to publish messages.安装了 Eclipse Mosquitto 提供 CLI 来订阅和发布消息。
Start Mosquitto Service.启动蚊子服务。
MQTT command to publish uplink measure:发布上行测量的 MQTT 命令:
mosquitto_pub -h eu.thethings.network -p 1883 -u applicationid-P ttn-account-v2.xXXXXXXXXXXXXXXXXXXXXXXXXX -t applicationid/devices/deviceid/up -m '{"port":1,"payload_raw":"AWcAuw=="}' -d
MQTT command to subscribe uplink measure:订阅上行测量的 MQTT 命令:
mosquitto_sub -h eu.thethings.network -p 1883 -u applicationid -P ttn-account-v2.x2Q20IXXXXX
I recommend you reading this IoT Agent LoRaWAN guide https://fiware-lorawan.readthedocs.io/en/latest/users_manual/index.html Device provisioning, config and read this part: In this case, the IoTA will subscribe to any observation coming from the LoRaWAN application server.我建议您阅读此 IoT 代理 LoRaWAN 指南https://fiware-lorawan.readthedocs.io/en/latest/users_manual/index.html设备配置、配置并阅读此部分:在这种情况下,IoTA 将订阅任何观察来自 LoRaWAN 应用服务器。 Whenever a new update arrives, it will create the corresponding device internally and also in the Context Broker using the pre-provisioned configuration.
每当有新的更新到来时,它都会在内部创建相应的设备,也会使用预先配置的配置在 Context Broker 中创建相应的设备。 Finally, it will forward appropriate context update requests to the Context Broker to update the attributes' values.
最后,它将适当的上下文更新请求转发给上下文代理以更新属性的值。
Regards!问候!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.