We often hear about instances where buildings are on fire, but by the time the firemen arrive, the entire property has been destroyed. Moreover, in their state of panic, the owners are not able to think quickly and hence the damage done extends to a higher level. This project "Fire Alert vis SMS using Bolt IoT" aims to solve this problem.
Hardware setupStep 1: Connect the circuit as follows:
- The VCC pin (Vs)of the LM35 connects to 5v of the Bolt Wifi module.
- The output pin(Vout) of the LM35 connects to A0 (Analog input pin) of the Bolt Wifi module.
- The GND pin of the LM35 connects to the GND.
- The positive pin of the buzzer connects to the GPIO pin 0 of the Bolt IoT Wifi module.
- The negative pin of the buzzer connects to the GND. Use the breadboard as required.
Step 2:Connect the USB Cable to the Bolt IoT Wifi module and then to the electric source
Step 3:Now that our hardware setup is ready, connect the Bolt IoT wifi module to the Bolt IoT Cloud using Bolt IoT Android App.For reference one can go through the following link to understand better, https://docs.boltiot.com/docs/setting-up-the-bolt-wifi-module
Software ProgrammingBefore starting the coding part we will be needing credentials of Bolt IoT Cloud and Twilio.
Bolt IoT Cloud credentials:-Step 1:Login to your Bolt Cloud account or create one by visiting https://cloud.boltiot.com/register/
Step 2:In theAPI section(present on the left side tab) you will get the API Key and Device Id which we will be using further in the coding part.
Step 1:Go to the Twilio website and log in using your email id. https://www.twilio.com/login
Step 2:Go to Console where you will find your Trail number, Account SID and Auth Token.
Now moving on to the coding part for that you will be needing Ubuntu LTS platform which works on Windows smoothly.
Step 1:Download latest version of Ubuntu LTS (https://ubuntu.com/download/desktop)
Step 2:Installing Bolt Python Library for that we need to execute the following commands,
sudo apt-get -y update
sudo apt install python3-pip
sudo pip3 install boltiot
Step 3:In Ubuntu LTS terminal create file conf.py where you will put every credential which we gathered, using the command sudo nano 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'
To save press CTRL+X and then Y and ENTER.
Step 4:Now for the main code create file, fire_alarm.py using the command sudo nano fire_alarm.py
Step 5: For executing the code using sudo python3 fire_alarm.py
It will continuously check the temperature and if it exceeds the max_limit temperature then the buzzer will start buzzing alerting the nearby people and will send an SMS via Twilio to the user by mentioning the current temperature.
The fire alert system alerts the user as it detects high raised temperatures that too by SMS where distance doesn't matter. This will help users to know about the fire incidence no matter where they are in the world. Even the buzzer present will alert the neighbourhood about the immediate fire emergency.
Comments