This is an automated hydroponic system, focusing on getting the current state of the system.
The system currently consists of the following:
- Lights on a timed cycle
- Air pump cycle
- Water level of the tank
- Temperature, Humidity, Electrical Conductivity sensors
- Water temperature sensor is a DS18B20 sensor.
- Ambient temperature sensor is a MCP9808 sensor, communicating using I2C.
- Water level sensor is Ultrasonic HC-SR04 sensor.
The system is designed to work on the Raspberry Pi 3.
Every 3 hours the system will send a json message with the telemetry to google cloud IoT core.
To add the config file for communication with GCP, run the following step:
- Create a file config/googleCloudIoTConfig.json
- Insert the following json:
{
"location": "<location>",
"projectID": "<projectID>",
"registryID": "<registryID>",
"deviceID": "<deviceID>"
}
cp selfhydro.service /etc/systemd/system/selfhydro.service
sudo systemctl enable selfhydro.service
For first time setup of device, wifi connect is used to setup the wifi network.
Install using:
bash <(curl -L https://github.com/resin-io/resin-wifi-connect/raw/master/scripts/raspbian-install.sh)
- Enable 1-wire:
sudo nano /boot/config.txt
sudo reboot
sudo modprobe w1-gpio
sudo modprobe w1-therm
docker run -it -p 1883:1883 -p 9001:9001 --restart always -d eclipse-mosquitto
- Config file for pins being used on Raspberry Pi
- Refactor all sensors into sensor directory
- Setup CICD pipeline