GithubHelp home page GithubHelp logo

shurik2533 / growbox Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 3.0 127 KB

Code for my smart growbox experiment

License: Apache License 2.0

Python 100.00%
growbox smart-growbox greenhouse greenhouse-control-system raspberry-pi sensor gpio

growbox's Introduction

Growbox

Code for my smart growbox experiment.

Growbox control based on Raspberry Pi. Supported devices/sensors:

  • Themperature sensors: DS18B20
  • 16-Bit ADC: ADS1115
  • Multiple channel relay
  • Humidity and Temperature Sensor: Si7021-A20
  • PWM fans control
  • CO2 and Temperature Sensor: MH-Z19

Prepare

  • sudo apt-get install -y python-smbus
  • sudo apt-get install -y i2c-tools
  • Enable 1-Wire on your Raspberry Pi
  • Enable I2C on your Raspberry Pi
  • Install requirements.txt for project Python environment
  • create config/db.py with the following content
USER = '***'
PASSWORD = '***'
DATABASE = '***'
HOST = '***'
PORT = '***'

Running

Works only with sudo because of CO2 sensor use /dev/serial0 which requires root permission

sudo python3 growbox.py

Run as a service

sudo apt-get install supervisor

Create a config file for your daemon at /etc/supervisor/conf.d/growbox.conf

[program:growbox]
[program:growbox]
directory=/home/pi/growbox
command=sudo python3 growbox.py
autostart=true
autorestart=true
stderr_logfile=/home/pi/growbox/logs/supervisor.err.log
stdout_logfile=/home/pi/growbox/logs/supervisor.out.log
stdout_logfile_maxbytes=0

Restart supervisor to load your growbox.conf`

sudo supervisorctl update
sudo supervisorctl restart growbox

Growbox dashboard project

https://github.com/shurik2533/growbox_panel

growbox's People

Contributors

shurik2533 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.