Smart Power Strip V2.0

About the project

Build your own easy or simple DIY smart power strip to control electrical devices from remotely.

Project info

Difficulty: Moderate

Platforms: ArduinoEverything ESPmyDevicesNodeMCUUbuntu

Estimated time: 5 hours

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Smart Power Strip Controller Board (4 Channel) Smart Power Strip Controller Board (4 Channel) x 1
Electrical Switch Box and other parts Electrical Switch Box and other parts Selection varies depending on factors decided to build. For this checkout Electrical connection packaging section to get a better understanding about the purchase x 1

Software apps and online services

myDevices Cayenne myDevices Cayenne
Arduino IDE Arduino IDE

Hand tools and fabrication machines

Multitool, Screwdriver Multitool, Screwdriver For connecting wires into screw terminal and electrical switches x 1
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires For cutting wires during electrical connection x 1


Here is the project which lets you turn on and off devices connected on power strip wirelessly using the Internet. You can also automate the daily repetitive task with scheduling feature, so the appliance will automatically be turned on and off on set timings.

Pre-Requisite: We need Arduino IDE software installed in PC/laptop and configure Wemos D1 board to IDE for programming.

Arduino IDE Installation and Wemos/ESP8266 Configuration

1) Arduino IDE setup:Follow the Arduino official link below to install Arduino IDE on your respective OS: On Windows -> Linux -> Mac ->

For Windows and Mac, it is pretty straight forward to install, no major problem faced during installation. But Linux user especially beginners find some issue regarding Arduino installation of which most common serial upload error issue (" avrdude: ser_open(): can't open device" ) during the first time installation. So, I recorded a video which you may follow: 

2) Configure Wemos D1 board to Arduino software: Actually, Wemos D1 board is made using the ESP8266 chip. So, to add Wemos to boards list we will have to follow steps given on esp8266 GitHub link:

Tutorial to Configure Wemos/other esp8266 boards to Arduino IDE Software

WARNING: This project include work around HIGH VOLTAGE 230V and HIGH CURRENT 5A. Electricity is dangerous so please be careful!!! You must have at least basic knowledge of Electricity or electrical wiring otherwise attempt this project under the supervision of electrical expert. I will not be responsible for any damage caused due to improper handling.

Control Board Details

Control board is equipped with most familiar ESP8266 based Wemos d1 microcontroller and 4 Relay to operate 4 Electrical devices. No headache of jumper wires and separate power adapter. This board is equipped with onboard AC(230V AC) to DC power module (5W and DC5V).

Let us check out the details of pin connection going from Wemos D1 to the various part on the baseboard and other breakouts which are available.

Wemos pin connection to Relay

Other Breakouts in case if you are interested to experiment i.e want to add some sensor like temperature, humidity or security PIR motion sensor.

Other Pins Breakout

Initial Test

So, now let us first check the working of control board before proceeding for the next steps. For this just copy and paste code to Arduino IDE provided in code section -> SmartPowerStrip_testcode.ino

Verify and upload it to the control board by selecting proper board and configuration as shown in video ->

Initial Test

Cloud Server Setup and Testing:

For this project, I have used Cayenne IoT Cloud server to operate the device. To create an account visit link:

For this step will use final code of the project given in code section-> SmartPowerStripv2_finalcode.ino

Below video shows the process to setup and configures Cayenne cloud for smart power strip project:

Cayenne Cloud Setup and Configuration

Scheduling Feature - to automate device switching operation

You can also use mobile app to operate device. Click here to download Android app

Demo Test with Cayenne Android APP

Electrical Connection :

Below is the basic wiring connection to control four Electrical appliances (here 4 Light Bulb for demo). You can go with wiring convention as followed in your countries. I have shown below the most basic configuration.

Case 1: Neutral is given to all appliances while Live is connected via Switch.

Neutral connected common to ALL while Live given via Switch

Case 2: Live is given to all appliances while Neutral is connected via Switch

Live connected common to ALL while Neutral given via Switch

Now, let's proceed for packaging. Components need for further steps are:1. Electrical Swtich box 2. Electrical Socket 3pin (your can also use 2 pin)3. Live/Phase indicator4. Plug wire 2 pin5. Electrical Switch 2way (optional, needed only if interested to control device from physical switch also)

Parts Needed

Using screw driver and wire cutter make below electrical connection with control board.Connection without 2Way switch:

Wiring without 2Way Switch

1 / 4step 1

Connection with 2Way Switch:Image below shows basic wiring technique for 2 way connection.

1 / 2 2Way Connection with Load

Relay as 2Way switch

So, to demonstrate I will show connections with first two relays. But you can try for all 4 relay.

Wiring with 2Way Switch

1 / 4step 1

Working Demo

Schematics, diagrams and documents

Project Working Block Diagram




This is the final project code for the project. Before upload, do necessary changes mention in code related to credentials.


Photo of Skyline


Maker and Electronics Engineer likes to Make and share DIY, open source Hardware projects.


Leave your feedback...