Giter Site home page Giter Site logo

dht22-lcd-snmp's Introduction

Readme

Devices

DHT22 Probe:

https://www.amazon.co.uk/gp/product/B07FM8BMWD/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

LCD Screen

https://www.amazon.co.uk/SunFounder-Display-Ardauino-Mega2560-IIC2004/dp/B01GPUMP9C/ref=pd_rhf_ee_s_rp_c_3_2/257-5943342-5061712?pd_rd_w=bWGxe&pf_rd_p=319d03f2-5e2d-4ea1-9213-1d86496172d6&pf_rd_r=9WRVMXDGFWAKG5Q4V4PN&pd_rd_r=ea51c56e-9b1c-41c0-92bd-60cf96e6795e&pd_rd_wg=GQeoQ&pd_rd_i=B01GPUMP9C&psc=1

Connections

DHT22 Probe:

Positive (+) to 3.3v
Out to Gpio pin, (in this case 17)
Negative (-) to Ground

LCD Screen

GND to Ground
VCC to 5v
SDA to GPIO2 (SDA)
SCL to GPIO3 (SCL)

Installation

sudo apt-get install python3-pip
git clone https://github.com/tomdoyle87/DHT22-LCD-SNMP.git
cd DHT22-LCD-SNMP

SNMP

cp {DHT-hum-snmp.py,DHT-temp-snmp.py} ~
touch ~/humid.txt ~/temp.txt
pip3 install adafruit-circuitpython-dht
pip3 install board
sudo cp {humid,temp} /usr/local/bin/
sudo chmod 755 {/usr/local/bin/humid,/usr/local/bin/temp}

Now add the following to /etc/snmp/snmpd.conf:
pass .1.3.6.1.2.1.25.1.8.2 /bin/sh /usr/local/bin/temp
pass .1.3.6.1.2.1.25.1.8.1 /bin/sh /usr/local/bin/humid

LCD Screen

cp display.py ~
sudo apt-get install i2c-tools
pip3 install smbus
pip3 install vcgencmd
pip3 install datetime

Systemd-Timers

sudo cp {get-temp.service,get-temp.timer,lcd-temperature.service,lcd-temperature.timer} /etc/systemd/system/
sudo systemctl enable get-temp.timer
sudo systemctl start get-temp.timer
sudo systemctl enable lcd-temperature.timer
sudo systemctl start lcd-temperature.timer

Sources:

http://www.kbza.org/2013/07/04/sensor-de-temperatura-snmp-con-raspberry-y-cacti/
https://howchoo.com/pi/how-to-make-a-raspberry-pi-smart-alarm-clock
https://github.com/fede2cr/raspberry-pi_snmp/tree/master/sensor-DHT
https://osoyoo.com/2016/12/01/use-raspberry-pi-display-temperaturehumidity-to-i2c-lcd-screen/

dht22-lcd-snmp's People

Contributors

tomdoyle87 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.