fbpx

Making Voice App for Home Automation using VoiceFlow for Alexa

We here at Techiesms have made several projects using Alexa, be it for controlling appliances or fetching sensors data. But, till now we have used third party platforms like Sinric or IFTTT or many other cloud servers. But in here today, we will be creating our own voice applications for Alexa.

Creating our own voice application for Alexa will give us complete freedom. We will be able to configure our project according to our needs, our demands and purpose which is not generally possible with these third party applications.

Components Required

  1. ESP8266 12e development board(NodeMCU) (http://amzn.to/2BKS7cv)
  2. 4 x 5V Relays (http://amzn.to/2ChddQC)
  3. 4 x 1n4007 Diode (http://amzn.to/2EM4IuD)
  4. 4 x BC547 transistors (http://amzn.to/2oiTbfV)
  5. 4 x 330ohm resistors (http://amzn.to/2ojg8zN)
  6. 16 channel analog multiplexer module (http://amzn.to/2mLwlfl)
  7. PIR motion sensor (http://amzn.to/2EK1OX2)
  8. MQ135  sensor (https://amzn.to/2SKFBR4)
  9. Sound Sensor (http://amzn.to/2HCYO0z)
  10. Light Sensor (http://amzn.to/2CcBAPr)
  11. DHT11 Temperature and Humidity sensor(http://amzn.to/2sPh3fO)
  12. 7805 Regulator IC (http://amzn.to/2CdUvcq)
  13. 9V Power Adapter (http://amzn.to/2CfffAL)
  14. 4 x 2 pin PCB mount screw terminal (http://amzn.to/2EM5Luz)

Connection Diagram

PCB Design and Gerber File

As there were a lot of connections in this project, I just designed my own custom PCB for it on EasyEDA.com . Now if you want the Gerber file or the design of PCB for this project, then you can get it by going to my EasyEDA account.

You can just click here and this will re-direct you to the page where you can find the design of this PCB.

Working of the project :-

Firstly, we create a project using the Blynk IoT platform that we have already made several times using the NodeMCU and Blynk. Now as our project is already connected with the Blynk server we need to make our voice app in such a manner that it will fetch a API link according to the commands.

For creating the voice application we will be using Voiceflow. If you don’t know what Voiceflow is, you can check out this video of mine. CLICK HERE!

So, in voiceflow you get a canvas in which you can put blocks for making your own custom voice application. Using those I have created this application. Have a look.

In the image you can see, as soon as the voice application starts Alexa will be greeting us by saying, Hey! Welcome to the studio, which appliance do you want to control. After telling this it will be waiting for the user’s input. If the input by the user does not matches any of the eight provided choices it,ll again run wait for the input saying, “Oops! That appliance is not added in the system try controlling any other appliance” But, if it matches any of the choice then it’ll go to the API block and request the API to turn on or off the appliance through Blynk. Apaart from this we also need to add a header that is content type and application.json.

That’s basically it about the working. This is how the API looks :-

http://188.166.206.43/auth_token/update/pin_number?value=1

Video tutorial:-

If you have any confusion or you want to understand the project in much more detail. You can have a look to my YouTube video.