Introduction: Home Automation (or Robot Butler Called Geoffrey) - IPhone Controlled, Arduino Based

About: I'm a sound engineer with a passion for making stuff! I'm a big fan of the arduino and I really enjoy learning new programming tricks. I'm an active member of my local Hackspace with whom I've produced and …
Being able to control everything from your pocket has long been a dream shared by many. Previously we've had universal remotes that can both control our TVs and radios, then we had wireless wall sockets. Both great things, but how likely is it that you're going to be carrying around those remotes with you everywhere you go? These days almost everyone has a smartphone in their pocket, so why not use that?

So that's what I did.


I can now control electrical sockets and the main lights in my house using my iPhone. It's all totally wireless and you can set up smart run-times within it (e.g. when you press the shower button it will turn on the boiler, the bathroom lights and the upstairs lights, after 1 minute it'll turn off any downstairs lights that are still on and then after two minutes it'll turn off the upstairs lights, and after 20 minutes it will turn off the bathroom lights).

By using basic electrical knowledge, taking apart some readily available items and writing some arduino code you to can make yourself a robot butler (mine's called Geoffrey).

Let's get started!

Step 1: What You'll Need

Tools you will need:
• Knife or other flat blade
• Stanley knife
• Set of standard Phillips and crosshead screwdrivers
• Safety Torx T15 screwdriver (can be done with a standard Torx T15 but more faff and potential breaking of a flat head screwdriver may ensue)
• Soldering iron
• Solder
• Wire cutters
• Wire strippers (although this could be done with a knife)
• Multimeter

Materials you will need:
• An arduino (I’m using an Arduino Uno)
• An arduino Ethernet shield
• A RTC (real time clock) module. Adafruit do a very good kit that I'd highly reccomend (http://www.adafruit.com/products/264) but if you search for "New I2C RTC Real Time Clock Module DS1307 Arduino" on eBay you will probably find one for a fair bit cheaper (that's where I got mine)
• A set of RF plug sockets and remote. I used Maplin's Remote Controlled Mains Sockets (product code N79KA). The RF module used in these plugs is the only one I’ve coded for and as such the only one that this has been tested with. There are plenty of other brands that use the same chip (SC5262) but you will need to check this for your individual sockets. If you can’t get one with the same chip, the basic principle and the way the coding is done will still apply but you may need to do some more work to get your arduino to communicate with the sockets. You will only need one remote but you will require a plug socket for every electrical item or set of mains lights you want to control independently – (i.e. I only ever use my TV with my Xbox so when ever I turn on the one I will require the other too. This means that I only need one RF plug socket and a two way mains extension for them both to plug in to).
• Mains extensions
• Pattress block extenders (46mm depth recommended) – this is so the additional circuits will fit behind your standard light switch. One required for each set of light switches to be rewired. I bought mine at Maplin (http://www.maplin.co.uk/single-surface-pattresses-1286)
• 75mm electrical socket screws (2x pattress block extender)
• A router with at least one free Ethernet port that is also used for your WiFi network (you will also need to have access to the settings of this router)
• An iPhone or iPad (the app I’ve used and as such a fair proportion of the code is iPhone/iPad only. I’m sure there are android alternatives but you’d have to look around for them and change the code accordingly. I’ve tried to make the code as easy as possible to change the control method)
• Mains to USB power supply
• An ethernet cable
• A USB A to B cable
• Access to the mains breaker/fuse box for the building in which you’re installing this (if you don’t intend to do anything with the mains lights then you probably won’t need this)

Arduino libraries you will require:
• Adafruit’s modified RTC library (for interfacing with the clock module) – https://github.com/adafruit/RTClib
• RCSwitch library (this deals with the codes to be sent by the RF remote) – https://code.google.com/p/rc-switch/downloads/detail?name=RCswitch_2.51.zip&can=2&q=


Skills required:
• Soldering
• How to avoid electrocuting yourself when sticking your fingers into exposed light switches

Got all that? Let's get cracking!

Step 2: Opening the Remote

Essentially the RF remote will still be used to control the sockets, it's just that, rather than pushing the buttons like some sort of Neanderthal, it will be controlled by the arduino (which is in turn controlled by the touch screen on your iPhone).

To do this we will need to take apart the remote.

First, remove the battery cover, which will reveal one of the six tabs that hold the front cover to the back of the remote. Using a flat blade or a small flat head screwdriver you can now pry this apart. I ended up loosening a couple down the side first as I found it to be easier but this might not be the case for everyone.

Roughly 25mm from the bottom of the remote and 35mm from the top there are tabs on either side. Again, taking your prying instrument of choice, slide it down the small groove between the top and the bottom of the remote's casing and push these tabs until they come free. You may need to apply some levering pressure to get them to pop out properly.

Once you've done both the tabs on one side it should be much easier to release the tab in the battery compartment.

I found that loosening the tab at the top was now fairly simple (again push it with the blade or screwdriver until it pops free). I had to use a fair bit of levering pressure for this one.

Now you can just push the top of the casing against the bottom and the two tabs on the other side should pop free. If not, just repeat the initial process on the other side and you will have the top free (take a look at the photos which show where the tabs are if you're in any doubt).

You can now just pull out the circuit board. Huzzah!

Step 3: Connecting the Remote to the Arduino

We now need to solder three wires on to the exposed circuit board. One 5V, one ground, and one data control. The 5V and Ground go to the appropriate sides of the battery holder (the side with the larger spring is the ground side and the smaller side is the 5V side).

I was initially concerned about losing range if I used a 5V supply rather than the 12V the battery it was designed for but I haven’t found this to be an issue. If you do decide to use a separate power supply, make sure to connect the power supply's ground to the ground pin of the arduino else the data connection won’t work (they both need the same 0V reference)

The data wire must be connected to the Dout pin of the chip (see pictures). There is a resistor which has one side directly connected to the Dout pin (see pictures). I found it much easier to solder my communications wire to this than to the chip itself. It doesn’t matter which pin on the arduino it goes into provided you change the code accordingly. I used pin 10 and as such that's what the code will have as a default.

Congratulations! The arduino is now connected.

Step 4: Setting Up Basic Appliances Ready for Use

If you want to turn on things like TVs, speakers, lamps etc. then you can use the plugs you've already got!

Simply select which group and which channel you would like the device to have assigned to it on the back of the plug. You should note that there are a maximum of 16 possible separate plugs (four channels within four groups). You might want to consider limiting yourself to 12 as this will leave one full group free for your next door neighbour to use without them accidentally turning on and off your appliances and vice versa.

You will almost certainly want to keep a record of which appliance has been given what group and channel as you will need this later (I've got a big spreadsheet with all the information I need to program this stuff - more on that later).

To select the group and channel turn the upper and lower dials on the back of the plug (the upper dial is the group and the lower is the channel).

Plug the RF receiver into a wall socket and the appliance into the RF plug. Your appliance is now ready to be controlled by your arduino!

If you don't want to turn on the main lights in your house (or you don't fancy messing around with light switches and mains voltage electricity) then you can skip the next two steps.

Step 5: Taking Apart the RF Wall Sockets

We'll need to take apart the RF wall socket to get to the innards that will be used to control the main lights.

First use a flat blade to prise off the ring around the prongs (there are some half exposed screw holes just underneath that make this very easy). The ring is connected at the two lower bulges and at the top. Use the blade to free it from the two lower bulges and then you should be able to pry it off with your hands.

Now the two screws are exposed (they're in the holes). The screws are a security Torx T15. I used a small flat head screwdriver that I didn't mind damaging to break off the security spike in the screw and then a standard Torx T15 screwdriver to remove the screws. I would highly recommend using the correct screwdriver though to avoid quite a lot of frustration!

Once you've undone the screws you should be able to open the bottom of the socket. The top is clipped by two small plastic tabs. Lifting the bottom should cause the top just to pop out. If you're really worried about damaging the enclosure you can use a blade to push the tabs in and release the top that way.

The part we're interested is in the the part connected to the small circuit board. DO NOT touch the screw in the plastic covering at the top left of the board! This is part of the antennae and moving it, even slightly, can have massive effects on the range.

You will need to detach the three wires from the three terminals (may be a different number for different countries: I would assume the USA would only have two). The easiest way to get to the thick wires is to undo the small screw on the right hand terminal (a small flathead should do the job). You can then use a flat blade to lift the top half away from the bottom half.

Next cut the wires away from the terminals (it's best to try and keep as much wire as possible so cut as close to the terminals as you can). The released terminal is easy; the other two are fixed and a bit more fiddly.

You should now have the circuit board free from the enclosure.

On the back of the circuit board you will see the two five-element metal sections that are used to select which channel the board will respond to.

You will need to get or make two small jumpers. I just used a couple of very small lengths of wire with stripped ends. These jumpers need to be soldered on to the board to select permanently what channel the board will respond to. This can be quite fiddly and I found a circuit board holder (Panavise Jr) and helping hands/magnifier to be extremely useful here.

If you look at the back of the casing, the orientation of the numbers will be the same as the board flipped over (that is 1 and I on the far left, 2 and II at the top, 3 and III on the right, and 4 and IV on the bottom. Each centre point needs to be connected with one of the jumper leads to the appropriate surrounding point for the desired channel/group.

Congratulations! You how have the board setup to do your bidding!


Step 6: Re-wiring the Light Switches

The very first thing you MUST do is turn off the breaker for the lights/pull out the fuse for the lights.

Most houses will have a separate breaker for the lights as opposed to the appliances. If this isn’t the case, either remove the fuse for the lights (often found in the cupboard under the stairs) or turn off the main breaker for the whole house. Under no circumstances should you fiddle with the light switches if the power to those particular wires is on!

For obvious reasons this particular step is best undertaken in daylight (unless, of course, you require the cover of darkness in which case that's your own business). If that's not an option then you will need a lamp from a mains socket or a torch and a willing assistant.

Right, now back to the good part:

Use a medium sized flat head screwdriver to remove the screws on the light switch fitting. It should now come free from the wall. It may be a little bit stiff as mains power wires are quite thick and can be a bit reluctant to bend. Applying a bit of pressure when slowly pulling the switch away from the wall should get it all sorted.

Now you'll want to take a picture of the back of the switch so you know which wires went where! If there are some wires the same colour, try and mark them so you know which is which. If your switch is a single switch this should be fairly straight forward.

Next remove the wires from the switch. There will almost certainly be small screws holding them in place and you will need to loosen these first.

Take the 46mm depth pattress and make enough holes in it for all the wires to go through easily (you should be able to push out the thin pieces of plastic that are use to cover the holes in the pattress). Pull all the wires through (including a/the wire connected to earth).

Once you have the switch part completely detached from any wires and the wall take out your multimeter and set it to continuity testing mode. You will want to put the probes in the places that the wires were to check which ones connect when you flick the switch. If you have only a single switch then this will probably be unnecessary but some switches also have an inverse ganging option so you'll need to make sure you don't use that one.

Write down which connect to which when the switch is thrown.

Using that information and the picture you took earlier you should be able to work out which wires are connected when the switch is closed. These are the two wires that we are interested in for the moment.

Taking the circuit board we extracted from the RF wall socket, we need to connect the two thicker wires to the two wires that we’ve just identified. Using the block connectors, put one of the thick wires from the circuit board in one end and one of the two wires that we’ve just identified in the other and tighten it all up with a screwdriver. Do this again for the other one.

If you know which one of the wires from the light switch is always live then connect that to the one on the long side of the board.

Inside the wall recess, there will probably be a connection between the wall plate and the yellow and green striped ground wire. The small wire on the circuit board needs to be connected to this ground.

Once it’s all connected, flick the breaker back on/replace the previously removed fuse and test it out. If it doesn’t work, turn off the breaker/remove fuse again and try swapping around the large wires from the circuit board. Test it again. If that doesn’t work make sure all is connected properly (particularly check the ground connection). If you can, try checking with an unmodified remote to see if it is a range issue.

Step 7: Setting the IP Addresses of the Arduino and IPhone

First stack the Ethernet shield atop the arduino (if it’s an Arduino Uno it should just slot on; if it isn’t check out the www.arduino.cc website for advice).

Plug the Ethernet shield into the router. The next stage is to give the arduino and your iPhone or iPad a permanent IP address each (I will refer to the controlling device as an iPhone from here on in as that’s what I used). This means that they will be able to communicate with each other over your home network.

Find the IP address of your router (for mac users you can find it by going into the network settings within systems preferences, selecting Airport, pressing Advanced and going to the TCP/IP tab). Open up your internet browser of choice and type in this IP address. The web page that opens should be the setting page for your router. You will probably be asked for a username and password (the username is normally “admin” and if you haven’t changed the password “changeme” is usually a good bet – this information is on the back of many routers).

You will need to go into the advanced settings. It will probably ask you whether you are sure and warn you that you can royally stuff up your router if you start clicking things randomly. You will want to find the section that lists all currently connected devices and their IP addresses (for me it was in the "devices" menu).

Find your Ethernet shield (you can look for the MAC address which will be printed on the bottom of your shield). Now you will need to reserve an IP address for this device. This is often just a tick box next to the device and this will mean that, whenever that device is connected to the network, it will be assigned the same IP address and that no other device can be assigned that address. Once you’ve done that, find your iPhone on the list of connected devices and do the same thing. Copy these down, as you will need to input them into the arduino code.

Step 8: Updating the Code With Your IPhone and Arduino Connection Specifics:

There are two versions of the arduino code attached. The older version is tried and tested but isn’t quite as easy to understand/modify. The newer version is far easier to understand and modify but I haven’t had a chance to test it out yet. I will update this instructable as soon as I get the chance to test it properly but until then I will leave instructions about modifying both sets of code.

Open up one of the arduino sketches. A few lines in you will find a section labelled
“////////////////  NETWORK INFO  ////////////////”

You will need to change the MAC address to that of your ethernet shield and update the shield's IP address to the one you reserved for it earlier.

Next update the IP address for your iPhone in the sketch.

The port number MUST be the same for both devices. I would recommend using 7777 as, unless you know it’s already being used by another of your projects, it is likely to be available for use. If it isn’t try using other numbers between 7718 and 7776

Your iPhone and arduino are now able to communicate! Smashing.

Step 9: Setting Up Ardumote on the IPhone

You will need to download the Ardumote app from the app store (https://itun.es/gb/RVIXA.i). On opening it you will notice a “+” symbol in the bottom right hand corner. Holding this down will give three options as to what kind of interface you want: a button, a toggle, or a slider.

A button will send a one-time message (useful for telling the system to run things like the shower run-time), a toggle will send a specific on or off message (useful for things like turning lamps on and off), and a slider will send a number from 0-255.

Choose which type of selector you’d like to use. Hold down the selector and you will be given the option to either to select the parameters or delete the selector. Click “Set Params”.

The first option will be to name the selector. This is what will identify it to you on the iPhone; name it sensibly!

The next box to fill out is the IP address of the Arduino (NOT the iPhone!). Fill this in as you filled it out in the arduino code. When you’ve done this once it should be automatically filled out for any more you create.

The next is the port number. This number is discussed in the previous step “Updating the arduino code with your iPhone and arduino specifics” but 7777 will normally do it. Make sure that the number in the arduino code and the one you enter here are the same.

The fourth box is “Message”. This is the data that’s sent to the arduino, which will identify the particular selector (i.e. the arduino will differentiate between the shower button and the entertainment button with this message). I would advise using a letter common to all which will help identify it to the arduino and then use a number afterwards to identify it as the specific selector. If you are using between 10 and 99 selectors then you will need to use a two-digit number. Take note of these numbers in the same place that you wrote down the group and channel numbers for each appliance. If you are using a “toggle” then when it’s on it will send your message followed by an “H” (for high) and when it’s turned off the message will be followed with an “L” (for low).

The next and final message is the number of times it will send the message when it’s pressed. Once should be sufficient but if you’re having issues then try increasing this number.

You can move all the selectors around easily on the screen.

And there you go; your control surface is now set up!

Step 10: Modifying the Arduino Code for Your Equipment – Old Code

There are two versions of the code attached (in step 8). The older version is tried and tested but isn’t quite as easy to understand/modify. The newer version is far easier to understand and modify but I haven’t had a chance to test it out yet. I will update this as soon as I get the chance to test it properly but until then I will leave instructions about modifying both sets of code.

This step will deal with the old code:

Scrolling down roughly half way, there is a section headed
“/////////////// The following section is for turning on and off individual devices ///////////////”

This is the section that will need to be dealt with first.

There follows 12 lines of very similar looking code for the different appliances/lights.

The first line of each if statement follows the same structure:
else if (packBuff[0] = 'P' && packBuff[1] == 'x' && packBuff[2] == 'x')

This is the section in which you specify which selector from your phone you are referring to. For instance, if you wanted to specify what should be done when you press a button that is setup to send the message P04 you would change the above code to:

else if (packBuff[0] = 'P' && packBuff[1] == '0' && packBuff[2] == ‘4’)

Because all toggles have two messages that can be sent (sticking with the P04 example it can be either P04H or P04L depending on the state to which toggle has been changed) there needs to be some logic to process the two separately. As they both start with P04 it makes sense to have a second nestled if statement.

if (packBuff[3] == 'H'){

This tells the code what to do if it is turned on. The statement two lines lower:

else {

tells the code what to do if the last letter is not H (i.e. L) which means you can specify what you want it to do when it’s turned off.

If you are using a button rather than a toggle you can get rid of the nestled if statement as there won’t be an additional H or L in the message.

The line of code just under the if “(packBuff[3] == 'H'){“ is the action to take when it’s on.

setOnOff(3, 1, true);

This calls a method named “setOnOff”. The code for this can be seen at the bottom of the sketch. It takes care of turning the devices on and off, and for feedback through the serial port. The layout of the code is:

setOnOff(int group, int plug, boolean on)

So, if I wanted the plug that was setup as group 3, channel 4 to turn on I would write:

setOnOff(3, 4, true)

If I wanted to turn the same plug off I would write:

setOnOff(3, 4, false);


To modify the simple on/off of individual devices you will need to fill in the correct messages to be read (e.g. the P04 in the previous example) and fill in the correct switch to be affected and whether you want it on or off (e.g. the switchOnOff (3, 4, true) in the previous example).

At the end of each turn on/off of each individual device there is another line of code:

multiOff = 1

This line means that, when the button is pressed, it will stop any run-time that involves delayed on/offs. Its purpose is to stop anything from being randomly turned on or off when you have finished the activity sooner than the run time was expecting. If you don’t want a particular button to cancel current run times then either comment out or delete this bit of the code.

The next stage deals with buttons that, when pressed, will affect more than one plug socket (e.g. entertainment turning on or off the TV, Xbox and sound system, or All lights on/off). For these you quite simply have more than one “switchOnOff” term (see examples of this already in the code).

The next, slightly more involved, section is the “run-time” section. Setting up timing automations requires a few more changes.

The first thing to do is to declare two variables before void(setup): one int that will act as a boolean and one unsigned long that will store the current time.

When a run-time button is pressed you will want it to set on or off anything that you want done at the start. You will then need to set the unsigned long to the current time (in seconds since January 1st 1970) and then the int to 1 (e.g. teethStart = now.unixtime(); and teethActive = 1;).

When the int == 1 the run-time will begin. The run-time must be specified before the section in which you state what happens when each button is pressed. Start with an if statement that checks to see if the int == 1. If so, then start the run-time (e.g. if (teethActive == 1){ ).

The next section will be the first with timing elements. By setting up if statements involving time queries you can set things to turn on and off at a given number of seconds after the button was initially pressed.

For instance, if you want something to turn on/off after two minutes then the syntax is:

if (teethStart+120 == now.unixtime()){

This is basically checking if the current time is the same as the time the button was pressed plus 120 seconds.

At the end of a run-time statement the activation int should be set to 0 so the run-time is no longer checked through (making the whole system more efficient).

The active int variable (e.g. teethActive) must be added to the multiOff statement.

There is another section, which makes sure that no more than one run-time can be active at any one time. It keeps the latest one to be turned on running.

In this section all the activation ints are summed and if the result is greater than 1, more than one run-time is active concurrently. If this is the case then the times at which the run-times were started are compared and the run-time with the greatest number (the one that started last) is kept active. You will need to add any additional run-times to this section but looking at the code that’s already there it should be fairly self-explanatory.

Step 11: Modifying the Arduino Code for Your Equipment – New Code

This step will deal with the new, as yet untested, code:

At the bottom of the code you will find individual methods for each switch or light (e.g. kitchen, bedside, etc.). When you add a new item or if you just want to change any that are already there this is the section you will need to edit first. The structure of an individual on/off method is:

void switchName (boolean on, boolean multioff){

The two Booleans are whether the switch is to be turned on (true) or off (false) and the second is whether it should turn off any timed run-times (to make sure that things don’t randomly turn on/off if you finish requiring a run-time before it expects you to be finished).

The if statement within the method determines whether the switch is turned on or off using a line of code that looks similar to this:

setOnOff(x, x, on);

this calls a method named “setOnOff”. The code for this can be seen towards the bottom of the sketch. This takes care of turning on and off the devices and for feedback through the serial port. The layout of the code is:

setOnOff(int group, int plug, boolean on)

The boolean “on” in each device’s method already says whether you want it to turn on or off so you only need to change the group and plug values for each device. For instance if I wanted to turn on the plug 4 in group 3 then I’d write:

setOnOff(3, 4, on);


Scrolling down roughly half way, there is a section headed
“/////////////// The following section is for turning on and off individual devices ///////////////”

This is the next section that will need to be dealt with.

There follows 12 lines of very similar looking code for the different appliances/lights.

The first line of each bit follows the same structure:
else if (packBuff[0] = 'P' && packBuff[1] == 'x' && packBuff[2] == 'x')

This is the section in which you specify which selector from your phone you are refereeing to. For instance, if you wanted to specify what should be done when you press a button that is setup to send the message P04 you would change the above code to:

else if (packBuff[0] = 'P' && packBuff[1] == '0' && packBuff[2] == ‘4’)

Because all toggles have two messages that can be sent (sticking with the P04 example it can either be P04H or P04L depending on the state the toggle has been changed to) there needs to be some logic to process the two separately. As they both start with P04 bit makes sense to have a second nestled if statement.

if (packBuff[3] == 'H'){

This tells the code what to do if it is turned on. The statement two lines lower:

else {

Tells the code what to do if the last letter is not H (i.e. L) which means you can specify what you want it to do when it’s turned off.

If you are using a button rather than a toggle you can get rid of the nestled if function as there won’t be an additional H or L in the message.

The line of code just under the if “(packBuff[3] == 'H'){“ is the action to take when it’s on. For instance if you want the desk lamp to turn on you call the “desk” method and tell it that you want it to be on and that you want it to turn off any run-times that are currently going:

desk(true, true);

In the “else” statement you will want to turn off the same switch and again for it to cancel any run-times that are currently in action:

desk(false, true);

If you would rather this particular button didn’t turn off any run-times then the second variable needs to be set to false (i.e. desk(true, false); and desk(false, false);)

The next stage is buttons that, when pressed, will affect more than one plug socket (e.g. entertainment turning on or off the TV, Xbox and sound system, or All lights on/off). For these you quite simply have more than one individual device method called (see examples of this already in the code).

The slightly more involved section is the “run-time” section. Setting up timing automations requires a few more changes.

The first thing to do is to declare two variables before void(setup). One int that will act as a boolean and one unsigned long which will store the current time.

When the button is pressed you will want it to set on or off anything that you want done at the start. You will then need to set the unsigned long to the current time (in seconds since January 1st 1970) and then the int to 1 (e.g. teethStart = now.unixtime(); and teethActive = 1;).

When the int == 1 the run-time will begin. Before the section where you specify what happens when each button is pressed the run-time must be specified. Start with an if statement that checks to see if the int == 1. If so, then start the run-time (e.g. if (teethActive == 1){ ).

The next section will be the first with timing elements. By setting up if statements involving time queries you can set things to turn on and off at a given number of seconds after the button was initially pressed.

For instance, if you want something to turn on/off after three minutes then the syntax is:

if (teethStart+120 == now.unixtime()){

This is basically checking if the current time is the same as the time the button was pressed add 120 seconds.

At the end of the statement in a run-time the activation int should be set to 0 so the runtime is no longer checked through (making the whole system more efficient).

The active int variable (e.g. teethActive) must be added to the multiOff statement.

There is another section, which makes sure that, no more than one run-time can be running at any one time. It keeps the latest one to be turned on running.

In this section all the activation ints are summed and if the answer is greater than 1 then more than one is active at the same time. If this is the case then the times at which the run-times were started are compared and the runtime with the greatest number is kept active. You will need to add any additional run times to this section but looking at the code that’s already there it should be come fairly self explanatory.

Step 12: Wiring Up the Arduino

You may need to solder a few wires to the RTC module yourself in which case the ones that we will need are Vc++, ground, SCL and SDA.

The communications wire we soldered on to the RF remote will need to be plugged into a single digital pin on the arduino. This is specified in the code (the fourth thing defined in void setup). If you haven’t changed this bit of the code then it will be expecting pin 10.

You will need to connect up the V++ (or 5V) of the RTC module and the positive side of the RF remote to the 5V pin on the arduino (use breadboard for this). The  Ground wires on both the RTC module and the remote must be connected to the arduino’s ground pin. Next, connect SDA to A4 and SCL to A5.

Next just make sure the ethernet shield is attached and plugged into your router. Finally, plug in the USB cable to the arduino and the mains power to USB adapter and away you go.

Boom! You are now ready to use your phone to control your house!

If you enjoyed this instructable then please feel free to vote for it in one or more of the competitions I've entered it for. I'd love to be able to keep expanding Geoffrey's capabilities.

If I were to win the Arduino Contest I would be able to include the GPS module which I'd attach to my bike allowing me to get Geoffrey to turn on the outside lights when I was close by and to put the kettle on when I'm the appropriate distance away. By using the pcDuino and the Raspberry Pi I would be able to get Geoffrey to control all my media too (who doesn't want to be able to let Geoffrey know that you're bring back someone special and for him to turn on the smooth jazz, soft lighting and a looped video of a fire place playing on the TV?!)

If I won the Remote Control Contest I would look to try and turn the Parrot AR.Drone 2.0 into an Automatic Airborne Beer Delivery Device and augment Geoffrey with the ability to give me a beer when asked (I'd 3D print some way of easily grabbing the beer and then augment it with something like this: http://kck.st/13nWTV3 to identify the beer). Obviously, I'd post an instructable on this too! I'd also love to use it to make some awesome videos (it's one of those things that I've wanted for ages but just never been able to justify buying). The Nexus 7 would enable me to give coding Geoffrey for Android systems a shot. With the additional flexibility offered by an Android system I would hopefully be able to do far more cool things with Geoffrey (and I'd then produce some code for everyone who wants to use it on their android devices). It would also mean I'd have another control surface which would pretty awesome! 

If I were to win the Weekend Projects Contest I would be able to take much better pictures for my instructables (you probably noticed that the macro setting on my current camera really isn't up to scratch for this sort of thing). The voucher from Zoro Tools would allow me to buy more tools and better tools meaning I could make even cooler projects in the future! The Nexus 7 would also allow me to do all the Android stuff I've already mentioned.

Thanks for reading and I hope you enjoy making your own Robot Butler! Feel free to message me or post a comment if you've got any questions!

Remote Control Contest

Participated in the
Remote Control Contest

Arduino Contest

Participated in the
Arduino Contest

Weekend Projects Contest

Participated in the
Weekend Projects Contest