Aquaponics monitoring and on-demand/remote-control fish feeder
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Greenhouse monitoring/control stuff

This is what is hooked up around my aquaponics system. So far: demand/remote auger feeder, water temperature, air temperature and humidity. Upcoming(?): battery backup status, door sensor, pH probe

TBD: make all sensor reads non-blocking, continued debugging/enhancing TBD: make web-accessible via microstates, etc.

Installation notes

# Unblacklist SPI kernel module, via
sudo vi /etc/modprobe.d/raspi-blacklist.conf        # comment out SPI line
sudo modprobe spi-bcm2708

mkdir radio && cd radio
git clone
cd RF24/librf24-rpi/librf24
ln -s
ln -s

cd radio
ln -s RF24/librf24-rpi/librf24
git clone
cd greenhouse && make
sudo LD_LIBRARY_PATH=../librf24:$LD_LIBRARY_PATH ./greenhub

Hack-ity poke-ity

For some undiagnosed reason, the listener on the Raspberry Pi side "stops working" until any command is sent. So here's how I'm automatically sending a B keypress to keep it logging:

# via
mkfifo rx_hack.fifo
# I run this in `screen`…
cat >rx_hack.fifo &
cat rx_hack.fifo | sudo LD_LIBRARY_PATH=../librf24:$LD_LIBRARY_PATH stdbuf -i0 -o0 ./greenhub | tee -a green.log

crontab -e

    */5 * * * * echo "B" > radio/greenhouse/rx_hack.fifo

I then use linepost to pipe the logs to CouchDB, e.g. tail -f green.log | linepost http://localhost:5984/greenhub/_design/greenhouse/_update/greenhub_log.