Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

  1

ESP8266 Internet Connected Switch (EasyIoT Cloud MQTT API V1)

ESP8266 Internet Connected Switch (EasyIoT Cloud MQTT API V1)

It’s project time! Today, going to make a switch. This Internet-controlled switch uses few components, and it’s connected to EasyIoT Cloud. You can control your devices on a computer in the EasyIoT Cloud WEB interface or with a native Android application. The Internet-controlled switch is connected via Wi-Fi connection. Our switch can also be controlled locally with the push of a button.

This tutorial is an improved version of the ESP8266 Internet-connected switch. It works with the latest version of EasyIoT Cloud MQTT broker. Two main improvements are that this uses switch information to update the state of the UI interface. If the connection to switch is broken, then the state in UI will not update. The next improvement is that in this switch, you can configure the AP username and password with a mobile phone or computer.

WARNING!! You will play with LIVE MAINS!! Deadly zone!!

No EasyIoT Cloud configuration is needed, just register to the EasyIoT Cloud service. You will need username and password to access your Internet switch via web application or Android application. The switch will be automatically added to EasyIoT Cloud and will be visible in the web interface or in the Android application after it is powered on.

The program is written in the Arduino ESP8266 IDE. Check out the Arduino ESP8266 IDE tutorial to see how to connect a ESP8266 module to a computer to upload a program. The program can be downloaded from our GitHub. You will also need the MQTT client library. Add this library to the library folder in the Arduino IDE. Our program uses the EasyIoT Cloud MQTT API.

In our case, we use ESP8266 01, but you can use any other type of ESP8266. GPIO2 is connected to the NPN transistor to control SSR. The max current for our type of solid state relay is 2A — this is suitable for room light and not for applications that consume more power, like a heater.

For the power supply, we use a 3.3V step-down module. It’s very important to add a 1000uF capacitor to the 3.3V power line — when we tried it without the capacitor, the switch didn’t work.

GPIO0 is connected to the push button for local control of the Internet switch.

ESP8266 internet switch schematic

After power on, the switch will be automatically added to EasyIoT Cloud, and it will be visible in the web interface or the Android application.

more info and full detailed guide: DZone IoT

Pinned onto ,

Likes

avatar

Related Pins

Arduino Xylophone
Arduino Xylophone
MPPT Solar Charger Testing
MPPT Solar Charger Testing
Design and Application Guide of Bootstrap Circuit for High-Voltage Gate-Drive IC
Design and Application Guide of Bootstrap Circuit for High-Voltage Gate-Drive IC
ESLOV is the amazing new IoT invention kit from Arduino
ESLOV is the amazing new IoT invention kit from Arduino
μPC1237 based 2 channel speaker protector
μPC1237 based 2 channel speaker protector
ESP8266 WeatherStation Color
ESP8266 WeatherStation Color
Keyless piano project using Arduino uno
Keyless piano project using Arduino uno
IoT Wardrobe
IoT Wardrobe
Automotive CAN Transceivers
Automotive CAN Transceivers
Restoring a vintage Xerox Alto day 8: it boots!
Restoring a vintage Xerox Alto day 8: it boots!
Sonicare toothbrush teardown: microcontroller, H bridge, and inductive charging
Sonicare toothbrush teardown: microcontroller, H bridge, and inductive charging
Reverse engineering a server CPU voltage regulator module
Reverse engineering a server CPU voltage regulator module
Building a sweet plastic MIDI controller
Building a sweet plastic MIDI controller
A DIY interactive book that uses digital gestures
A DIY interactive book that uses digital gestures
Arduino Stopwatch
Arduino Stopwatch
App note: General overview of IR transmission in free ambient
App note: General overview of IR transmission in free ambient
Sonicare toothbrush teardown: microcontroller, H bridge, and inductive charging
Sonicare toothbrush teardown: microcontroller, H bridge, and inductive charging
App note: Using Vishay infrared receivers in a Wi-Fi environment
App note: Using Vishay infrared receivers in a Wi-Fi environment
Skill Sunday: Uploading to your Arduino via a Network
Skill Sunday: Uploading to your Arduino via a Network
μPC1237 based 2 channel speaker protector
μPC1237 based 2 channel speaker protector

Top


Shares