LoRa proxy
Introduction
LoRa Proxy module allow user to use only one MQTT publish message structure to subscribe and send message to node on different LoRaWAN server. The Proxy works by subscribe to multiple LoRaWAN server. And forward all those message to the single MQTT Broker. This way use and send and receive message from single MQTT Broker. But the actual data come from different MQTT Broker.
https://gitlab.com/unamur_iot/python-rpi-component
Architecture
The LoRa Proxy module is inside a Raspberry Pi. The module will subscribe to two or more LoRaWAN server to get the uplink message from LoRa node.
Architecture flow:
- Cache server inside the web server will subscribe to a MQTT Broker inside a Raspberry Pi.
- The LoRa Proxy inside a Raspberry Pi will subscribe to two or more LoRaWAN Server.
- When node send data from any LoRaWAN Server, The LoRa Proxy in RPi forward those data to MQTT Broker in RPi.
- The cache server subscribe to MQTT Broker will receive the node data from any LoRaWAN Server through MQTT Broker install inside RPi and store those data in its database.
- Whenever user make request to web server. The web server will look for data inside cache server.
Uplink
User can get uplink message from the Proxy in this structure below:
- Message structure
"topic": "node/<node-eui>/up", "message": { "device_eui": "<node-eui>", "gateways": ["<gateway-eui>"], "payload": "<payload>", "device_id": "<device_id>" }
Downlink
User can send downlink message to node by publishing the message in the below structure:
- Message structure
"topic": "node/<node-eui>/down", "message": { "port": 2, "confirmed": false, "payload": "<payload>" }
The LoRa Proxy will extract node-eui, find out which LoRaWAN server the node belongs to, Then form message according to the server api, and publish the message. The LoRaWAN server will schedule the message to send to node.