VINU GEORGE
Published

Temperature Monitor System For Greenhouse

This system monitors the temperature inside a Greenhouse and alerts by sending a message to your mobile when the temp goes out of range.

IntermediateFull instructions provided800
Temperature Monitor System For Greenhouse

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
Temperature Sensor
Temperature Sensor
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
Bolt IoT Android App
Bolt IoT Android App
SMS Messaging API
Twilio SMS Messaging API

Story

Read more

Schematics

LM35 connection with Bolt Iot module

Code

Python code for Greenhouse Temperature Monitor System

Python
import conf
from boltiot import Sms, Bolt
import json, time

max_limit=32
min_limit=24
mybolt=Bolt(conf.API_KEY, conf.DEVICE_ID)
sms=Sms(conf.SID, conf.AUTH_TOKEN, conf.TO_NUMBER, conf.FROM_NUMBER)

while True:
	print("Reading temperature")
	response=mybolt.analogRead('A0')
	data=json.loads(response)
	print("Greenhouse is : "+str(round(int(data['value'])/10.24,2))+" degree celsius")
	try:
		sensor_value=int(data['value'])
		temperature=round(sensor_value/10.24,2)
		if temperature>max_limit:
			print("Making   request to Twilio")
			respons=sms.send_sms("Greenhouse temperature is "+ str(temperature)+" degree celsius. Temperature exceeded maximum limit. Deploy cooling measures ")
			print("Response received from Twilio is: "+str(respons))
			print("Status of sms is: "+ str(respons.status))
		elif temperature<min_limit:
			print("Making   request to Twilio")
			respons=sms.send_sms("Greenhouse temperature is "+ str(temperature)+" degree celsius. Temperature exceeded minimum limit. Deploy heating measures ")
			print("Response received from Twilio is: "+str(respons))
			print("Status of sms is: "+ str(respons.status))
	except Exception as e:
		print("Error: Details")
		print(e)
	time.sleep(300)

Credits

VINU GEORGE

VINU GEORGE

1 project • 1 follower

Comments