Python server for managing and geofencing devices using LoRa
Server created for team project called “GeoLoRacja”
IMPORTANT - Repository does not have training data included.
Also You have to set Your own secret key in config.cfg, email and email password.
To install all packages, run:
$ pip install -r requirements.txt
Go to folder machine_learning
by typing $ cd machine_learning
then run:
$ python train.py
Install PostrgreSQL for Your operating system, You can download it from this link:
Create user:
$ sudo -u postgres createuser loradb
Create database:
$ sudo -u postgres createdb loradb
Give new created user a password:
$ sudo -u postgres psql
psql=# alter user loradb with encrypted password 'GeoLoracja2018!';
Grant privileges on database:
psql=# grant all privileges on database loradb to loradb;
In project folder start python console by typing:
$ python
In python console run:
>>> from server import db
Next create all tables by typing:
>>> db.create_all()
Exit python console:
>>> exit()
After finishing all steps in Installation, in project folder run command:
$ python server.py
If everything was properly configured You should see this:
Starting Lora thread
Uplink listener is running...
* Running on http://0.0.0.0:5000/
Now You can start browser and go to:
https://localhost:5000
This project is licensed under the MIT License - see the LICENSE.md file for details