Internet-connected Light Switch

by EasyIoT in Circuits > Raspberry Pi

16399 Views, 76 Favorites, 0 Comments

Internet-connected Light Switch

gpioonoff.png

In this tutorial we will show how to create internet connected switch with Raspberry Pi and relay module. You can use internet switch to remotely control up to 17 devices (light, heater,sprinkler..) over internet. You do not need programming skills.

See more tutorials at http://iot-playground.com/build

Materials

VUPN5949-1.jpg
RaspberryPi.jpg

1. Raspberry Pi

2. Relay module

Connect Wires

20141126_235521.jpg
gpio.png
1-450.gif

Conenct relay and Raspberry Pi. In this case we will use only one relay, but you can use up to 17 relays. Connect GPIO 5V VCC and GND to relay. Then connect relay IN to GPIO pin 7 (GPIO04).

Next connect relay to light or other device.

Install and Configure EasyIoT Server

enable_pin.png
addmodule.png

Download EasyIoT server image and store it to SD card. Put SD card to Raspberry Pi and switch on. Windows users can write EasyIoT server image to SD card with Win32 Disk Imager.

Go in WEB browser on computer and type Raspberry Pi IP address (computer must be on the same network as Raspberry Pi). Use username admin and password test when asked. Go to Configure->Drivers->Raspberry Pi driver and enable driver. Be sure to select right version of Raspbery Pi board. Next enable Pin_P1_07 as output.

Then go back to Configure->Groups and modules and add new module to group. And that's all. Now you can see switch on front page.

Test It

gpioonoff.png

Go on front page and select pin you just added. Try to switch relay on and off.

Check also ESP8266 only internet connected switch:

https://www.instructables.com/id/ESP8266-5-internet-controlled-switch/

See also other ESP8266 tutorials.