Skip to main content

Temperature and Humidity Monitoring Notifications




Temperature and Humidity Monitoring Project with GrovePi and Hologram Nova

A Temperature and Humidity Grove sensor is used in this project to measure relative humidity and temperature. It provides relative humidity measurement expressed as a percentage of the ration of moisture in the air to the maximum amount that can be held in the air at that temperature. The relative humidity changes with temperature as air becomes hotter and it holds more moisture.



Things used in this project:

Things used in this project:

Hardware components:

Software Apps:

  • GrovePi 
  • Python
  • Hologram CLI

GrovePi Zero is a HAT from Dexter Industries  that allows Grove PIR motion sensor to connect to Raspberry Pi zero with out needing soldering or breadboards. One can plug in the Grove water sensor start programming.

Grove Temperature and Humidity sensor works with digital I/O pins and it can be connected to D3 port Grove Pi Zero as shown below.
The installation instructions for Grove Pi zero and Hologram SIM are provided here .


The following program (temphumidity_sensor_led.py) checks the temperature and humidity sensor output sets the text on LCD.

First  a cellular connection is established using the credentials that uses a devicekey obtained from Hologram dashboard. 


After execution of the above program, the status is displayed on the LCD as shown in the picture.

 $ sudo python temphumidity_sensor_led.py


from grovepi import *
from grove_rgb_lcd import *
from time import sleep
from math import isnan
from Hologram.HologramCloud import HologramCloud


# Provide Hologram device key
credentials = {'devicekey': 'xxxxxxxx'}
hologram = HologramCloud(credentials, network='cellular')


dht_sensor_port = 3 # connect the DHt sensor to port 3
dht_sensor_type = 0 # use 0 for the blue-colored sensor

# set green as backlight color
# we need to do it just once
# setting the backlight color once reduces the amount of data transfer over the I2C line
setRGB(0,255,0)

while True:
        try:
        # get the temperature and Humidity from the DHT sensor
                [ temp,hum ] = dht(dht_sensor_port,dht_sensor_type)

        # display temperature and humidity values on LCD 
       
                if temp > 0.0 :
                  setText_norefresh("Temp:" + str(temp) + "C      " + "Humidity :" + str(hum) + "%")

                if temp > 45:
                 response_code = hologram.sendMessage("High Temperature " +str(temp) +" C")

                if hum > 60:
                 response_code = hologram.sendMessage("High Humidity " +str(hum) +" %")

        except (IOError, TypeError) as e:
                print(str(e))

        except KeyboardInterrupt as e:
                print(str(e))
                break

        # wait some time before re-updating the LCD
        sleep(0.5)


After reading the digital input from port D3 it displays the sensor value on the LCD and it also sends notification using cellular network if the sensor value  for temperature or humidity exceeds the predefined threshold values.

Configure routes in Hologram dash board to send the notifications (e.g., SMS, email etc).





Comments

  1. Wow, What an Excellent post. I really found this to be very informative. It is what I was searching for. I would like to suggest that you please keep sharing such type of information. watlow f4t

    ReplyDelete
  2. I am very happy to say that this is an interesting post. I learned new information from your article, you are doing a great job. Thanks for sharing this kind of blog. roxtec cable glands

    ReplyDelete
  3. With almost every rain barrel set up, you will need to use a rain barrel diverter. This takes the water from the downspout and directs it into your barrel, where it can be stored for safe use. Read this article to know the process, explained by Helen Miller

    ReplyDelete
  4. Whether you're adding a new shower or updating an existing one, you'll be making all sorts of crucial decisions, not the least of which is what type of doors to buy. GoGlass

    ReplyDelete
  5. The King Casino - Atlantic City, NJ | Jancasino
    Come on in poormansguidetocasinogambling the King Casino for gri-go.com fun, no wagering requirements, 1xbet app delicious dining, and enjoyable casino gaming all at หาเงินออนไลน์ the heart https://jancasino.com/review/merit-casino/ of Atlantic City.

    ReplyDelete

Post a Comment