Skip to content

Routes messages between a Telegram Bot and a MQTT broker. Part of project "HaLoRa"

License

Notifications You must be signed in to change notification settings

LoRaWahnsinn/HaLoRa_Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HaLoRa Backend

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:

Setup

In order to use the backend, you have to compile it yourself. You need to have maven present.

  1. clone the repository, cd into the directory
  2. 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=
  1. run mvn install
  2. run mvn clean compile assembly:single to create a jar with bundled dependencies
  3. execute java -jar target/halora-backend-1.0-SNAPSHOT-jar-with-dependencies.jar
  4. now the backend should be up and running.

Bot Commands

/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.

Built with

  • Java
  • Maven
  • SQLite
  • Eclipse Paho MQTT Client
  • Telegrambots

About

Routes messages between a Telegram Bot and a MQTT broker. Part of project "HaLoRa"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages