Skip to content

Bachelor's Degree Project. This repository represents the sink module of an IoT Irrigation System, that collects data from collectors via MQTT, uploads it into a MongoDB database and communicates via MQTT with the web application.

Notifications You must be signed in to change notification settings

pdany1116/is-iot-sink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-iot-sink

This repository represents the sink module of an IoT Irrigation System that:

  1. Communicates with collectors via MQTT and uploads collected data into a MongoDB database.
  2. Communicates with a web application via MQTT accepting configurations and manual control of water valves.

System requirements

The application was developed on Raspberry Pi 4B+ 8Gb RAM with Raspbian Buster as operating system, written in Python3.7.

Electric connections

sink-electric

  1. 1x 8 Relay Module board -> source
  2. 1x 230VAC to 24VAC Transformer -> source
  3. 6x 24VAC Solenoid Valves -> source

Install prerequisites

sudo apt-get update
sudo apt-get install git python3-pip python3-venv

Clone repository

cd ~/ && git clone https://github.com/pdany1116/is-iot-sink.git
cd is-iot-sink

Create virtual environment and activate

python3 -m venv env
source env/bin/activate

Install requirements packages

pip install -r requirements.txt

Configure enviroment variables

Change default values

cp .env.example .env
nano .env

Note: Replace the environment variables with your values. All variables need to be defined!!!

Export environment variables

set -o allexport; source .env; set +o allexport

Configure system setup

nano setup.xml

Configure python path

export PYTHONPATH=$(pwd):${PYTHONPATH}

Run main

python3 is_iot_sink/main.py

About

Bachelor's Degree Project. This repository represents the sink module of an IoT Irrigation System, that collects data from collectors via MQTT, uploads it into a MongoDB database and communicates via MQTT with the web application.

Resources

Stars

Watchers

Forks

Packages

No packages published