With the fast-moving world and everything moving towards automation, smart devices are at most demand. Smart Garage is one such device which will make the life of the user easy. It will also ensure the safety of the garage by sending SMS alerts. Open and close the garage using your google assistant and get a SMS alert message every time you do so. Also equipped with a smart lighting system which remains ON till the garage door is open. The parking assistant lets the user park their vehicle without any hassle. All in all, this user-friendly smart garage will help the user lead a comfortable life.
Step 1: Connect Google Assistant and Bolt Cloud via IFTTT- Create an account on IFTTT.
- Click on create button --> +This button --> Search for Google Assistant --> Choose Trigger : Say a simple phrase --> Fill in the details and click on Create Trigger --> Click on +That button --> Search for Webhooks --> Choose Action: Makea web request --> Fill in the details - URL: https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=0&state=HIGH&deviceName=DEVICE_ID (Please replace API_KEY and DEVICE_ID with your API Key and Device ID. You will find it on bolt cloud) --> Create Action --> Review and Finish.
- Now repeat the same process for Closing the Garage. In the URL change state=LOW (https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=0&state=LOW&deviceName=DEVICE_ID)
- Your Bolt cloud is now linked to your Google Assistant. Make sure you are using the same mail ID. You can check for the functionality by simply connecting a LED to pin 0 of the Bolt Wi-Fi module.
Any cloud computing platform can be used for this. I have used AWS.
- Create an account on AWS.
- After verification of your account, create an EC2 Instance. Choose only free tier eligible products to avoid billing.
- Click on Launch Instance --> Choose Ubuntu Server 16.04 LTS (HVM) --> Choose t2.micro--> Review and Launch --> Launch --> Choose Create a new key pair and enter the key pair name of your choice --> Download Key Pair (.pem file)--> Launch Instance
- To convert.pem file to.ppk file download puttygen software.
- Use putty software to login into your ubuntu machine. Enter the IP address of your Ubuntu machine --> click on "+" sign next to SSH --> click on AUTH --> browse and add the key pair that you had downloaded while launching your instance --> click on Open
- login as - ubuntu
- After logging into your cloud server, download the latest Python libraries and the Bolt Python libraries as you will use it for writing your code. sudo apt-get -y update sudo apt install python3-pip sudo pip3 install boltiot
- Create an account on Twilio and note down the SID, Auth Token and the phone number generated.
- Create a file named
conf.py
which will store all the credentials related to Twilio. To create a new file typesudo nano conf.py
in the terminal. After that write below code to save all the credentials in a single file. 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' press ctrl+x then y to save the file. - Now create one more file named garage.py and type the code given in the attachment below.
- Download Arduino IDE and install it on your laptop.
- Type the code given in the attachment below.
- Do the circuit connections as given in the circuit diagram.
Your smart garage is ready to serve you.
Working:Say "ok google, open garage" and the garage door will be opened for you and an SMS will be sent to your phone saying that you have opened the garage door. When the garage is open, Smart Lighting System turns ON the lights automatically and the Parking Assistant will blow the buzzer when you are too close to the wall. Say "ok google, close garage" and the garage door will be closed and the Smart Lighting System and Parking Assistant will be turned OFF for you. An SMS will also be sent to your phone saying that you have closed the garage door.
Comments