Internet-connected Light Switch




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

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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:

See also other ESP8266 tutorials.

Be the First to Share


    • Assistive Tech Contest

      Assistive Tech Contest
    • Reuse Contest

      Reuse Contest
    • Made with Math Contest

      Made with Math Contest

    8 Discussions


    Question 7 months ago

    Hello, i am trying to create the same project using raspberry Pi 3 b+ which already include Wi-Fi, do i need the NRF24L01 to make it work? because i wired and set everything like yours appart of the the pin 07 as a buzzer on step 3 because i cant find the buzzer and when i press the switct it doesnt work. Any idea why is not working? Many thanks.


    4 years ago on Step 3

    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?

    1 reply

    Reply 2 years ago

    yes, you can use this over internet but you have to setup few things. like webhost as well as you must know where to send the command in which you need domain name or you can also use kind of service for this in free of cost. google it you get more detailed information on this.

    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.