Introduction: DIY Smart Power Sockets

Why you should make your own smart sockets?

  • Because it’s fun and you’ll learn something new.
  • Because you’ll be able to automate your home and do lots of cool things with it.
  • Because it’s cheaper than commercial alternatives, especially if you want to own multiple ones. E.g. in our office we use 7 connected sockets. Buying those off the shelf would have cost us from $260 to $350 in total, yet we did it for less than $120 and each additional socket now will cost us $11 instead for $37-$50.

The recipe

1 Raspberry PI ($39)

For example from here.

1 Radio frequency (RF) transceiver for Raspberry PI ($3)

Like this one.

1 Prota OS which will control your switches. ($0*)

Download here.

3 (or more) RF switches. ($29 for 3)

We use Watts Clever in our office, but you have to contact the supplier for smaller quantities.
Some alternatives can be found here (EU plug) and here (US plug). Make sure to match the frequency of your switches and RF module.

Bread board and jumper wires.

Micro SD card to store Prota OS and apps.

Step 1: Check If You Have Following Items.

You should have Raspberry Pi, SD card with installed Prota OS, wireless power socket (we used Watts Clever), breadboard, jumper wires, 315 MHz or 433 MHz RF module with antenna (learn how to make antenna yourself here).

Step 2: Solder Antenna to the RF Module.

Step 3: Connect RF Module to Raspberry PI Using a Bread Board and Jumper Wires.

Connect as following:

RF module’s power to Raspberry PI pin #2.
VDD -> 5V (#2)

RF module’s ground to Raspberry PI pin #6.
GND -> Ground (#6)

RF modules data to Raspberry PI pin #16.
DATA -> GPIO23 (#16)

Step 4: Turn Your Raspberry PI on and Connect to Your Wi-Fi Router.

Step 5: Install Prota OS and Visit Http://myprota.me.

Step 6: Install ON/OFF App From the App Repository.

Step 7: Just Click the Install Button.

Step 8: Go Back to Shell and Open the ON/OFF App. Then Click to Add Socket.

Step 9: Name Your Socket.

Step 10: To Discover Your Socket Press and Hold on the Button Until the LED Indicator Starts Blinking.

Step 11: When the Blinking Stops It Means That Your Socket Has Been Discovered. Click Remember.

Step 12: Now You Can Turn on and Off From Any Browser. Prota OS Supports Remote Access So You Can Control Your Appliances Even When You Are Outside of Your Home Network.

Step 13: We Recommend Making a Shortcut on Your Smartphone’s Home Screen.

Step 14: If You Wish You Can Make Advance Automation Stories. E.g. Add a Bluetooth Module and Install RFID App. Then You Can Set Prota to Turn on Your Socket When You Are Present in the Room and Turn It Off When You Leave.

Step 15: Test Your Smart Socket and You Can Always Add More.

Enjoy!

We hope this was helpful. If you have any questions drop us a line or contact on Facebook or Twitter.

You like our projects? Make your own!

We are currently (and until July 30) running a maker contest. Show us the creative projects you can do with Prota OS and win awesome prizes!

More info here - https://support.prota.info/hc/en-us/community/top...

Comments

author
Naran made it! (author)2016-06-20

Prota for Raspberry Pi 3 is now available (no licence key is needed).

Download here: https://prota.info/pages/downloads

author
jlabarge made it! (author)2017-01-03

I'm having a issue with turning the light off. I can pair my RF outlet and it turns on but wont turn off. Has anyone else had a similar issue?

author
ÁlvaroG56 made it! (author)2016-11-28

Can it be used with Tasker or IFTTT? Would be nice to use it with voice commands

Awesome tut man!

author
AustinS96 made it! (author)2016-10-24

does anyone know if i would be able to use this same raspberry pi as a wifi hotspot? Ideally im looking to have it use a sim card or other such device to use cellular data that i can access from the internet to turn the plug on or off. Thanks in advance. All my searches seemed to lead in other directions.

author
stylust made it! (author)2016-05-26

Grabbed a couple of Watts Clever sockets and a 433mhz trans (Cat: ZW3100) from Jaycar.co.nz. didn't bother with the bread borad, just used female jumper cables. Fired up the pi with ProtaPi (the config took a while via LAN) added the sockets, worked first time, awesome.

ProtaPi.jpeg
author
MichaelA91 made it! (author)2016-03-31

I found the plug alone on ebay and its $9.00 and free shipping.

http://www.ebay.com/itm/Etekcity-One-Pack-Wireless-Remote-Control-Outlet-Switch-Additional-Replacement-/141355056598?hash=item20e96afdd6:g:Z-8AAOSw3xJVbmUS

This makes it better since we wouldn't be using the remotes anyway.

I also wanted to know can we use ANY type? I have some Stanley ones I bought that since I have them I would use them.

How about ones with Z wave tech? Can that work?

author
MichaelA91 made it! (author)2016-03-31

Hi,

Ok I found how to make this project but why would we buy the plugs that will cost us around 30.00 and has the remotes and everything?

http://www.amazon.com/Etekcity-Programmable-Electrical-Converter-Appliances/dp/B00DQELHBS/ref=sr_1_2?s=lamps-light&srs=5569938011&ie=UTF8&qid=1437542970&sr=1-2&pebp=1437542980676&perid=0VVP94X8FPJV0RJMYV4K Wouldnt there be something else that is cheaper that we can make with the RPI?

author
SirSpanky made it! (author)2016-03-15

Ok, but how do i remove the switches that don't work in the OnOff app?

2016-03-15 18.16.26.jpg
author
BrendanC1 made it! (author)BrendanC12016-03-18

Pretty cool thing I just figured out, actually. If you press the button on the prota site (not on or off, just the entire box that contains the on/off buttons) and HOLD DOWN the button, an option should come up to remove it.

author
KaryF made it! (author)2016-02-11

So I am trying to make it work with the US versions of Etekcity ZAP RF433 mhz outlets

http://www.amazon.com/gp/product/B00DQELHBS?keywords=Etekcity&qid=1455240999

but have no luck getting the outlets to accept the codes that are being sent out. According to RFsniffer they are in the 11128153 range with a 350ish pulse while the Zap remotes put out a 5512451 range and a 192 pulse is there anyway to adjust these 2 settings or its only a dev side option? I dont have a clear enough understanding but I imagine the bits are incorrect for these types of outlets and they wont take.

author
Dannzig made it! (author)2016-02-03

I finally got my Prota OS installed and activated, but I am still having an issue programming my switches. When I do step 10, the blinking stops, but the socket does not get discovered. Is there an issue if I wired the RF transmitter directly to the Rasp Pi? Here are the components I am using:

http://www.amazon.com/gp/product/B00M2CUALS?psc=1&...

http://www.amazon.com/Etekcity-Wireless-Electrical...

Not sure why each photo posted 3 times, But thanks for all the help!

RFTrans.jpeg20160111_203851.jpegNo Bread board.jpeg
author
Dannzig made it! (author)Dannzig2016-02-09

Well It doesn't work here. I tried a Raspberry Pi 2, and a B+. 2 different types of 433MHZ transmitters. I tried controlling it via a laptop and from my Smart phone and still nothing. I tried 3 different antenna designs and still nothing. I am at a total loss.

author
Dannzig made it! (author)2016-02-05

Is there a way to use these transceivers?

http://www.amazon.com/gp/product/B00NGCZC0M?psc=1&redirect=true&ref_=oh_aui_detailpage_o09_s00

author
Naran made it! (author)2016-01-20

Please subscribe to Prota Pioneer Memebership program and you'll get a download link once its available.

author
Naran made it! (author)2016-01-20

** UPDATE 3**
** New Prota OS is coming **

Naran is working relentlessly to make a new version of Prota OS available to the maker community. Please be patient and stay tuned. To get notified when the download link becomes available, please subscribe to Prota Pioneer Pembership program (http://prota.info/downloads)

author
jprada made it! (author)2015-12-28

or using this wireless remote switch to replace smart socket

link: http://es.aliexpress.com/store/product/RF-AC85V-11...

author
jprada made it! (author)2015-12-28

you can change the smart socket for wireless remote switch, the reason I want to turn on lights and other things and as the socket is too big would not be possible.

link 1: http://es.aliexpress.com/store/product/Free-shippi...

it's posible?

author
Storm-E made it! (author)2015-11-07

I finally got an RF unit after some a unfilled orders and being messed around. grrr

I even have and old B+ and a new Pi2 to load the software on...
But now there doesn't appear to be a download link.

I went to http://prota.info/downloads/ but there isn't a download button?

Where do I get it?

author
Naran made it! (author)Naran2015-11-11

Hi! Sorry seems we've missed your comment. Send an email to edward@thenaran.com. He'll help you out!

author
Storm-E made it! (author)Storm-E2015-11-11

NO ANSWER IN FIVE DAYS!!!!

author
fissinissi made it! (author)2015-10-26

Hi, first of all, this seems like a cool project, which i am eager to try on.

I have a question though, how many rf receivers can be controlled without interuppting eachother?

author
shopowner made it! (author)2015-09-30

Hi, Cool project! Thanks for sharing!!
Do you think it is possible to build the RF switch into the power socket in the wall? or make it at least smaller? I mean, can we get rid of the big power socket and use the necessary parts directly into the socket wall? Thanks

author
Storm-E made it! (author)2015-09-21

- 1 Radio frequency (RF) transceiver

I've looked that one up but there are no specs and it costs 5 times what others cost when shipped to Australia. (and I'd like to buy 2 in case I blow one up)
I've found this one

http://www.ebay.com.au/itm/315MHz-433MHz-Wireless-...

but wanted to make sure before ordering...

Could you confirm this one will do the job?

Thanks!

author
Naran made it! (author)Naran2015-09-21

We checked. This should work.

author
Storm-E made it! (author)Storm-E2015-09-22

Thank you!

Ordered and on the way. I have everything else so you should have a picture and request for a licence soon. :)

Is getting excited about automation make me a geek. :) (YES)

author
Storm-E made it! (author)2015-09-19

Is there an available alternative to the "Radio frequency (RF) transceiver for Raspberry PI" you recomended as they are no longer available. Don't want to order the wrong thing.

I have the rest of the hardware it's just the RF that is missing. And of course the software. :)


Thanks!

author
PavelH2 made it! (author)2015-09-17

Thanks for this tutorial. It ignited my interest in home DIY automation.

DSC_0085.JPG
author
Storm-E made it! (author)2015-08-04

Great Project and I'm itching to get my teeth into it. Just got a few questions :)

I've already got a Pi V2 with a Piface installed and Clever Watts power plugs.

PiFace : https://www.sparkfun.com/products/11772

Will the PiFace work with your software?

Will the PiFace work with the RF Module?

There isn't much info on the RF module from the link you supplied. Do you have a link with the specs so I can do some research?

What is the range of the RF module? The Pi will be in the office and the plugs will be around the home.

Thanks!

author
Naran made it! (author)Naran2015-08-05

First, Piface can be integrated with raspberry pi, we don’t understand what integration you want exactly. Just gpio pin control is available on gpio app. Input can be controlled by using interrupt interface on gpio app, and output-relay can be controlled by using output interface on gpio app.

Secondly, you can connect rf module on Piface. just exactly connect with gpio pin.

If RF module (we made transmitter, receiver is built in socket) send the data far away, rpi should need more power. Rf module we made can send a data to receiver about 15m. so pi and socket should be placed altogether.

author
Storm-E made it! (author)Storm-E2015-08-05

Great thanks for the reply. I know it was a little garbled but you gave me what I needed to know about the Pi-Face. :)

Yes I was talking about the RF transmitter from "aliexpress.com". I was hoping I could source something similar in Australia to get it quicker.

Just a suggestion for a future expansion/add-on... a RF extender with either "WI-FI - RF" device or "RF re-generator" would be great to extend the range beyond 15 Meters. Sorry if you've already thought of it but I thought it was worth adding just in case. :)

Thank you for your reply.

author
Naran made it! (author)Naran2015-08-05

PiFace maker made their API guide. so we don’t have an idea if they didn’t connect directly their pin to rpi. (i.e rf module should use gpio23 but on PiFace we don’t know which pin gpio23 is)so if you’d like to use some extension of gpio pin, you had better use another

author
Meena_Bassem made it! (author)2015-08-04

if you want something within budged, a DTMF decoder, and old mobile phone, and a relay can do.

author
PavelH2 made it! (author)2015-07-29

Hi. Is it possible to use your solution with 433Mhz system which is configured by jumpers?

Its usually 5 dip switches with numbers and 5 dip switches with alphabets.

I understand that one is for "mesh" and other one for "device address".

Please let me know.

author
Naran made it! (author)Naran2015-07-29

Could you please clarify your question? Seems not possible, but we aren't sure.

author
PavelH2 made it! (author)PavelH22015-07-30

Hi.

From this article it appears to me, that your software only works with 433Mhz plugs that initiate pairing (certain model/vendor).

I was wondering, if it can be used for different system using same band and modulation but different pairing model (static set by dip switches).

Thank you.

author
Naran made it! (author)Naran2015-07-29

To use it with 433Mhz sockets, you just need 433MHz module for the Pi and 433MHz sockets themselves. That should do the job!

author
rblumenthal made it! (author)2015-07-30

Excellent piece of work! Thanks!

Would love to know if there's some sort of RF transceiver that I can plug into a USB port of an existing computer.

I have a Windows 8 machine that I use as my media server. Sits there all day doing not very much.

Could you recommend software as well?

author
Naran made it! (author)2015-07-29

*** UPDATE 2 ***

We made a live demo of prota OS with a video stream directly from our office:
http://demo.prota.info/en/index.html

See how to use demo here:
https://www.youtube.com/watch?v=TSa7syBgcKI

author
iamjustme made it! (author)2015-07-28

Nice and well written instructable. Always wanted to have a connected home and work with Raspberry Pi. This is definitely my next project.

author
Naran made it! (author)Naran2015-07-29

Thanks!

author
michaelomm made it! (author)2015-07-29

Im confused. How is using a store bought smart plug a DIY alternative? This looks more like an alternative way to control (in a very nice package) store bought plugs. Am i missing something?

author
michaelomm made it! (author)michaelomm2015-07-29

Sorry, a bit slow here. I am use to wifi smartplugs. Im assuming there must usually be an expensive controller required?

author
Naran made it! (author)Naran2015-07-29

Hello, here we are converting RF plugs (that would be normally controlled with radio remote) to WiFi plugs that can be controlled over the Internet.

author
nunzionuk made it! (author)2015-07-28

Any idea where to find UK plug sockets that work with this?

author
Naran made it! (author)Naran2015-07-28

Hi,

We used Watts Clever sockets to make our own. Looks like you can find UK version on Amazon: http://www.amazon.co.uk/Watts-Clever-Wireless-Cont...

Cheers!

author
elmo7sharp9 made it! (author)2015-07-28

Looks like you've made square antennae. Does this perform the same as a straight 17cm of wire?

author
Naran made it! (author)Naran2015-07-28

We chose a square antenna just because of styling. Standard 17cm wire should perform even better.

author
JoeI2 made it! (author)2015-07-28

Any way to set this up for hard-wired light switches, and stove controls (I think I left the stove on I have to run home/ No just use your phone)

author
VicP1 made it! (author)2015-07-28

Are these less wonky than X10s?

author
Just4Fun Media made it! (author)2015-07-25

Very well described! I love the use of RF instead of the traditional WiFi systems.

Have you noted any interference issues?

About This Instructable

79,942views

580favorites

License:

Bio: We are the creators of - Prota OS: an OS for smart home hub that connects all devices and services and automate them in a simple ... More »
More by Naran:Entrance Master Remote (w/ Raspberry Pi)[NO CODE] Ultimate Cloud Media ServerSmooth Ambience System With Voice Command
Add instructable to: