Going to sense the water drops from the rain fall and intimate you ASAP. This makes you alert for taking off your belongings back which is drying outside such as clothes, vathal(Munchies), chillies etc immediately. This can instantly send messages to you via mail, sms and telegram with the help of bolt iot cloud. Using this as an core I can add a futuristic feature in future. As soon as the rain detected an horizontal motor placed pulls out a transparent shield, which covers the belongings like drying clothes, chillies, plants etc. from the rainfall. So, this helps to keep you cool rather than rushing fastly to take off your belongings. Interesting right! But in this module I have done only the Rain alert system(RAS) but in future I can try it out.
We need the following:
"""Configurations for Rain_alert_system"""
bolt_api_key = "980fa1a1-d5" # This is your Bolt Cloud API Key
device_id = "BOLT67" # This is the device ID and will be similar to BOLTXXXX
telegram_chat_id = "@arjun_" #This is the channel ID of telegram channel.paste after@
telegram_bot_id = "bot87317" # This is the bot ID.
SID = 'AC641d6db' #Twillio sid
AUTH_TOKEN = 'ef2bb5c753c0a38e6' #Twillio auth token
FROM_NUMBER = '+13623' #Twillio number
TO_NUMBER = '+91869'#Recipient number
MAILGUN_API_KEY = 'a25e18948e08d85cfe7b7' #Mailgun api
SANDBOX_URL= 'sandbox22f028b1420c1c8.mailgun.org' #sandbox url
SENDER_EMAIL = 'test@sandbox2c8.mailgun.org'#Paste above url after "test@---"
RECIPIENT_EMAIL = 'sr.arjun3@gmail.com'#Recipient mail id
threshold=1024 #these are the threshold values you must take
threshold1=950
threshold2=850
threshold3=500
threshold4=10
"""Actual data may vary! I have changed my data for privacy"""
TwilioUse this link:https://www.twilio.com/
- Head to the website and signup your account.
- Verify your email id and phone number.
- fill the procedures as mentioned.
- After setting up your account do these things.
Use this link:https://www.mailgun.com/
- Create a account.
- Verify your mail id.
- Do the following.
- Install Telegram app from playstore.
- Do as mentioned and verify your number.
- Create channel as follows.
- Create a bot as follows.
- Sign in to your account.
- Copy and paste the API key, Bolt Device ID as follows.
Use this link to download https://www.ubuntu.com/download/server
You can use any one of this as follows:
- Use Digital Ocean service(https://www.digitalocean.com/)
- Use Raspberry Pi to install it.(I used this in this project)
- Use Virtual Machine to install.(https://www.vmware.com/in/products/workstation-pro/workstation-pro-evaluation.html)
After installing the Server Login into it.
**If the above steps are complex.Do install any linux os and use Terminal of it to work.It will work fine no problem(I tried that).**
STEP 3: Implementing the projectAfter installing Follow the steps:
- Login into the system.
- install the necessary packages by using these commands.
sudo apt install python3-pip #"Do it one after one"
sudo pip3 install boltiot
- Pause it here.
- Give the connection to the module as provided in the schematic diagram.
- Power on the module.
- Get the device connected to WIFI.
- after the device turns green led on.
- Resume the process now.
- Use this command to create a file by this command.
sudo nano rain_alert.py
- paste the code in the following.(Provided at last)
- Press Ctrl+X then press Y and then press Enter to save it.
- Execute the code by using this code.
sudo python3 rain_alert.py
- Your code will get execute successfully as shown in the video down below.
- Use Ctrl+C to interrupt the program from loop continuously.
- The above shown video can be taken as reference for the execution process.
- SMS Output.
- Email Output.
- Telegram Output.
I hope that I have made you understand my project. If you have any Doubts, suggestions or any queries don't hesitate to drop them in the comment box below.#Thank you all.... for reading and hit the like button if you like my project and do it. Have a Colorful day Ohana!
Comments