loading

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

Step 1: Materials

1. Raspberry Pi

2. Relay module

Step 2: Connect Wires

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.

Step 3: Install and Configure EasyIoT Server

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.

Step 4: Test It

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.

<p>is it only useable if the computer and the pi is on the same network? if so, can it be done so it is possible to connect thru the web, for example, on the phone so i can start my pellet oven some hours before i come home?</p>
<p>can we do this with an arduino?</p>
<p>Yes, you can do this with EasyIoT server on Raspbery Pi and Arduino as node. On Arduino node you can implement switch or relay (see architecture on our website). Right now EasyIoT server supports MySensors protocol (NRF24L01 module) to communicate with EasyIoT server, but in next release we will add ESP8266 WiFi module and you will have more options to connect Arduino with EasyIoT server.</p>
How would you connect the relay to light?
<p>Hi, light is connected in serial with relay. I updated instructable with picture.</p>
Thanks!

About This Instructable

11,844views

75favorites

License:

More by EasyIoT:ESP8266 Controlling 4 Relays ESP8266 Door/window Sensor With SMS Alarm ESP8266 $5 internet connected switch - improved 
Add instructable to: