Like this:

LikeLoading...

In this tutorial we will show how to build WiFi internet connected switch connected to EasyIoT Cloud. We will use ESP8266, solid state relay and Arduino IDE. Switch can be controlled by WEB application, native Android application or button.

This internet switch is "plug and play" - it will automatically set all EasyIoT Cloud settings, so no configuration in EasyIoT Cloud is needed.

Material for switch cost about 5$.

WARNING!! You will play with LIVE MAINS!! Deadly zone!!If you don't have any experience and are not qualified for working with MAINS power I will not ecourage you to play arround! Do NOT use it without proper Knowledge about MAINS circuits ! Do NOT use it without a proper FUSE on MAINS line! Max current for solid state in this tutorial is 2A - suitable for room light only.

In program change following lines to set access point username and password and your EasyIoT Cloud username and password:

#define AP_SSID "xxx"#define AP_PASSWORD "xxx"

#define EIOTCLOUD_USERNAME "xxx"

#define EIOTCLOUD_PASSWORD "xxx"

Step 4: Hardware

In our case we use ESP8266 01, but you can use any other type of ESP8266. GPIO2 is connected to NPN transistor to control SSR. Max current for our type of solid state relay is 2A - this is suitable for room light and not for applications which consume more power - for example heater.

For power supply we use 3.3V step down module. It's very important to add 1000uF capacitor to 3.3V power line - in our case switch didn't work if we skip this capacitor. GPIO0 is connected to push button for local control of internet switch.

After power on, switch will be automatically added to EasyIoT Cloud and it will be visible in WEB interface or Android application where you can control your device from remote locations.