top of page
Writer's picturesaber kerayehchian

Making smart home tutorial with Amazon Alexa Part 1

Updated: Mar 20, 2021

Hello All, As I moved to my new home I decided to make all my home smart, as a lazy person I need to make anything smart, like lights, thermostats, etc and I'm sharing every step with you...

to make the first project I'm starting from the kitchen lamp, the place never I go so if my project doesn't work I don't lose that much :)


 

In this project we learn :

  1. How to program nodemcu (ESP32)

  2. How to use fauxmoESP to emulate Philips hue

  3. How to control lamp with Alexa


 

The things we need :


 

Let's get started




First, if you don't have Arduino IDE you should download and install it, if you have any problem with installing or downloading there are many courses about how to use the internet :) just kidding



How this works:

the main purpose is to control the kitchen light with Alexa, when you ask Alexa to discover a new device Alexa starts to search and ask all of the devices in the local network or understand there is any familiar face or not, so? if we connect our ESP32 to wifi Alexa will ask that nodeMCU and definitely, our nodeMCU is not familiar with Alexa, so we have to pretend we are a familiar brand! then Alexa will trust us.

one of the libraries that emulate Philips Hue is fauxmoESP.


The first step is installing Arduino IDE

then we go to Arduino IDE preferences and in additional Boards Manager URLs we add these 2 links:

https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json




now it's time to add fauxmoESP library, so we go Tools -> Manage Libraries and in the searching field, we enter Fuxmo then we install it!




it's time to go to the code, choose the Fauxmo example from File -> Examples -> FauxmoEsp -> FauxmoESP_basic


as you ss example is pretty simple and there are 4 different devices, but because I need just one device I just keep on them and remove the rest of it



as you see I just removed 3 devices and changed one device name, and because I'm so lazy even I don't change the variable name! :)


now everything is ready and after setting SSID and password in "credentials.h" we are ready to upload code to our ESP32(or ESP8266)





Full code: https://github.com/robotvio/smart_kitchen_fauxmo

90 views0 comments

Comments


bottom of page