Meenakshi Dhruvan
Published © GPL3+

"BE AWARE" ! e-owner waiting....

There comes an end to the people who escape from their landlords. Late night entries will soon dwindle or it will have a right approach.

IntermediateFull instructions provided3 hours246
"BE AWARE" ! e-owner waiting....

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
LED (generic)
LED (generic)
×1
Buzzer
Buzzer
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×2
Male/Male Jumper Wires
×5
Breadboard (generic)
Breadboard (generic)
×1
LDR, 5 Mohm
LDR, 5 Mohm
×1
Resistor 10k ohm
Resistor 10k ohm
×1

Software apps and online services

IFTTT google assistant
ifttt webhooks
Bolt Cloud
Bolt IoT Bolt Cloud

Story

Read more

Schematics

The hardware connections

Connect according to this schematic diagram

Code

Code of configurations

Python
Hold the configuration variables Boltiot and twilio
SID ='ACf58acbd1357cf9f948727481344f191d'
AUTH_TOKEN = 'c1f4e60b9ac62132375e4aa8bcddd3ad'
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 api'
DEVICE_ID = 'BOLT291577'

light.py

Python
The operational part
import conf
from boltiot import Sms, Bolt
import json, time


maximum_limit = 1024  


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:
            print("Making request to Twilio to send a SMS")
            response = sms.send_sms("The Current ldr sensor value is " +str(sen$
            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

Meenakshi Dhruvan
1 project • 0 followers
Passionate about iot. Continuing bolt journey along with my engineering degree.

Comments