Skip to content

stirkac/smart_garden

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This Rails application is used to provide temperature and humidity logging as JSON API from Raspberry Pi equipped with DHT22 (AM2302) temperature sensor.

Things you need:

  • Raspberry Pi

  • DHT22 sensor connected to GPIO pin 4

  • Debian and Ruby on Rails installed on SD card

  • PostgreSQL

  • Installed bcm2835 lib from: www.airspayce.com/mikem/bcm2835

Setup (on your Raspberry PI):

  • “git clone” this repository in /home/pi/Projects/ or any other directory (but change config/schedule.rb accordingly)

  • run “bundle install” to install gems

  • run “whenever –update-crontab” to set up cron jobs

  • run “rake db:create db:migrate” to set up database

  • reboot Raspberry Pi

Usage:

Current status from sensor should be available, check your.raspberry.IP/current and your.raspberry.IP/statuses

Sensor readings will be saved to database automatically via Crontab jobs every 3 minutes (if readings have changed). Application is started on every boot, so after setup you can leave an forget about it :)

If you are not a computer:

Future plans:

  • make whole app as an image to put directly on RasperryPi’s SD (zero setup)

  • handle dynamic IP’s with dynamic dns service

About

Raspberry Pi based smart garden API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published