This repository represents the collector module of an IoT Irrigation System that:
- Collects data from the field and sends it to the sink module via MQTT.
The application was developed on Raspberry Pi Zero W/Zero W 2 with Raspbian Buster as operating system, written in Python3.7.
- 2x Capacitive Soil Moisture Sensors -> source
- 1x DHT22 Air Temperature and Humidity -> source
- 1x DIY Light Intensity Sensor
- 1x ADS1015 Analog To Digital Converter -> source
sudo apt-get update
sudo apt-get install git python3-pip python3-venv
cd ~/ && git clone https://github.com/pdany1116/is-iot-collector.git
cd is-iot-collector
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-collector/main.py