简体   繁体   English

如何从 postman 或 MQTT Publisher 客户端向 FIWARE LoRaWAN IoT Agent 发送 LoRaWAN 设备数据

[英]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.还在该应用程序中注册了一个设备。

  1. Already register a service in LoRaWAN IoT Agent and provisioned a device with provider as TTN in LoRaWAN IoT Agent.已经在 LoRaWAN IoT Agent 中注册了一项服务,并在 LoRaWAN IoT Agent 中提供了一个提供者作为 TTN 的设备。
  2. Created a HTTP integration in Things Network Stack for my IoT Agent.为我的物联网代理在物联网堆栈中创建了 HTTP 集成。
  3. I also received data sent from Things Network Uplink client in my registered IoT agent.我还在注册的 IoT 代理中收到了从 Things Network Uplink 客户端发送的数据。

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:

  1. Installed Eclipse Mosquitto providers a CLI to subscribe and to publish messages.安装了 Eclipse Mosquitto 提供 CLI 来订阅和发布消息。

  2. Start Mosquitto Service.启动蚊子服务。

  3. 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
  4. 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.

相关问题 使用 JSON/MQTT IOT AGENT FIWARE 配置设备 - Provision device with JSON/MQTT IOT AGENT FIWARE 通过 MQTT 将 LoRa 测量值发送到 Fiware IOT 代理 - Send LoRa measures to Fiware IOT agent via MQTT MQTT如何在物联网中发送回客户端? - MQTT How to send back to client in IoT? Fiware MQTT IoT Agent:API Key 中需要有斜线 - Fiware MQTT IoT Agent: need to have slashes in the API Key 将 MQTT 消息从 AWS Lambda 发送到我的 IOT 设备 - Send MQTT messages from AWS Lambda to my IOT Device MQTT客户端从RTI DDS发布者订阅数据 - MQTT client subscribing data from RTI DDS publisher RabbitMQ (MQTT) 如何将应答消息从消费者发送到发布者? - RabbitMQ (MQTT) how to send answer message from consumer to publisher? 如何将带有文件的文本数据从 IoT 设备发送到 Cloud IoT Core? - How to send text data with file from IoT device to Cloud IoT Core? 如何通过不断更新MQTT发布者的数据来更新UILabel? - How to update UILabel with constantly updating data from MQTT publisher? 如何以 Mosquitto 发布者客户端将数据(上行链路措施)支持 MQTT 协议作为代理发布到物联网(TTN) - How to publish data(Uplink Measures) supports MQTT protocol with Mosquitto publisher client to The Things Network(TTN) as broker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM