This is a relatively simple controller for controlling equipment in your home.

At the moment I control my central heating, security and lighting.
By sending commands from my home computer.

My homeeasy central heating controller hack.

I am also able to login remotely from the internet to control the equipment at home connected to this controller.

This project is built around an Arduino board.


The arduino board is a hardware interface allowing you to control and monitor hardware devices with your computer.

And the homeeasy home automation controllers available from B&Q.


These are basically plug-in module which allows you to switch devices on and off using a remote control.

The idea behind this project was. I wanted to be able to login to my home computer and send commands that would allow me to turn lights on remotely.
Or have the computer do it automatically at a set time or when it gets dark.

Step 1: Parts Needed

1 arduino board.
1 homeeasy controller - part number HE300
1 prototype board - Vero board
10 resistors - 47 ohm
10 led's
4 opto isolators - RS part 308-613
Some ribbon cable.
a strip of pins to connect to the headers on the arduino board.
1 box - to put it all in.
some HE302S - remote control socket


Soldering iron

Step 2: Basic Principle


Basically the arduino board when programmed will switch the digital outputs high.
Which will send 5 volts through the resistor and light the led's.
Which will activate the opto isolator which will connect the contacts on the remote control.
which will send the comand to the remote control sockets
And turn on or off the lights, heating or anything you want.

this circuit shown is for the first on and off switches.
just repeat the circuit for the following channels


I programed the software so when I pressed (H) in the terminal the arduino board will send a 1 second pulse to my remote control and switch my heating on.
when I press(h) the board will send a 1 second pulse my heating switches off.
(S) for security on
(s) for security off
(G) garden lights on
(g) garden lights off

and so on this can be changed to any button you want

Step 3: Building the Board

The board I built on some prototype project board available from most electronic stores.

It was just a matter of soldering on the components as show in the circuit diagram.
And making sure there were no short circuits.

the first led connects to pin 1 on the opto isolator, led 2 connects to pin 4 on the opto isolator.
pins 2 and 3 are then connected to ground. which is next to digital pin 13 on the arduino board.

opto isolator pins 6 and 7 are connected together and go to the center contact on the remote control for the first on off buttons.
opto isolator pin 8 goes to the left track on the remote.
pin 5 goes to the right track on the remote.

and then it's just a matter of repeating the circuit for the other channels.

Step 4: Modifying the Remote Control

I unscrewed the screw under the rear label. And carefully prised open the case.

When open you will see the PCB.
On the PCB there is one track on the left which when connected to the centre contacts will switch devices on.
And there is a track on the right which when connected to the centre contacts will switch equipment off.

I just attached the contacts to my circuit as shown in my diagram.

and soldered on a link in place of the remote switch.

Next I attached the battery to the 3v output on the arduino board.
You don't have to do this. But I did it so I wouldn't need a battery in the remote control.

Step 5: The Software

the arduino board is controlled from it's own software this can be downloaded from here.

you can then copy and paste this code in to the arduino software and upload it to the board.

char val; // variable to receive data from the serial port
int ledpin = 2; // LED connected to pin 2 (on-board LED)

void setup()
pinMode(ledpin = 2, OUTPUT); // pin 2 (on-board LED) as OUTPUT
pinMode(ledpin = 3, OUTPUT); // pin 3 (on-board LED) as OUTPUT
pinMode(ledpin = 4, OUTPUT); // pin 4 (on-board LED) as OUTPUT
pinMode(ledpin = 5, OUTPUT); // pin 5 (on-board LED) as OUTPUT
pinMode(ledpin = 6, OUTPUT); // pin 6 (on-board LED) as OUTPUT
pinMode(ledpin = 7, OUTPUT); // pin 7 (on-board LED) as OUTPUT
pinMode(ledpin = 8, OUTPUT); // pin 8 (on-board LED) as OUTPUT
pinMode(ledpin = 9, OUTPUT); // pin 9 (on-board LED) as OUTPUT
pinMode(ledpin = 10, OUTPUT); // pin 9 (on-board LED) as OUTPUT
pinMode(ledpin = 11, OUTPUT); // pin 9 (on-board LED) as OUTPUT

Serial.begin(9600); // start serial communication at 9600bps


void loop() {
if( Serial.available() ) // if data is available to read
val = Serial.read(); // read it and store it in 'val'

if( val == 'h' ) // if '2' was received

digitalWrite(ledpin = 2, HIGH); // turn ON the LED
delay(1000); // waits for a second
Serial.println("h = Heating off");
digitalWrite(ledpin, LOW); // sets the LED off

if( val == 'H' ) // if '3' was received
digitalWrite(ledpin = 3, HIGH); // turn ON the LED
delay(1000); // waits for a second
Serial.println("H = Heating on");
digitalWrite(ledpin, LOW); // sets the LED off
if( val == 's' ) // if '4' was received
digitalWrite(ledpin = 4, HIGH); // turn ON the LED
delay(1000); // waits for a second
Serial.println("s = gate off");
digitalWrite(ledpin, LOW); // sets the LED off
if( val == 'S' ) // if '5' was received
digitalWrite(ledpin = 5, HIGH); // turn ON the LED
delay(1000); // waits for a second
Serial.println("S = gate on");
digitalWrite(ledpin, LOW); // sets the LED off
if( val == 'g' ) // if '6' was received
digitalWrite(ledpin = 6, HIGH); // turn ON the LED
delay(1000); // waits for a second
Serial.println("g = Garden lights off");
digitalWrite(ledpin, LOW); // sets the LED off
if( val == 'G' ) // if '7' was received
digitalWrite(ledpin = 7, HIGH); // turn ON the LED
delay(1000); // waits for a second
Serial.println("G = Garden lights on");
digitalWrite(ledpin, LOW); // sets the LED off
if( val == 'b' ) // if '8' was received
digitalWrite(ledpin = 8, HIGH); // turn ON the LED
delay(1000); // waits for a second
Serial.println("b = Bedroom light off");
digitalWrite(ledpin, LOW); // sets the LED off
if( val == 'B' ) // if '9' was received
digitalWrite(ledpin = 9, HIGH); // turn ON the LED
delay(1000); // waits for a second
Serial.println("B = Bedroom light on");
digitalWrite(ledpin, LOW); // sets the LED off
if( val == '9' ) // if '9' was received
digitalWrite(ledpin = 10, HIGH); // turn ON the LED
delay(1000); // waits for a second
digitalWrite(ledpin, LOW); // sets the LED off
if( val == '0' ) // if '9' was received
digitalWrite(ledpin = 11, HIGH); // turn ON the LED
delay(1000); // waits for a second
digitalWrite(ledpin, LOW); // sets the LED off


Step 6: Testing

After I had set up the homeeasy module to respond to the remote.
(You can find out how to do this in the instructions for the modules.)

I loaded the software on to the arduino board.
And ran the command (H)

And my heating switches on.
I tested the other commands for the lights and security and they all responded as planned.

Step 7: Final Assembly

the last job was to fix all the boards in a plastic box and made a hole for the USB to plug in to the arduino board.

You may find when the boards are in the box the range at which they work is shortened.
If this happens you can mount the remote antenna on the out side of the box as I have done this to solved the problem I had with range. But you will have to keep the leads short or they will effect the frequency at which the antena transmits at.

Step 8: Controlling Remotely From the Internet Method 1 and 2

The computer I have connected to the arduino board is running Linux ubuntu.
But this board will work with windows, mac and Linux.

I have 3 ways of remotely controlling the board from the internet at the moment.

The first way will work with any computer. And that is using VNC to remotely login and control the board from the desktop. There are other software alternatives to remotely login.

Such as windows remote desktop.

And log me in https://secure.logmein.com/home.asp?lang=en

The second way which I use most of the time because of security.

Is to login using the Linux SSH terminal from windows using a program called putty.

you can also you do it this way using a mac.

When logged in

You can find out which device the arduino board is, by typing this command.

ls /dev/tty*

You should get a screen like this.

My device is USB0 but this can be different.

Then you can send the command.

screen /dev/ttyUSB0 9600

to open the tty terminal.

When the tty terminal is open you can then type the command to turn the device on or off. I.e. G or g for garden lights.

And that is about it.

if you have any problems here are some more usefull commands.
these comands will show you which tty services are running.
ps -lt ttyUSB0
ps ax | grep tty

this command will stop the service running.
kill (job number)

Step 9: Controlling From the Internet Method 3 (using a Script)(even From My Phone)

This is a new update I have just set up to alow me to control the arduino board from any web browser.

I wanted to control my home automation from my phone but this was not very easy using VNC or SSH.

So installed webmin on my server this will give me full control of the machine from within a web browers.

In web min there is a page called command shell that will allow me to run commands from the web browser.

I original tried to run the comands I was using in the SSH terminal. but they didn't work in webmin.

So with help from my brother we wrote a script.

so now all I have to do is send a command like "home_auto h1" and the heating will switch on. or "home_auto h0" to switch the heating off.

so now it can all be controlled from my phone

here is a copy of the script.


_usage () {
echo "gl1 it will run this comand echo G > /dev/ttyUSB0 9600 and turn my garden lights on"
echo "gl0 it will run this comand echo g > /dev/ttyUSB0 9600 and turn my garden lights off"
echo "s1 it will run this comand echo S > /dev/ttyUSB0 9600 and turn my gates on"
echo "s0 it will run this comand echo s > /dev/ttyUSB0 9600 and turn my gates off"
echo "h1 it will run this comand echo H > /dev/ttyUSB0 9600 and turn my heating on"
echo "h0 it will run this comand echo h > /dev/ttyUSB0 9600 and turn my heating off"
echo "b21 it will run this comand echo B > /dev/ttyUSB0 9600 and turn my bedroom 2 lights on"
echo "b20 it will run this comand echo b > /dev/ttyUSB0 9600 and turn my bedroom 2 lights off"
echo "N it will run this comand echo N > /dev/ttyUSB0 9600 and turn next bank of outputs on for 5 seconds"
echo "R it will run this comand echo R > /dev/ttyUSB0 9600 and turn the Relay on"
echo "r it will run this comand echo r > /dev/ttyUSB0 9600 and turn the Relay off"


case "$1" in

#garden lights on
/bin/echo G > /dev/ttyUSB0 9600 && echo "Lights On"

#garden lights off
/bin/echo g > /dev/ttyUSB0 9600 && echo "Lights Off"

# gates on
/bin/echo S > /dev/ttyUSB0 9600 && echo "Gates On"

# gates off
/bin/echo s > /dev/ttyUSB0 9600 && echo "Gates Off"

#heating on
/bin/echo H > /dev/ttyUSB0 9600 && echo "Heating on"

# heating off
/bin/echo h > /dev/ttyUSB0 9600 && echo "Heating Off"

# bedroom 2 lights on
/bin/echo B > /dev/ttyUSB0 9600 && echo "Bedroom 2 Lights On"

#bedroom 2 lights off
/bin/echo b > /dev/ttyUSB0 9600 && echo "Bedroom 2 Lights Off"

#Next Bank on
/bin/echo N > /dev/ttyUSB0 9600 && echo "Next Bank on for 5 seconds"

#Relay on
/bin/echo R > /dev/ttyUSB0 9600 && echo "Relay on"

#Relay off
/bin/echo r > /dev/ttyUSB0 9600 && echo "Relay off"

#echo $0 ": Not a valid command";
echo "Please retype command";


Step 10: Updates and Upgrades


I have now added the option of switching to the next set of button. It was just a matter of wiring in a spdt relay.

so when the relay is off the first bank of buttons are selected.

and when the relay is energised the second bank of buttons are selected.

I have also added a second relay incase I want to conect anything up in the future.

Step 11: Future Upgrades

I am now in the process of connecting light and tempiture sensors to the arduino board.
which can help automate devices.

Hi..<br>I am trying to do this project but i am stucked at a point..<br>I am not getting how to connect it to my home lights,tv and fridge with the circuit you have made above..<br>Please reply as soon as possible..<br>Thank You..
<p>just connect the lode in realy </p>
<p>You need to connect the switches of your home devices to the arduino pins.</p>
<p>connect the switch boards using relay</p>
<p>How many relay can be connected to arduino uno? Can anyone help?</p>
<p>This seems very long winded and expensive as those home plugs aren't cheap.</p><p>I've just automated a lot of things but using a WIFI shield for the arduino. It also acts as a web server and puts out a nice graphical front end to turn things on/off. Additionally instead of using all those components you have I simply bought an 8 ch relay controller for around &pound;5. Now I can turn many things on/off from the web and it works great on any mobile phone too. I've also purchased a &pound;4 RF remote kit which can also turn the volume up/down on things but again you can send signals to this over WIFI as it will be going through the Arduino 1st :)</p>
<p>Hello Shayneg,</p><p>I would like us to connect via my mail privately. I need you to put me through some things as I am about working on my final year project.</p><p>You can access me on <a href="mailto:chimelo2002@yahoo.com" rel="nofollow">chimelo2002@yahoo.com</a> or you could still drop yours. I would contact you.</p><p>Thanks</p>
<p>So via your project can we switch on/off the devices even from a great distance of about 5 or 6km??</p>
<p>Dear, Can you please specify from website <a href="https://store.arduino.cc/" rel="nofollow">https://store.arduino.cc/ </a> , which arduino board have you used to be specific?</p><p>I'm taking up this as my graduating project , please help me</p><p>Can we have a telephonic contact?</p>
<p>I made it in Simple Manner... Anyone can check in following link.</p><p><a href="https://www.instructables.com/id/Switching-Appliances-Using-Ir-Remote/" rel="nofollow">https://www.instructables.com/id/Switching-Applianc...</a></p>
<p>Your project introduced me to arduino's and is awesome. I however am using Blynk to control this from my phone. I also connected a DHT11 to send me temperature and humidity. You can expand this by using an arduino mega. My question is: how do you choose the proper optoisolator? </p>
<p>Hai Admin!</p><p>My name is Shila.</p><p>Ive 1 question.</p><p>why you choose arduino instead of raspberry pi to control home appliance? </p><p>Thanks ;)</p>
<p>The Arduino is more like an industrial programmable controller, while the Raspberry Pi is more like a personal computer. For automation with simple LED and pushbutton interfaces the Arduino is more cost-effective and can deliver better performance in direct control of hardware. However, in recent years bridge devices have appeared, allowing one to combine an Arduino board with a Raspberry Pi, providing the advantages of both.</p>
<p>Fantastic. Thank you for your time and instruction.I will be using this guide.</p>
hiii <br>i want to prepare it, but <br> <br>if i try to control 10 system with this project than ,can i do it?????? <br>reply
<p>your only limited to the number of pins on the arduino, you could, however by two arduinos and connect pin 0 (or the RX pin) of each board to each other and set one to respond to one list of commands and ignore others wile the other one responds to the commands the first one ignores.</p>
<p>how do you get the computer to atomaticly send commands to the bord? PLZ reply!</p>
<p>If you want to make your Arduino sensors wireless, try out MySensors.</p><p>Website:<br><a href="http://mysensors.org/" rel="nofollow">http://mysensors.org/</a><br>API:<br><a href="http://mysensors.org/build/sensor_api" rel="nofollow">http://mysensors.org/build/sensor_api</a><br>Github:<br><a href="https://github.com/mysensors/" rel="nofollow">https://github.com/mysensors/</a></p>
<p>This was a great project to complete after I took an entry-level learn at home course. (<a href="http://www.ciebookstore.com/home-automation-installation" rel="nofollow">http://www.ciebookstore.com/home-automation-instal...</a>) It's nice having a lab to complete after learning about home automation installation techniques and apply what I learned from my course! Thank you.</p>
I am interested in building a temperature controller for heating the mash water for brewing beer. I bought the HomeEasy HE300 and a HomeEasy socket, but the design of the HE300 circuit board has changed and I can't figure out how to connect it to the Arduino board. Has anyone out there used the newer HE300 and can identify the connections to make? <br>Thanks Andy
<p>Christ on a cookiesheet! That is going to turn out to be a difficult project for you, guaranteed. There are easier &amp; cheaper ways of putting together a temperature controller. Check out this baby from amazon: <a href="http://www.amazon.com/AGPtek-Temperature-Controller-TA4-SNRWith-alarm/dp/B00BVWYHVO/ref=lp_306533011_1_7?s=industrial&ie=UTF8&qid=1390499094&sr=1-7" rel="nofollow">http://www.amazon.com/AGPtek-Temperature-Controlle...</a> Thats right, $25 gets you PID control...! (youll have to buy a $6 thermocouple, and a $5 solid state relay, plus what ever heaters you want to use. </p>
Hello, <br>Could anyone email the document regarding Arduino Home automation to me please? <br>iem_sabie@hotmail.com <br> <br>Thank you,
thats so good budy.now i can prepare it for my home.....
&nbsp;Doing a home automation project myself using these sockets and an arduino.<br /> <br /> The main differences are that my project uses the ethernet shield and is controllable via some custom software on my mobile phone over the internet<br /> Plus that I use a 433Mhz AM transmitter and a library I created by researching other peoples work that reverse-engineered the protocol.<br /> I can transmit the code for the old simple protocol(sockets &nbsp;have dial on back) and the advanced protocol (socket have small button on front). &nbsp;So i can actually control millions of sockets all from 1 pin on my arduino.<br /> <br /> I have timers for turning on and off electric heating, water and even my electric blanket on my bed , plus I have an output for controlling my electric door lock so I can actually let in a friend when I'm not there if they call me.<br /> <br /> Code is getting rather big now as I keep adding things and might have to upgrade to a mega just for the extra space :p<br /> <br /> Who knew such a small device could take up most of my free time. ( I own 2 and probably more soon).<br /> <br /> With regards to your own project, great work and if ya want to upgrade your project to using a dedicated 433Mhz transmitter, just give me a shout and can send you my library with instruction on how to use it.<br />
Hi Matrixis,<br>I'd love to extend the home easy setup using Arduino to create a low cost main controller and low cost input devices which seem to be missing from the range (temp sensors, light sensors etc.)<br>Would you mind sharing your library and transmitter design?<br>many thanks<br>Guy
Hi Matrixis,<br><br>Do u mind sharing the library with me too?<br><br>Thanks,<br>Mojud
Hi, <br> <br> Matrixis, <br> <br> i insterested in your project , can u share it with me. <br> <br> <br> <br>thanks, <br> <br>jimmy
Holy crap! This is awesome! I've been researching X10, Insteon, misterhouse, arduino, thermostats, lights ad naseum to start doing something like this. I was focused on the Insteon PowerLinc modem to hook up to my computer, but I never thought of hooking into a remote... genius! Opens all kinds of possibilities!<br><br>Question though.... why the opto isolators? I don't know electronics very well (but I'm learning!)
Opto Isolator (aka opto coupler) provide optical isolation from the mains circuit. The idea behind it is if something goes wrong your micro doesn't get fried and protects the micro from EMF noise.<br><br>When you working with noisy loads (such as heavy mains switching via relays) the opto will usually prevent the micro from spazzing out (due to it switching, copping an emf whack, crashing, then rinse and repeating)
This is amazing in terms of smart home products. I came across http://sabinessmarthome.com the other day and saw some cool and useful products for home automation as well
hi, <br> <br>simon, <br> <br> can i use different remote control. <br> <br> <br>Thanks, <br> <br>Jimmy
Where can I get the block of 10 leds? I have looked for them but I cant find them anywhere. Can you post a link or something?
thank you !! i was looking for months to find a alternative to transitors and power hungry relays i never thought of using opto-isolators
Thank You for this wonderful idea. I'm using a different remote system but everything works fine thanks to you :)<br /> <br /> <br /> i seriously need to add some flat cables to my next project...its works but it looks very ugly ^^'<br />
Can&nbsp; you explain in a lil more detail of how to communicate via SSH. I have freeSSH server running on my windows xp machine. I can connect but none of the commands are recognized. Am I missing something here? <br />
I think I'm missing something here but I'm not sure. I don't think it can be done without something else. <br />
Kinda new to scripts just want to make sure. I add this script somewhere in my arduino sketch?<br />
if( val == 'B' ) // if '<strong>9</strong>' was received<br /> if( val == '9' ) // if '<strong>9</strong>' was received<br /> if( val == '0' ) // if '<strong>9</strong>' was received<br /> <br /> is this correct?<br />
Technically, no, but it will work since its just the comments that are screwed up.&nbsp; Should read<br /> if( val == 'B' ) // if '<strong>B</strong> ' was received<br /> if( val == '9' ) // if '<strong>9</strong> ' was received<br /> if( val == '0' ) // if '<strong>0</strong> ' was received<br /> but the code will still compile the same either way<br />
&nbsp;Thanks a lot!!!!!<br /> <br /> <br /> look this: &quot;instructables.com/id/we-controlled-valentine&quot;<br /> <br /> Can you make more digital outputs for that?<br /> <br /> T_T please I need &nbsp;a web controlled pcb with 8 outputs...<br /> <br /> I've tried but ....fail...<br />
&nbsp;Hi the server software I used was webmin.&nbsp;<a href="http://www.webmin.com/" rel="nofollow">www.webmin.com/</a>
can you post your web server? please<br /> <br />
Why does your Arduino programing interface have a space to input a letter and mine doesn't?
in the arduino software click the button on the right to open the serial terminal.
Hey! i got somthing for you. the cheaper,quicker way is to use relays :P
Hi I was going to use relays originally. But I had these bits laying around. This is all powered from the arduino board. running relays from the arduino board could overload it if there are a few on at the same time.
Well, That REALLY all sepends on where you get them.<br/>in the USA, theres this thing called a hamfest for/and computer show where you can get alot of cheep stuff.<br/><br/>i controll my relays with the dc controller shield found on arduino's website =P<br/>
Or you can control the relays with another low power relay...
haha, this i would like to see. some guy just randomly re-wiring his house using relays. that is a fire wating to happen. plus the fact this is already wireless, if you were to use relays you would need to either 1. run wires across your house or 2. find a wireless alternative. if you use wireless, it will either be cheap and unreliable or really expensive. either way this method here seems like a better choice to me really.
Sir! I need the detailed schematic. please help me sir. Or any other ways to get it. Raathigesh92@gamil.com

About This Instructable




More by simon72post:Arduino powered bluetooth remote relay switch How to back up your usb stick or camera to your android phone How to back up memory cards without a computer 
Add instructable to: