I got an Amazon Echo Dot and immediately wanted to integrate it with Bolt. The best way to get started was by glowing the LED a.k.a 'Hello World' of Hardware world.

Here is a video of the project in action:

It's Magic

This is my first project on Hackster.io so would love to know your feedback and suggestions for the project.

This project is based on the Bolt IoT Platform. Here is a money saving trick. You can get a Bolt WiFi Module and Cloud with Lifetime Access for just $12 now on Kickstarter for a limited time. The Lifetime cloud access is only for the early adopters of the platform via Kickstarter.

Full disclosure: I am the Co-Founder and CEO of the Bolt IoT Platform. So I will praise it quite frequently during this blog, of course, because I have to sell it but mainly because I sincerely believe that is the best IoT platform ever. I have used many other IoT Platforms in the past and Bolt makes IoT development seamless like none other.

In this project, I have assumed that you have already linked your Bolt WiFi module with your Bolt cloud account. If you have not yet done so, please download the Bolt IoT app for iOS and Android and follow the steps in the App.

Here is how the information flows:

Words from your mouth -> Amazon Echo -> IFTTT -> Bolt Cloud via APIs -> Bolt WIFi Module -> LED

Step 1: Hardware Setup

Plug the longer end of the LED in the Pin 0 of Bolt WiFi module shorter end to the ground pin (GND).

Power on the Amazon Echo and Bolt WiFi Module.

Step 2: Getting the Bolt API Key and Device ID

Login to cloud.boltiot.com and note the ID of your Bolt WiFi Module.

Now click on the API Tab and under the section for Generate Key, click on Enable.

API Key Setup in Bolt Cloud

Next click on the copy button to copy your API key. Your API key will may look something like this: f1f918e9-d9c2-4e5b-aed0-b7cb743f74cf

Step 3: Writing the GPIO Control Command

Since LED is a digital output device, we will need to get a Digital Write command that can be sent to Bolt over the Internet to switch on the LED.

In Bolt Cloud go to Docs Tab -> API Documentation -> GPIO Commands API -> Write Digital Output

The command to write digital output is:

https://cloud.boltiot.com/remote/f1f918e9-d9c2-4e5b-aed0-b7cb743f74cf/digitalWrite?pin=0&state=HIGH&deviceName=BOLT13819450

Make sure that you change the API Key to your own API Key and device ID which you got in the previous step.

If you have connected the LED to any other pin other then Pin 0 then make a suitable change in the pin no in your code.

Step 4: IFTTT integration via Alexa and Webhooks

Go to IFTTT to create a new applet by clicking here https://ifttt.com/create

Click on +This

Choose Amazon Alexa -> Say Specific Phrase

Type the phrase you want to trigger the action. I used 'lights on' and click on 'Create Trigger'.

Click on +That

Select Webhooks and then Make a web request

Enter the API URL you got in the previous Step. Make sure that you change the API Key and device name.

Method will be GET

Content type will be Application/json

Here is how your screen will look like

IFTTT Screenshot

Click on 'Create Action' and then Click on 'Finish'

Now do the same process for a command to switch of the LED. Here you will change the state to LOW i.e. state=LOW in your code. Here is a sample of the code. Also, add a suitable phrase to switch off the LED.

https://cloud.boltiot.com/remote/f1f918e9-d9c2-4e5b-aed0-b7cb743f74cf/digitalWrite?pin=0&state=LOW&deviceName=BOLT13819450

That's it. You are done.

Now switch on your Alexa, Bolt WiFi Module and say the words to see the magic happen.

If you want to build this project then click here to get a Bolt IoT Platform.