In the present day scenario, all our basic needs and services are integrated by electronic devices. These devices are power-hungry and are delicate, which make them vulnerable to harsh environments.
Due to the immense flow of energy through these electronic appliances, there is a wide range of possibilities for major fire accidents. So, In order to safeguard these appliances and to save lives, there is a potential need for a Smart application which detects such incidents and quickly notify the concerned authorities, so that any further problems can be quickly resolved.
This Fire Alarm System can be used in the following scenarios: -
- Pharmaceutical Industries.
- Schools/Colleges etc.
- Buildings/ Factories etc.
The above demonstration shows the working of the mechanism.
Now let's see how to build such a mechanism in detail.
Step 1: Setting up BOLT Cloud Account & Configuring BOLT Module- Sign up for the BOLT Cloud account from this link https://cloud.boltiot.com/
- Then power on your BOLT Module with the USB cable.
- Initially, a Blue LED Starts Blinking Slowly which indicates that the module is ON but is not connected to the network (Wi-Fi).
- Now use the BOLT Android App to connect the module to the wifi.
- As, soon as you open the App, Login with the same credentials as the BOLT Cloud.
- Then tap on the Add Device button on the bottom of the screen & Follow the steps mention on the screen carefully.
- After the Setup is complete the Green LED turn ON which indicated that the device in Online which can also be seen on the Devices section on the BOLT Cloud page. i.e, Devices > STATUS
- Sign up for the Twilio Service Here: - https://www.twilio.com/
- After setting up the account, Go into the settings tab and Note down the SID and the Authentication key for the account.
- In the Programmable Messages section Signup in it and verify your number. Later you will be allocated with an international number, kindly note it down.
- Sign up for the Telegram through the Telegram App on the App Store/ Play Store using your mobile number.
- Then On the chat search type BotFather and tap on the first result with a bluetick.
- In that tap on start and then create a bot. Then set a valid name for your bot.
- Name the bot and note down the token with a prefix of bot[xxxtokenxxx].
- Then come back to the home screen of telegram and on the Left hamburger menu Add a New Channel.
- And in that channel add the bot that you have created through bot father as an administrator in the setting of the channel. Also, note down the ChannelChatID which is the Channel Type i.e. @xxxxxxxxx.
- On the BOLT Cloud, go to the Devices menu on the left side and check whether your module in online or not. Then select the 3 dots button the dashboard and select Device Info.
- Select the update the firmware version option. (SKIP THIS STEP IF IT IS UP TO DATE).
- After updating. Go into the products menu and click on "+Add Product" option. Then name your product and select the type as "INPUT DEVICES" & "GPIO".
- After you finish creating the product, Click on the "Link Device to this Product" option on the top right panel.
- And then link your bolt module to the product. Now you bolt module will be visible on the product Dashboard.
- Then select the "ConfigurethisProduct" option on the top right panel.
- Now in the Hardware panel, select the A0 Radio Button on the boards schematic and then on the right panel set the variable name as "temp".
- In the Code panel, input a name to your file and select the file type from the dropdown as ".js".
- For the JavaScript code, please refer to the CodeSection below.
- Then click on the safe button and exit the menu.
- Parts required for the project are: -
- Give proper board connection as per the diagram below: -
- After giving proper connection Power on the device and on the product's dashboard, click on the "Deploy Configuration".
- Then click on the "View this device" option which directs you to a new page where your data is represented in a Graphical method.
- The online cloud service that we will be using here is from Digital Oceans.
- Sign up for the Digital Ocean account here: - https://www.digitalocean.com/
- After Signing up select create a droplet. Secondly, select the basic 5$ /month plan to get started with and then select Ubuntu 64-bit as the operating system. Then set the root password for your OS.
- Once your operating system is set up note down the IP address of the VPS from the Dashboard.
- Then in your computer install putty client software to access your cloud droplet. Type the IP address of your droplet and then press enter.
- It will ask you for the login credentials where you need to enter your Username (Mostly root for ubuntu ) and the password (One which you have set up earlier as the root password.). Then you will be logged into the terminal.
- Enter the following commands one after the other to complete set up and to install the bolt library.
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt install python3-pip
sudo pip3 install boltiot
Step 6: Creating a Directory and coding necessary files- Create a working directory.
cd ~
sudo mkdir BOLT_WorkSpace
- Make a python file which consists of the necessary credentials for the project (Auth codes and API codes etc.).
sudo nano config.py
- For the code in the config.py kindly refer the Code Section below. After writing the code, press the keys Ctrl+X --> Y --> Enter, this saves the file.
- In the same directory make another python file which consists of the main code for the project.
sudo nano Fire_Alert.py
- For the code in the Fire_Alert.py kindly refer the Code Section below. After writing the code, press the keys Ctrl+X --> Y --> Enter, this saves the file.
- After completing all the steps above, run the python program.
python3 Fire_Alert.py
OUTPUT RECEIVED on the command line:
Message Alert in the form of SMS from Twilio & on Telegram.
Graphical Representation of Data in the form of Multiple Graph (Line, Bar & Scatter):
Comments
Please log in or sign up to comment.