Skip to content

Matheuao/FM-ApplicationServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


LoRaWAN Forest Project — Acoustic Forest Monitoring 🌳📡

This project aims to implement a proof of concept for acoustic forest monitoring using LoRaWAN connectivity, a Node-RED-based backend for data acquisition, visualization, and storage, and auxiliary Python scripts for analysis and maintenance.


🔧 Technologies Used

  • C (bare-metal) for embedded device programming
  • MQTT via The Things Network (TTN)
  • Node-RED with SQLite for backend and dashboard
  • Python for utility scripts
  • Docker for application packaging and portability
  • LocalTunnel for remote dashboard access

🗂️ Project Structure

The project is organized into three main directories, each containing its own README.md file with usage instructions:

LoRaWANForest/ — Embedded Device Code

Contains the firmware written in C, responsible for capturing and transmitting acoustic data via LoRaWAN.

  • Sends data packets to TTN

See the README.md inside the LoRaWANForest folder

Note: The payload currently contains mock data; in a real application, these values would be generated by a machine learning model. Future work will focus on implementing this.


Node-red/ — Backend and Dashboard

Contains all files required for the Node-RED application, including:

  • Dockerfile for creating a custom image
  • floresta.db (SQLite) database
  • Node-RED flows and MQTT configuration for TTN integration
  • Startup and LocalTunnel integration scripts

See the README.md inside the Node-red folder


scripts/ — Python Utilities

Utility scripts for:

  • Database queries and integrity checks
  • MQTT connection testing
  • Payload conversion
  • Data debugging support

See the README.md inside the scripts folder


🚀 How to Run the Project

Full instructions are available in the Node-red folder’s README.md, but the basic workflow is:

# Build the Docker image
sudo docker build -t trabalho_iot ./Node-red

# Create the folder containing the database
mkdir projeto
cp Node-red/floresta.db ./projeto/
sudo chown 1000:1000 ./projeto/floresta.db

# Run the container
sudo docker run -it -p 1880:1880 -v ./projeto:/data --name florest1 trabalho_iot

# Install and run LocalTunnel (one time)
sudo npm install -g localtunnel
lt --port 1880

Access the dashboard via:

https://<your-localtunnel-address>.loca.lt/ui

The access password is your public IP address, which can be checked at:

https://nordvpn.com/what-is-my-ip/

❗ Note on TTN Configuration

For the application to function properly, it must be registered in The Things Network (TTN), and a valid App Access Key must be configured.

If necessary, generate a new App Key on the TTN platform.

About

Trabalho Final da disciplina: Redes de Sensores sem Fio para IoT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors