An automated hydroponic system
A Washington DC based hydroponic lab using a deep water culture system.
- Raspberry Pi 3 Model B
- Peristalic Pumps (x8) (PH up & down + nutrients)
- Fill Valve
- Drain Valve
- 1CH Relay - control AC
- Motor Hat - control peristatlic pumps
- Arduino Hat
- Power Receptacles
- 4CH Relay - control receptacles
- 2CH Relay - control valves
- Light Sensor - TSL2591
- PH Sensor - SEN0161
- Water Temperature Probes - DS18B20
- Ultrasonic - HC-SR04 (for water level)
- Humidity & Temperature - DHT22
- Water Chiller
- Water Pump (x2) - draining & water chiller
- Water Pump - top feed distribution
- Water Pump Manifold
- Exhaust
- Air Stone/Diffuser
- Air Pump
- Light
- Light Bulbs
- Nutrient Storage for Pumps
enable ip_tables
sudo modprobe ip_tables
sudo echo 'ip_tables' >> /etc/modules
update /etc/rc.local
# Forward port 80 and 443 so the
# web server can run at normal permissions
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 3000
load /etc/rc.local
sudo /etc/rc.local
generate ssl csr and generate ssl certificate
openssl req -nodes -newkey rsa:2048 -keyout private.key -out server.csr
install pm2 and setup startup scripts
sudo npm install pm2 -g
pm2 startup
setup config.js & grow.json, then start index.js
git clone https://github.com/krahimian/growlab.git
cd growlab
npm install
cp config.sample.js config.js
cp grow.sample.json grow.json
pm2 start index.js --watch