Step 3: Measuring the Dimension of Components.

At first I measured the dimension of the AC Socket followed by the mains switch.Meanwhile I transferred the measured data on the enclosure.Talking about the enclosure I used this 10*6*2 cm enclosure which was perfect for this project.Once the measured data was transferred on the enclosure I used a rotary tool to cut out every single holes and used a 5mm drill bit for the leds which will later act as an indicator.Then I drilled a 8mm holes on the side of the enclosure for the mains wire to feed through,

Step 4: Setting Things Up !

Then I solder the mains wire on the power supply module which will deliver us 5V for the arduino,Bluetooth and relay to get power.After that I hot glued the board on the base of the enclosure followed by the relay module keeping a distance of 1.5cm in between for the mains switch to sit.Connect the mains switch in parallel with the relay module so that in case your smart plug fails you'll still have a way to turn on/off your appliance manually.

Connect the mains wire in parallel with the ac socket keeping the relay module in between( ie in series with ac socket)

Step 5: Control Electronics.

I used the arduino promini beacuse of its small size.Connections were made as per as the schematic.I used pin13 which will be the power indicator for the device and connected a red led to it.Then I used a RGB led trimming off the red terminal for the status led(Green) and for the temperature alert(Blue).The code was uploaded using a TTL converter/FTDI.

For the App I used a online software called MIT app inventor if you are curious.