-->
Page 1 of 3

Wifi controlled Relay

PostPosted: Tue Oct 31, 2017 6:49 pm
by WosO
I would like to create a wifi controlled realy. So far i'm considering a NodeMCU v2 + Relay + generic 5v Power adapter or a plain ESP8266 board + relay + serial adapter (would a raspberry pi 3b work for this?) + 3.3v Power supply.

It appears to me that the NodeMCU build would be slightly more expensive, but much more compact and simpler for a beginner. Is that assesment correct?

Would like to hear any and all suggestions to do this the "simplest" possible way.

Thanks for any advice!

Re: Wifi controlled Relay

PostPosted: Tue Oct 31, 2017 8:29 pm
by rudy
If you plan to switch AC power then a Sonoff relay would be the easiest low cost solution. It uses the ESP8266. You would also need a usb-serial converter to do the initial programming.

https://www.itead.cc/sonoff-wifi-wireless-switch.html

Re: Wifi controlled Relay

PostPosted: Wed Nov 01, 2017 3:04 am
by QuickFix
A Sonoff is indeed the way to go, since it's a ready made (and stable) product inside a nice case.

If you want to solder some things together yourself, you could also opt for a Wemos D1 and Wemos relay shield. :idea:

Re: Wifi controlled Relay

PostPosted: Wed Nov 01, 2017 3:17 pm
by faramon
I have done this with Nodemcu v 0.9, and with v 3 lolin, and of course relay from ebay and this works great.
My technics is done with MQTT on Nodemcu in Lua.
If you familiar with MQTT then this is great solution.
I build with free MQTT broker CloudMqtt.
If you want some more info, let me know. I will write more when I found some time or see my topic from previous topics http://www.esp8266.com/viewtopic.php?f=24&t=14433

Faramon