This repository contains the Backend part of our project "HaLoRa", written during the course Innovation Lab 2 at UAS Technikum Wien.
It serves as a middleware between The Things Network, with which our Microcontroller devices talk to, and our Telegram Bot, which is used for user management and also for sending/receiving messages. The repository for the Microcontroller-Software can be found here.
This illustration provides an overview of all components of the project:
Additionally, this class diagram depicts the detailed structure of the backend component:
In order to use the backend, you have to compile it yourself. You need to have maven present.
- clone the repository, cd into the directory
- add your configuration values to
src/main/resources/halora.properties
using the provided template
# Key/Password for the mqtt broker
MQTT_API_KEY=
# e.g. halora@ttn
MQTT_USER=
# e.g. tcp://mqtt.example.org:1883
MQTT_URI=
BOT_USERNAME=
BOT_TOKEN=
# Telegram Ids comma seperated
BOT_ALLOWED_USERS=
- run
mvn install
- run
mvn clean compile assembly:single
to create a jar with bundled dependencies - execute
java -jar target/halora-backend-1.0-SNAPSHOT-jar-with-dependencies.jar
- now the backend should be up and running.
/start - print a welcome message. If you are already registered you will be greeted with your username.
/send <recipient> <message> - sends a message to an existing halora user
/register <username> - registers your telegram account at halora with the provided username.
/device <deviceId> - associates a device registered at your TheThingsNetwork Account with your HaLoRa Account.
/mode <dora|telegram> - defines whether you want to receive new messages at your LoRaWAN device or within the Bot.
- Java
- Maven
- SQLite
- Eclipse Paho MQTT Client
- Telegrambots