Git Product home page Git Product logo

smart_garden's Introduction

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

smart_garden's People

Contributors

stirkac avatar

Stargazers

Matt Hahn avatar  avatar

Watchers

 avatar  avatar

Forkers

ecornuet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.