Skip to content

Latest commit

 

History

History
60 lines (49 loc) · 3.57 KB

README.md

File metadata and controls

60 lines (49 loc) · 3.57 KB

LoRa-concentrator

The target of this repository files is to send different kinds of payloads from simple LoRa nodes to a Raspberry Pi LoRa concentrator (or gateway) to be converted to MQTT and elaborated via Node-Red or sent to LoRaWAN.

Nodes

Nodes consist of Arduino boards like Arduino Pro Mini or ESP32 mounting LoRa modules like SX127x or RF9x. The most popular libraries:

Note: Be aware that Arduino-LoRa and Heltec LoRa libraries cannot easily coexist because of duplicated library error when compiling for Lora-ESP32 board

Concentrator

The concentrator is made of a Raspberry Pi Rev. 2 with SX127x module and is based on library:

Preparation

All these tests were made using a Raspberry Pi concentrator prepared as follows. These steps are just provided as an example and should be adapted to your setting:

  • download and install Raspbian to SD card, plug to Raspberry, boot and follow installation procedure
  • enable SPI (GPIO interface) using raspi-config tool via terminal console
  • install PyLoRa library (link above)
  • test your LoRa module with PyLoRa to get messages from sensors
  • install Paho-MQTT to allow sending mqtt packets from Python scripts https://pypi.org/project/paho-mqtt/
  • install Mosquitto MQTT broker (kind of server) on local or remote machine, that will manage MQTT messages
  • test publishing MQTT LoRA messages via python script and show them in console using Mosquitto
  • install node-red (if not already installed) and set a flow to get and use your incoming MQTT data
  • install node-red Dashboard to create a dashboard for your sensors data that you can edit via nodes and flows
  • install node-red-admin to set a degree of security if you wish to access your node-red remotely https://nodered.org/docs/security#http-node-security - Be aware that this is NOT a strong security setting (see link below).
  • create a python script to perform the lora listening an MQTT publishing, and set it to start at boot

Authors

See also

Lora

ESP32 board

IR nodes

Node-red

MQTT

other issues

Licenses

The sketches provided are licensed under the MIT Licence. Other files provided as example belong to their respective owners as stated within each file.