Skip to content

Latest commit

 

History

History
65 lines (54 loc) · 2.01 KB

README.md

File metadata and controls

65 lines (54 loc) · 2.01 KB

is-iot-collector

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

  1. Collects data from the field and sends it to the sink module via MQTT.

System requirements

The application was developed on Raspberry Pi Zero W/Zero W 2 with Raspbian Buster as operating system, written in Python3.7.

Electric connections

collector-electric

  1. 2x Capacitive Soil Moisture Sensors -> source
  2. 1x DHT22 Air Temperature and Humidity -> source
  3. 1x DIY Light Intensity Sensor LDR
  4. 1x ADS1015 Analog To Digital Converter -> 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-collector.git
cd is-iot-collector

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-collector/main.py