This repository represents the sink module of an IoT Irrigation System that:
- Communicates with collectors via MQTT and uploads collected data into a MongoDB database.
- Communicates with a web application via MQTT accepting configurations and manual control of water valves.
The application was developed on Raspberry Pi 4B+ 8Gb RAM with Raspbian Buster as operating system, written in Python3.7.
- 1x 8 Relay Module board -> source
- 1x 230VAC to 24VAC Transformer -> source
- 6x 24VAC Solenoid Valves -> source
sudo apt-get update
sudo apt-get install git python3-pip python3-venv
cd ~/ && git clone https://github.com/pdany1116/is-iot-sink.git
cd is-iot-sink
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
cp .env.example .env
nano .env
Note: Replace the environment variables with your values. All variables need to be defined!!!
set -o allexport; source .env; set +o allexport
nano setup.xml
export PYTHONPATH=$(pwd):${PYTHONPATH}
python3 is_iot_sink/main.py