Shalabh Sharma
Published

REMOTELY MONITORED HIGH TEMPERATURE ALERT SYSTEM by BOLTIOT

Inexpensive IOT based system to safeguard costly equipment ranging from thousands to crores by remotely providing rise in temperature alert.

IntermediateFull instructions provided3 hours465
REMOTELY MONITORED HIGH TEMPERATURE ALERT SYSTEM by BOLTIOT

Things used in this project

Hardware components

BOLT Mobile Adapter
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
BOLT LM35 Sensor
×1

Software apps and online services

Snappy Ubuntu Core
Snappy Ubuntu Core

Story

Read more

Code

Remote High Temperature alert Monitoring System

Python
Codes are distributes in two Files. Configuration Files(conf.py) And Main File(temp_sms.py)
#Conf.py

SID = 'You can find SID in your Twilio Dashboard' 
AUTH_TOKEN = 'You can find  on your Twilio Dashboard' 
FROM_NUMBER = 'This is the no. generated by Twilio. You can find this on your Twilio Dashboard'
TO_NUMBER = 'This is your number. Make sure you are adding +91 in beginning'
API_KEY = 'This is your Bolt Cloud accout API key'
DEVICE_ID = 'This is the ID of your Bolt device' 



#temp_sms.py

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

minimum_limit = 300
maximum_limit = 600  


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 sensor value")
    response = mybolt.analogRead('A0') 
    data = json.loads(response) 
    print("Sensor value is: " + str(data['value']))
    try: 
        sensor_value = int(data['value']) 
        if sensor_value > 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(sensor_value))
            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

Shalabh Sharma

Shalabh Sharma

1 project • 0 followers

Comments