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.


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

<p>Prota for Raspberry Pi 3 is now available (no licence key is needed).</p><p>Download here: https://prota.info/pages/downloads</p>
<p>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?</p>
<p>Can it be used with Tasker or IFTTT? Would be nice to use it with voice commands</p><p>Awesome tut man!</p>
<p>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. </p>
<p>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.</p>
<p>I found the plug alone on ebay and its $9.00 and free shipping. </p><p><a href="http://www.ebay.com/itm/Etekcity-One-Pack-Wireless-Remote-Control-Outlet-Switch-Additional-Replacement-/141355056598?hash=item20e96afdd6:g:Z-8AAOSw3xJVbmUS" rel="nofollow">http://www.ebay.com/itm/Etekcity-One-Pack-Wireless-Remote-Control-Outlet-Switch-Additional-Replacement-/141355056598?hash=item20e96afdd6:g:Z-8AAOSw3xJVbmUS</a></p><p>This makes it better since we wouldn't be using the remotes anyway.</p><p>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.</p><p>How about ones with Z wave tech? Can that work? </p>
<p>Hi,</p><p>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? </p><p>http://www.amazon.com/Etekcity-Programmable-Electrical-Converter-Appliances/dp/B00DQELHBS/ref=sr_1_2?s=lamps-light&amp;srs=5569938011&amp;ie=UTF8&amp;qid=1437542970&amp;sr=1-2&amp;pebp=1437542980676&amp;perid=0VVP94X8FPJV0RJMYV4K Wouldnt there be something else that is cheaper that we can make with the RPI?</p>
<p>Ok, but how do i remove the switches that don't work in the OnOff app?</p>
<p>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.</p>
<p>So I am trying to make it work with the US versions of Etekcity ZAP RF433 mhz outlets </p><p>http://www.amazon.com/gp/product/B00DQELHBS?keywords=Etekcity&amp;qid=1455240999</p><p>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.</p>
<p>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: </p><p><a href="http://www.amazon.com/gp/product/B00M2CUALS?psc=1&redirect=true&ref_=oh_aui_detailpage_o06_s01" rel="nofollow">http://www.amazon.com/gp/product/B00M2CUALS?psc=1&amp;...</a></p><p><a href="http://www.amazon.com/Etekcity-Wireless-Electrical-Household-Appliances/dp/B00DQELHBS/ref=pd_bxgy_147_2?ie=UTF8&refRID=0K45HB962CHZ1PKZBQEM" rel="nofollow">http://www.amazon.com/Etekcity-Wireless-Electrical...</a></p><p>Not sure why each photo posted 3 times, But thanks for all the help!</p>
<p>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.</p>
<p>Is there a way to use these transceivers?</p><p>http://www.amazon.com/gp/product/B00NGCZC0M?psc=1&amp;redirect=true&amp;ref_=oh_aui_detailpage_o09_s00</p>
<p>Please subscribe to Prota Pioneer Memebership program and you'll get a download link once its available.</p>
<p>** UPDATE 3** <br>** New Prota OS is coming **<br><br>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)</p>
<p>or using this wireless remote switch to replace smart socket</p><p>link: <a href="http://es.aliexpress.com/store/product/RF-AC85V-110V-220V-230V-250V-1CH-Remote-Control-Switch-315mhz-433mhz-transmitter-and-receiver-Learning/804402_1998409725.html?spm=2114.04020208.3.42.RmKFj8&ws_ab_test=searchweb201556_6,searchweb201644_4_79_78_77_82_80_62_81,searchweb201560_1" rel="nofollow">http://es.aliexpress.com/store/product/RF-AC85V-11...</a></p>
<p>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.</p><p>link 1: <a href="http://es.aliexpress.com/store/product/Free-shipping-AC110V-130V-Wireless-3-Ways-On-Off-Digital-Remote-Control-Switch-LED-Lights-Lamp/734510_32536082165.html" rel="nofollow">http://es.aliexpress.com/store/product/Free-shippi...</a></p><p>it's posible?</p>
<p>I finally got an RF unit after some a unfilled orders and being messed around. grrr</p><p>I even have and old B+ and a new Pi2 to load the software on... <br>But now there doesn't appear to be a download link.</p><p>I went to <a href="http://prota.info/downloads/" rel="nofollow"> http://prota.info/downloads/ </a> but there isn't a download button?</p><p>Where do I get it?</p>
Hi! Sorry seems we've missed your comment. Send an email to edward@thenaran.com. He'll help you out!
<p>Hi, first of all, this seems like a cool project, which i am eager to try on.</p><p>I have a question though, how many rf receivers can be controlled without interuppting eachother?</p>
<p>Hi, Cool project! Thanks for sharing!!<br>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</p>
<p>- <strong>1 Radio frequency (RF) transceiver</strong></p><p><strong>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)<br>I've found this one <br></strong></p><p><a href="http://www.ebay.com.au/itm/315MHz-433MHz-Wireless-Transmitter-Module-2-2-12V-500mW-ASK-OOK-Alarm-Remote-/281773278285?var=&hash=item419aff044d" rel="nofollow">http://www.ebay.com.au/itm/315MHz-433MHz-Wireless-...</a></p><p>but wanted to make sure before ordering...</p><p>Could you confirm this one will do the job?</p><p>Thanks!</p><p></p>
<p>We checked. This should work.</p>
<p>Thank you!</p><p>Ordered and on the way. I have everything else so you should have a picture and request for a licence soon. :)</p><p>Is getting excited about automation make me a geek. :) (YES) </p>
<p>Is there an available alternative to the &quot;<strong>Radio frequency (RF) transceiver for Raspberry PI&quot; you recomended as they are no longer available. Don't want to order the wrong thing.</strong></p><p>I have the rest of the hardware it's just the RF that is missing. And of course the software. :)</p><p><br></p><p><strong>Thanks!<br></strong></p>
<p>Thanks for this tutorial. It ignited my interest in home DIY automation.</p>
<p>Great Project and I'm itching to get my teeth into it. Just got a few questions :)</p><p>I've already got a Pi V2 with a Piface installed and Clever Watts power plugs.</p><p>PiFace : <a href="https://www.sparkfun.com/products/11772" rel="nofollow"> https://www.sparkfun.com/products/11772 </a> </p><p>Will the PiFace work with your software?</p><p>Will the PiFace work with the RF Module?</p><p>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?</p><p>What is the range of the RF module? The Pi will be in the office and the plugs will be around the home.</p><p>Thanks!</p>
<p>First, Piface can be integrated with raspberry pi, we don&rsquo;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.</p><p>Secondly, you can connect rf module on Piface. just exactly connect with gpio pin.</p><p>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.</p>
<p>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. :)</p><p>Yes I was talking about the RF transmitter from &quot;aliexpress.com&quot;. I was hoping I could source something similar in Australia to get it quicker.</p><p>Just a suggestion for a future expansion/add-on... a RF extender with either &quot;WI-FI - RF&quot; device or &quot;RF re-generator&quot; 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. :)</p><p>Thank you for your reply.</p>
<p>PiFace maker made their API guide. so we don&rsquo;t have an idea if they didn&rsquo;t connect directly their pin to rpi. (i.e rf module should use gpio23 but on PiFace we don&rsquo;t know which pin gpio23 is)so if you&rsquo;d like to use some extension of gpio pin, you had better use another</p>
<p>if you want something within budged, a DTMF decoder, and old mobile phone, and a relay can do.</p>
<p>Hi. Is it possible to use your solution with 433Mhz system which is configured by jumpers? </p><p>Its usually 5 dip switches with numbers and 5 dip switches with alphabets.</p><p>I understand that one is for &quot;mesh&quot; and other one for &quot;device address&quot;.</p><p>Please let me know.</p>
<p>Could you please clarify your question? Seems not possible, but we aren't sure.</p>
<p>Hi.</p><p>From this article it appears to me, that your software only works with 433Mhz plugs that initiate pairing (certain model/vendor).</p><p>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).</p><p>Thank you.</p>
<p>To use it with 433Mhz sockets, you just need 433MHz module for the Pi and 433MHz sockets themselves. That should do the job!</p>
Excellent piece of work! Thanks! <br><br>Would love to know if there's some sort of RF transceiver that I can plug into a USB port of an existing computer. <br><br>I have a Windows 8 machine that I use as my media server. Sits there all day doing not very much. <br><br>Could you recommend software as well?
<p>*** UPDATE 2 ***<br><br>We made a live demo of prota OS with a video stream directly from our office:<br><a href="http://demo.prota.info/en/index.html" rel="nofollow">http://demo.prota.info/en/index.html</a><br><br>See how to use demo here:<br>https://www.youtube.com/watch?v=TSa7syBgcKI </p>
<p>Nice and well written instructable. Always wanted to have a connected home and work with Raspberry Pi. This is definitely my next project. </p>
<p>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?</p>
<p>Sorry, a bit slow here. I am use to wifi smartplugs. Im assuming there must usually be an expensive controller required?</p>
<p>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.</p>
<p>Any idea where to find UK plug sockets that work with this?</p>
<p>Hi,<br><br>We used Watts Clever sockets to make our own. Looks like you can find UK version on Amazon: <a href="http://www.amazon.co.uk/Watts-Clever-Wireless-Control-Sockets/dp/B00FMTC304" rel="nofollow">http://www.amazon.co.uk/Watts-Clever-Wireless-Cont...</a><br><br>Cheers!</p>
<p>Looks like you've made square antennae. Does this perform the same as a straight 17cm of wire? </p>
<p>We chose a square antenna just because of styling. Standard 17cm wire should perform even better.</p>
<p>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)</p>
<p>Are these less wonky than X10s?</p>
Very well described! I love the use of RF instead of the traditional WiFi systems. <br><br>Have you noted any interference issues?

About This Instructable




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:Cheapest Smart Home for $38 Boost Your Google Home With Prota OS for RPi DIY Smart Home Automation for Everyone 
Add instructable to: