Smart Socket ESP8266 Cayenne


This project uses an ESP8266-12E and benefits the Cayenne to make a smart outlet, in the case of using a fan for example, the user can determine the minimum temperature from which the outlet will be energized.

The air conditioners, have thermostats, since the fans do not, we often want them to be turned off or connected from a temperature, just like the air equipment, well, using Cayenne to monitor, an ESP8266 could do I also used a non-virtual local interface, an LCD display to monitor even without a computer or smartphone.

I Used:
ESP8266-12E Doit
PNP Transistor BC557
Relay 220VAC / 5VCC -1A
Two Resistors
I2C 20X4 LCD Display
An outlet
Several jumpers

NO Triggers & Alerts

NO Scheduling

Dashboard Screenshots

Photos of the Project

Here the video in my youtube channel


Cayenne_Tomada_inteligente_Ventilador.txt (6,0 KB)

Greetings to all Cayenners:slight_smile: Merry Christmas:evergreen_tree:


Hey @kwiek,

Cool project :slight_smile: Think you could post your code for others to follow along?



Hi @ bestes

It’s almost a must, I’m very busy with the opening of my Blog here in Brazil, so I do not put my complete design as I would like, but I really like the community and I will do it yes.

I think Brazil is a reference in Portuguese Cayenne, the language makes difficult, and the lack of knowledge too, so I will try to use my knowledge and my experience to help people here in Brazil.

Soon I will send an email to those responsible for the Cayenne to talk about it.


How to set up events with Arduino and Cayenne?

I added the code, I hope it will be useful for Cayennes friends :slight_smile:



Yes it is very useful :slight_smile:

Sounds very fun in Brazil! I have never been to Brazil but I very much want to go. You should post a link to your blog so we can read it. I would love to make you a Cayenne representative in Brazil…do you run maker workshops in Brazil to educate people about electronics, IoT, Arduino, etc…?



Hi bestes

I believe we have common purposes, could you send me an email to talk more about it?

These are my contacts.

My Company:

My blog in a few days:

My email to contact:

I am a dealer of several companies in the US.

I await your contact.

Thank you.