Fay on the Rocket !!

[IOT] How to turn On/Off light with your voice

Date : Wednesday,26 August 2020
Writer : Ataya P

It is the begining of IOT(Internet Of Things) era. So, I've made smart home prototype project to control light with google assistant voice command. Let's see how to make it works.

Ingredients :
1. Arduino Uno Board.
2. True NB IOT shield.
3. LED as your light tube.
4. Ubidots account.
5. IFTTT account.

Detail :
1. This is system flow. You speak specific command phase to your smart phone with Google Assistant. Then Google assistent send your command to IFTTT and it will transfer command to Ubidots specific URL to change the LED status as you had set before. With The True NB IOT shield and Arduino board that keep pooling LED status will turn LED On/Off as you said.
System Flow

2. First you need to set your Ubidots dashboard to be able to display and control LED status for IOT board.
Ubidots Dashboard

3. At IFTTT website, select 'Create' menu.
Create menu

4. Click on '+' sign
IF + This

5. Select 'Google Assistant'
Select Google Assistant

6. At Choose Trigger, Select 'Say a simple phrase'
Say a simple phrase

7. Input your pharse. For me I want to say "Turn Off the lights" to turn off the light.
Turn Off the lights

8. Click on '+' on That.
+ That

9. Select 'WebHooks'
Select WebHooks

10. Input your Ubidot device URL with your Token ID. Select Method as POST, Content type as application/json and input the body to ("lamp":0) which lamp is LED variable and 0 for turn off the light.
Enter Ubidot device URL

11. IFTTT setting finish here. Do the same setting for turn on the light.
Finnish Setting

12. Say "OK Google" to your smartphone and say the magic phrase "Turn On the Light"
Say Turn On the Light

13. Check on the board. If LED is turn ON then it's Working !!
Light On

14. Say the phrase "Turn Off the Light"
Say Turn Off the Light

15. Then the LED will turn OFF. Enjoy the Future !!
Light Off

Custom Search