Rupesh Ingale
Published © GPL3+

Temperature Alert System using Bolt Iot and Twilio

The project use to notifies through SMS when the temperature crosses the limit.

BeginnerFull instructions provided4 hours994
Temperature Alert System using Bolt Iot and Twilio

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

Circuit Connection

Code

tempSMS.py file

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

minimum_limit = 20
maximum_limit = 30  


mybolt = Bolt(sconf.API_KEY, sconf.DEVICE_ID)

sms = Sms(sconf.SID, sconf.AUTH_TOKEN, sconf.TO_NUMBER, sconf.FROM_NUMBER)

while True:
    print ("Reading sensor value")
    response = mybolt.analogRead('A0')
    data = json.loads(response)
    print("Sensor value is: " + str(data['value']))
    try:
        sensor_value = int(data['value'])
        Temprature= (100*sensor_value)/1024
        print("The current temperatue is :",Temprature)
        if Temprature > maximum_limit or sensor_value < minimum_limit:
            print("Making request to Twilio to send a SMS ")          
            response = sms.send_sms("The Current temperature sensor value is " +str(Temprature))
            print("Response received from Twilio is: " + str(response))
            print("Status of SMS at Twilio is :" + str(response.status))

    except Exception as e:
        print ("Error occured: Below are the details")
        print (e)
    time.sleep(10)

Credits

Rupesh Ingale
1 project • 1 follower

Comments