Paresh Pawar logo Paresh Pawar
Security

Controlling Lights with ESP8266 and Voice Assistants

By Paresh Pawar··Updated

https://github.com/pareshpawar/ESP8266MQTT

https://github.com/adafruit/Adafruit_MQTT_Library

Many people like automation and me too. This is the tutorial in which I'll be guiding you how you can control lights using Alexa or Google Assistant.

Why use MQTT and IFTTT?

The answer to this question is quite easy, We are using this because this is a very easy and reliable method to work with. I tried to use a WEMO switch emulation with Alexa Device but due to recent firmware updates Echo devices are not able to find or discover the ESP board with WEMO emulation. so this is the way that I found easy and reliable because by doing this way you can also control your lights from a phone, any browser, Alexa enabled devices, Google Assistant, Cortana and from any corner of the world where you can reach to the Internet.

What will you need?

  • ESP8266 Development Board
  • Relay Switches (I used 4-channel Relay Board)
  • Jumper Wires
  • Arduino IDE and some libraries
  • USB power supply for ESP and Relay to operate

What do you need to do?

  1. First, install the Adafruit MQTT library into your Arduino IDE.
  2. Download code from my GitHub repository.
  3. Create an account on io.adafruit.com and ifttt.com
  4. Create feeds in your Adafruit dashboard and then link those feeds in IFTTT
  5. Change the code according to your needs.
  6. Complete the circuit of relays and the controller as shown in the image below
  7. change the key in the code received from Adafruit dashboard
  8. Upload your code to your controller
  9. Test if it is working correctly and check the serial output for debugging the problems

Where to get help?

for additional help regarding this experiment search most of your problems on Google and you will get most of the solutions there. in case you didn't found anything comment down on this article and I'll try my best to help you All the best!

Related reading

P
Security

Phases of Ethical Hacking

Knowing the processes is very critical and impacts the lifecycle of your job/task. In Ethical Hacking there are some phases that you need to go through in order to complete your penetration test or the security audit.

D
Security

Detecting Load Balancer using Kali Linux

Load Balancers is a method used by my websites and organizations to distribute network or application traffic or load upon a cluster of servers. This way, Application or website operates effectively and can maintain it’s uptime, using load balancers increases the reliability…