top of page

Alexa controlled Ceiling lights. 

I made this back in Feb of 2021. It really bugged me out how in my room everything was Alexa controlled apart from my ceiling lights. I remember studying about how Relays work but it was just then that struck my mind how I could remove the actual switch in my room and fit a relay in the wall along with Node MCU to wirelessly control my lights. I quickly made a circuit on my desk and coded the node MCU to work with Alexa controlling the lights.

20220102_114450.jpeg
20220102_114428.jpeg
20220102_114433.jpeg
20220102_143509.jpeg
IMG_9688.JPG

Insights and Coding

The coding is fairly simple. It just switches on and off pin number 5 on the Node MCU which is connected to the signal pin on the relay. A micro USB cable goes into Node MCU to power both itself and the relay. 

 

The relay's common, closed and open are connected to the 3 wires coming from the wall. These 3 wires are typical in most homes that have a 2 way light switch. 

​

I use a website known as Sinric pro. When I tell Alexa to switch on the lights, it first tells Sinric pro which in turn tells my code to turn on the lights. This next screenshot is only a part of my code. 

Screen Shot 2022-01-03 at 11.16.57 AM.png
  • Twitter
  • LinkedIn

©2025 by Rehan Agrawal

bottom of page