#Weather Station
IOT Aurduino
MQTT Server Mosquitto
MQTT Client paho-mqtt/py
Database (noSQL) MongoDB
Mongo-Client pymongo/py
Backend (RESTapi) FastAPI/py
Frontend (webapp) reactjs/js
Machine Learning
IOT (mqtt-client) <-MQTT-> (MOSQUITTO mqtt-server) <-MQTT-> (paho-mqtt mqtt-client)--(mongodb database)--(backend/api) <-HTTP-> client (using client-script)
# install mosquitto
apt install mosquitto
# start mosquitto broker/server
mosquitto -c CONF_FILE -d
# in case of `Error: Address already in use`
ps -ef | grep mosquitto # get process id PID
sudo kill PID # kill process
mosquitto -c CONF_FILE -d # start broker/server
# In case running locally on wifi-network
hostname -I # get private IP to be used as broker IP
For Linux Install Guide
For Windows Install Guide
cd backend/
python3 -m venv venv # create virtual env `venv`
source venv/bin/activate # activate venv
pip install -r requirements.txt # install dependencies
uvicorn backend.server.main:app
# development server (hot-reload)
uvicorn backend.server.main:app --reload
This repository uses pytest
and requires test to follow Python test discovery Conventions
Connection between Mongodb and Mongoose